Short answer
Coding agents introduce new attack surfaces because they read untrusted content, run commands and hold credentials. A secure agentic coding workshop teaches teams to set least-privilege permissions, keep secrets out of reach, recognise prompt injection and supply chain risks, and build safe defaults into their tooling.
On this page
A new kind of insider
A coding agent sits in an unusual position. It has access to the source code, often to a shell, sometimes to cloud credentials and internal tools via integrations. It reads content from many sources: issues, documentation, dependency files, web pages. And it acts on what it reads. From a security point of view, that makes it something like a very fast, very literal colleague who can be talked into things by anyone who manages to put text in front of it.
Most security problems with coding agents are not exotic. They come from default settings that are too permissive, secrets lying around in working directories and nobody thinking about where instructions might come from. The workshop we run at neooutput is designed to fix those basics first and then go deeper.
Threat model in one table
We open with a shared threat model that participants refine for their own environment:
| Threat | How it happens | Primary controls |
|---|---|---|
| Destructive commands | Agent runs a command with broad effect, such as deleting files or resetting a database | Permission modes, command allowlists, sandboxed environments |
| Secret exposure | Agent reads a credentials file and includes it in output, logs or a commit | Secrets out of the working tree, vaults, secret scanning, deny rules on paths |
| Prompt injection | Malicious instructions in an issue, a README, a web page or tool output | Treat external content as data, restrict tools after untrusted input, human approval for consequential actions |
| Supply chain | Agent adds an unknown or typosquatted dependency | Dependency review, allowlisted registries, lockfiles, scanning |
| Data leakage to providers | Personal or confidential data pasted into prompts | Data classification, anonymization, approved tools only |
| Over-privileged integrations | MCP servers or tokens with more rights than needed | Least privilege, per-user auth, logging |
Module 1: permissions and sandboxing
Every major coding agent offers ways to control what it may do without asking. Participants configure them hands-on:
- Default to asking before shell commands, then allow specific safe ones such as test runners and linters
- Deny edits to sensitive paths such as infrastructure definitions, CI configuration or secrets directories
- Use hooks or policy files where the tool supports them to enforce rules automatically
- Run fully autonomous tasks only in isolated environments: containers, dev boxes or cloud sandboxes without production credentials
We test the configuration by asking the agent to do something it should not, and checking that the guardrails hold.
Module 2: secrets
The simplest rule is the most effective: an agent cannot leak what it cannot read. We work through:
- Moving secrets out of
.envfiles in the repository and into a secret manager or injected environment variables - Using short-lived, narrowly scoped tokens for any credential an agent does need
- Enabling secret scanning in pre-commit hooks and in CI
- Checking that agent logs and transcripts do not persist secrets in places with broad access
Module 3: prompt injection, demonstrated
Prompt injection is easier to understand when you see it. We set up a safe exercise repository where an issue description or a documentation file contains hidden instructions, for example to add a new remote endpoint or to print environment variables. Participants run a realistic task and observe whether and how the agent reacts.
Mitigations we discuss:
- Agents should treat content from issues, web pages and tool outputs as data, and humans should approve actions that follow from such content
- Limit which tools are available in sessions that process untrusted input
- Separate read-only research tasks from tasks with write or network access
- Review diffs for unexpected changes outside the task's scope, such as new network calls or config edits
No current mitigation is perfect, which is exactly why least privilege and review matter.
Module 4: supply chain
Agents like to solve problems by adding packages. Sometimes the package does not exist, or a similarly named malicious one does. We practise:
- Requiring justification for every new dependency in the pull request
- Checking package provenance and maintenance status before accepting
- Pinning versions and committing lockfiles
- Using internal registries or proxies with allowlists where the organization has them
Module 5: data protection
Engineers sometimes paste production logs, customer emails or database excerpts into an agent to explain a bug. The workshop sets clear rules on data classes and shows alternatives: synthetic data, redacted samples and anonymization. Textwash Pro is useful here because it anonymizes text with local AI, offline or as a privacy layer in front of ChatGPT and Claude, so support tickets or log excerpts can be used without exposing personal data.
Module 6: review and incident response
Security review of agent pull requests needs specific attention:
- Unexpected file changes outside the task scope
- New network calls, permissions or dependencies
- Weakened validation or error handling
- Disabled tests or lint rules
We close with an incident drill: an agent-introduced secret leak is discovered. Who rotates what, how is the scope determined, and what changes in the configuration afterwards?
Output and follow-up
Teams leave with a hardened configuration for their chosen agent, a short security checklist for agent pull requests and an updated threat model. We recommend pairing this with a written policy; our article on an AI coding tool policy shows how to structure one, and security and data privacy of AI coding tools covers the vendor assessment side. If agents connect to internal systems through MCP, the MCP workshop adds the integration perspective.
neooutput delivers this as a one-day workshop for engineering and security teams together, remote or on site, in English or German.
FAQ
Is prompt injection a real risk for coding agents?
Yes. Any content the agent reads can contain instructions, and agents can act on them. The risk grows with the agent's permissions, which is why least privilege and human approval for consequential actions are central.
Should we let coding agents run commands without approval?
For a defined set of safe commands such as tests and linters, usually yes. Broad autonomy should be limited to sandboxed environments without access to production systems or sensitive credentials.
How do we stop agents from reading secrets?
Keep secrets out of the repository and working directory, use deny rules for sensitive paths where the tool supports them, and give agents only short-lived, narrowly scoped credentials.
Who should attend this workshop?
Engineers who use coding agents daily, plus security engineers and platform owners. Mixed groups produce configurations that are both safe and practical.