The flow
- I decide
- An agent acts
- A gate checks
Numbers match the steps below.
Steps
-
An agentNeeds to act on another machine
Deploy a service, pull a repository, use a secret. The agent does not pick a route. It uses the one credential it holds.
-
The keyLimits what the key can do
Agents reach other machines with standing keys, each limited to addresses on the private network and stripped of everything but a command channel. Hosts that only pull code hold one read-only deploy key per repository, so a leaked key can read one thing and write nothing. Secrets are read through a password manager only, never from the operating system’s keychain, chat or files.
-
The deploy gateRuns one forced command
The receiving end of the deploy key runs one fixed script whatever the client asks for. It accepts only a status check or a deploy, for a short allow-list of services. There is no shell, no terminal and no forwarding. The edge and the platform’s own configuration are refused by name, and every call is logged.
-
An agentActs inside that grant
A deploy fast-forwards the main branch and nothing else. Code reaches that branch by pull request and auto-merge, never by a direct push. The agent’s source-control token has no administration permission, so it cannot lift branch protection.
-
Pull request checksHold sensitive changes
CI must be green. A separate check blocks auto-merge on changes to CI workflows, SSH or sudo handling, network exposure, the deploy gate and the edge configuration, until a label is applied that only I apply.
-
MeReview what is reserved for me
Applying that label, edge deploys, deploys that need root, waivers, security code fixes, major version bumps, anything touching auth or data, and every permanent delete. The account-level powers, such as network policy, DNS, the router and the account key, stay with me alone.
-
An agentStops and asks, never reroutes
A refused command, or a connection that hangs and then fails authentication because the password manager is locked, ends the attempt. The agent does not switch to another protocol, the keychain or another key. It reports state and side effects. After two failures of one automation it hands over the manual steps.
-
MeApprove, then the agent retries once
I unlock the password manager, or do the step myself. My own key asks for a prompt on every use, so nothing I hold can be used silently.
Guardrails
Hard stops
- The deploy key runs one forced command, with every extra feature off, and works only from the private network.
- Read-only deploy keys cannot push.
- Required checks block auto-merge on sensitive changes.
My call
- The label that releases sensitive changes, edge and root deploys, waivers.
- Every permanent delete: the exact command is parked for me to run.
- Each use of my own key: a prompt on every use.
Stop, ask, retry once
- A connection that hangs, then fails authentication, means the password manager is locked: ask me, retry once, never switch route.
- A refused gate command exits with an error, and a failed deploy is fixed by a revert, then a new deploy.
- Two failures of one automation: stop and hand over the manual steps.
Who holds what
Each kind of actor holds one narrow credential. I hold a personal key that prompts on every use and reaches everything I own. Agent sessions on my workstation hold standing keys that reach the other machines on the private network and nothing else; they cannot touch the account-level powers. Unattended jobs hold a scoped source-control token and the deploy key, which can run a status check or a deploy of a few named services and nothing more. Hosts that only pull hold one read-only key per repository.
One boundary is worth naming plainly: the sensitive-change label is a rule agents follow, not an identity check, which is why it stays mine.
The idea
Give every actor the smallest credential that does its job, and put a gate on the receiving end, not just a promise on the sending end. A key that can run only one command cannot be talked into anything else. Then make the failure mode boring: when a gate says no, the agent stops and asks, because an agent that hunts for another route is the real risk. What remains for the human is short and explicit, so the list of things only I can do stays small enough to keep.