Join our Newsletter — 33% off our NHI Course

Why do context graphs create new risk for non-human identities?

Context graphs extend the risk surface beyond keys and permissions because they capture the reasoning and historical inputs behind agent actions. If that context is exposed, reused, or over-retained, the agent can inherit stale assumptions or sensitive instructions. For NHI programmes, the problem is behavioural memory, not just credential exposure.

Why This Matters for Security Teams

Context graphs change the security problem from simple credential protection to control over what an autonomous system knows, remembers, and reuses. For non-human identities, that matters because the agent’s behaviour is often shaped by prior tool calls, retrieved notes, policy hints, and embedded instructions. If those inputs are inaccurate or overly broad, the resulting action may still look authorised while being operationally unsafe.

This is especially important in environments where the same agent handles multiple workflows, tenants, or confidence levels. A context graph can improve continuity, but it can also preserve stale assumptions, hidden dependencies, or sensitive prompts that should have been ephemeral. Security teams that only review keys, tokens, and role assignments will miss the behavioural layer. Current guidance suggests treating context as governed security data, not as a neutral productivity feature. The NIST Cybersecurity Framework 2.0 is useful here because it pushes teams to think about governance, asset visibility, and protective controls together rather than in isolation.

In practice, many security teams encounter context risk only after an agent repeats a bad action from an earlier workflow, rather than through intentional review of what the agent was allowed to remember.

How It Works in Practice

Context graphs usually connect messages, retrieved documents, tool outputs, policy cues, and execution history into a graph or memory layer that the agent can query during later steps. That makes them valuable for planning and continuity, but it also creates a new integrity and confidentiality boundary. Once context is reused automatically, the security question becomes whether each node is trustworthy, still relevant, and safe to expose to the next action.

For NHI governance, the key issue is not just who has the token, but what the token can reach through the context layer. A compromised or noisy memory source can influence downstream decisions even when the underlying identity is technically valid. That is why controls need to cover:

  • input provenance, so retrieved context can be traced back to an approved source;
  • retention limits, so stale or sensitive memory is not preserved longer than needed;
  • segmentation, so context from one task, tenant, or trust level does not bleed into another;
  • validation, so agent outputs are checked against policy before execution;
  • logging, so context changes and retrieval decisions can be audited later.

Practitioners should also distinguish between useful memory and durable instruction. A context item that helped once may become a liability if it is treated as a standing rule. That is why current best practice is evolving toward least-context design, where the agent receives only the minimum state required for the current task. For broader control mapping, NIST CSF 2.0 helps structure governance and monitoring, while MITRE ATLAS helps teams reason about adversarial manipulation of AI workflows and memory-driven attack paths.

These controls tend to break down when context graphs span multiple applications or vendors because provenance and retention rules are often lost at integration boundaries.

Common Variations and Edge Cases

Tighter context controls often increase operational overhead, requiring organisations to balance agent performance against the cost of review, segmentation, and shorter memory windows. That tradeoff is real: too little context can make an agent brittle, while too much context can make it unsafe.

There is no universal standard for context graph design yet. Some teams store only retrieval pointers, others persist rich semantic memory, and some allow agents to write back observations automatically. The more write capability the agent has, the more important it becomes to separate observed facts from inferred advice. Best practice is evolving toward explicit trust labels, time-to-live controls, and approval gates for high-risk memory nodes.

Edge cases matter most in regulated or shared environments. In multi-tenant systems, context leakage can expose one customer’s instructions to another workflow. In sensitive operations, old context can reintroduce revoked procedures or outdated authorisation logic. In agentic systems that chain multiple models, one model’s hallucinated summary can become another model’s trusted memory. OWASP guidance for LLM applications is useful for understanding prompt and retrieval abuse patterns, but the practical lesson is broader: context should be treated as controlled security state, not passive history.

NIST AI Risk Management Framework is helpful where teams need a governance lens for model behaviour, context quality, and downstream impact.

Standards & Framework Alignment

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

MITRE ATLAS and OWASP Agentic AI Top 10 address the attack and risk surface, while NIST CSF 2.0, NIST AI RMF and NIST AI 600-1 set the governance and control requirements practitioners need to meet.

Framework Control / Reference Relevance
NIST CSF 2.0 GV.OV-01 Context graphs need governance, ownership, and oversight to manage behavioural risk.
NIST AI RMF AI RMF addresses trustworthiness, provenance, and risk in AI system behaviour.
MITRE ATLAS AML.T0059 Adversarial manipulation can poison retrieved context and steer agent actions.
OWASP Agentic AI Top 10 Agentic systems inherit prompt, memory, and tool abuse risks through context layers.
NIST AI 600-1 GenAI profiles emphasise secure prompting, output control, and provenance awareness.

Assign control ownership for context sources, retention, and review before agents reuse them.