Join our Newsletter — 33% off our NHI Course
Home FAQ Cyber Security How do security teams evaluate GenAI frameworks in…
Cyber Security

How do security teams evaluate GenAI frameworks in code without losing control of sensitive data?

← Back to all FAQ
By NHI Mgmt Group Editorial Team Updated August 27, 2026 Domain: Cyber Security

Security teams should first identify where GenAI frameworks exist, then determine whether they are connected to secrets or sensitive data flows. The practical test is whether the framework expands the attack surface or creates new leakage and compliance risks. From there, teams can create policies, monitor usage, and require stronger controls around data handling and access.

Why This Matters for Security Teams

GenAI frameworks in code are not just another dependency concern. They can change how prompts, embeddings, retrieval data, API keys, and model outputs move through an application, which makes sensitive data exposure easier to miss during ordinary software review. That risk is amplified when frameworks connect to secrets, logs, plugins, or external tools. Current guidance from NIST AI 600-1 GenAI Profile and the NIST Cybersecurity Framework 2.0 points teams toward risk-based evaluation, but the practical challenge is mapping where the framework touches real data paths. NHIMG research also shows why this matters: in the State of Non-Human Identity Security, only 1.5 out of 10 organisations were highly confident in securing NHIs. In practice, many security teams discover data leakage paths only after developers have already wired the framework into production workflows.

How It Works in Practice

Security teams should evaluate GenAI frameworks the same way they evaluate other high-risk code dependencies, but with extra attention to data handling and identity boundaries. Start by inventorying where the framework runs, what it can read, and what it can send. Then trace whether it can access environment variables, secret stores, vector databases, prompt history, telemetry, or third-party connectors. If the framework has access to sensitive data, the question is not only whether it is vulnerable, but whether it can expose data through prompts, logs, caching, debug output, or tool execution.

A useful review sequence is:

  • Confirm whether the framework stores or forwards prompts, embeddings, and completion traces.
  • Check whether secrets are passed through code, config files, or runtime variables.
  • Validate whether access is scoped to the minimum data set needed for the use case.
  • Require logging controls that avoid capturing credentials, tokens, or regulated data.
  • Test whether retrieval and plugin features can reach systems beyond the intended boundary.

Framework-level review should also include identity and workload controls. If a GenAI framework uses service accounts, agent connectors, or tool access, those identities should be treated as privileged non-human identities and governed accordingly. NHIMG’s Top 10 NHI Issues is a useful companion for spotting over-privilege, weak rotation, and missing monitoring. For implementation guidance, teams can pair that with NIST SP 800-53 Rev 5 Security and Privacy Controls to map data protection, access control, and audit requirements into the review process. These controls tend to break down when developers allow the framework to inherit broad environment access in containerized or serverless deployments because the runtime boundary becomes too permissive.

Common Variations and Edge Cases

Tighter framework review often increases delivery overhead, so organisations have to balance developer speed against exposure risk. That tradeoff is especially visible in retrieval-augmented generation, internal copilots, and agentic workflows where the framework needs broad read access to be useful. Current guidance suggests treating those cases as higher risk by default, but there is no universal standard for how much data access is acceptable across all use cases.

One common edge case is open-source code that is safe in isolation but becomes risky once teams add plugins, vector stores, or telemetry packages. Another is local development, where engineers assume non-production data is harmless and end up exposing secrets through notebooks, traces, or shared debug artifacts. The DeepSeek breach illustrates how quickly sensitive records can become visible when AI systems are misconfigured or exposed. For governance maturity, the Ultimate Guide to NHIs — Regulatory and Audit Perspectives helps teams align framework review with audit evidence, retention, and accountability. The right control is not to ban GenAI frameworks outright, but to classify where they can operate, what they can touch, and what must be blocked before code reaches production.

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, OWASP Agentic AI Top 10 and CSA MAESTRO address the attack and risk surface, while NIST AI RMF and NIST CSF 2.0 set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
OWASP Non-Human Identity Top 10NHI-01GenAI frameworks often introduce privileged non-human identities.
OWASP Agentic AI Top 10A2Frameworks with tool or plugin access can behave like autonomous agents.
CSA MAESTROMSG-03MAESTRO addresses governance for AI systems that access data and external tools.
NIST AI RMFAI RMF supports risk-based assessment of GenAI framework data exposure.
NIST CSF 2.0PR.DS-1Data security controls directly apply to framework-driven data flows.

Apply runtime governance to any framework that can retrieve, transform, or transmit sensitive data.

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