the package manager for JavaScript
This report summarizes scanner evidence for npm/cli, a JavaScript project with 10,236 GitHub stars. SynthScan examined 198,379 lines of code across 729 source files, recording 152 pattern matches distributed across 8 syntactic categories. The legacy adjusted pattern signal is 1.1 (Low pattern signal); it is not an authorship estimate.
Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.
Use each vector to guide manual verification of the underlying findings.
Payload schema: 1.0.0 · Engine: 2.0.0 · Scoring: heuristic-density-v1 · Scan date: 2026-10-31.
Can maintainers explain intent, assumptions, and trade-offs? 130 finding(s).
Are imports declared and package/API names verified? 22 finding(s).
Are wrappers, guards, and repeated structures necessary? 4 finding(s).
Which changes need focused human review? 152 finding(s).
This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.
Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.
This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.
The scanner identified 152 distinct pattern matches across 8 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | test/lib/commands/ci.js | 501 | // Root cause: an optional peerDependency at an exact version causes buildIdealTree() to resolve a different version tha | COMMENT |
| LOW | test/lib/commands/install.js | 1181 | }) | COMMENT |
| LOW | workspaces/config/lib/definitions/definitions.js | 101 | flatOptions[camel] = obj[key] | COMMENT |
| LOW | workspaces/config/lib/definitions/definitions.js | 121 | // instead do `npm.config.set('foo', 'bar')` prior to passing the | COMMENT |
| LOW | workspaces/arborist/README.md | 61 | }) | COMMENT |
| LOW | workspaces/arborist/README.md | 81 | // add: Array of package specifiers to add at the top level. Each of | COMMENT |
| LOW | workspaces/arborist/README.md | 101 | // preferDedupe: prefer to deduplicate packages if possible, rather than | COMMENT |
| LOW | workspaces/arborist/test/place-dep.js | 401 | t.equal(zy.location, y.location, 'y bundled under z is removed') | COMMENT |
| LOW | workspaces/arborist/test/place-dep.js | 581 | nodeLoc: 'node_modules/b/node_modules/c', | COMMENT |
| LOW | workspaces/arborist/test/place-dep.js | 1021 | }) | COMMENT |
| LOW | workspaces/arborist/test/place-dep.js | 1061 | explicitRequest: true, | COMMENT |
| LOW | workspaces/arborist/test/place-dep.js | 1121 | // root | COMMENT |
| LOW | workspaces/arborist/test/place-dep.js | 1441 | // b@2 -> PEER(c@2) | COMMENT |
| LOW | workspaces/arborist/test/place-dep.js | 1481 | { pkg: { name: 'c', version: '1.0.0', peerDependencies: { d: '1' } } }, | COMMENT |
| LOW | workspaces/arborist/test/place-dep.js | 1541 | // v@4 -> PEER(a@1||2) | COMMENT |
| LOW | workspaces/arborist/test/place-dep.js | 1581 | { pkg: { name: 'a', version: '1.0.0', peerDependencies: { b: '1' } } }, | COMMENT |
| LOW | workspaces/arborist/test/place-dep.js | 1661 | peerSet: [ | COMMENT |
| LOW | workspaces/arborist/test/node.js | 1341 | // y@2 -> x@1 | COMMENT |
| LOW | workspaces/arborist/test/can-place-dep.js | 481 | ], | COMMENT |
| LOW | workspaces/arborist/test/can-place-dep.js | 761 | // b@1.0.1 -> PEER(c@1) | COMMENT |
| LOW | workspaces/arborist/test/can-place-dep.js | 961 | // dd@1.0.1 -> PEER(c@1) | COMMENT |
| LOW | workspaces/arborist/test/can-place-dep.js | 1061 | // root -> (a) | COMMENT |
| LOW | workspaces/arborist/test/can-place-dep.js | 1121 | COMMENT | |
| LOW | workspaces/arborist/test/can-place-dep.js | 1201 | // | COMMENT |
| LOW | workspaces/arborist/test/can-place-dep.js | 1241 | // b@1 -> PEER(c@1) | COMMENT |
| LOW | workspaces/arborist/test/can-place-dep.js | 1301 | // a@2 -> PEER(b@2) | COMMENT |
| LOW | workspaces/arborist/test/can-place-dep.js | 1341 | { pkg: { name: 'c', version: '1.0.0', peerDependencies: { e: '1' } } }, | COMMENT |
| LOW | workspaces/arborist/test/can-place-dep.js | 1401 | // partly overlapping peer sets that diverge | COMMENT |
| LOW | workspaces/arborist/lib/optional-set.js | 1 | // when an optional dep fails to install, we need to remove the branch of the | COMMENT |
| LOW | workspaces/arborist/lib/release-age-exclude.js | 1 | // Determine whether a package name is exempt from the `min-release-age` / | COMMENT |
| LOW | workspaces/arborist/lib/signals.js | 1 | // copied from signal-exit | COMMENT |
| LOW | workspaces/arborist/lib/place-dep.js | 61 | } | COMMENT |
| LOW | workspaces/arborist/lib/place-dep.js | 101 | this.checks.set(target, cpd) | COMMENT |
| LOW | workspaces/arborist/lib/place-dep.js | 201 | if (placementType === KEEP) { | COMMENT |
| LOW | workspaces/arborist/lib/place-dep.js | 341 | COMMENT | |
| LOW | workspaces/arborist/lib/place-dep.js | 361 | // gather all peer edgesIn which are at this level, and will not be | COMMENT |
| LOW | workspaces/arborist/lib/unreviewed-scripts.js | 1 | const isScriptAllowed = require('./script-allowed.js') | COMMENT |
| LOW | workspaces/arborist/lib/install-scripts.js | 1 | const { isNodeGypPackage } = require('@npmcli/node-gyp') | COMMENT |
| LOW | workspaces/arborist/lib/install-scripts.js | 21 | // purpose: | COMMENT |
| LOW | workspaces/arborist/lib/edge.js | 121 | // There's some override. If the target node satisfies the overriding spec | COMMENT |
| LOW | workspaces/arborist/lib/peer-entry-sets.js | 1 | // Given a node in a tree, return all of the peer dependency sets that | COMMENT |
| LOW | workspaces/arborist/lib/peer-entry-sets.js | 41 | for (const edge of peer.edgesOut.values()) { | COMMENT |
| LOW | workspaces/arborist/lib/shrinkwrap.js | 1 | // a module that manages a lockfile (package-lock.json). | COMMENT |
| LOW | workspaces/arborist/lib/shrinkwrap.js | 21 | const mismatch = (a, b) => a && b && a !== b | COMMENT |
| LOW | workspaces/arborist/lib/shrinkwrap.js | 761 | // Symlinks were already handled above, so that leaves git. | COMMENT |
| LOW | workspaces/arborist/lib/vuln.js | 1 | // An object representing a vulnerability either as the result of an | COMMENT |
| LOW | workspaces/arborist/lib/node.js | 1 | // inventory, path, realpath, root, and parent | COMMENT |
| LOW | workspaces/arborist/lib/node.js | 161 | // since _location is just where the module ended up in the tree, | COMMENT |
| LOW | workspaces/arborist/lib/node.js | 241 | // its various deps, then we're going to _first_ create all the | COMMENT |
| LOW | workspaces/arborist/lib/node.js | 1261 | COMMENT | |
| LOW | workspaces/arborist/lib/calc-dep-flags.js | 1 | // Dep flag (dev, peer, etc.) calculation requires default or reset flags. | COMMENT |
| LOW | workspaces/arborist/lib/yarn-lock.js | 1 | // parse a yarn lock file | COMMENT |
| LOW | workspaces/arborist/lib/yarn-lock.js | 221 | COMMENT | |
| LOW | workspaces/arborist/lib/yarn-lock.js | 241 | // | +-- z@2 | COMMENT |
| LOW | workspaces/arborist/lib/script-allowed.js | 1 | const { resolve, sep } = require('node:path') | COMMENT |
| LOW | workspaces/arborist/lib/script-allowed.js | 21 | // attacker-controlled. A package can publish a tarball claiming any | COMMENT |
| LOW | workspaces/arborist/lib/script-allowed.js | 221 | // Preferred source: the lockfile's resolved URL parsed via | COMMENT |
| LOW | workspaces/arborist/lib/script-allowed.js | 401 | return false | COMMENT |
| LOW | workspaces/arborist/lib/can-place-dep.js | 1 | // Internal methods used by buildIdealTree. | COMMENT |
| LOW | workspaces/arborist/lib/can-place-dep.js | 21 | // - if satisfying and preferDedupe? KEEP | COMMENT |
| 31 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | .github/workflows/release.yml | 1 | # This file is automatically added by @npmcli/template-oss. Do not edit. | COMMENT |
| MEDIUM | .github/workflows/create-node-pr.yml | 1 | # This file is automatically added by @npmcli/template-oss. Do not edit. | COMMENT |
| MEDIUM | .github/workflows/ci-libnpmteam.yml | 1 | # This file is automatically added by @npmcli/template-oss. Do not edit. | COMMENT |
| MEDIUM | .github/workflows/codeql-analysis.yml | 1 | # This file is automatically added by @npmcli/template-oss. Do not edit. | COMMENT |
| MEDIUM | .github/workflows/ci-npmcli-mock-registry.yml | 1 | # This file is automatically added by @npmcli/template-oss. Do not edit. | COMMENT |
| MEDIUM | .github/workflows/ci-release.yml | 1 | # This file is automatically added by @npmcli/template-oss. Do not edit. | COMMENT |
| MEDIUM | .github/workflows/ci-libnpmdiff.yml | 1 | # This file is automatically added by @npmcli/template-oss. Do not edit. | COMMENT |
| MEDIUM | .github/workflows/ci-libnpmorg.yml | 1 | # This file is automatically added by @npmcli/template-oss. Do not edit. | COMMENT |
| MEDIUM | .github/workflows/ci-npmcli-config.yml | 1 | # This file is automatically added by @npmcli/template-oss. Do not edit. | COMMENT |
| MEDIUM | .github/workflows/ci-npmcli-mock-globals.yml | 1 | # This file is automatically added by @npmcli/template-oss. Do not edit. | COMMENT |
| MEDIUM | .github/workflows/ci-npmcli-arborist.yml | 1 | # This file is automatically added by @npmcli/template-oss. Do not edit. | COMMENT |
| MEDIUM | .github/workflows/ci-npmcli-smoke-tests.yml | 1 | # This file is automatically added by @npmcli/template-oss. Do not edit. | COMMENT |
| MEDIUM | .github/workflows/ci-libnpmsearch.yml | 1 | # This file is automatically added by @npmcli/template-oss. Do not edit. | COMMENT |
| MEDIUM | .github/workflows/audit.yml | 1 | # This file is automatically added by @npmcli/template-oss. Do not edit. | COMMENT |
| MEDIUM | .github/workflows/ci-npmcli-docs.yml | 1 | # This file is automatically added by @npmcli/template-oss. Do not edit. | COMMENT |
| MEDIUM | .github/workflows/ci-libnpmpublish.yml | 1 | # This file is automatically added by @npmcli/template-oss. Do not edit. | COMMENT |
| MEDIUM | .github/workflows/ci-libnpmpack.yml | 1 | # This file is automatically added by @npmcli/template-oss. Do not edit. | COMMENT |
| MEDIUM | .github/workflows/pull-request.yml | 1 | # This file is automatically added by @npmcli/template-oss. Do not edit. | COMMENT |
| MEDIUM | .github/workflows/ci-libnpmexec.yml | 1 | # This file is automatically added by @npmcli/template-oss. Do not edit. | COMMENT |
| MEDIUM | .github/workflows/ci-libnpmversion.yml | 1 | # This file is automatically added by @npmcli/template-oss. Do not edit. | COMMENT |
| MEDIUM | .github/workflows/ci-libnpmfund.yml | 1 | # This file is automatically added by @npmcli/template-oss. Do not edit. | COMMENT |
| MEDIUM | .github/workflows/ci.yml | 1 | # This file is automatically added by @npmcli/template-oss. Do not edit. | COMMENT |
| MEDIUM | .github/workflows/node-integration.yml | 1 | # This file is automatically added by @npmcli/template-oss. Do not edit. | COMMENT |
| MEDIUM | .github/workflows/ci-libnpmaccess.yml | 1 | # This file is automatically added by @npmcli/template-oss. Do not edit. | COMMENT |
| MEDIUM | .github/workflows/release-integration.yml | 1 | # This file is automatically added by @npmcli/template-oss. Do not edit. | COMMENT |
| MEDIUM | .github/actions/install-latest-npm/action.yml | 1 | # This file is automatically added by @npmcli/template-oss. Do not edit. | COMMENT |
| MEDIUM | .github/actions/create-check/action.yml | 1 | # This file is automatically added by @npmcli/template-oss. Do not edit. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | test/schemas/cyclonedx/bom-1.5.schema.json | 439 | "examples": ["Acme Inc"] | CODE |
| LOW | test/schemas/cyclonedx/bom-1.5.schema.json | 445 | "examples": ["Acme Inc"] | CODE |
| LOW | test/schemas/cyclonedx/bom-1.5.schema.json | 494 | "examples": ["Acme Inc"] | CODE |
| LOW | test/lib/utils/queryable.js | 213 | q.set('foo[lorem.ipsum]', 'LOREM IPSUM') | CODE |
| LOW | test/lib/utils/queryable.js | 220 | 'lorem.ipsum': 'LOREM IPSUM', | CODE |
| LOW | test/lib/utils/queryable.js | 232 | 'lorem.ipsum': 'LOREM IPSUM', | CODE |
| LOW | test/lib/utils/queryable.js | 249 | 'lorem.ipsum': 'LOREM IPSUM', | CODE |
| LOW | test/lib/utils/queryable.js | 271 | 'lorem.ipsum': 'LOREM IPSUM', | CODE |
| LOW | test/lib/utils/queryable.js | 298 | 'lorem.ipsum': 'LOREM IPSUM', | CODE |
| LOW | test/lib/utils/queryable.js | 326 | 'lorem.ipsum': 'LOREM IPSUM', | CODE |
| LOW | test/lib/utils/queryable.js | 375 | 'lorem.ipsum': 'LOREM IPSUM', | CODE |
| LOW | test/lib/commands/profile.js | 290 | fullname: 'Lorem Ipsum', | CODE |
| LOW | test/lib/commands/profile.js | 309 | await profile.exec(['set', 'fullname', 'Lorem Ipsum']) | CODE |
| LOW | test/lib/commands/profile.js | 310 | t.equal(result(), 'Set fullname to Lorem Ipsum', 'should output set key success msg') | CODE |
| LOW | test/lib/commands/profile.js | 323 | await profile.exec(['set', 'fullname', 'Lorem Ipsum']) | CODE |
| LOW | test/lib/commands/profile.js | 328 | fullname: 'Lorem Ipsum', | CODE |
| LOW | test/lib/commands/profile.js | 343 | await profile.exec(['set', 'fullname', 'Lorem Ipsum']) | CODE |
| LOW | mock-registry/lib/provenance.js | 7 | email: 'foo@bar.com', | CODE |
| LOW | docs/lib/content/commands/npm-sbom.md | 45 | "author": "John Doe", | CODE |
| LOW | workspaces/libnpmpublish/test/publish.js | 478 | email: 'foo@bar.com', | CODE |
| LOW | workspaces/libnpmpublish/test/publish.js | 1030 | email: 'foo@bar.com', | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| CRITICAL | lib/commands/search.js | 31 | exclude: this.npm.flatOptions.search.exclude.split(/\s+/), | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | workspaces/arborist/test/arborist/reify.js | 4795 | // Step 1: Install abbrev@1.0.4 in my-cool-package | COMMENT |
| LOW | workspaces/arborist/test/arborist/reify.js | 4816 | // Step 2: Install abbrev@1.1.1 in another-cool-package | COMMENT |
| LOW | workspaces/arborist/test/arborist/reify.js | 4836 | // Step 3: Install abbrev@1.0.4 in another-cool-package | COMMENT |
| LOW | workspaces/arborist/lib/override-set.js | 233 | // mean they conflict. We need to check if they have conflicting version requirements | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | workspaces/arborist/test/arborist/reify.js | 4795 | // Step 1: Install abbrev@1.0.4 in my-cool-package | COMMENT |
| LOW | workspaces/arborist/test/arborist/reify.js | 4816 | // Step 2: Install abbrev@1.1.1 in another-cool-package | COMMENT |
| LOW | workspaces/arborist/test/arborist/reify.js | 4836 | // Step 3: Install abbrev@1.0.4 in another-cool-package | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | test/lib/commands/audit.js | 909 | async function manifestWithValidAttestations ({ registry }) { | CODE |
| LOW | test/lib/commands/audit.js | 925 | async function manifestWithMultipleValidAttestations ({ registry }) { | CODE |
| LOW | workspaces/arborist/test/isolated-mode.js | 2574 | function withRequireChainRecursive (resolvedGraph, chain, initialDir) { | CODE |
| LOW | lib/utils/validate-lockfile.js | 49 | function validatePackageExtensions (virtualTree, idealTree) { | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | workspaces/arborist/test/yarn-lock.js | 58 | # Note: do not require a \\n at the end of the file, just add it if missing | COMMENT |