---
title: "Supply chain"
description: "How Baz checks every package added or upgraded in your lockfiles for advisories, phantom packages, fresh releases, risky publishers, install hooks, and license risk."
canonical: "https://baz.ai/docs/security/supply-chain"
---

# Supply chain

How Baz checks every package added or upgraded in your lockfiles for advisories, phantom packages, fresh releases, risky publishers, install hooks, and license risk.

A single line in a lockfile can pull malicious code into every developer machine and CI runner that installs it. When a pull request changes a lockfile, Baz checks each added or upgraded package and reports only findings backed by a primary source.

Dependency checks are part of [Advanced Security](/docs/agents/build/advanced-security) and run only when the diff touches a supported lockfile.

## Supported lockfiles

Baz reads the lockfiles for JavaScript and TypeScript (`package-lock.json`, `yarn.lock`, `pnpm-lock.yaml`), Python (`poetry.lock`, `Pipfile.lock`, `uv.lock`), Rust (`Cargo.lock`), Go (`go.sum`), and Elixir (`mix.lock`).

Changes to other files are ignored by this agent. Code that imports a package is still reviewed by the other security agents.

## Why you can trust it

Baz checks only packages the pull request adds or upgrades, against their registry (npm, PyPI, crates.io, the Go proxy, or Hex) and the GHSA, OSV, and NVD advisory databases. Every finding cites its primary source, such as the advisory ID or the registry page. If a lookup fails or is inconclusive, Baz says nothing about that package. It does not invent advisories.

## Detection rules

Baz flags a new or upgraded package when it looks vulnerable, fake, or hijacked. That covers a version with a known advisory, a package that does not exist on its registry (often a typosquat or a name an AI made up), a version less than 24 hours old, a publisher account under 30 days old, a recent change of owner, install scripts such as `postinstall`, and a new dependency with a license like GPL that may clash with your project. Each finding cites its proof, such as the advisory ID or the registry page.

Some signals never produce a finding on their own, because many legitimate packages have them. They raise the severity of another rule's finding instead:

- A disposable or privacy-forwarding publisher email.
- A missing repository URL, or one that returns 404.
- No release tag in the source repository for the published version.

## What it does not flag

- Packages that were already pinned before the pull request.
- Lockfile churn with no added or upgraded package.
- Speculation. Every finding names the ecosystem, package, version, rule, and a primary-source URL.

Unpinned references, missing lockfiles, and CI actions pinned to mutable tags are a different problem: Advanced Security reviews those in your code and workflow files under the OWASP **Software Supply Chain Failures** category.

## Related

<CardGroup cols={2}>
  <Card title="Advanced Security" href="/docs/agents/build/advanced-security" icon="lock">
    Turn on the agent that includes dependency checks.
  </Card>
  <Card title="AI code security" href="/docs/security/ai-code-security" icon="bot">
    Unsafe model loading and untrusted MCP servers.
  </Card>
  <Card title="Prioritization" href="/docs/security/prioritization" icon="gauge">
    How severity and OWASP categories are assigned.
  </Card>
  <Card title="Security overview" href="/docs/security" icon="shield">
    Every layer of Baz security in one place.
  </Card>
</CardGroup>
