License and SBOM checks when agents add dependencies
Agents add dependencies casually and can drag incompatible licenses into your tree.
Agents add dependencies casually and can drag incompatible licenses into your tree. License and SBOM checks belong in the same gates as tests, especially when agents propose new packages.
Compliance failures are expensive late. Allowlists and automated scanning catch problems while the PR is still small.
Decide: add the dependency, or not

When this fits vs when it does not
Add only when:
- The purpose fits a real gap (not “agent likes this library”).
- Direct license identity is known and matches policy.
- You considered an existing in-tree option or a smaller alternative.
- Lockfile, SBOM, and scanner results will ship with the PR.
Do not add when the license is unclear, copyleft needs legal/engineering owners you do not have, or someone proposes disabling scanners to unblock a release.
The dependency PR gate

Dep Gate
When an agent wants a dependency, require this contract in the PR:
- Purpose and alternatives considered (including “write the 40 lines ourselves”).
- License identity for the direct package, plus scanner coverage for transitive deps.
- Lockfile + SBOM updated the way your pipeline expects.
- CI license scan green against the org allow/deny list.
- Escalation path for copyleft or unknown licenses: named humans, not the model.
Publish the allow/deny policy where agents and humans both see it (agent rules + docs). Fail closed when the scanner is missing.
Three traps that show up late

Failure modes to catch early
- Notice stripped. Vendored code without license notices. Fix: keep notices; reject silent vendor copies.
- Transitive blind. Direct dep looks fine; a child pulls copyleft. Fix: scan the tree, not only the top package.
- Scanner off. Disabled to ship. Fix: fail closed in CI; never “temporarily” mute policy.
A short weekly hygiene loop
Once a week: review new dependencies added this month, confirm each has a purpose note and clean scan, and prune unused packages the agent introduced “just in case.” Re-run the scanner on main if lockfiles moved outside normal PRs.
Bottom line
Agents may propose packages. Policy and scanners decide. Same bar as tests: purpose, license, SBOM, green scan. For private code that should not leave the machine while you evaluate packages, pair with local models for private repos.
Share