Artificial Intelligence (AI) is being applied across sectors to drive efficiency and innovation. To reap the benefits of AI, users must have trust and confidence that the AI will function as originally intended, and outcomes are secure. To secure AI systems, the Cyber Security Agency of Singapore (CSA) has released the Guidelines and Companion Guide on Securing AI Systems in Oct 2024. The Guidelines are designed for system owners to secure the use of AI throughout its life cycle, and the Companion Guide complements the Guidelines as a useful reference that contains practical measures and controls that system owners may consider implementing.
Subsequently, the advent of Agentic AIAI systems that can independently plan and execute multi-step tasks to achieve a specified objective, using tools and data with minimal human intervention per action. capabilities, which can understand context, formulate plans and take independent actions to achieve specified objectives, also introduces new risks with greater potential for impact given its added capabilities and access to tools and data. As such, CSA has released the Addendum on Securing Agentic AI in Jun 2026 to outline how risks could be identified and assessed based on capabilities of Agentic AI systems as well as practical controls to mitigate relevant risks across the development lifecycle.
Based on the Addendum, CSA has since performed a deep dive into AI Coding AssistantsAI coding assistants that go beyond generating code suggestions. They can plan multi-step tasks, invoke external tools, read and write files, execute commands, and interact with remote services with minimal human intervention per action., which is an agentic AI use case commonly adopted by developers. We leverage the Guidelines and Addendum to develop a security assessment approach of coding assistants, and recommend relevant mitigations associated with their use. By doing so, we intend to help security practitionersProfessionals responsible for assessing, monitoring, and managing cybersecurity risks within an organisation. This includes security engineers, analysts, architects, and risk managers. and developersSoftware engineers and technical staff who build, maintain, or operate systems that use agentic AI coding assistants as part of their development workflow. adopt AI Coding Assistants more securely.
CSA developed this handbook to apply the Addendum's guidance to a specific agentic AI archetype: the AI coding assistant. It covers the system architecture of common deployments, identified attack vectors with adversarial attack paths mapped to MITRE ATLAS tactics and techniques, and mitigations applicable at each trust boundary.
This handbook is structured as six sequential tabs. Readers are encouraged to progress through them in order, though each tab is designed to function independently for reference purposes.
The following attack vectors (T-001 to T-006) form a baseline set for IDE-based and CLI-based agentic AI coding assistant deployments. Each vector is defined by the surface through which untrusted instructions reach the agent, not by the consequence that follows, which depends on what the agent is able to do in your deployment. Each is detailed in the Attack Path tab with step-by-step adversarial chains and applicable mitigations. Treat this baseline as a starting point for assessment and extend it with vectors specific to your organisation's deployment, tooling, and threat environment.
settings.json automatically execute attacker payloads when a user clones the repo and triggers an agent session event. CLI agents only.Click a component or trust boundary in the diagram to view details.
The mitigations listed in this tab are reference controls intended to achieve the identified security objective for each attack vector and trust boundary. Organisations may implement equivalent or compensating controls based on their architecture, operating model, and risk appetite, provided the resulting risk is assessed and accepted appropriately. An Attack Vector value of "All" means the control is broadly applicable across attack vectors, not that it is universally mandatory.
Note: Where a reference mitigation is operationally impractical, assessors should document the alternative control, its expected risk reduction, and the resulting residual risk.
Attended and unattended deployments: Three mitigating controls assume an attended deployment, in which a developer initiates the session and is present while the agent works: M-011 human verification, M-015 immediate interruptibility, and M-019 approval before activation. Where a developer is absent, each control shows a compensating substitute in its details panel.
| Mitigation | Level | Attack Vector | Trust Boundary |
|---|
| Code | Capability | What to determine | Related attack vectors |
|---|---|---|---|
| C1 | Filesystem read | Which paths the agent can read, and whether it can reach beyond the project directory into home directories, credential stores, or other repositories.
Related controls
|
T-001 |
| C2 | Filesystem write | Which paths the agent can write to. Pay particular attention to places another program later runs code from, such as the repository's own .git/hooks directory, build scripts, or pipeline definitions.
Related controls
|
T-004 |
| C3 | Agent command execution | Whether the agent can run commands on the host, and whether those commands are confined to an isolated environment or reach the developer's machine directly.
Related controls
|
T-001, T-002a, T-002b, T-003, T-005, T-006 |
| C4 | Network retrieval | Whether the agent can fetch external content itself, and whether it is limited to an approved list of destinations.
Related controls
|
T-004 |
| C5 | Remote MCP connection | Whether the agent can connect to MCP servers over the network, who approves a server before it is added, and whether developers can add their own.
Related controls
|
T-002a, T-002b |
| C6 | Local MCP with host access | Whether the agent can run MCP servers as local processes, what privileges those processes hold, and what they can reach on the host on their own.
Related controls
|
T-003, T-004 |
| C7 | Skill or extension loading | Whether third-party skills or extensions can be loaded, where they come from, and whether someone must approve them first.
Related controls
|
T-005 |
| C8 | Agent hooks | Whether settings carried inside a cloned repository can make the agent run commands automatically when a configured event occurs, such as the start of a session, a tool call, an approval decision, or a change to a watched file. Some events are changes in the workspace rather than points in the agent's own run, so a hook can fire without the developer interacting with the agent.
Related controls
|
T-006 |
| C9 | Repository and CI write | Whether the agent can commit, push, open pull requests, or modify pipeline definitions, and whether branch protection excludes the identity under which it runs.
Related controls
|
Increases impact across all vectors |
| C10 | Credential access | Which credentials the agent can read or use, what access those credentials grant, and how long they stay valid.
Related controls
|
T-003, T-005 |
| Likelihood →Impact ↓ | Rare (1) |
Unlikely (2) |
Possible (3) |
Likely (4) |
Almost Certain (5) |
|---|---|---|---|---|---|
| Catastrophic (5) | Medium5 | Medium-High10 | High15 | High20 | High25 |
| Major (4) | Low4 | Medium8 | Medium-High12 | High16 | High20 |
| Moderate (3) | Low3 | Medium6 | Medium9 | Medium-High12 | High15 |
| Minor (2) | Low2 | Low4 | Medium6 | Medium8 | Medium-High10 |
| Negligible (1) | Low1 | Low2 | Low3 | Low4 | Medium5 |
| Rating | Score | Description |
|---|---|---|
| Catastrophic | 5 | Could cause exceptionally grave harm, including risk to human safety or the loss of critical services |
| Could cause severe ongoing impact on the organisation's or multiple organisations' ability to perform their primary functions | ||
| Could cause severe reputational, financial, or commercial damage to the organisation or to the parties that depend on it | ||
| Could cause severe breach of laws, regulations, or contractual obligations, or major litigation against the organisation | ||
| Major | 4 | Could cause serious harm to the organisation, its customers, or third parties that depend on it |
| Could cause serious ongoing impact on one or more business functions' ability to operate | ||
| Could cause serious reputational, financial, or commercial damage to the organisation | ||
| Could cause serious breach of laws, regulations, or contractual obligations, or litigation against the organisation | ||
| Moderate | 3 | Could cause harm to the organisation or its interests |
| Could adversely impact the organisation's ability to perform its primary functions | ||
| Could cause reputational, financial, or commercial damage to the organisation | ||
| Could cause breach of laws, regulations, or contractual obligations, or litigation against the organisation | ||
| Minor | 2 | Could cause difficulties or undesirable consequences to the organisation |
| Could cause difficulties in the organisation's ability to perform its primary or secondary functions | ||
| Could cause inconvenience to a limited number of users in the organisation | ||
| Negligible | 1 | Has no impact on the organisation's ability to perform its primary or secondary functions |
| Has no impact to anyone |
| Likelihood | Discoverability of exploit | Complexity of exploit | Repeatability |
|---|---|---|---|
| Almost Certain (5) | Vulnerabilities can be discovered from publicly available information | Trivial, a straightforward attack achieves its objective on essentially every attempt with no tailoring | The attack can be repeated any time |
| Likely (4) | Vulnerability can be discovered through functional use of the application | Reliable once the attack is placed correctly and lightly tailored to the target's setup; minimal tuning | The attack can be carried out frequently |
| Possible (3) | Vulnerability can only be discovered with technical specification of the application | Needs specific conditions, placement, and a few attempts to land, succeeds sometimes, not every run | The attack can only be carried out at specific times |
| Unlikely (2) | Vulnerability can only be discovered through technical analysis of the application | Requires obfuscation (Unicode / zero-width, encoding) or an attack hand-tuned to one specific agent, tool, or configuration | The attack can only be carried out infrequently |
| Rare (1) | Vulnerability can only be discovered through source code analysis of the application | Only works via multi-step chaining with other exploits or a precise, tightly sequenced setup | The attack can only be carried out once |
Non-determinism check: Where an attack depends on how the model responds to attacker-supplied content, the outcome is probabilistic, and the same attack can succeed on one run and fail on the next. This is why Complexity is scored on reliability of success rather than ease of attempt: an attack that only lands occasionally sits at Possible (3) or below, not Almost Certain. As more evidence accumulates through repeated trials, revise the level up or down accordingly.
Unattended deployments: the residual likelihood ratings assigned to each attack vector assume an attended deployment with a developer present during the session. Where an agent runs unattended, three mitigating controls are replaced by weaker compensating substitutes: M-011 human verification, M-015 immediate interruptibility, and M-019 approval before activation. Residual likelihood should be reassessed upward accordingly rather than inherited from this handbook.