fix(enrichment): detect npm alias dependency targets for typosquat/confusion#1724
fix(enrichment): detect npm alias dependency targets for typosquat/confusion#1724JSONbored wants to merge 1 commit into
Conversation
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ Gittensory review result - manual review recommendedReview updated: 2026-06-29 17:43:53 UTC
⏸️ Suggested Action - Manual Review
Review summary Blockers
Nits — 5 non-blocking
Concerns raised — review before merging
Review context
Contributor next steps
Signal definitions
🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.
|
Motivation
"foo": "npm:[email protected]") were not parsed, so the analyzer never saw the real registry package and skipped typosquat and dependency-confusion checks.Description
review-enrichment/src/analyzers/dependency-scan.tsto broaden theNPM_REto capture the full package spec and add anNPM_ALIAS_REto recognisenpm:target@versionalias specifiers and return the alias target name and version as the dependency entry.review-enrichment/test/typosquat.test.tsincludingnpmAliasAddfixtures and tests that assertscanTyposquatnow flags alias targets for both typosquat and dependency-confusion findings.Testing
npm run test --prefix review-enrichment, which passed (all tests green, new alias-target tests included).git diff --checkreturned clean results locally.npm run test:ci, but it could not be completed due to an environment/network blocker inactionlint(WASM fallback reported a pre-existing custom runner label in.github/workflows/self-host-nightly.yml).npm audit --audit-level=moderate, which could not complete due to the npm registry audit endpoint returning403 Forbiddenin this environment.Codex Task