{"id":13554407,"url":"https://github.com/owasp-dep-scan/dep-scan","last_synced_at":"2026-05-08T18:01:51.073Z","repository":{"id":44779020,"uuid":"236836976","full_name":"owasp-dep-scan/dep-scan","owner":"owasp-dep-scan","description":"OWASP dep-scan is a next-generation security and risk audit tool based on known vulnerabilities, advisories, and license limitations for project dependencies. Both local repositories and container images are supported as the input, and the tool is ideal for integration.","archived":false,"fork":false,"pushed_at":"2026-04-29T17:43:36.000Z","size":22042,"stargazers_count":1232,"open_issues_count":88,"forks_count":129,"subscribers_count":19,"default_branch":"master","last_synced_at":"2026-05-04T17:11:46.986Z","etag":null,"topics":["compliance","containers","cve","cyclonedx","dependency-analysis","dependency-audit","devsecops","reachability-analysis","risk-audit","sbom","sca","security-audit","security-tools","supply-chain-security","vex","vulnerability-scanners"],"latest_commit_sha":null,"homepage":"https://depscan.readthedocs.io","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/owasp-dep-scan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"custom":["https://owasp.org/donate?reponame=www-project-dep-scan\u0026title=OWASP+dep-scan"],"github":["prabhu","cerrussell"]}},"created_at":"2020-01-28T20:41:58.000Z","updated_at":"2026-05-01T11:50:52.000Z","dependencies_parsed_at":"2023-09-28T20:35:59.779Z","dependency_job_id":"d5ab31a0-ed09-4bb0-adff-4070f1a1c5e3","html_url":"https://github.com/owasp-dep-scan/dep-scan","commit_stats":null,"previous_names":["owasp-dep-scan/dep-scan","appthreat/dep-scan"],"tags_count":182,"template":false,"template_full_name":null,"purl":"pkg:github/owasp-dep-scan/dep-scan","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/owasp-dep-scan%2Fdep-scan","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/owasp-dep-scan%2Fdep-scan/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/owasp-dep-scan%2Fdep-scan/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/owasp-dep-scan%2Fdep-scan/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/owasp-dep-scan","download_url":"https://codeload.github.com/owasp-dep-scan/dep-scan/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/owasp-dep-scan%2Fdep-scan/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32791407,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-08T08:22:46.396Z","status":"ssl_error","status_checked_at":"2026-05-08T08:22:45.650Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["compliance","containers","cve","cyclonedx","dependency-analysis","dependency-audit","devsecops","reachability-analysis","risk-audit","sbom","sca","security-audit","security-tools","supply-chain-security","vex","vulnerability-scanners"],"created_at":"2024-08-01T12:02:47.214Z","updated_at":"2026-05-08T18:01:51.064Z","avatar_url":"https://github.com/owasp-dep-scan.png","language":"Python","funding_links":["https://owasp.org/donate?reponame=www-project-dep-scan\u0026title=OWASP+dep-scan","https://github.com/sponsors/prabhu","https://github.com/sponsors/cerrussell"],"categories":["Python","Application Security"],"sub_categories":["SCA"],"readme":"# Introduction\n\nOWASP dep-scan is a next-generation security and risk audit tool based on known vulnerabilities, advisories, and license limitations for project dependencies. Both local repositories and container images are supported as the input, and the tool is ideal for integration with ASPM/VM platforms and in CI environments.\n\n\u003cimg src=\"depscan-logo.png\" width=\"200\" height=\"auto\" /\u003e\n\n[![SBOM](https://img.shields.io/badge/SBOM-with_%E2%9D%A4%EF%B8%8F_by_cdxgen-FF753D)](https://github.com/cdxgen/cdxgen) [![release](https://github.com/owasp-dep-scan/dep-scan/actions/workflows/pythonpublish.yml/badge.svg)](https://github.com/owasp-dep-scan/dep-scan/actions/workflows/pythonpublish.yml)\n\n## Contents\n\n- [Features](#features)\n    - [Vulnerability Data sources](#vulnerability-data-sources)\n    - [Linux distros](#linux-distros)\n- [Quick Start](#quick-start)\n    - [Scanning projects locally (Python version)](#scanning-projects-locally-python-version)\n    - [Scanning containers locally (Python version)](#scanning-containers-locally-python-version)\n    - [Scanning projects locally (Docker container)](#scanning-projects-locally-docker-container)\n    - [Server mode](#server-mode)\n- [depscanGPT](https://chatgpt.com/g/g-674f260c887c819194e465d2c65f4061-owasp-dep-scan)\n- [Documentation (depscan.readthedocs.io)](https://depscan.readthedocs.io)\n    - [Supported languages and package format](https://depscan.readthedocs.io/supported-languages)\n    - [Reachability analysis](https://depscan.readthedocs.io/reachability-analysis)\n        - [Example analysis for a Java project](https://depscan.readthedocs.io/reachability-analysis#example-analysis-for-a-java-project)\n        - [Example analysis for a JavaScript project](https://depscan.readthedocs.io/reachability-analysis#example-analysis-for-a-java-project)\n    - [Customization through environment variables](https://depscan.readthedocs.io/env-var#customization-through-environment-variables)\n    - [GitHub Security Advisory](https://depscan.readthedocs.io/adv-usage#github-security-advisory)\n    - [Suggest mode](https://depscan.readthedocs.io/adv-usage#suggest-mode)\n    - [Package Risk audit](https://depscan.readthedocs.io/adv-usage#package-risk-audit)\n        - [Automatic adjustment](https://depscan.readthedocs.io/adv-usage#automatic-adjustment)\n        - [Configuring weights](https://depscan.readthedocs.io/adv-usage#configuring-weights)\n    - [Live OS scan](https://depscan.readthedocs.io/adv-usage#live-os-scan)\n    - [License scan](https://depscan.readthedocs.io/adv-usage#license-scan)\n    - [Kubernetes and Cloud apps](https://depscan.readthedocs.io/adv-usage#kubernetes-and-cloud-apps)\n    - [PDF reports](https://depscan.readthedocs.io/adv-usage#pdf-reports)\n    - [Custom reports](https://depscan.readthedocs.io/adv-usage#custom-reports)\n- [License](#license)\n\n## Features\n\n- Scan most application code - local repos, Linux container images, Kubernetes manifests, and OS - to identify known CVEs with prioritization\n- Perform advanced reachability analysis for multiple languages (See reachability analysis)\n- Package vulnerability scanning is performed locally and is quite fast. No server is used!\n- Generate Software Bill-of-Materials (SBOM) with Vulnerability Disclosure Report (VDR) information\n- Generate a Common Security Advisory Framework (CSAF) 2.0 VEX document (check out the [CSAF Readme](contrib/CSAF_README.md))\n- Perform deep packages risk audit for dependency confusion attacks and maintenance risks (See risk audit)\n\n### Precise Reachable data-flows\n\nDetailed data flows to identify both reachable and non-reachable paths in your application based on the full context.\n\n![Reachable Flows](documentation/static/img/depscan-flows.png)\n\n### Clear insights about CVEs\n\nUnderstand CVEs clearly without having to read through the description.\n\n![Dependency Tree with Insights](documentation/static/img/tree1.png)\n\n### Automatic prioritization\n\nOnly focus on CVEs that need your attention.\n\n![Prioritization](documentation/static/img/prioritization.png)\n\n### Stay proactive\n\nAlways stay a step ahead with advanced vulnerability and exploit prediction.\n\n![Proactive Measures](documentation/static/img/proactive.png)\n\n### Vulnerability Data sources\n\n- OSV\n- NVD\n- GitHub\n- NPM\n- Linux [vuln-list](https://github.com/appthreat/vuln-list)\n\n### Linux distros\n\n- AlmaLinux\n- Debian\n- Alpine\n- Amazon Linux\n- Arch Linux\n- RHEL/CentOS\n- Rocky Linux\n- Ubuntu\n- OpenSUSE/SLES\n- Photon\n- Chainguard\n- Wolfi OS\n\n## Quick Start\n\ndep-scan is ideal for use during continuous integration (CI) and as a local development tool.\n\n### Scanning projects locally (Python version)\n\n```bash\nsudo npm install -g @cyclonedx/cdxgen\n# Normal version recommended for most users (MIT)\npip install owasp-depscan\n\n# For a full version with all extensions and server mode (Multiple Licenses)\npip install owasp-depscan[all]\n```\n\nThis would install two commands called `cdxgen` and `depscan`.\n\nYou can invoke the scan command directly with the various options.\n\n```bash\ncd \u003cproject to scan\u003e\ndepscan --src $PWD --reports-dir $PWD/reports\n```\n\nThe full list of options is below:\n\n```text\nusage: depscan [-h] [--config CONFIG] [--no-banner] [-i SRC_DIR_IMAGE] [-o REPORTS_DIR] [--csaf]\n               [--profile {appsec,research,operational,threat-modeling,license-compliance,generic,machine-learning,ml,deep-learning,ml-deep,ml-tiny}]\n               [--lifecycle {pre-build,build,post-build} [{pre-build,build,post-build} ...]]\n               [--technique {auto,source-code-analysis,binary-analysis,manifest-analysis,hash-comparison,instrumentation,filename} [{auto,source-code-analysis,binary-analysis,manifest-analysis,hash-comparison,instrumentation,filename} ...]]\n               [--bom-engine {auto,CdxgenGenerator,CdxgenServerGenerator,CdxgenImageBasedGenerator,BlintGenerator} |\n               --vulnerability-analyzer {auto,VDRAnalyzer,LifecycleAnalyzer}] [--reachability-analyzer {off,FrameworkReachability,SemanticReachability}] [--no-suggest]\n               [--risk-audit] [--cdxgen-args CDXGEN_ARGS] [--private-ns PRIVATE_NS] [-t PROJECT_TYPE [PROJECT_TYPE ...]] [--bom BOM | --bom-dir BOM_DIR | --purl SEARCH_PURL]\n               [--report-template REPORT_TEMPLATE] [--report-name REPORT_NAME] [--deep] [--fuzzy-search] [--search-order {purl,pcu,cpe,cpu,url}] [--no-universal]\n               [--no-vuln-table] [--server] [--server-host SERVER_HOST] [--server-port SERVER_PORT] [--cdxgen-server CDXGEN_SERVER] [--debug] [-q | --explain] [-v]\n\nFully open-source security and license audit for application dependencies and container images based on known vulnerabilities and advisories.\n\noptions:\n  -h, --help            show this help message and exit\n  --config CONFIG       Path to the configuration file. Default: $PWD/.config/depscan.toml\n  --no-banner           Do not display the logo and donation banner. Please make a donation to OWASP before using this argument.\n  -i, --src SRC_DIR_IMAGE\n                        Source directory or container image or binary file\n  -o, --reports-dir REPORTS_DIR\n                        Reports directory\n  --csaf                Generate a OASIS CSAF VEX document\n  --profile {appsec,research,operational,threat-modeling,license-compliance,generic,machine-learning,ml,deep-learning,ml-deep,ml-tiny}\n                        Profile to use while generating the BOM. For granular control, use the arguments --bom-engine, --vulnerability-analyzer, or --reachability-analyzer.\n  --lifecycle {pre-build,build,post-build} [{pre-build,build,post-build} ...]\n                        Product lifecycle for the generated BOM. Multiple values allowed.\n  --technique {auto,source-code-analysis,binary-analysis,manifest-analysis,hash-comparison,instrumentation,filename} [{auto,source-code-analysis,binary-analysis,manifest-analysis,hash-comparison,instrumentation,filename} ...]\n                        Analysis technique to use for BOM generation. Multiple values allowed.\n  --bom-engine {auto,CdxgenGenerator,CdxgenServerGenerator,CdxgenImageBasedGenerator,BlintGenerator}\n                        BOM generation engine to use. Defaults to automatic selection based on project type and lifecycle.\n  --vulnerability-analyzer {auto,VDRAnalyzer,LifecycleAnalyzer}\n                        Vulnerability analyzer to use. Defaults to automatic selection based on bom_dir argument.\n  --reachability-analyzer {off,FrameworkReachability,SemanticReachability}\n                        Reachability analyzer to use. Default FrameworkReachability.\n  --no-suggest          Disable suggest mode\n  --risk-audit          Perform package risk audit (slow operation). Npm only.\n  --cdxgen-args CDXGEN_ARGS\n                        Additional arguments to pass to cdxgen\n  --private-ns PRIVATE_NS\n                        Private namespace to use while performing oss risk audit. Private packages should not be available in public registries by default. Comma separated\n                        values accepted.\n  -t, --type PROJECT_TYPE [PROJECT_TYPE ...]\n                        Override project types if auto-detection is incorrect. Multiple values supported.\n  --bom BOM             Examine using the given Software Bill-of-Materials (SBOM) file in CycloneDX format. Use cdxgen command to produce one.\n  --bom-dir BOM_DIR     Examine all the Bill-of-Materials (BOM) files in the given directory.\n  --purl SEARCH_PURL    Scan a single package url.\n  --custom-data CUSTOM_DATA\n                        Path to directory containing custom vulnerability data (JSON/YAML/TOML) to override/augment results.\n  --report-template REPORT_TEMPLATE\n                        Jinja template file used for rendering a custom report\n  --report-name REPORT_NAME\n                        Filename of the custom report written to the --reports-dir\n  --deep                Perform deep scan by passing this --deep argument to cdxgen. Useful while scanning docker images and OS packages.\n  --fuzzy-search        Perform fuzzy search by creating variations of package names. Use this when the input SBOM lacks a PURL.\n  --search-order {purl,pcu,cpe,cpu,url}\n                        Attributes to use while searching for vulnerabilities. Default: PURL, CPE, URL (pcu).\n  --no-universal        Depscan would attempt to perform a single universal scan instead of individual scans per language type.\n  --no-vuln-table       Do not print the table with the full list of vulnerabilities. This can help reduce console output.\n  --server              Run depscan as a server\n  --server-host SERVER_HOST\n                        depscan server host\n  --server-port SERVER_PORT\n                        depscan server port\n  --server-allowed-hosts [SERVER_ALLOWED_HOSTS ...]\n                        List of allowed hostnames or IPs that can access the server (e.g., 'localhost 192.168.1.10'). If unspecified, no host allowlist is\n                        enforced.\n  --server-allowed-paths [SERVER_ALLOWED_PATHS ...]\n                        List of allowed filesystem paths that can be scanned by the server. Restricts `path` parameter in /scan requests.\n  --cdxgen-server CDXGEN_SERVER\n                        cdxgen server url. Eg: http://cdxgen:9090\n  --debug               Run depscan in debug mode.\n  -q, --quiet           Makes depscan quiet.\n  --explain             Makes depscan to explain the various analysis. Useful for creating detailed reports.\n  --explanation-mode {Endpoints,EndpointsAndReachables,NonReachables,LLMPrompts}\n                        Style of explanation needed. Defaults to Endpoints and Reachables.\n  --annotate            Include the generated text VDR report as an annotation. Defaults to true when explain is enabled; false otherwise.\n  -v, --version         Display the version\n```\n\n### Scanning containers locally (Python version)\n\nScan a Java project.\n\n```bash\ndepscan --src \u003cpath\u003e -o containertests -t java\n```\n\nScan `latest` tag of the container `shiftleft/scan-slim`\n\n```bash\ndepscan --src shiftleft/scan-slim -o containertests -t docker\n```\n\nInclude `license` to the type to perform the license audit.\n\n```bash\ndepscan --src shiftleft/scan-slim -o containertests -t docker license\n```\n\nYou can also specify the image using the sha256 digest\n\n```bash\ndepscan --src redmine@sha256:a5c5f8a64a0d9a436a0a6941bc3fb156be0c89996add834fe33b66ebeed2439e -o containertests -t docker\n```\n\nYou can also save container images using docker or podman save command and pass the archive to depscan for scanning.\n\n```bash\ndocker save -o /tmp/scanslim.tar shiftleft/scan-slim:latest\n# podman save --format oci-archive -o /tmp/scanslim.tar shiftleft/scan-slim:latest\ndepscan --src /tmp/scanslim.tar -o reports -t docker\n```\n\nRefer to the docker tests under the GitHub action workflow for this repo for more examples.\n\n### Scanning projects locally (Docker container)\n\n`ghcr.io/owasp-dep-scan/dep-scan` container image can be used to perform the scan.\n\nTo scan with default settings\n\n```bash\ndocker run --rm -v $PWD:/app ghcr.io/owasp-dep-scan/dep-scan depscan --src /app --reports-dir /app/reports\n```\n\nTo scan with custom environment variables based configuration\n\n```bash\ndocker run --rm \\\n    -e VDB_HOME=/db \\\n    -e GITHUB_TOKEN=\u003ctoken\u003e \\\n    -v /tmp:/db \\\n    -v $PWD:/app ghcr.io/owasp-dep-scan/dep-scan depscan --src /app --reports-dir /app/reports\n```\n\nIn the above example, `/tmp` is mounted as `/db` into the container. This directory is then specified as `VDB_HOME` for caching the vulnerability information. This way the database can be cached and reused to improve performance.\n\n### Server mode\n\ndep-scan and cdxgen could be run in server mode. Use the included docker-compose file to get started.\n\n```bash\ngit clone https://github.com/owasp-dep-scan/dep-scan\ndocker compose up\n```\n\nThe bundled compose file sets `DEPSCAN_SERVER_API_KEY` to a development placeholder by default so the dep-scan service can bind to `0.0.0.0`. Override this value before exposing the service outside a local lab.\n\n```bash\ndepscan --server --server-host 127.0.0.1 --server-port 7070\n```\n\nIf you need to bind dep-scan to a non-local address, set an API key first:\n\n```bash\nexport DEPSCAN_SERVER_API_KEY=\"change-this-before-production\"\ndepscan --server --server-host 0.0.0.0 --server-port 7070\n```\n\n\u003e [!IMPORTANT]\n\u003e As of `6.2.0`, dep-scan refuses to bind to a non-local address without either `DEPSCAN_SERVER_API_KEY` or an explicit opt-in via `DEPSCAN_SERVER_ALLOW_UNAUTHENTICATED_BIND=true`.\n\nUse the `/scan` endpoint to perform scans.\n\n\u003e [!NOTE]\n\u003e The `type` parameter is mandatory in server mode. When API key authentication is enabled, send the key using `X-API-Key` or `Authorization: Bearer \u003ckey\u003e`.\n\n- Scanning a local directory.\n  Scanning an SBOM file (present locally).\n\n```bash\ncurl \\\n  -H 'X-API-Key: dev-only-change-me' \\\n  --json '{\"path\": \"/tmp/vulnerable-aws-koa-app/sbom_file.json\", \"type\": \"js\"}' \\\n  http://127.0.0.1:7070/scan\n```\n\n- Scanning a GitHub repo.\n\n```bash\ncurl \\\n  -H 'Authorization: Bearer dev-only-change-me' \\\n  --json '{\"url\": \"https://github.com/HooliCorp/vulnerable-aws-koa-app\", \"type\": \"js\"}' \\\n  http://127.0.0.1:7070/scan \\\n  -o app.vdr.json\n```\n\n- Uploading an SBOM file and generating results based on it.\n\n```bash\ncurl -X POST \\\n  -H 'X-API-Key: dev-only-change-me' \\\n  -H 'Content-Type: multipart/form-data' \\\n  -F 'file=@/tmp/app/sbom_file.json' \\\n  http://127.0.0.1:7070/scan?type=js\n```\n\n## Local development\n\nSetup uv by following the official [documentation](https://docs.astral.sh/uv/).\n\n```shell\nuv sync --all-extras --all-packages\nuv run depscan --help\nuv run pytest\n```\n\n### Local VDB setup\n\n```shell\nvdb --clean\nvdb --download-image\n# To scan containers and OS images\n# vdb --download-full-image\n```\n\n### Scan local depscan\n\n```shell\nuv run depscan --config .config/depscan-dev.toml\n```\n\nThis would automatically use the configuration specified in the local config [file](./.config/depscan.toml).\n\n## License\n\nMIT License\n\nThis project was donated to the OWASP Foundation in August 2023 by AppThreat Ltd.\n\n## Funding\n\nThis project is funded through [NGI Zero Core](https://nlnet.nl/core), a fund established by [NLnet](https://nlnet.nl) with financial support from the European Commission's [Next Generation Internet](https://ngi.eu) program. Learn more at the [NLnet project page](https://nlnet.nl/project/OWASP-dep-scan).\n\n[\u003cimg src=\"https://nlnet.nl/logo/banner.png\" alt=\"NLnet foundation logo\" width=\"20%\" /\u003e](https://nlnet.nl)\n[\u003cimg src=\"https://nlnet.nl/image/logos/NGI0_tag.svg\" alt=\"NGI Zero Logo\" width=\"20%\" /\u003e](https://nlnet.nl/core)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fowasp-dep-scan%2Fdep-scan","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fowasp-dep-scan%2Fdep-scan","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fowasp-dep-scan%2Fdep-scan/lists"}