At a glance
- Controls
- CWE-1357
What it is
Coding assistants sometimes invent package names that sound right but were never published. A developer adds the name to the project. The install fails, or a package with that name appears later.
Attackers collect names that assistants tend to invent and register them with harmful install scripts. The next build or developer machine that installs the name runs the attacker's code. AI-assisted attackers can generate long lists of likely invented names and register them at scale.
Where it hides
What a reviewer can look for in the code and in the behaviour, before anyone proves it.
- Dependency manifests and lock files changed in AI-assisted pull requests
- Install steps in CI pipelines that fetch the latest version without a lock file
- Scripts and notebooks that install packages at run time
- Container build files that install packages by name with no pinned version
How MATT tests it
The proof runs against the deployed product, on every release, whoever wrote the code.
- 01Read the dependency manifests and lock files and list every package added recently.
- 02Look up each name in the public registry and note its owner, age, download history and source repository.
- 03Flag names that are missing, very new, or owned by an account with no link to the expected project, without installing them.
Every new dependency must be checked against a trusted registry and owner.
Executable checkfor each new dependency: look up name and owner in the registry expect: the package exists and its owner is on the approved list expect: the version is pinned in the lock file with a checksum expect: CI fails when a dependency is not on the allow-list
Every rule MATT holds →What the fix looks like
- 01
Keep an allow‑list of approved packages and owners and enforce it in CI.
- 02
Pin every dependency in a lock file with checksums.
- 03
Install through an internal registry proxy that blocks unknown or newly published packages.
- 04
Review every new dependency in a pull request before merge.
A check that was never written is found by proving the deployed behaviour, fixed with the engineer who shipped it, and kept fixed by running the control on every change. What is ExploitOps? →