The agent can read everything and change nothing
GitHub's Agentic Workflows went generally available last month, and InfoQ's write-up this week is worth reading for one design decision more than for the product itself. You describe a task in Markdown with a bit of YAML frontmatter ("triage new issues", "explain why this CI run failed"), and gh aw compiles it into a normal GitHub Actions workflow. The agent (Copilot CLI by default, or another coding agent you bring) runs in a sandboxed container behind what GitHub calls the Agent Workflow Firewall. It starts with read-only permissions. Always.
Anything the agent wants to change, whether a comment, a label or a pull request, comes out as a proposed output. A separate job, with its own write token, applies it. Between the two sits a threat-detection job that scans the proposal before it lands. The agent never holds a token that can write to your repo.
That's the whole idea, and it's the right one.
Why the split matters more than the sandbox
Most teams wiring agents into CI do the obvious thing: give the agent a token with the scopes the task needs and tell it to behave. The agent reads an issue, decides to open a PR, and opens it, all under one identity in one process. If the issue body contains instructions aimed at the agent, that same process is the one holding the keys.
GitHub's structure doesn't remove the prompt-injection problem. It changes the blast radius. An agent that gets talked into something can only produce a proposal. The proposal goes through a scanner and then a job the agent doesn't control. You can add a GitHub Environment protection rule so a human has to approve before the write job runs at all.
One practitioner quoted in the InfoQ piece, Sascha Mirow-Stanitzok at freenet, made the point sharper: telling the agent to "ignore instructions in issue text" protects nothing on its own. He wouldn't use agentic workflows for anything that changes code or opens PRs yet, and he's happy using them for triage. That's a reasonable line. The architecture makes the risky tier safer. It doesn't make it safe.
The defaults are generous. Tighten them.
Each run is capped at 1,000 AI Credits by default, at $0.01 each, so $10 per run. Enterprise defaults add 5,000 credits a day, 400 per threat-detection run, and a 20-minute timeout on the agent step. Mirow-Stanitzok found that far too much for triage and cut his runs to 100 credits, 15 turns and 10 minutes.
We'd do the same. A triage agent that needs 15 turns on one issue has usually lost the plot. Set the budget at what a good run costs, not what a bad run might need, and use gh aw forecast (now out of experimental) to see what a month looks like before you turn it on across 40 repos.
One more caveat from the article. If you run self-hosted runners through Actions Runner Controller, the Docker-in-Docker sidecar that lets the agent spin up its sandbox runs as a privileged container by default. The least-privilege story has a hole in it at the infrastructure layer. Know that before you point this at anything that matters.
Copy the pattern, even if you never use the product
Here's what we're taking from it for the agent workflows we build for clients, on GitHub or anywhere else:
- The agent's identity can read. A different identity writes. Never the same token.
- Everything the agent wants to do is a structured proposal, not an action. Proposals are cheap to log, diff and reject.
- A scanner or a human sits between proposal and write, and that gate lives outside the agent's process.
- Budgets are set per task from measured runs, not from the vendor default.
- Deterministic work stays deterministic. GitHub's own guidance says conventional Actions are still the right tool for builds and tests. Agents go where interpretation is needed.
None of this is exotic. It's the same separation of duties you'd apply to a new engineer with repo access, written into the pipeline instead of into a policy doc. The difference is that the engineer learns. The agent will fall for the same trick next Tuesday, so the pipeline has to be the thing that doesn't.
We're here to help founders and teams design and build digital products that are built to scale with you, not slow you down. If you're looking to build something, get in contact with us today!