Repository navigation
Read installed npm evidence and inspect clone/mirror source candidates - #11
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved lockfile reconciliation and privacy defects can suppress affected instances or expose sensitive dependency specifiers, and source classification needs correction.
6 open issues
Reconcile lockfile conflicts per package location · New Redact credentialed and private source specifiers from reports · New Recognize all lexer string-token variants as literal strings · New Exclude member properties when matching imported factories · New Require bare client references for tracked receiver matching · New Validate legacy identity and link evidence before version reconciliation · New
What changed in this PR
Extends the standalone offline checker with dependency evidence and lexical source inspection, addressing gaps tracked in node2shell-check#10 without executing target code or testing exploitability.
Changes:
- Adds npm lockfile and installed-manifest inputs with version, instance, link, and conflict evidence.
- Adds import-associated clone/mirror candidates with relative locations and argument/configuration shapes.
- Documents schema 1.1, adds synthetic regressions and examples, and extends CI to macOS.
| File | Description |
|---|---|
test_evidence.py |
Adds dependency, source, privacy, and standalone regression cases. |
simplegit_rce_check.py |
Implements new inputs, lexical inspection, and report fields. |
SHA256SUMS |
Updates the standalone checker checksum. |
README.md |
Documents evidence modes, limits, and uncertainty. |
examples/source.example.js |
Adds a synthetic clone-call fixture. |
examples/package-lock.example.json |
Adds a synthetic npm lockfile fixture. |
docs/REFERENCE.md |
Expands CLI/schema documentation and corrects relative links. |
docs/IMPLEMENTATION.md |
Records extension scope and verification expectations. |
.github/workflows/tests.yml |
Adds macOS to the test matrix. |
Review effort: Balanced
| if legacy: | ||
| conflict = {k: v.get("version") for k, v in instances.items()} != {k: v.get("version") for k, v in legacy.items()} | ||
| if conflict: | ||
| instances = {**legacy, **instances} |
| version = _bounded_text(item.get("version", ""), "Dependency version") | ||
| row = assess_entry(location, "npm_lockfile", "" if item.get("link") or conflict else version) |
| def _argument_shape(values, start, end, pairs): | ||
| if start >= end: | ||
| return "missing" | ||
| if end == start + 1 and values[start] == "@string": |
| for index, value in enumerate(values[:-1]): | ||
| opening = None |
| for index in range(len(values) - 3): | ||
| if values[index + 1] != "." or values[index + 2] not in {"clone", "mirror"} or values[index + 3] != "(": | ||
| continue | ||
| shape = direct.get(index) if values[index] == ")" else clients.get(values[index]) |
| if legacy: | ||
| conflict = {k: v.get("version") for k, v in instances.items()} != {k: v.get("version") for k, v in legacy.items()} | ||
| if conflict: | ||
| instances = {**legacy, **instances} |


Fill the dependency and source-analysis gaps tracked by node2shell-check#10. Add bounded explicit npm lock v1/v2/v3 and installed simple-git manifest inputs, preserving transitive instances, aliases, link uncertainty and primary/legacy conflicts. Add lexical import/factory-associated clone/mirror candidates with relative locations and argument/config shapes. No Git, npm, target code, network or exploit execution.
Source hints always remain separate unknown rows and never prove trust, taint or runtime preconditions. Existing output protections now cover every new input; JSON/CSV schema 1.1 and HTML evidence agree. Keep advisory ranges/date and standalone distribution; bundle the reviewed vm2 lexer with provenance and add macOS CI.
Validation: 30 synthetic local Python 3.14 tests pass, including instance/range/conflict cases, malformed flags/identities, duplicate/non-finite JSON, traversal/depth/size/token limits, unrelated calls and customArgs, aliases, constants/dynamic inputs, source privacy, output protection/parity and standalone-copy execution. Existing publication regressions, CLI help, documented examples, checksums, relative documentation links and git diff --check pass. Hosted checks must pass on the exact head before merge.
Refs CompleteTech-Security/node2shell-check#10