Skip to content

Read installed npm evidence and inspect clone/mirror source candidates - #11

Merged
CompleteDotTech merged 1 commit into
mainfrom
feat/dependency-source-evidence
Oct 25, 2026
Merged

CompleteDotTech merged 1 commit into
mainfrom
feat/dependency-source-evidence

Conversation

@CompleteDotTech

Copy link
Copy Markdown
Contributor

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

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
🔒 Security Review ✅ Completed 2026-10-25T22:22:10.098771Z dd2ac20 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@CompleteDotTech
CompleteDotTech merged commit 4cf10eb into main Oct 25, 2026
12 checks passed
@CompleteDotTech
CompleteDotTech requested a balanced review from Copilot October 25, 2026 22:24

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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
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

Comment thread simplegit_rce_check.py
Comment on lines +553 to +556
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}
Comment thread simplegit_rce_check.py
Comment on lines +563 to +564
version = _bounded_text(item.get("version", ""), "Dependency version")
row = assess_entry(location, "npm_lockfile", "" if item.get("link") or conflict else version)
Comment thread simplegit_rce_check.py
def _argument_shape(values, start, end, pairs):
if start >= end:
return "missing"
if end == start + 1 and values[start] == "@string":
Comment thread simplegit_rce_check.py
Comment on lines +422 to +423
for index, value in enumerate(values[:-1]):
opening = None
Comment thread simplegit_rce_check.py
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])
Comment thread simplegit_rce_check.py
Comment on lines +553 to +556
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}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants