A coding agent can have a tightly scoped workspace and still write a test or build script that runs in continuous integration (CI). When CI runs that script, it runs with the job’s permissions. To understand how far the agent can reach, follow the code it can cause to run as well as the credentials it can see in its own workspace.
Take an illustrative council repairs service. The council has agreed that staff should see two facts separately. The contractor marked the job complete. The council case is still open. The agent can propose that change. Putting it live involves a different set of permissions and an accountable release decision.
Give the agent access to the work it needs to do
For this change, the agent needs the relevant repository, the agreed service rule and realistic test fixtures. It can run the service in an isolated development environment and check that both statuses appear. Synthetic records can reproduce the combination. If an important detail is missing, an authorised engineer can investigate the live behaviour and turn the finding into a fixture the team can use.
Look at the agent’s actual reach. That includes the repositories and mounted files it can read, the credentials available to its processes, and the services those processes can contact. Decide what the agent can change on a working branch and what needs an owner’s approval. Treat changes to the release workflow, its permissions and protected acceptance checks as changes to the controls that govern delivery.
Separate pull request checks, the approved build and deployment
The agent can open a pull request. Run its checks in an environment with just the access needed to produce and report results. A separate build on the approved revision can create and publish a release artifact. The production deployment job uses its own identity to promote the specific artifact approved for release.
For the council change, the protected acceptance check should confirm that both facts are shown and that viewing the screen leaves the authoritative case status untouched. Start with an open case and a completed contractor job, open the staff view, and check the stored case status and whether a closure event was recorded. That gives the release owner a service-level result they can trace to the artifact, alongside the ordinary build and test results.
One way to apply this on AWS is to separate development and production accounts and give build and deployment jobs different IAM roles. In GitHub Actions, an approved deployment job can use OpenID Connect to obtain temporary AWS credentials. Restrict the AWS production role’s trust to the intended repository and deployment environment. Configure the environment's deployment branch rules and, where your GitHub plan supports them for the repository, required reviewers; otherwise record the release approval in a separate, deliberate step. Scope the role to the resources the job needs to deploy. The identity of the job and the approval of the specific release should both be visible in the evidence.
Follow the approved change into production
Record the approved source revision, the artifact’s immutable identifier, the checks run against that artifact, the release approval and the resulting deployment. If an artifact is rebuilt, record its new identity and make sure the approval and evidence apply to that version. The person approving the change should be able to follow the chain without asking the agent to reconstruct it afterwards.
Plan for the first call from the service desk. If the screen shows the wrong status, the on-call engineer needs to identify what is running, see enough operational evidence to investigate and decide whether to restore a previous approved version. An agent can help analyse the evidence within its assigned scope. If wider access is genuinely needed, grant it for the specific task, for a limited time and under a named approval.
In a supplier review, ask to see one routine change from the agent’s workspace to the live service. Ask what the agent, the pull-request checks, the approved build and the deployer can each do. Then ask who owns those permissions when the supplier leaves.
Further reading
AWS IAM security best practices
