JOURNAL / SOFTWARE ENGINEERING · AGENT SECURITY

A coding agent
needs a boundary.

A repository gives an agent useful context—and may also give it the ability to read files, run commands, use credentials, or reach the network. The workspace around the agent is part of the security design.

01 / SUGGESTION IS NOT EXECUTION

A coding agent can do more than propose a line of code.

An autocomplete tool suggests text for a person to accept. A coding agent may inspect a project, edit files, launch a shell command, run tests, call integrations, and continue from the result. Its effective authority comes from the tools and environment it can reach—not from how carefully the prompt is worded.

That changes the threat model. A useful task can include untrusted source material: an issue description, README, test fixture, build output, or dependency documentation. A malicious or simply misleading instruction in that material should not be able to grant access to secrets, other projects, or production systems.

OWASP’s 2026 guidance identifies risks such as goal hijacking, tool misuse, identity and privilege abuse, and unexpected code execution. It recommends least privilege, human approval for high-impact actions, and visibility into tool use. The practical question is not whether a model promises to be careful. It is what the process is allowed to read, change, execute, and contact.

REPOSITORY WORKFLOW / TRUST BOUNDARYINPUT ≠ AUTHORITY
01 / UNTRUSTED CONTEXT

Project files

Issues, docs, source, tests, and command output can guide a task. They do not grant permissions.

02 / ENFORCED POLICY

Scoped workspace

  • Specific read and write paths
  • Network hosts limited to the task
  • Credentials withheld or narrowly exposed
  • Separate approval for privileged actions
03 / HUMAN REVIEW

Reviewable change

Inspect the diff, test results, and any actions that crossed the workspace boundary.

Instructions explain the task. The operating system and tool policy decide what can happen.

02 / SET THE BOUNDARY BEFORE THE PROMPT

Limit the workspace along separate lines.

A sandbox is not one switch. Current coding-agent documentation describes controls for filesystem paths, outbound and local network access, credentials, subprocesses, and exceptions that let a command run outside the sandbox. Which controls are available—and how they are enforced—depends on the product, operating system, and session type.

FilesystemGive the task its own working tree or container. Allow only the project paths it needs; keep sibling projects, personal folders, and secret stores outside reach. A separate Git worktree can isolate edits, but it does not by itself restrict every path a process can access.
NetworkDisable outbound access when a task does not need it. When it does, allow only the services required for package installation or tests. Repository text should not be able to redirect credentials to a new host.
CredentialsDo not place long-lived keys in files the agent can read. Prefer short-lived, task-specific credentials, and make their allowed destinations and operations explicit.
Tools and approvalSeparate routine checks from actions such as publishing, deploying, changing permissions, or accessing production data. A human approval should name the actual command and its consequence.

GitHub’s documentation is a useful concrete example: it describes local sandbox controls for paths, network, and credentials, and also explains that isolation behavior differs by surface and operating system. Check the effective policy on the machine that runs the agent; a settings screen alone may not prove the sandbox is active.

03 / IDENTITY FOLLOWS THE ACTION

Every external action should have an owner and a scope.

A coding agent may use a person’s Git credentials, an API token, a package registry, or an MCP server. Those connections can carry authority beyond the current file edit. Keep the identity, allowed operation, destination, and time window visible for each integration.

NIST’s National Cybersecurity Center of Excellence published a draft concept paper in February 2026 on applying identity and authorization practices to software and AI agents. The public comment period ended on April 2, 2026; the paper is not a final standard. Its central design question remains useful: how can an agent authenticate and act with only the authority it needs?

If an action changes shared state, preserve the link from the request to the agent session, the credential or principal used, the tool call, and the resulting change. That makes revocation and incident review possible without treating a model’s explanation as the audit record.

04 / TEST THE DENIAL PATH

A boundary is real only if a forbidden action fails.

  1. Try to read outside the project. Confirm private files, neighboring repositories, and credentials remain inaccessible.
  2. Try a blocked network destination. Test both an ordinary shell request and any built-in fetch or integration tools the agent can use.
  3. Try to widen permissions. Confirm a request in an issue, README, or tool result cannot approve a sandbox bypass or grant a new credential.
  4. Inspect the patch and history. Review changed files, new dependencies, generated scripts, and commands that ran—not just the final summary.
  5. Repeat after changes. Recheck when the operating system, agent, tools, permissions, or repository instructions change.

Passing a code test does not prove the agent stayed within its authority. Verify the code outcome and the execution boundary as separate properties.

For a broader code review, see how to evaluate AI-generated code security ↗. For the rules around agent permissions and untrusted input, continue with permissions at the tool boundary ↗ and prompt injection ↗. Then measure the full work in evidence-led agent workflows ↗.

KEEP THE WORK REVIEWABLE

Useful autonomy has a shape: narrow scope, visible work, reversible change.

Start each task in a clean workspace with only the access it needs. Let the agent propose and test a change there. Keep sensitive actions behind explicit controls, and let a person review the patch before it reaches a shared or production environment.

See how Symploka approaches software engineering in Grablex Code ↗. The principle is simple: the result should be inspectable, and the authority behind each action should be clear.

PRIMARY SECURITY GUIDANCE · SOURCES CHECKED OCTOBER 2026OWASP GenAI Security Project, Top 10 for Agentic Applications 2026 ↗GitHub Docs, About cloud and local sandboxes for Copilot ↗GitHub Docs, Configuring local sandbox settings ↗NIST NCCoE, Software and AI Agent Identity and Authorization — draft concept paper (February 2026) ↗OpenAI, Running Codex safely at OpenAI ↗