{
  "schema": "vedokrok.public-item.v1",
  "release_id": "MHC-RPUB-20260920-75ad787a",
  "url": "/knowledge/audit-the-version-before-merging-an-ai-added-dependency",
  "id": "MHC-D-RESEARCH-0661",
  "version": "0.1.0",
  "title": "Audit the version before merging an AI-added dependency",
  "summary": "A real dependency can still be a known vulnerable dependency.",
  "kind": "protocol",
  "body": "Run the project's normal dependency and vulnerability checks on every new or changed dependency. Inspect the lockfile and release provenance, pin versions according to project policy, and separate 'latest' from 'approved.' Treat a clean scan as one signal, not a guarantee.",
  "limits": [
    "Vulnerability databases can lag or miss issues; high-risk components may need deeper supply-chain review."
  ],
  "topics": [
    "union-ai-assisted-coding-safeguards"
  ],
  "intents": [],
  "source_ids": [
    "RS-1C68AE8325C384C0",
    "RS-F8FE84C698B3B53A"
  ],
  "evidence": [
    {
      "claim": "OWASP recommends auditing AI-suggested dependencies and versions against current vulnerability information rather than assuming a model knows recent CVEs or legitimate package names.",
      "source_id": "RS-1C68AE8325C384C0",
      "role": "supports",
      "note": "Dependency scanners also have coverage and freshness limits; manual package identity and provenance checks can still matter.",
      "locator": "Hallucinated and Outdated Dependencies"
    },
    {
      "claim": "NIST SSDF recommends integrating secure development practices into the software lifecycle rather than treating security as a separate late-stage review.",
      "source_id": "RS-F8FE84C698B3B53A",
      "role": "supports",
      "note": "The framework is high-level and must be tailored to the organization's development model and risk.",
      "locator": "SSDF overview"
    }
  ],
  "use_when": [
    "The package is legitimate, but the agent chose a version from stale training or an old example."
  ],
  "avoid_when": [
    "Vulnerability databases can lag or miss issues; high-risk components may need deeper supply-chain review."
  ],
  "example": "A valid library is rejected at the AI-suggested version because the project's scanner identifies a known vulnerability fixed in a later release.",
  "check": "The dependency version is justified by current project security checks rather than model memory.",
  "steps": [
    "Dependency audit run.",
    "Lockfile inspected.",
    "Version matches policy.",
    "Known vulnerability sources checked.",
    "License/provenance checks run if required."
  ],
  "sources": [
    {
      "id": "RS-1C68AE8325C384C0",
      "title": "Secure Coding with AI Cheat Sheet",
      "url": "https://cheatsheetseries.owasp.org/cheatsheets/Secure_Coding_with_AI_Cheat_Sheet.html"
    },
    {
      "id": "RS-F8FE84C698B3B53A",
      "title": "Secure Software Development Framework (SSDF) Version 1.1",
      "url": "https://csrc.nist.gov/pubs/sp/800/218/final"
    }
  ],
  "relations": [],
  "collections": [
    {
      "id": "RC-E25DB1788236EF13",
      "title": "Let coding agents move fast inside a reviewable security boundary",
      "url": "/collections/let-coding-agents-move-fast-inside-a-reviewable-security-boundary"
    }
  ]
}
