TL;DR: Model variance makes deterministic, non-deterministic and probabilistic AI non-interchangeable in application security, because it affects auditability, control consistency and enforcement reliability, according to Cycode. Commercial code-generation models hallucinate package names at least 5.2% of the time while open-source models reach 21.7%, and the practical implication is that security teams must separate reasoning from enforcement before agentic workflows turn inconsistency into an attack surface.
At a glance
What this is: Cycode’s analysis separates AI modes in AppSec and concludes that the wrong mode in the wrong control role creates audit, compliance and security risk.
Why it matters: IAM, NHI and AppSec teams need this distinction because agentic workflows can turn inconsistent AI behaviour into policy drift, unreliable enforcement and unmanaged access decisions.
By the numbers:
- Commercial code-generation models hallucinate package names at least 5.2% of the time.
- Open source code-generation models hallucinate package names 21.7% of the time.
👉 Read Cycode's analysis of deterministic, non-deterministic and probabilistic AI in AppSec
Context
Application security is now dealing with a control problem, not just a capability problem. The key issue is whether an AI system behaves the same way every time, because consistency determines whether security output can be enforced, audited and trusted in production. That matters for AppSec programmes, but it also matters where AI agents touch identity, secrets and access decisions.
The article argues that deterministic, non-deterministic and probabilistic AI belong in different parts of the control stack. That distinction becomes especially relevant when AI agents generate code, evaluate risk or make pipeline decisions at scale, because variance can undermine evidence, introduce false confidence and widen the boundary between human oversight and machine action.
Key questions
Q: How should security teams use AI without turning it into a control dependency?
A: Security teams should use AI for summarisation, correlation, and prioritisation, then keep containment in deterministic controls such as access policy, segmentation, and revocation. The key rule is that AI can recommend action, but it should not be the only mechanism that can stop exposure. That separation reduces false confidence and preserves auditability.
Q: Why do non-deterministic AI systems create governance risk in security pipelines?
A: Because variance breaks reproducibility. If the same codebase or dependency graph produces different outputs across runs, teams cannot reliably prove control effectiveness, compare remediation decisions or explain why a finding was blocked one day and allowed the next. That inconsistency becomes a governance and assurance problem, not just a model issue.
Q: What do security teams get wrong about confidence scores in AI tools?
A: They often treat confidence as certainty rather than calibration. A high score only matters if the threshold has been tested against the organisation’s own data, workflows and false-positive tolerance. Without that calibration, probabilistic scoring can create noisy triage or, worse, confidently wrong blocking decisions.
Q: How do organisations reduce the risk of AI-generated package hallucinations?
A: Require dependency allowlisting, validate package names against trusted registries and reject any identifier that is not already approved. Teams should also monitor for newly suggested packages in AI-assisted code changes, because hallucinated names can be turned into malicious supply chain targets.
Technical breakdown
Deterministic AI as an enforcement layer
Deterministic AI returns the same result for the same input, which is why it fits policy enforcement, known vulnerability detection and audit evidence. In AppSec, that means repeatable SAST, SCA, secrets scanning and infrastructure policy checks that can be regression-tested. The technical value is not intelligence in the abstract, but traceability from input to output. When a rule fires inconsistently, the control itself becomes suspect. In regulated environments, reproducibility is a control property, not just a model feature.
Practical implication: keep enforcement, gating and evidence generation on deterministic controls that can be tested and reproduced.
Non-deterministic AI and the variance problem
Non-deterministic AI introduces output variability, which is useful for reasoning, explanation and synthesising signals across tools. It helps teams understand why a finding matters, but the same variability also produces hallucinations and inconsistent recommendations. In AppSec, that creates a security boundary problem: a model that is helpful in triage may be unsafe as the sole source of policy decisions. The issue is not that the model is broken, but that its behaviour is not stable enough to serve as the control itself.
Practical implication: use non-deterministic AI for analysis and explanation, but never as the only mechanism enforcing a security decision.
Probabilistic AI and confidence calibration
Probabilistic AI assigns confidence scores to outputs, which makes it useful for prioritisation, anomaly detection and risk scoring. That strength becomes a weakness if teams treat confidence as certainty without validating thresholds in their own environment. A model can be well calibrated in one pipeline and badly miscalibrated in another, especially when data quality, code patterns or deployment context shift. For security teams, the real task is not accepting or rejecting probabilistic models, but knowing what the score means operationally and where false confidence will hurt.
Practical implication: calibrate confidence thresholds against your own pipeline data before you let probabilistic scoring influence remediation priority.
Threat narrative
Attacker objective: The attacker wants to turn AI variance into a reliable path for dependency compromise, control bypass or policy drift inside the software delivery chain.
- Entry occurs when a non-deterministic model introduces inconsistent package suggestions or security decisions into a development pipeline. Escalation happens when that variance is trusted as a control and permitted to shape remediation, dependency selection or policy enforcement without deterministic checks. Impact follows when attackers exploit hallucinated package names, inconsistent reviews or unstable agent behaviour to inject malicious dependencies or weaken control consistency at scale.
NHI Mgmt Group analysis
Deterministic control, not model sophistication, is what makes AI safe in AppSec: the article is right to frame consistency as a security control rather than a quality preference. Once AI is used in scanning, triage or enforcement, repeatability becomes a governance requirement because auditors need evidence and engineers need stable behaviour. Practitioners should treat determinism as the default property for control points, not as an implementation detail.
AI variance becomes an identity problem as soon as agents act on code or secrets: when an AI system can create, move or recommend credentials, its behaviour starts to resemble a non-human identity with operational authority. That is where AppSec, IAM and NHI governance intersect. The field needs to stop asking only what the model can output and start asking what access, privilege and delegation the model is allowed to exercise.
Slopsquatting is a named concept worth tracking because it converts hallucination into supply chain abuse: a model that invents package names is not just making an error, it is creating a target list for attackers. That makes model variance part of the software supply chain threat model, not just an LLM evaluation metric. Practitioners should map this risk to package approval, dependency controls and runtime validation.
Probabilistic scoring is useful only when the organisation can explain its thresholds: the article’s emphasis on confidence scores is important, but confidence without calibration creates a false sense of control. Security programmes need to know which score drives triage, which score triggers blocking, and which score only informs investigation. The practical conclusion is that governance should define decision thresholds before the model is allowed to influence them.
Regulated deployment pressure will keep pushing AI toward auditable control roles: the more organisations rely on automated findings to satisfy compliance evidence, the more they will need separation between reasoning models and enforcement layers. That trend favours architectures where deterministic controls produce the evidence and non-deterministic systems enrich the analysis. Teams should expect this split to harden into procurement and assurance requirements.
What this signals
Control architecture will matter more than model choice. AppSec programmes that blur reasoning, prioritisation and enforcement into one AI layer will struggle to prove effectiveness when auditors or incident responders ask for evidence. The practical direction is clear: use deterministic controls for decisions that must be repeatable, and place AI assistance where variance can be tolerated.
Agentic workflows raise the identity question for AI systems. As soon as an AI system can select tools, touch repositories or move secrets, it is operating like a managed non-human identity. That means the security programme needs access boundaries, approval scopes and monitoring that are closer to NHI governance than to simple model evaluation.
The distinction between reasoning and control will shape procurement language. Buyers will increasingly ask whether a product is scoring, explaining or enforcing, and those roles should not be conflated. The cleaner that separation becomes, the easier it is to align with assurance expectations in frameworks such as the NIST Cybersecurity Framework 2.0 and the NIST IR 8596 Cyber AI Profile.
For practitioners
- Separate reasoning from enforcement Use non-deterministic models for explanation, synthesis and recommendation, but require deterministic controls for pipeline gates, policy decisions and audit evidence. This keeps AI helpful without making it the control itself.
- Calibrate confidence thresholds by pipeline Test probabilistic scoring against your own code, dependency and runtime data before allowing scores to influence remediation priority or blocking decisions. A score is only useful if the team agrees what it means operationally.
- Treat hallucinated package names as a supply chain risk Block unapproved dependency identifiers, validate package metadata against trusted registries and monitor for model-generated names that do not exist in your approved catalogue. That is the practical defence against slopsquatting.
- Document which AI mode sits at each control point Record whether a stage uses deterministic, non-deterministic or probabilistic AI, and link that choice to the expected assurance level. This makes audits faster and exposes where variance is being relied on as if it were certainty.
Key takeaways
- AI behaviour in AppSec is now a control question because inconsistent outputs can undermine auditability, enforcement and trust.
- The article’s own evidence shows why the risk is real, with hallucinated package names appearing in measurable proportions of code-generation output.
- Security teams should separate deterministic enforcement from AI reasoning and calibrate probabilistic scoring before allowing it to shape decisions.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
MITRE ATT&CK address the attack and risk surface, while NIST AI RMF, NIST SP 800-53 Rev 5, NIST CSF 2.0 and NIST AI 600-1 set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| NIST AI RMF | GOVERN | The article centres on AI governance, accountability and control separation. |
| NIST SP 800-53 Rev 5 | AU-2 | Audit evidence depends on repeatable security decisions and traceable AI outputs. |
| NIST CSF 2.0 | PR.DS-1 | The article connects AI outputs to secure handling of code, secrets and security data. |
| MITRE ATT&CK | TA0006 , Credential Access; TA0002 , Execution | Hallucinated packages and AI-driven code changes can enable execution and credential-related abuse. |
| NIST AI 600-1 | The article aligns with generative AI governance and trustworthy AI deployment concerns. |
Map AI-assisted supply chain abuse to execution and credential-access tactics, then add validation gates.
Key terms
- Deterministic AI: An AI system is deterministic when the same input produces the same output every time. In security, that repeatability supports testing, auditability and reliable enforcement, which is why deterministic systems are better suited to gates, policy checks and evidence generation than to open-ended reasoning tasks.
- Non-deterministic AI: An AI system that can produce different outputs or action paths from similar inputs. For identity governance, this matters because access scope, review evidence, and control testing cannot assume a fixed execution pattern the way they often can with scripted automation.
- Probabilistic AI: Probabilistic AI assigns confidence levels rather than binary answers, which makes it useful for ranking, scoring and anomaly detection. The risk is miscalibration, where teams treat a score as certainty without validating what that score means in their own operational environment.
- Slopsquatting: Slopsquatting is a supply-chain attack that exploits hallucinated package names suggested by AI systems. An attacker registers the invented name in a public registry and waits for a developer or build pipeline to install it. The risk sits at the intersection of model error, dependency trust, and software delivery speed.
What's in the full article
Cycode's full article covers the operational detail this post intentionally leaves for the source:
- Side-by-side examples of where deterministic, non-deterministic and probabilistic modes belong in AppSec workflows
- The hybrid architecture behind Cycode's separation of scanning, reasoning and risk analysis across pipeline stages
- The practical framework for matching AI mode to use case in regulated environments and agentic development
- How the platform connects security context across code, infrastructure, identities and runtime activity
Deepen your knowledge
The NHI Foundation Level course, the industry's only accredited NHI security programme, covers NHI governance, machine identity security and secrets management. It is a practical fit for practitioners who need to connect identity control design to AI-assisted security operations.
Published by the NHIMG editorial team on August 20, 2026.
NHI Mgmt Group — the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org