VibeGuard blocks AI-generated code leaks with perfect recall
VibeGuard can detect artifact hygiene, packaging drift, source-map exposure, hardcoded secrets, and supply-chain risks in AI-generated code
AI/ML arXiv 1 Apr 2026 Defense Prototype evidence
Published as “VibeGuard: A Security Gate Framework for AI-Generated Code”
Why it matters
Integrating VibeGuard as a prepublish hook can stop accidental source-map leaks and other packaging exposures before they reach users.
Summary
VibeGuard detects all five categories of packaging-related vulnerabilities in AI-generated code, achieving 100% recall and 89.47% precision on a synthetic test suite of eight projects, and makes correct pass/fail decisions for every project under all three built-in policies. The tool blocks publishes that would expose source maps, hard-coded secrets, mis-configured packaging, supply-chain risks, or private artifacts. However, the evaluation is limited to synthetic projects and the ConfigScanner produces false positives, lowering its precision to 71.4%.
What they found 1
- VibeGuard achieved perfect recall and high precision while correctly gating all test projects.
“VibeGuard achieved 100% recall, 89.47% precision (F1 = 94.44%), and correct pass/fail gate decisions on all eight projects across three policy levels.”
Caveats 5
- Two false positives were observed from the ConfigScanner, lowering its precision to 71.4%.
- The evaluation uses synthetic projects with planted vulnerabilities. Real vibe-coded codebases will contain subtler and more varied patterns; our recall figure should be treated as an upper bound until the tool is tested on production repositories.
- The secret scanner relies on regular expressions and a placeholder heuristic. It will miss obfuscated or non-standard credential formats and may flag test fixtures that happen to match key patterns.
- VibeGuard is purely static. It cannot catch vulnerabilities that appear only at runtime (SSRF, insecure deserialization) or configurations assembled dynamically.
- Coverage is currently limited to npm and pip ecosystems. Maven, Cargo, and NuGet have analogous packaging concerns but different file layouts.
What’s new here 4
- Targets packaging-configuration and artifact-boundary issues that existing SAST and secret-scanning tools miss.
- Implements a pre-publish gate that inspects the actual publishable artifact rather than just source code.
- Provides dedicated scanners for source-map content, ignore-file drift, and unpinned dependencies.
- Offers three built-in policy profiles (default, strict, permissive) to tune tolerance for findings.