Detect dependency source redirection - #383
Open
rng1995 wants to merge 2 commits into
Open
Conversation
rng1995
force-pushed
the
naren/inspect-nested-artifacts
branch
from
August 17, 2026 18:45
013a79b to
b4b4f31
Compare
rng1995
force-pushed
the
naren/detect-dependency-source-redirection
branch
from
August 17, 2026 18:45
9e3e58d to
5040229
Compare
rng1995
marked this pull request as ready for review
August 18, 2026 13:00
rng1995
force-pushed
the
naren/detect-dependency-source-redirection
branch
from
August 18, 2026 13:34
5040229 to
e7bad7a
Compare
rng1995
force-pushed
the
naren/inspect-nested-artifacts
branch
from
August 18, 2026 13:37
a89cac0 to
ab60bb8
Compare
Signed-off-by: Narendran Raghavan <nraghavan@nvidia.com>
Signed-off-by: Narendran Raghavan <nraghavan@nvidia.com>
rng1995
force-pushed
the
naren/detect-dependency-source-redirection
branch
from
August 18, 2026 13:37
e7bad7a to
5a17cc3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add deterministic HIGH SC10 findings when package-manager configuration adds or replaces a dependency source, or when a dynamic destination cannot be resolved safely from simple local assignments.
The analyzer covers npm, Yarn, pip, Poetry, Maven, and Cargo across direct config files, commands/environment variables, generated heredoc configs, and actionable shell fences. It never executes configuration or contacts a registry.
Root cause
Existing generic patterns could notice credential/configuration-adjacent text but did not model package-source changes as dependency trust-boundary changes. A non-default registry or index could therefore affect dependency resolution without a dedicated rule, operation, scope, destination status, or package-manager evidence.
BEFORE behavior
For a published regression case that generates npm and Yarn configuration through a shell script:
AFTER behavior
The same case now emits two deterministic SC10 HIGH findings:
.npmrc.yarnrcThe destination is resolved through a same-file literal assignment and carried as structured, credential-safe evidence. The resulting combined assessment is 95 / CRITICAL / DO_NOT_INSTALL.
Supported surfaces
.npmrc, including scoped registriesnpm config set,NPM_CONFIG_REGISTRY.npmrcheredoc.yarnrc,.yarnrc.ymlyarn config setpip.conf,pip.inipip config set, index environment variablespyproject.tomlsourcespyproject.tomlheredocCommands in executable scripts and shell-language Markdown fences are actionable. Explanatory prose, comments, unrelated uses of the word “registry,” and non-shell fences do not create SC10 findings.
Deterministic decision model
unresolved.Evidence and credential safety
Each finding includes:
URL userinfo and sensitive query values are removed from SC10 findings. Report-level defense in depth applies the same redaction to every finding field and evidence string in terminal, JSON, Markdown, and SARIF output.
Validation
git diff --checkpassed.Review order
This PR is intentionally stacked on the nested-artifact PR so each change remains reviewable. After the first PR merges, this PR can be retargeted to
main; its own commit contains only SC10, credential redaction, tests, and documentation.Out of scope