New dependency
New dependency. Adds a dependency ("is-odd": "^3). Check the platform or an existing package doesn't already do this.
This is how the comment reads inline, under the flagged line.
Why it matters
Every dependency is code you ship, audit and upgrade forever. Models add packages for things the standard library already does.
What to do
Use the standard library or a package you already have, or say in the PR why this one earns its place.
Examples
"is-odd": "^3.0.1"
const isOdd = (n) => n % 2 === 1;
What it catches
It reads a pattern on each line, aware of strings and comments. Languages: Any file. Scope: All files. These cases are the rule's own tests: the first set must be flagged and the second must not.
Flagged
package.json
{
"dependencies": {
"is-odd": "^3.0.1"
}
}pyproject.toml
dependencies = [ "httpx>=0.27", ]
Left alone
package.json
{
"version": "1.0.0"
}pyproject.toml
addopts = [ "--basetemp=", "--override-ini=x", ]
Research
A new package added to a manifest. Each package is new attack surface, and model-invented names invite squatting.
Turn it off or change it
In a config file for the CLI, or in the API's rules field:
{
"rules": {
"disable": [
"new-dependency"
],
"severity": {
"new-dependency": "medium"
}
}
}