Dependency risk and lock files
In this lesson you will learn why the libraries an AI assistant adds are a security risk, how lock files record what you really ship, and how vulnerability databases tell you what to fix first.
Your app is mostly other people's code
A modern web app may have a few thousand lines of its own code and hundreds of open-source dependencies: libraries it uses directly, and the libraries those libraries use (called transitive dependencies). The OWASP Top 10:2025 lists Software Supply Chain Failures as A03, a sign of how often attacks now come through components rather than your own code.
AI coding assistants make this worse in three ways:
- they add libraries freely, often more than the task needs;
- they may suggest versions from their training data, which can be years old and already vulnerable;
- they occasionally suggest a package name that does not exist or is subtly misspelt, which an attacker may have registered.
None of this means "do not use AI assistants". It means you check what they add.
Lock files: the record of what you ship
A manifest (such as package.json or pyproject.toml) says what you asked for, often as a range like "version 4 or later". A lock file records exactly which version of every package, direct and transitive, was installed. It is the honest list of what you ship.
The Cehpoint Agentic SOC understands these lock files:
| Ecosystem | Lock file |
|---|---|
| npm and yarn (JavaScript) | package-lock.json, yarn.lock |
| Composer (PHP) | composer.lock |
| pip, Pipenv, Poetry (Python) | requirements.txt, Pipfile.lock, poetry.lock |
| Go | go.sum |
| Cargo (Rust) | Cargo.lock |
| Bundler (Ruby) | Gemfile.lock |
Habits that follow:
- commit the lock file, so everyone (and every build) installs the same versions;
- review lock-file changes in a pull request, not just source changes; an assistant's "small fix" may have pulled in dozens of new packages;
- install from the lock file in builds (for example
npm cirather thannpm install), so the build matches what was reviewed.
Where vulnerability facts come from
A CVE (Common Vulnerabilities and Exposures) is a public identifier for one known flaw, such as CVE-2021-44228. Advisories link CVEs to the affected packages and the versions that fix them.
Two sources matter for the SOC:
- OSV (osv.dev) is an open vulnerability database that collects advisories from many sources in one format and works out precisely which versions of a package are affected. The SOC looks up your package names and versions there.
- The CISA Known Exploited Vulnerabilities (KEV) catalogue is the US Cybersecurity and Infrastructure Security Agency's authoritative list of vulnerabilities exploited in the wild. If a package's CVE is on it, the SOC marks the finding actively exploited.
Deciding what to fix first
Severity labels (critical, high, medium, low) describe how bad a flaw could be. "Actively exploited" says attackers are using it. Use this order:
- Actively exploited, whatever the severity: fix now.
- Critical and high in code that is reachable from the internet: fix this week.
- The rest: plan them into normal updates.
The SOC's own results follow the same idea: findings are sorted with actively exploited first, and on a device a project with an actively exploited library raises a critical alert.
Fixing is usually an upgrade
For each vulnerable package, the SOC gives the version that fixes it and, where possible, the exact command:
npm install lodash@<fixed version>
composer require vendor/package:^<fixed version>
pip install "package>=<fixed version>"
go get module@<fixed version>
cargo update -p crate --precise <fixed version>
bundle update gem --conservative
After upgrading, run your tests, rebuild, and check again. A major-version upgrade can break things; that is a reason to test, not a reason to stay vulnerable.
Where the SOC sees your projects
- On Windows PCs and Macs with the agent, developer projects are found daily; only package names and versions are kept on the server, and the lock-file text is discarded.
- Through the skill, inside your AI coding assistant, on request (next lesson).
- Through the API,
POST /v1/projects/scan, from any script or build pipeline, with a read key.
Source code is never uploaded by any of these. Nothing in your code changes automatically.
Summary
- Dependencies are most of your app; supply-chain failures are A03 in the OWASP Top 10:2025.
- Commit and review lock files; build from them.
- OSV says what is vulnerable; CISA KEV says what is exploited; fix exploited first.
- Fixes are upgrades to the fixed version, followed by tests and a fresh check.
Sources
- OWASP Top 10:2025: https://top10.owasp.org/2025/
- OSV: https://google.github.io/osv.dev/
- CISA Known Exploited Vulnerabilities Catalog: https://www.cisa.gov/known-exploited-vulnerabilities-catalog
- Cehpoint developer reference: https://www.cehpoint.co.uk/docs/soc/developers