By NHI Mgmt Group Editorial TeamBased on Pixee: “Why AI Can't Audit Its Own Code: Replit's Research on Deterministic Security” (January 22, 2026)

TL;DR: Replit’s research shows AI-only code scanners missed dependency CVEs, secrets hidden in JSX literals, and produced inconsistent results across identical runs, underscoring that security scanning must be deterministic and auditable, according to Pixee’s analysis of the findings. The real issue is not AI in remediation, but replacing structural detection with statistical inference, which leaves AppSec blind to known risk classes.


At a glance

What this is: Pixee's analysis of Replit's research says AI-only code scanners miss known vulnerability classes and return inconsistent results, which makes them unsuitable as the baseline for security detection.

Why it matters: AppSec, platform, and engineering teams need deterministic controls because coverage that changes with syntax or prompts cannot support trusted triage, auditability, or governance.


Context

AI code security scanning is only useful when the same input produces the same finding. If detection changes with prompt wording, variable names, or code formatting, the tool is behaving like an interpreter rather than a control, which breaks auditability and weakens security governance. That matters in modern software programmes where AI-generated code and third-party dependencies already expand the attack surface.

The core problem here is not whether AI can help developers, but whether it can be trusted to act as the primary detection layer. In a code pipeline, deterministic controls need to establish the baseline for vulnerable dependencies, secrets, and structural flaws before any probabilistic analysis is used for triage or remediation. That is the right framing for both AppSec and broader software supply chain governance.


Key questions

Q: How should teams prevent AI code scanners from becoming the primary security control?

A: Treat AI scanners as advisory, not authoritative. Use deterministic SAST, SCA, and secret detection to establish the security baseline, then let AI help with explanation and remediation. The control decision is simple: if a finding cannot be reproduced on the same input, it should not decide whether code ships.

Q: Why do AI-only code scanners miss dependency vulnerabilities and secrets?

A: They rely on pattern recognition and interpretation, while those problems require structural analysis and exact version intelligence. Dependency CVEs depend on lockfiles and advisory data, and secrets can hide in syntactic forms that do not look like credentials to a model. That makes coverage uneven and hard to trust.

Q: What are the signs that an AI security scanner is failing in practice?

A: The biggest warning signs are inconsistent findings across identical runs, sensitivity to prompt wording, and missed issues when code is rewritten without changing its meaning. If the scanner flags a variable assignment but not the same secret in a literal, the control is syntax-sensitive rather than security-sensitive.

Q: What should AppSec teams do when AI scanning and deterministic tools disagree?

A: Default to the deterministic result and investigate the discrepancy rather than averaging the two outputs. AI disagreement is a signal that the model is not operating as a reliable detector. In release governance, reproducible evidence should outrank probabilistic confidence.


Technical breakdown

Why deterministic code scanning matters

Deterministic scanning means the same code, under the same rules, produces the same result every time. That property is central to security because findings must be reproducible, explainable, and testable. Static analysis, software composition analysis, and secret detection work by parsing structure, matching known patterns, and checking versions against databases. Those methods do not depend on natural-language interpretation or model inference. When a scanner behaves differently because a variable name changed, the problem is not coverage alone but control integrity. A security control that cannot be repeated reliably cannot be validated confidently.

Practical implication: Use deterministic scanners as the authoritative detection layer before any AI-assisted review or remediation.

Why AI-only scanners miss dependency CVEs and embedded secrets

Dependency scanning requires version comparison against vulnerability intelligence, not interpretation of code intent. An LLM does not naturally perform lockfile parsing, database lookup, and affected-version matching with consistent precision. The same limitation shows up with secrets hidden in JSX literals or other syntactic edge cases. AI systems often infer secrets from patterns that resemble credentials, so they can miss values that do not match the training-time cues they expect. This is why syntax-sensitive detection is dangerous in real codebases, where developers use unusual structures, copy-paste snippets, and rapid prototyping that do not follow tidy patterns.

Practical implication: Pair SCA and secret scanning with structural rules that catch issues regardless of syntax or naming.

Where AI fits in a secure detection pipeline

AI is better suited to remediation assistance, explanation, and prioritisation after a deterministic tool has already identified the issue. That division of labour matters because detection is a control function, while fix generation is an interpretive function. If the same model both finds and judges the vulnerability, the pipeline loses independence and becomes hard to trust. The stronger architecture is baseline detection first, then AI-assisted triage and fix synthesis, then human review before merge. This pattern also aligns with software governance expectations because it preserves traceability from finding to fix to release.

Practical implication: Keep AI in the remediation layer and preserve deterministic findings as the source of record.


Threat narrative

Attacker objective: Exploit missed dependency flaws or exposed secrets in production code that the AI-only scanner failed to identify.

  1. Entry occurs through vulnerable or mis-scanned code that AI-only tools fail to flag because the issue is hidden behind syntax, prompt ambiguity, or dependency metadata.
  2. Credential or secret exposure persists when embedded values in literals, variables, or configuration are not detected consistently by the scanner.
  3. Escalation follows when dependency CVEs or leaked secrets remain in the codebase and are available for abuse by attackers or downstream automation.
  4. Impact is blind spot driven: teams ship vulnerable code believing the security review was complete when it was not.

Read and download The State of NHI & AI Agent Breach Report 2026, covering 200+ breaches impacting Non-Human Identities including AI Agents.


NHI Mgmt Group analysis

Deterministic baselines are now a governance requirement for AI-assisted development. Security scanning that changes with prompts or syntax cannot be relied on as a control because it is not reproducible. That makes validation, exception handling, and audit review materially weaker, especially when AI-generated code is entering production at scale. Practitioners should treat determinism as the minimum standard for any code security detector.

AI-only scanning creates a control gap at the exact point where software supply chain risk is growing fastest. The article's findings show that dependency intelligence and structural secret detection are not natural fits for probabilistic systems. In practical terms, this means the baseline must come from SCA, SAST, and secret scanning, with AI restricted to interpretation and remediation.

Security teams should think in terms of detection authority, not tool novelty. The fact that AI can explain code does not mean it can govern code risk. In mature programmes, the tool that finds the vulnerability must be the one the organisation can reproduce, test, and defend in audit. That is the control boundary AppSec teams need to preserve.

AI-assisted development increases the value of structural controls, not lessens it. The more code is generated quickly, the more important it becomes to maintain consistent baselines for vulnerable packages, exposed secrets, and unsafe constructs. The practitioner conclusion is straightforward: if the scanner cannot be trusted to find the same issue twice, it should not be the primary gate.

What this signals

Deterministic detection is the real control boundary for AI-generated code. As code generation accelerates, the security function has to move from asking whether a model can reason about risk to asking whether the control can be reproduced, explained, and audited. That is why structural analysis should remain the baseline in AppSec pipelines.

AI-assisted remediation is useful only after the finding is trustworthy. The practical programme shift is to keep models in the fix-generation layer while preserving deterministic evidence for triage, exception handling, and review. That separation reduces governance ambiguity and gives engineers something they can verify.

Syntax-sensitive coverage is a warning sign of weak control design. If a scanner misses embedded secrets or behaves differently when variable names change, the issue is not just a false negative rate. It is a failure to govern detection as a repeatable security control.


For practitioners

  • Enforce deterministic scanning as the release gate Require SAST, SCA, and secret detection to run before merge or deployment, and treat AI output only as supplemental analysis.
  • Validate dependency coverage against vulnerability databases Confirm that your pipeline queries current package intelligence and flags exact affected versions rather than relying on model inference.
  • Test scanners against syntax variants Run the same vulnerable pattern in variables, literals, comments, and alternate naming to verify the tool returns consistent findings.
  • Separate detection from remediation Use AI to explain findings and draft fixes, but keep the finding source deterministic so reviewers can reproduce every result.

Key takeaways

  • AI-only code scanners cannot be the baseline for AppSec because their findings change with prompts, syntax, and model inference.
  • Replit's testing showed 0% detection of dependency CVEs and missed secrets embedded in JSX literals, which exposes a structural control gap.
  • The strongest operating model is deterministic detection first, AI-assisted remediation second, and human review before release.

Standards & Framework Alignment

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

OWASP API Security Top 10 addresses the attack and risk surface, while OWASP ASVS, OWASP SAMM, NIST CSF 2.0 and CIS Controls v8 set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
OWASP API Security Top 10API9 — Improper Inventory ManagementThe article focuses on missed dependency coverage and incomplete security visibility in code pipelines.
Recommendation — Inventory dependencies and scan coverage so version-specific vulnerabilities are detected before release.
OWASP ASVSV16 — Security Logging and Error HandlingDeterministic findings and auditable results are the core issue in this scanning debate.
Recommendation — Require reproducible findings and traceable scanner output before treating results as trustworthy.
OWASP SAMMVerification — VerificationThe article is about how software security practices are validated in the development lifecycle.
Recommendation — Build verification steps that confirm scanners are repeatable, testable, and independently reviewable.
NIST CSF 2.0PR.DS-01 — Data-at-Rest is ProtectedThe article discusses baseline security controls for code and dependency scanning in a governed programme.
Recommendation — Use governed protection controls to ensure code review tooling produces consistent, defensible outcomes.
CIS Controls v8CIS-16 — Application Software SecurityApplication security practices are the main control domain affected by the article's findings.
Recommendation — Apply application security controls that require deterministic detection before code enters production.

Key terms

  • Deterministic Scanning: A repeatable security analysis method that checks code against known rules, patterns, or policy conditions. It is valued because the same input should produce the same output, which supports auditability, tracking, and consistent operational decisions across the software delivery lifecycle.
  • Static analysis: Static analysis is the inspection of source code or configuration without executing it. It helps identify insecure patterns early, but its value depends on accuracy, timing, and whether the output is usable enough for developers to fix issues while they are still working on the code.
  • Software Composition Analysis: Software composition analysis is the inspection of dependencies and packages to identify known vulnerabilities in third-party or transitive code. It complements secret scanning by answering a different question: what exploitable software weaknesses are present in the container, regardless of whether credentials are embedded.
  • Secrets detection: Secrets detection is the identification of credentials such as API keys, tokens, certificates, and passwords in code, configuration files, or pipelines. In mature programmes, detection is paired with rotation, revocation, and ownership so exposed secrets do not remain usable.

Deepen your knowledge

NHI Mgmt Group covers identity security, NHI governance, and agentic AI through independent research, practitioner guides, and the NHI Foundation Level course. Explore how identity governance principles strengthen security programmes that depend on reliable control evidence.
NHIMG Editorial Note
Published by the NHIMG editorial team on August 20, 2026.
Updated on October 12, 2026.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org