Join our Newsletter — 33% off our NHI Course
Home› FAQ› Cyber Security› Should teams prioritise version pinning or runtime controls…
Cyber Security

Should teams prioritise version pinning or runtime controls for AI dependencies?

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

Both matter, but runtime controls should be prioritised when a dependency can access secrets during execution. Version pinning reduces exposure to known bad releases, yet it does not stop a trusted package from behaving maliciously once installed. The stronger control is to govern what the process can read, write, and send after startup.

Why runtime controls usually win when AI dependencies can touch secrets

Version pinning is useful, but it only reduces uncertainty about which release you install. Once a dependency is executing inside your process, the higher-value control is to constrain what that process can access at runtime: secrets, local files, network destinations, service endpoints, and outbound data paths. That is the control that limits damage if a package is compromised, updated maliciously, or simply behaves more broadly than expected. For open source dependencies, the Open Source Security Guide is the natural starting point because it ties pinning to the broader problem of dependency trust, transitive risk, and malicious package behaviour.

Runtime controls matter most when the dependency is not just imported, but granted meaningful authority during execution. If a library, plugin, or agent framework can read tokens, call APIs, or exfiltrate prompts and outputs, pinning the version does not stop abuse. The practical question is whether the dependency is allowed to behave like a trusted component or is fenced in as an untrusted one.

That is why teams should treat version pinning as a supply-chain hygiene measure and runtime restriction as an execution-time safety measure. Both reduce risk, but they answer different failure modes. Pinning helps with known-bad releases and repeatable builds; runtime controls help when a dependency is installed correctly but still uses its legitimate execution path to overreach. For AI systems that make outbound calls or mediate tool use, runtime checks are often the difference between a contained failure and a secrets exposure event. CIS Controls v8 remains useful here because it anchors the broader discipline of inventory, access control, logging, and vulnerability management that these dependencies depend on.

What runtime controls should cover in practice

Good runtime control is not a single product feature. It is the combination of least-privilege process permissions, secret isolation, egress restriction, and observability around what the dependency actually does after startup. If the dependency should never read a production token, mount a writable directory, or reach the public internet, enforce that structurally rather than relying on code review or version selection.

The strongest implementations make the boundary visible. They separate build-time trust from runtime trust, and they prevent a dependency from turning local execution into broader system access. That usually means scoped credentials, short-lived access where possible, explicit allowlists for network and filesystem access, and audit logs that show when a package or model component attempted to cross its intended boundary. Container-level hardening and runtime confinement are especially relevant when the dependency is packaged as part of an AI service. NIST SP 800-190 Container Security is useful because it distinguishes image and deployment hygiene from the runtime protections needed once software is actually running.

For AI-specific deployment patterns, the same logic applies to model wrappers, tool adapters, and orchestration code. They are not safe simply because they were pinned to a known version. They need runtime limits that constrain what they can invoke, what they can export, and what credentials they can reach. Where teams already use defensive filtering, AI Guardrails and AI Firewalls Guide and the Generative AI Data Loss Prevention Guide help connect runtime constraints to content filtering, prompt handling, and leakage prevention.

How to decide where pinning ends and runtime protection begins

Use version pinning when the main problem is reproducibility or avoiding a known vulnerable release. Use runtime controls when the main problem is trust after load time. If the dependency is pure computation with no access to secrets, pinning may be enough for the immediate risk reduction. If it can read environment variables, reach internal APIs, generate outbound requests, or influence downstream tooling, runtime restrictions should be treated as the primary control.

The most common mistake is assuming that a pinned dependency is a safe dependency. In reality, a trusted package can be updated upstream with malicious intent, compromised through its supply chain, or used as a convenient execution path for data theft once installed. Runtime controls reduce the blast radius even when the package version is stable. They also help when patching is delayed, because you can limit exposure while waiting for an approved upgrade path. If you need a formal way to track exceptions, the Security Exceptions and Risk Acceptance Guide is a good fit for documenting why a temporary runtime restriction or version hold exists and when it must be revisited.

Standards & Framework Alignment

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

CIS Controls v8, NIST SP 800-53 Rev 5 and OWASP ASVS set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
CIS Controls v8CIS-6 — Access Control ManagementRuntime restriction of AI dependencies depends on scoped access and least privilege.
Recommendation — Limit dependency permissions to the minimum resources and destinations required.
NIST SP 800-53 Rev 5IA-5 — Authenticator ManagementAI dependencies often rely on secrets and tokens that must be protected at runtime.
SC-7 — Boundary ProtectionRuntime controls for AI dependencies depend on constraining network and data paths.
Recommendation — Rotate and scope secrets used by dependencies so they cannot be reused broadly. Restrict dependency egress and inbound paths to approved boundaries.
OWASP ASVSV14 — Data ProtectionAI dependencies that can access secrets need runtime safeguards against data exposure.
Recommendation — Apply runtime protections that prevent sensitive data from being exposed or exfiltrated.

Practitioner Guidance

What to prioritise: Prioritise runtime controls first when the dependency can access secrets, credentials, or sensitive network paths. Pin versions in parallel, but do not treat pinning as a substitute for runtime confinement.

What to verify: Verify what the process can read, write, and send after startup, not just which release is installed. If the dependency can reach production secrets or unrestricted egress, the control set is too weak.

Decision rule: If a dependency can do anything harmful with already-available secrets, put the first engineering effort into reducing runtime authority and blast radius. If the main concern is repeatability or a documented bad release, pinning becomes the leading control for that specific issue.

Practitioner takeaway: Version pinning reduces supply-chain uncertainty, but runtime controls determine whether a dependency can turn execution into impact. For AI dependencies, the security boundary that matters most is what they can do once they are already running.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

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