{
 "schema_version": 1,
 "generated": "2026-10-31",
 "id": "google-osv-scanner--scan-a-container-image-and-check-licenses-with-osv-scanner",
 "repo": "google/osv-scanner",
 "repo_url": "https://github.com/google/osv-scanner",
 "repo_slug": "google-osv-scanner",
 "title": "Scan a container image and check licenses",
 "page_title": "How to scan a container image and check licenses with Osv Scanner",
 "summary": "Scan an image layer by layer, then check dependency licenses against an allow list.",
 "who": "A platform team gating images and dependencies before they reach production.",
 "problem": "Base images and licenses both carry hidden risk.",
 "outcome": "Image vulnerabilities plus a license report for a project.",
 "steps": [
  "Install OSV-Scanner from the releases page",
  "Run `osv-scanner scan image my-image-name:tag` with your image",
  "Run `osv-scanner --licenses path/to/repository` for a license summary",
  "Run `osv-scanner --licenses=\"MIT,Apache-2.0\" path/to/directory` to check against an allowed SPDX list"
 ],
 "agent_prompt": "With google/osv-scanner, run `osv-scanner scan image my-image-name:tag` for <my image>, then `osv-scanner --licenses path/to/repository` for <my repo>, and list anything that breaks an allowed list of MIT and Apache-2.0.",
 "agents": [
  "claude-code",
  "codex",
  "cursor",
  "gemini-cli"
 ],
 "difficulty": "Intermediate",
 "time": "30 minutes",
 "basis": "readme",
 "caveat": "Image scanning covers Alpine, Debian and Ubuntu plus Go, Java, Node and Python artifacts.",
 "category": "Security and science",
 "tags": [
  "Security and science"
 ],
 "lang": "go",
 "requirements": [
  "A prebuilt binary from the releases page, or Go to run go install",
  "A project directory with lockfiles or manifests, or a container image",
  "Network access to OSV.dev, unless you use offline mode"
 ],
 "risk": "none",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [
  {
   "tag": "data",
   "notice": "License scanning sends package names, versions and ecosystems to deps.dev."
  }
 ],
 "best": false,
 "score": 0.9,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/google-osv-scanner/scan-a-container-image-and-check-licenses-with-osv-scanner/",
 "md": "https://dedupedai.com/use-cases/google-osv-scanner/scan-a-container-image-and-check-licenses-with-osv-scanner/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/google-osv-scanner--scan-a-container-image-and-check-licenses-with-osv-scanner.json",
 "api_version": "v1"
}
