Repository navigation
Conversation
There was a problem hiding this comment.
Graphify reviewed this change.
Worth a look — the grounded gate found no coupling regressions or blocking issues, but 3 advisory finding(s) below merit a look before merge.
Graphify review — findings
Fixes a command-injection vector in the --watch instructions of the Aider and Devin skill monoliths: Step 1 now persists the resolved scan root to graphify-out/.graphify_root via a quoted heredoc (so metacharacters in the path are never re-interpreted), and the --watch command reads that trusted file instead of substituting a raw INPUT_PATH. Extends the injection test suite to pull Step 1 and --watch blocks from all three skill artifacts, assert the --watch command uses the exact trusted-file form with no raw placeholder, and execute Step 1 against six hostile payloads to prove no injected command runs. Adds Windows/WSL handling in the test runner that rewrites C:\ paths to /mnt/c/ and shells out via a temp .sh file to dodge quote mangling.
Worth a look
- Step 1 now rejects URL/non-directory INPUT_PATHs before graphify can handle them —
graphify/skill-aider.md:100· Escalate · high- agreed by 2 of 2 members but NOT verified (no proof, no reproducing execution) — consensus is not a verdict; needs human review
- Unconditional drive-letter indexing crashes legitimate-path test on POSIX —
tests/test_skillgen_input_path_injection.py:184· Escalate · medium- agreed by 2 of 2 members but NOT verified (no proof, no reproducing execution) — consensus is not a verdict; needs human review
- Unquoted interpreter path breaks watch when Python path contains spaces —
graphify/skill-aider.md:1239· Escalate · medium- agreed by 2 of 2 members but NOT verified (no proof, no reproducing execution) — consensus is not a verdict; needs human review
Analysis details — impact, health, verification
Impact & health
Graphify review
Impact — 389 functions depend on the 324 functions this change touches.
Health — this change adds coupling hotspots:
- new:
render()— 13 callers, 5 callees - new:
audit_coverage()— 8 callers, 6 callees - new:
main()— 3 callers, 11 callees - new:
monolith_roundtrip()— 3 callers, 5 callees - new:
test_audit_catches_a_dropped_non_allowlisted_heading()— 0 callers, 6 callees
Verification — 389 functions in the blast radius were not formally verified this run (proofs are advisory here).
Gate & verification
graphify gate
PASS — objectively clean (no health regressions, tests not run — proofs not run this pass (advisory)). Grounded, not self-assessed.
Advisory (not blocking):
- verification_scope: 389 function(s) in the blast radius were not formally verified this run
Test selection
Test selection
301 of 301 test file(s) selected (100%) via static blast radius.
Escalated to a full run for safety — the selection is not trustworthy on its own (see below). CI should run the whole suite.
tests/test_affected_cli.py— full-run-safetytests/test_affected_member_seed.py— full-run-safetytests/test_agents_platform.py— full-run-safetytests/test_analyze.py— full-run-safetytests/test_anthropic_custom_endpoint.py— full-run-safetytests/test_antigravity_install.py— full-run-safetytests/test_apm_fallback_version.py— full-run-safetytests/test_architecture_doc.py— full-run-safetytests/test_astro_extraction.py— full-run-safetytests/test_astro_import_ids.py— full-run-safetytests/test_atomic_canvas_export.py— full-run-safetytests/test_atomic_version_stamp.py— full-run-safetytests/test_atomic_writes.py— full-run-safetytests/test_backend_env_isolation.py— full-run-safetytests/test_backend_extras.py— full-run-safetytests/test_benchmark.py— full-run-safetytests/test_benchmark_raw_graph.py— full-run-safetytests/test_build.py— full-run-safetytests/test_build_merge_dedup_scope.py— full-run-safetytests/test_build_merge_hyperedges_and_prune.py— full-run-safetytests/test_build_merge_shrink_guard.py— full-run-safetytests/test_builtin_global_type_refs.py— full-run-safetytests/test_cache.py— full-run-safetytests/test_callflow_html.py— full-run-safetytests/test_cargo_introspect.py— full-run-safetytests/test_cargo_missing_manifest.py— full-run-safetytests/test_carried_hyperedge_remap.py— full-run-safetytests/test_case_sensitive_resolution.py— full-run-safetytests/test_charmap_encoding.py— full-run-safetytests/test_chunking.py— full-run-safetytests/test_cjs_module_extension.py— full-run-safetytests/test_claude_cli_backend.py— full-run-safetytests/test_claude_md.py— full-run-safetytests/test_cli_broken_pipe.py— full-run-safetytests/test_cli_export.py— full-run-safetytests/test_cli_help.py— full-run-safetytests/test_cluster.py— full-run-safetytests/test_cobol_extractor.py— full-run-safetytests/test_codebuddy.py— full-run-safetytests/test_community_hub_labels.py— full-run-safetytests/test_community_labels_skill.py— full-run-safetytests/test_confidence.py— full-run-safetytests/test_corrupt_graph_json.py— full-run-safetytests/test_cpp_nested_and_cli.py— full-run-safetytests/test_cpp_objc_cross_file_calls.py— full-run-safetytests/test_cpp_preprocess.py— full-run-safetytests/test_cross_extension_reexport_self_cycle.py— full-run-safetytests/test_cross_language_call_resolution.py— full-run-safetytests/test_cross_repo_external_call_guards.py— full-run-safetytests/test_cross_repo_member_calls.py— full-run-safety- … and 251 more
non-code file(s) changed (
graphify/skill-aider.md,graphify/skill-devin.md,tools/skillgen/expected/graphify__skill-aider.md,tools/skillgen/expected/graphify__skill-devin.md,tools/skillgen/fragments/core/aider.md…) → running the full suite for safety (a code graph can't see config/fixture/data deps)
changed code file(s) with no mapped test (
graphify/skill-aider.md,graphify/skill-devin.md,tools/skillgen/expected/graphify__skill-aider.md,tools/skillgen/expected/graphify__skill-devin.md,tools/skillgen/fragments/core/aider.md…) — a coverage gap or a missing link — running the full suite rather than only the selected tests
Selection is safe under the controlled-regression assumption; always-run tests + a periodic full run are the backstops. Advisory — it never changes the check verdict.
· 5 more finding(s) on lines outside this diff (see the check run).
There was a problem hiding this comment.
Graphify reviewed this change.
Worth a look — the grounded gate found no coupling regressions or blocking issues, but 5 advisory finding(s) below merit a look before merge.
Graphify review — findings
Hardens the graphify update/watch flow across all skill variants by reading the scan root from the trusted graphify-out/.graphify_root file instead of substituting INPUT_PATH into the command line, so a path containing shell metacharacters can't be re-interpreted. Adds the root-saving heredoc step to the aider and devin variants that were missing it, and updates the watcher invocation to $(cat graphify-out/.graphify_python) -m graphify.watch "$(cat graphify-out/.graphify_root)". Rewords the accompanying comments and generator fragments/expected fixtures to match.
Worth a look
- Command substitution of .graphify_root reintroduces shell injection in watch command (devin) —
graphify/skill-devin.md:1369· Escalate · high- agreed by 2 of 2 members but NOT verified (no proof, no reproducing execution) — consensus is not a verdict; needs human review
- Watch command executes interpreter arguments from workspace file —
tools/skillgen/fragments/core/devin.md:1369· Escalate · medium- agreed by 2 of 2 members but NOT verified (no proof, no reproducing execution) — consensus is not a verdict; needs human review
- Persisted Python interpreter is executed unquoted in watch command —
graphify/skill-aider.md:1227· Escalate · medium- agreed by 2 of 2 members but NOT verified (no proof, no reproducing execution) — consensus is not a verdict; needs human review
- Watcher executes interpreter path from writable project file —
graphify/skill-aider.md:1229· Escalate · medium- agreed by 2 of 2 members but NOT verified (no proof, no reproducing execution) — consensus is not a verdict; needs human review
- Watch command leaves saved Python path unquoted —
tools/skillgen/gen.py:1177· Escalate · medium- agreed by 2 of 2 members but NOT verified (no proof, no reproducing execution) — consensus is not a verdict; needs human review
Analysis details — impact, health, verification
Impact & health
Graphify review
Impact — 1043 functions depend on the 978 functions this change touches.
Health — this change adds coupling hotspots:
- new:
render()— 13 callers, 5 callees - new:
audit_coverage()— 8 callers, 6 callees - new:
main()— 3 callers, 11 callees - new:
monolith_roundtrip()— 3 callers, 5 callees - new:
test_audit_catches_a_dropped_non_allowlisted_heading()— 0 callers, 6 callees
Verification — 1043 functions in the blast radius were not formally verified this run (proofs are advisory here).
Health delta baseline: last indexed commit 4139885 (diverged from this PR's base — delta is approximate).
Gate & verification
graphify gate
PASS — objectively clean (no health regressions, tests not run — proofs not run this pass (advisory)). Grounded, not self-assessed.
Advisory (not blocking):
- verification_scope: 1043 function(s) in the blast radius were not formally verified this run
Test selection
Test selection
301 of 301 test file(s) selected (100%) via static blast radius.
Escalated to a full run for safety — the selection is not trustworthy on its own (see below). CI should run the whole suite.
tests/test_affected_cli.py— full-run-safetytests/test_affected_member_seed.py— full-run-safetytests/test_agents_platform.py— full-run-safetytests/test_analyze.py— full-run-safetytests/test_anthropic_custom_endpoint.py— full-run-safetytests/test_antigravity_install.py— full-run-safetytests/test_apm_fallback_version.py— full-run-safetytests/test_architecture_doc.py— full-run-safetytests/test_astro_extraction.py— full-run-safetytests/test_astro_import_ids.py— full-run-safetytests/test_atomic_canvas_export.py— full-run-safetytests/test_atomic_version_stamp.py— full-run-safetytests/test_atomic_writes.py— full-run-safetytests/test_backend_env_isolation.py— full-run-safetytests/test_backend_extras.py— full-run-safetytests/test_benchmark.py— full-run-safetytests/test_benchmark_raw_graph.py— full-run-safetytests/test_build.py— full-run-safetytests/test_build_merge_dedup_scope.py— full-run-safetytests/test_build_merge_hyperedges_and_prune.py— full-run-safetytests/test_build_merge_shrink_guard.py— full-run-safetytests/test_builtin_global_type_refs.py— full-run-safetytests/test_cache.py— full-run-safetytests/test_callflow_html.py— full-run-safetytests/test_cargo_introspect.py— full-run-safetytests/test_cargo_missing_manifest.py— full-run-safetytests/test_carried_hyperedge_remap.py— full-run-safetytests/test_case_sensitive_resolution.py— full-run-safetytests/test_charmap_encoding.py— full-run-safetytests/test_chunking.py— full-run-safetytests/test_cjs_module_extension.py— full-run-safetytests/test_claude_cli_backend.py— full-run-safetytests/test_claude_md.py— full-run-safetytests/test_cli_broken_pipe.py— full-run-safetytests/test_cli_export.py— full-run-safetytests/test_cli_help.py— full-run-safetytests/test_cluster.py— full-run-safetytests/test_cobol_extractor.py— full-run-safetytests/test_codebuddy.py— full-run-safetytests/test_community_hub_labels.py— full-run-safetytests/test_community_labels_skill.py— full-run-safetytests/test_confidence.py— full-run-safetytests/test_corrupt_graph_json.py— full-run-safetytests/test_cpp_nested_and_cli.py— full-run-safetytests/test_cpp_objc_cross_file_calls.py— full-run-safetytests/test_cpp_preprocess.py— full-run-safetytests/test_cross_extension_reexport_self_cycle.py— full-run-safetytests/test_cross_language_call_resolution.py— full-run-safetytests/test_cross_repo_external_call_guards.py— full-run-safetytests/test_cross_repo_member_calls.py— full-run-safety- … and 251 more
non-code file(s) changed (
graphify/skill-agents.md,graphify/skill-aider.md,graphify/skill-amp.md,graphify/skill-claw.md,graphify/skill-codex.md…) → running the full suite for safety (a code graph can't see config/fixture/data deps)
changed code file(s) with no mapped test (
graphify/skill-agents.md,graphify/skill-aider.md,graphify/skill-amp.md,graphify/skill-claw.md,graphify/skill-codex.md…) — a coverage gap or a missing link — running the full suite rather than only the selected tests
Selection is safe under the controlled-regression assumption; always-run tests + a periodic full run are the backstops. Advisory — it never changes the check verdict.
· 5 more finding(s) on lines outside this diff (see the check run).
Security: close the Fortran cpp #include arbitrary-file-read (GHSA-pcc4-rvhr-2pr8), the last Aider/Devin monolith --watch shell sink (#3852), and terraform name/value secret redaction (#3870). Plus Windows watch rebuild locking (#3883), C# tuple element-name refs (#3877), JSX component-usage calls (#3855), and nested scan-root Python import projection (#3867). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
|
Shipped in v0.9.70 (now on PyPI) via an authorship-preserving cherry-pick, so your commit keeps contributor-graph credit. Thanks @hopstreax! Closes the last Aider/Devin monolith --watch shell sink (tracking issue #3844); monolith-roundtrip and the gen.py sanctioned-diff verified green. |
Summary
Fixes #3844 by preventing untrusted
INPUT_PATHvalues from being interpreted as shell syntax in Graphify's generated skills, including the Aider and Devin monolith flows.Changes
Persist the resolved scan root to
graphify-out/.graphify_rootthrough a single-quoted heredoc.Remove direct
INPUT_PATHinterpolation from the Aider/Devin--watchcommands.Make
--watchconsume the trusted.graphify_rootmarker instead.Remove literal
INPUT_PATHreferences from Step 1 comments to prevent newline-based substitution from escaping the quoted heredoc.Add narrowly scoped sanctioned-diff rules for the intentional monolith changes.
Expand security tests to cover:
;&&Add tests for valid paths containing spaces and nonexistent paths.
Fix Linux/macOS portability in the path-resolution tests.
Regenerate all affected skill artifacts and expected snapshots.
Validation
python -m tools.skillgen --check— PASSpython -m tools.skillgen --monolith-roundtrip— PASSpytest tests/test_skillgen_input_path_injection.py -v— 30 passedpytest tests/test_skillgen.py -v— 65 passedgit diff --check— PASSSecurity
The scan path is now passed to Python through a quoted heredoc rather than being interpreted as part of a shell command. The Aider and Devin
--watchflows read the trusted resolved root fromgraphify-out/.graphify_root, eliminating direct shell interpolation ofINPUT_PATH.No unrelated changes are included.