Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
os: [ubuntu-latest, windows-latest, macos-latest]
python: ['3.10', '3.14']
steps:
- name: Check out repository
Expand Down
55 changes: 54 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,58 @@ The reviewed fixed line is `4.x`; future lines remain unknown rather than extrap
| `attacker_controlled_readable_git_configuration_file` | attacker-controlled readable Git configuration file |
| `remote_operation_loads_unsafe_configuration` | remote operation loads unsafe configuration |

Each observation is boolean or null, is unverified, and never changes the package-version result. No source search, taint analysis, reachability test, or runtime evaluation is performed. Absent observations do not establish mitigation.
Each observation is boolean or null, is unverified, and never changes the package-version result. Optional lexical source inspection is separate. No taint analysis, reachability test or runtime evaluation is performed. Absent observations do not establish mitigation.

## Dependency and source evidence

```sh
python simplegit_rce_check.py --npm-lock examples/package-lock.example.json --format json
python simplegit_rce_check.py --source examples/source.example.js --source-root examples --format html
python simplegit_rce_check.py --installed-package path/to/node_modules/simple-git/package.json --format json
```

`--npm-lock` reads explicitly named npm lock/shrinkwrap v1/v2/v3 JSON. Nested
instances and aliases carrying an explicit package name remain separate.
Resolved versions are not proof of deployment; linked packages, missing/qualified
versions, conflicting primary/legacy lock records and unsupported coverage keep
uncertainty. Conflicting version candidates are retained. When no determinable
instance is found, the report includes an unknown coverage observation, never proof of absence.
`--installed-package` reads the name/version of an explicitly selected installed
simple-git manifest, without running scripts or importing the module. Manifest
metadata cannot attest that a serving process loads that package.

`--source` explicitly selects JS/TS files and requires `--source-root` for
relative locations. No directory traversal or execution occurs. Simple literal
CommonJS/ES imports (default/named aliases and namespace `simpleGit`), factory
calls, directly assigned client spellings, and clone/mirror argument shapes
produce lexical review candidates. Factory `config` and actual call arguments
are inspected separately; an unrelated same-file `customArgs` or config object
cannot establish a flow. Argument labels describe literal containers/strings or
dynamic expressions, not input trust. Identifiers named trustedConfig or
request.body do not prove trusted input or attacker control.

Shadowing, reassignment, computed syntax, templates (including interpolation),
callbacks, chained methods, execution order and regex/division ambiguity require
manual review. Source rows always remain `unknown` with `not_tested`
exploitability and unfilled operator observations; they never inherit the status
of a separately supplied version/manifest/lock instance. When no supported candidate
is found, the report includes an explicit unknown coverage row rather than an absence verdict.

All new input modes share existing 4 MiB/file, 100-file and 10,000-result limits.
Lock traversal is limited to 64 dependency levels and 10,000 metadata entries;
source is limited to 200,000 tokens/file and 4,096 tokens per inspected argument
window. Source files must resolve within the selected root. Output protection
covers every new input and its aliases even with --force. Stable copies are
recommended; file checks are not a filesystem sandbox. The checker performs no
Git, npm, network, application or sandbox execution.

JSON/CSV schema 1.1 adds `version_candidates`, `source_path`, `source_line`,
`source_operation`, `source_argument_shapes`, `source_factory_options`,
`source_config_argument` and `source_coverage`. HTML includes candidates and
locations in escaped evidence notes. Source strings/snippets, registry URLs and
manifest scripts are not included in reports. The standalone executable bundles
its lexer from vm2-nesting-check commit 1618874 under the same licensing; no
companion checkout is needed. Version rules and their date are unchanged.

## Evidence and reports

Expand All @@ -58,3 +109,5 @@ CSV `record_type=result` rows are asset observations. A zero-result report has a
CSV rejects NUL characters before writing a report. An interruption after a complete report is published preserves that report and exits 130.

If an interrupt leaves file publication indeterminate, the checker exits 130 without retrying. Inspect the output before retrying; the diagnostic does not establish whether publication succeeded.

Npm metadata grammar: [official package-lock reference](https://docs.npmjs.com/cli/v11/configuring-npm/package-lock-json/), reviewed 2026-10-25. Lockfile URLs and scripts are not collected.
2 changes: 1 addition & 1 deletion SHA256SUMS
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ee68fe79b82fcb34ddba2a877e2ae079e3da3589ab61401282de7857833cec14 simplegit_rce_check.py
7adf4d42a2e3a42873886e56420dd9240b9d44650685f69e2d4ec2f852a00640 simplegit_rce_check.py
4 changes: 4 additions & 0 deletions docs/IMPLEMENTATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@ Implemented offline package-version evidence checker, with independent source/se
Local verification: 13 tests, CLI help, documented synthetic inputs, checksum validation and whitespace checks. Hosted CI must pass for the exact final PR head before merge; a local pass is not a hosted result. The advisory metadata now describes the implemented rule and preserves its original disabled research state under research_origin.

No live traffic, application execution, exploit verification or deployed-target assessment is claimed. Reported fixed versions do not attest installed patches; unknown evidence remains unknown.

## Dependency/source extension (2026-10-25)

Adds explicit installed simple-git manifests, bounded npm locks v1/v2/v3 with instance/conflict/link uncertainty, and lexical import-associated clone/mirror candidates. Source evidence never establishes taint, runtime configuration or a patch verdict. Relative locations, argument/config shapes, output parity and protected standalone operation have synthetic tests. Schema 1.1 is documented in README/REFERENCE. Primary advisory bounds are unchanged. Exact-head hosted CI and review remain separate release evidence.
63 changes: 60 additions & 3 deletions docs/REFERENCE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Evidence and CLI reference
# simplegit-rce-check

Offline evidence checker for **CVE-2026-102826 — simple-git configuration include command injection**. Python 3.10+, standard library only. The executable can be copied alone. It never contacts websites, imports application code, runs a package manager, or executes exploit payloads.

Expand Down Expand Up @@ -36,7 +36,58 @@ The reviewed fixed line is `4.x`; future lines remain unknown rather than extrap
| `attacker_controlled_readable_git_configuration_file` | attacker-controlled readable Git configuration file |
| `remote_operation_loads_unsafe_configuration` | remote operation loads unsafe configuration |

Each observation is boolean or null, is unverified, and never changes the package-version result. No source search, taint analysis, reachability test, or runtime evaluation is performed. Absent observations do not establish mitigation.
Each observation is boolean or null, is unverified, and never changes the package-version result. Optional lexical source inspection is separate. No taint analysis, reachability test or runtime evaluation is performed. Absent observations do not establish mitigation.

## Dependency and source evidence

```sh
python simplegit_rce_check.py --npm-lock examples/package-lock.example.json --format json
python simplegit_rce_check.py --source examples/source.example.js --source-root examples --format html
python simplegit_rce_check.py --installed-package path/to/node_modules/simple-git/package.json --format json
```

`--npm-lock` reads explicitly named npm lock/shrinkwrap v1/v2/v3 JSON. Nested
instances and aliases carrying an explicit package name remain separate.
Resolved versions are not proof of deployment; linked packages, missing/qualified
versions, conflicting primary/legacy lock records and unsupported coverage keep
uncertainty. Conflicting version candidates are retained. When no determinable
instance is found, the report includes an unknown coverage observation, never proof of absence.
`--installed-package` reads the name/version of an explicitly selected installed
simple-git manifest, without running scripts or importing the module. Manifest
metadata cannot attest that a serving process loads that package.

`--source` explicitly selects JS/TS files and requires `--source-root` for
relative locations. No directory traversal or execution occurs. Simple literal
CommonJS/ES imports (default/named aliases and namespace `simpleGit`), factory
calls, directly assigned client spellings, and clone/mirror argument shapes
produce lexical review candidates. Factory `config` and actual call arguments
are inspected separately; an unrelated same-file `customArgs` or config object
cannot establish a flow. Argument labels describe literal containers/strings or
dynamic expressions, not input trust. Identifiers named trustedConfig or
request.body do not prove trusted input or attacker control.

Shadowing, reassignment, computed syntax, templates (including interpolation),
callbacks, chained methods, execution order and regex/division ambiguity require
manual review. Source rows always remain `unknown` with `not_tested`
exploitability and unfilled operator observations; they never inherit the status
of a separately supplied version/manifest/lock instance. When no supported candidate
is found, the report includes an explicit unknown coverage row rather than an absence verdict.

All new input modes share existing 4 MiB/file, 100-file and 10,000-result limits.
Lock traversal is limited to 64 dependency levels and 10,000 metadata entries;
source is limited to 200,000 tokens/file and 4,096 tokens per inspected argument
window. Source files must resolve within the selected root. Output protection
covers every new input and its aliases even with --force. Stable copies are
recommended; file checks are not a filesystem sandbox. The checker performs no
Git, npm, network, application or sandbox execution.

JSON/CSV schema 1.1 adds `version_candidates`, `source_path`, `source_line`,
`source_operation`, `source_argument_shapes`, `source_factory_options`,
`source_config_argument` and `source_coverage`. HTML includes candidates and
locations in escaped evidence notes. Source strings/snippets, registry URLs and
manifest scripts are not included in reports. The standalone executable bundles
its lexer from vm2-nesting-check commit 1618874 under the same licensing; no
companion checkout is needed. Version rules and their date are unchanged.

## Evidence and reports

Expand All @@ -51,6 +102,12 @@ Exit 0: completed run; 1: potentially affected with `--fail-on-finding`; 2: argu
- https://github.com/steveukx/git-js/security/advisories/GHSA-g4wm-2vf7-vfgr
- https://github.com/advisories/GHSA-g4wm-2vf7-vfgr

[Synthetic report](docs/example-report.html), [reference](docs/REFERENCE.md), [implementation status](docs/IMPLEMENTATION.md), [AGENTS](AGENTS.md), [contribution terms](CONTRIBUTING.md), [security policy](SECURITY.md), [license](LICENSE), [dual licensing](LICENSING.md). Bounded input and reporting helpers are bundled from the reviewed Node.js checker at `74aa57ba5df05c34d17ae67912cd26ec2335201b`, with package-specific range comparison and the mixed-whitespace CSV fix. No companion repository is needed at runtime.
[Synthetic report](example-report.html), [reference](REFERENCE.md), [implementation status](IMPLEMENTATION.md), [AGENTS](../AGENTS.md), [contribution terms](../CONTRIBUTING.md), [security policy](../SECURITY.md), [license](../LICENSE), [dual licensing](../LICENSING.md). Bounded input and reporting helpers are bundled from the reviewed Node.js checker at `74aa57ba5df05c34d17ae67912cd26ec2335201b`, with package-specific range comparison and the mixed-whitespace CSV fix. No companion repository is needed at runtime.

CSV `record_type=result` rows are asset observations. A zero-result report has a `record_type=summary` row carrying completeness, schema, rule date, CVE and `not_tested`; it is not an asset finding.

CSV rejects NUL characters before writing a report. An interruption after a complete report is published preserves that report and exits 130.

If an interrupt leaves file publication indeterminate, the checker exits 130 without retrying. Inspect the output before retrying; the diagnostic does not establish whether publication succeeded.

Npm metadata grammar: [official package-lock reference](https://docs.npmjs.com/cli/v11/configuring-npm/package-lock-json/), reviewed 2026-10-25. Lockfile URLs and scripts are not collected.
1 change: 1 addition & 0 deletions examples/package-lock.example.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"lockfileVersion":3,"packages":{"node_modules/simple-git":{"version":"3.36.0"}}}
4 changes: 4 additions & 0 deletions examples/source.example.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// Synthetic text fixture; never executed.
import git from 'simple-git';
const client = git({config: operatorSuppliedConfig});
client.clone(repository, destination, customArgs);
Loading
Loading