A Developer Runs Coding Agents Around the Clock on a Refurbished Dell and Moved Deploy Keys Out of CI. An Agent That Can Edit a Workflow Can Read Its Secrets. Here Is the Check I'd Run on My Repo.
On November 29 Dmitry Kudryavtsev published a long write-up of what he calls a self-hosted software development factory: Claude Code sessions that pick up issues and work on them at any hour, running on hardware in his home. The core machine is a refurbished Dell Optiplex Micro 7010 with a 13th-generation Core i5 and 32 GB of RAM, joined by a Lenovo ThinkCentre Tiny.
I read the whole thing expecting to envy the homelab. The part I came away wanting to copy was a security decision that applies to a plain GitHub repo with one agent on it.
The setup in two paragraphs
Both machines run Proxmox. Every project gets its own virtual machine, created from a template with cloud-init and then configured with Ansible, driven by a small CLI he wrote. Two VLANs separate the dev machines from supporting services such as git and CI, with narrow firewall holes between them. Forgejo hosts the code. An issue labelled ready gets picked up by a Claude Code instance in a tmux session, moves through research, plan and implement stages, and ends as a pull request. The main branch is protected, agents cannot push to it, and he reviews everything that merges.
Agents never hold API keys. A secrets proxy (he uses Infisical's agent-vault in its own container) sits between each VM and the outside services, and the VM trusts the proxy's certificate. He notes that standalone agent-vault is no longer the recommended way to use it and that he plans to replace it.
He gives no prices, no power figures and no throughput numbers, and he describes parts of the tooling as 99% vibe-coded. Read it as one person's working notes.
The hole he found in his own CI
His deploys used to run as Forgejo Actions. That meant the CI system's secret store held the SSH keys for production. Then he saw the problem: an agent working in a dev VM can create a branch, and a branch can contain a new workflow file. A workflow that prints or exfiltrates its secrets is a few lines of YAML. Protecting main did nothing, because the workflow would run from the agent's own branch.
His fix was to take deploy credentials out of CI altogether. Deploys now run from Semaphore UI, a separate system that holds the keys and runs a deploy script. It is triggered by a webhook when a CI run finishes on main. CI still runs checks on every branch, but nothing an agent can touch has access to production keys.
He is honest about what remains. An agent can still write malicious code that passes his review, gets built into an artifact and is deployed. Review is the only control on that path.
Why this applies to a plain GitHub repo
Swap Forgejo for GitHub and nothing changes. Repository secrets in GitHub Actions are available to workflows that run on any branch pushed to the same repository. If your coding agent has a token that can push branches and modify files under .github/workflows/, it can add a workflow that reads every repository secret. Nobody has to merge anything.
I am not suggesting a model will decide to do this unprompted. The realistic path is prompt injection: the agent reads a poisoned issue, web page or dependency README that tells it to add a "CI fix", and it complies. Last week's posts here on GitHub's pull_request_target change and the 1Password backend incident were about the same class of problem, which is code reaching a privileged pipeline without a human in between.
The check I'd run
It takes about fifteen minutes on a small repo.
List the repository's Actions secrets and mark the ones that can change production: deploy keys, cloud credentials, registry tokens, database URLs.
Move those into a GitHub environment, for example one named production, and restrict that environment's deployment branches to main. Environment secrets are only released to jobs that target the environment, and the branch rule stops a job on any other branch from doing so. Add yourself as a required reviewer on the environment if you want a manual gate on every deploy.
Protect main so that changes need a pull request, and make sure the agent's identity cannot bypass the rule.
Look at the token the agent uses. A fine-grained personal access token needs the Workflows permission to change files under .github/workflows/. If the agent has no reason to edit CI, leave that permission off, and pushes that touch workflow files will be rejected. This is the cheapest control on the list and the one I would do first.
What stays in plain repository secrets after this should be low value: a token for a test service, a coverage upload key. Assume the agent can read those.
What I would not copy
The homelab itself. A VM per project with VLANs, a DNS server, a DHCP relay and a custom webhook harness is a second product to maintain. Kudryavtsev says as much when he mentions the complications around DNS and firewall rules. For a solo operator with one or two repos, a container or a cloud dev environment per project gets most of the isolation for a fraction of the upkeep.
I would also be slower than he is to put production deploys behind an automatic trigger when agents write most of the code. His design deploys what lands on main. Mine would keep a manual approval on the production environment until I had a few months of evidence about what my review catches.
Where this could be wrong
Environment protection rules depend on your GitHub plan for private repositories, so check that the branch restriction is available on yours before relying on it. If it is not, his approach of moving deploys to a separate system that holds the keys works on any plan.
And the residual risk he names is the bigger one. Moving keys out of reach stops the cheap attack. It does nothing about code that looks fine in review and misbehaves in production. No setting fixes that. Smaller pull requests and reading them properly are the only answer I have.
What I'd actually do
If an agent can push to your repo today, remove the Workflows permission from its token before you do anything else. Then move production secrets into a branch-restricted environment this week. The self-hosted factory is an interesting read and an optional project. The secrets check is something I'd do today on any repo an agent can push to.
Author
Lukas
@lukcombinator