Subscribe to the Non-Human & AI Identity Journal
Home Glossary Cyber Security Sink
Cyber Security

Sink

← Back to Glossary
By NHI Mgmt Group Updated August 2, 2026 Domain: Cyber Security

A sink is a point in code where input stops being inert data and becomes an action, such as a database query, shell command, or file write. Runtime controls focus on sinks because that is where a benign-looking request can turn into a security incident.

Expanded Definition

In application security, a sink is any code path where externally influenced input can trigger an effect, including SQL execution, command invocation, deserialization, template rendering, file operations, network calls, or privilege-relevant business actions. The term is used most often in taint analysis, secure code review, and runtime protection, where defenders track how untrusted data reaches sensitive operations. That makes a sink different from a source, which introduces data, and from a sanitizer, which attempts to reduce risk before the sink is reached.

Definitions vary slightly across vendors and tooling, but the security meaning is consistent: the sink is the location where risk becomes concrete because the program acts. Guidance in NIST SP 800-53 Rev 5 Security and Privacy Controls supports this defensive focus by emphasising safeguards around input handling, system integrity, and controlled execution. The most common misapplication is treating every function that accepts input as a sink, which occurs when teams fail to distinguish inert data handling from operations that actually change state or execute code.

Examples and Use Cases

Implementing sink-level analysis rigorously often introduces review overhead, requiring organisations to weigh stronger detection of exploit paths against added tuning and developer effort.

  • A web application treats a SQL query builder as a sink because unsafely concatenated input can alter database logic and expose records.
  • A CI pipeline marks shell execution as a sink so that untrusted parameters cannot become command-line flags or injected subcommands.
  • A document-processing service treats file write operations as sinks when attacker-controlled filenames or content can overwrite sensitive paths.
  • Security engineers map deserialisation routines as sinks because malformed objects can trigger code paths that bypass intended validation.
  • Runtime application protection tools monitor sinks to block suspicious transitions before input reaches high-risk operations, especially in code paths that also intersect with identity claims or session state.

For defenders, sink thinking is most useful when paired with source tracking and trust-boundary analysis, so the team can see which inputs remain harmless and which reach impactful operations. The OWASP concept of code injection risk also aligns closely with this model, and OWASP Top 10 remains a practical reference for the classes of failures that occur when data is allowed to influence execution.

Why It Matters for Security Teams

Sinks matter because most real exploitation happens when input crosses from validation into action. If teams only inspect where data enters a system, they miss the point where that data becomes capable of altering records, executing commands, or changing security posture. In modern applications, sinks also matter for agentic AI workflows, where an AI agent with tool access can turn model output into an API call, a ticket update, or a privileged automation step. That makes sink review relevant not only to classic injection flaws but also to non-human identity governance, because every tool-enabled action depends on a trusted execution point.

Security teams use sink awareness to define where sanitisation must be mandatory, where privilege checks must be enforced, and where runtime controls should block unsafe transitions. This aligns with OWASP guidance on injection classes and with control expectations in NIST SP 800-53 Rev 5 Security and Privacy Controls for controlled execution and data protection. Organisations typically encounter sink-related risk only after an injection, command execution, or unsafe automation event, at which point sink analysis 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 Non-Human Identity Top 10 and OWASP Agentic AI Top 10 address the attack and risk surface, while NIST CSF 2.0, NIST SP 800-53 Rev 5 and NIST AI RMF set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
NIST CSF 2.0PR.DS-1NIST CSF covers protecting data at rest and in use near dangerous code paths.
NIST SP 800-53 Rev 5SI-10Input validation control is directly relevant to preventing unsafe sink reachability.
OWASP Non-Human Identity Top 10Sink analysis is critical when non-human identities can trigger privileged tool actions.
OWASP Agentic AI Top 10Agentic AI guidance addresses unsafe tool calls caused by model output reaching sinks.
NIST AI RMFAI RMF addresses managing AI system risks that emerge when outputs drive actions.

Review tool-execution sinks for NHI-driven automation paths and enforce approvals.

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