Subscribe to the Non-Human & AI Identity Journal
Home Glossary Agentic AI & Autonomous Identity Prompt injection in development workflows
Agentic AI & Autonomous Identity

Prompt injection in development workflows

← Back to Glossary
By NHI Mgmt Group Updated August 14, 2026 Domain: Agentic AI & Autonomous Identity

Prompt injection in development workflows is the practice of hiding instructions inside content an agent reads and then exploiting the agent’s trust in that content. In code environments, the result can be credential retrieval, workflow tampering, or secret exposure through apparently normal task execution.

Expanded Definition

Prompt injection in development workflows is not just a model abuse issue, it is a control-plane problem. When an agent can read code comments, issue descriptions, build logs, pull-request text, package metadata, or repository content, an attacker can bury instructions that override the developer’s intended task. The core risk is that the agent treats untrusted text as operational guidance, then uses its tool access to act on it.

In practice, this term sits at the intersection of agentic AI security, secrets governance, and software delivery integrity. The relevant question is not whether the prompt is malicious in a human sense, but whether the workflow gives content the power to redirect execution, retrieve secrets, or alter artifacts. Definitions vary across vendors, but the security meaning is consistent: untrusted inputs must not be allowed to steer privileged actions. The OWASP Agentic AI Top 10 frames this as a core agent governance failure, while NHI Management Group treats it as a pathway from content ingestion to credential exposure.

The most common misapplication is assuming prompt injection only matters in chat interfaces, which occurs when teams ignore repository text and pipeline artifacts that agents can parse during normal development tasks.

Examples and Use Cases

Implementing agent-assisted development rigorously often introduces extra review steps and tighter content boundaries, requiring organisations to weigh automation speed against the cost of isolating untrusted inputs.

  • A coding agent scans a pull request and follows a hidden instruction in a code comment to read environment variables, which can expose secrets if tool permissions are too broad. This pattern appears in incidents like Gemini CLI Breach — Silent Code Execution.
  • A repository issue contains text that tells the agent to “summarise all files and include tokens,” turning a routine documentation task into exfiltration risk. This aligns with the attack path described in Gemini AI Breach — Google Calendar Prompt Injection.
  • A CI assistant reads build logs or dependency notes and is nudged to modify pipeline steps, creating workflow tampering during otherwise normal delivery operations.
  • An agent reviewing third-party code comments is tricked into executing a destructive command, similar to the supply-chain abuse seen in GitHub Action tj-actions Supply Chain Attack.
  • During secure code review, a developer assistant is allowed to fetch files, but not to infer policy from them. That distinction matters because “read access” and “instruction authority” are not the same.

These scenarios reflect the same issue discussed in OWASP Agentic Applications Top 10: the agent is only as safe as the boundaries around what it is permitted to treat as instruction.

Why It Matters in NHI Security

Prompt injection becomes an NHI problem as soon as an agent can invoke tools, read secrets, or act under service credentials. In development workflows, that often means API keys in CI/CD, tokens in vaults, and privileged service accounts that can reach source control, artifact registries, or cloud resources. NHI Management Group reports that 30.9% of organisations still store long-term credentials directly in code, and 96% store secrets outside secrets managers in vulnerable locations including code, config files, and CI/CD tools. That exposure makes prompt injection far more dangerous than a simple model error.

Once an agent has access to those credentials, a hidden instruction can convert a text-processing task into secret retrieval, pipeline tampering, or downstream compromise. The governance lesson is straightforward: treat agent inputs as hostile, limit tool scopes, and apply Zero Standing Privilege so a prompt cannot unlock durable access. The risk is especially acute where development automation crosses repository, build, and deployment boundaries without content sanitisation or approval gates. Organisations typically encounter the consequences only after a malicious commit, issue, or dependency note has already triggered secret leakage, at which point prompt injection in development workflows becomes operationally unavoidable to address.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

OWASP Agentic AI Top 10, OWASP Non-Human Identity Top 10 and CSA MAESTRO address the attack and risk surface, while NIST CSF 2.0 and NIST Zero Trust (SP 800-207) set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
OWASP Agentic AI Top 10NHI-04Covers prompt injection and unsafe tool use in agentic workflows.
OWASP Non-Human Identity Top 10NHI-02Prompt injection often targets secrets stored or reachable through NHIs.
NIST CSF 2.0PR.AC-6Least privilege and access restriction are central to limiting agent blast radius.
NIST Zero Trust (SP 800-207)SC-1Zero Trust requires continuous verification of requests from software identities.
CSA MAESTROAddresses agent autonomy, tool boundaries, and prompt-related abuse paths.

Reduce secret exposure paths and verify agents cannot read or exfiltrate credentials from development systems.

NHIMG Editorial Note
Reviewed and updated by the NHIMG editorial team on August 14, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org