Protect against malicious open source packages 🤖
See the codeFind malicious packages, vulnerabilities and risky CI workflows before they reach production.
[!NOTE] This branch is vet v2, in alpha. vet v1 is on
mainand stays the latest release. The v2.0.0 release notes map each v1 command and flag to v2.
Your dependencies, your GitHub Actions workflows and your AI agent configs run code that you did not write. vet finds the risk in them.
vet needs no account and sends no source code.
brew install --cask safedep/tap/vet@edge
vet scan
vet scan --fail-on high # exit 1 on a high or critical finding
vet scan --base-ref origin/main --fail-on high # report only what a pull request changes
vet report show --report sarif=vet.sarif # write SARIF from the saved scan, with no new scan
| Channel | Command |
|---|---|
| Homebrew | brew install --cask safedep/tap/vet@edge |
| mise | mise use -g 'github:safedep/vet[prerelease=true]@2' |
| Go | go install github.com/safedep/vet/v2/cmd/vet@latest |
| Container | docker run --rm -v "$PWD:/src" -w /src ghcr.io/safedep/vet:v2-latest scan |
mise installs a release one day after its publication. install.md has the command for the newest build, the release binaries and the build attestations.
| Target | Example |
|---|---|
| A directory (the default) | vet scan, vet scan ./service |
| A git repository | vet scan https://github.com/safedep/vet |
| A container image | vet scan oci://alpine:3.20, vet scan image.tar |
| An SBOM (CycloneDX or SPDX) | vet scan sbom.cdx.json |
| One package | vet scan pkg:npm/express@4.19.2 |
| The tools on this machine | vet endpoint audit |
vet reads the lockfiles and manifests of npm, PyPI, Go, Maven, Gradle, Cargo, RubyGems, NuGet, Packagist, Pub and more. It also reads the GitHub Actions workflows and the AI agent configs of the target. It does not install or run any of them. Controls turn this data into findings. See controls.md.
A policy decides when a scan fails. Save this file as vet-policy.yml:
version: 2
rules:
- id: no-malware
description: A malicious or suspicious package fails the build.
when: finding.family == "malware"
action: fail
- id: no-workflow-injection
when: finding.control_id in ["dangerous-trigger", "template-injection"]
action: fail
- id: no-critical-vulnerability
when: finding.control_id == "vulnerability" && finding.severity == "critical"
action: fail
- id: new-dependency-age
description: A pull request cannot add a version that is less than 14 days old.
when: package.change == "ADDED" && has(package.days_since_publish) && package.days_since_publish < 14
action: fail
suppressions:
- purl: pkg:npm/lodash@4.17.20
reason: The upgrade to 4.18.1 is in pull request 42.
expires: 2026-12-31
Test it on the last scan, with no new scan. Then apply it to a pull request:
vet report show last --policy vet-policy.yml
vet scan --base-ref origin/main --policy vet-policy.yml
After its expiry date, the suppression no longer hides the finding. Read policy.md for the rule fields, more rules and the Agent Skill that writes a policy for you.
vet ci init adds it to a repository.--base-ref reports only the packages and workflows that a change adds.vet endpoint audit lists the AI tools, MCP servers, editor extensions and
global npm packages on a developer machine, and checks them for malware.| Page | Read it for |
|---|---|
| Install | All channels and how to verify a release |
| Commands | Every command, its flags and its exit codes |
| Controls | The controls and their options |
| Policy | Rules, suppressions and the gate |
| Output | Report formats, saved scans and configuration |
| CI and AI agents | GitHub Actions, GitLab, Bitbucket and agent mode |
| Inventory | Code usage, AI and crypto, xBOM and CBOM |
vet sends the identity of each package (its ecosystem, name and version) to SafeDep to get the data about it. vet sends no source code and no file content.
vet also runs in the cloud. SafeDep Cloud runs vet on your repositories, with no infrastructure to manage.
Overall
Maintained
Code review
Contributors
Go module
Latest release
Releases this year
(top 24 of 25)
661 followers · starred Apr 2024
656 followers · starred Apr 2023
161 followers · starred Apr 2023
1,758 followers · starred Sep 2025
Protect against malicious open source packages 🤖
See the codeFind malicious packages, vulnerabilities and risky CI workflows before they reach production.
[!NOTE] This branch is vet v2, in alpha. vet v1 is on
mainand stays the latest release. The v2.0.0 release notes map each v1 command and flag to v2.
Your dependencies, your GitHub Actions workflows and your AI agent configs run code that you did not write. vet finds the risk in them.
vet needs no account and sends no source code.
brew install --cask safedep/tap/vet@edge
vet scan
vet scan --fail-on high # exit 1 on a high or critical finding
vet scan --base-ref origin/main --fail-on high # report only what a pull request changes
vet report show --report sarif=vet.sarif # write SARIF from the saved scan, with no new scan
| Channel | Command |
|---|---|
| Homebrew | brew install --cask safedep/tap/vet@edge |
| mise | mise use -g 'github:safedep/vet[prerelease=true]@2' |
| Go | go install github.com/safedep/vet/v2/cmd/vet@latest |
| Container | docker run --rm -v "$PWD:/src" -w /src ghcr.io/safedep/vet:v2-latest scan |
mise installs a release one day after its publication. install.md has the command for the newest build, the release binaries and the build attestations.
| Target | Example |
|---|---|
| A directory (the default) | vet scan, vet scan ./service |
| A git repository | vet scan https://github.com/safedep/vet |
| A container image | vet scan oci://alpine:3.20, vet scan image.tar |
| An SBOM (CycloneDX or SPDX) | vet scan sbom.cdx.json |
| One package | vet scan pkg:npm/express@4.19.2 |
| The tools on this machine | vet endpoint audit |
vet reads the lockfiles and manifests of npm, PyPI, Go, Maven, Gradle, Cargo, RubyGems, NuGet, Packagist, Pub and more. It also reads the GitHub Actions workflows and the AI agent configs of the target. It does not install or run any of them. Controls turn this data into findings. See controls.md.
A policy decides when a scan fails. Save this file as vet-policy.yml:
version: 2
rules:
- id: no-malware
description: A malicious or suspicious package fails the build.
when: finding.family == "malware"
action: fail
- id: no-workflow-injection
when: finding.control_id in ["dangerous-trigger", "template-injection"]
action: fail
- id: no-critical-vulnerability
when: finding.control_id == "vulnerability" && finding.severity == "critical"
action: fail
- id: new-dependency-age
description: A pull request cannot add a version that is less than 14 days old.
when: package.change == "ADDED" && has(package.days_since_publish) && package.days_since_publish < 14
action: fail
suppressions:
- purl: pkg:npm/lodash@4.17.20
reason: The upgrade to 4.18.1 is in pull request 42.
expires: 2026-12-31
Test it on the last scan, with no new scan. Then apply it to a pull request:
vet report show last --policy vet-policy.yml
vet scan --base-ref origin/main --policy vet-policy.yml
After its expiry date, the suppression no longer hides the finding. Read policy.md for the rule fields, more rules and the Agent Skill that writes a policy for you.
vet ci init adds it to a repository.--base-ref reports only the packages and workflows that a change adds.vet endpoint audit lists the AI tools, MCP servers, editor extensions and
global npm packages on a developer machine, and checks them for malware.| Page | Read it for |
|---|---|
| Install | All channels and how to verify a release |
| Commands | Every command, its flags and its exit codes |
| Controls | The controls and their options |
| Policy | Rules, suppressions and the gate |
| Output | Report formats, saved scans and configuration |
| CI and AI agents | GitHub Actions, GitLab, Bitbucket and agent mode |
| Inventory | Code usage, AI and crypto, xBOM and CBOM |
vet sends the identity of each package (its ecosystem, name and version) to SafeDep to get the data about it. vet sends no source code and no file content.
vet also runs in the cloud. SafeDep Cloud runs vet on your repositories, with no infrastructure to manage.
Overall
Maintained
Code review
Contributors
Go module
Latest release
Releases this year
(top 24 of 25)
661 followers · starred Apr 2024
656 followers · starred Apr 2023
161 followers · starred Apr 2023
1,758 followers · starred Sep 2025