Graphify skill triggers ~30 Claude Code security prompts per run from inline python -c — how was it fixed?
On graphify 0.4.1 with Claude Code CLI on Ubuntu 24.04, the graphify skill runs every pipeline step as inline Python via
$(cat graphify-out/.graphify_python) -c "...". That triggers two Claude Code heuristics — "Contains command_substitution" and "Newline followed by # inside a quoted argument can hide arguments from path validation" — which permission allow-rules cannot auto-accept, so a pipeline run needs ~30 manual "Yes" clicks. How was this fixed, and what works until you can upgrade?Originally asked on GitHub: https://github.com/Graphify-Labs/graphify/issues/197
4 answers
Status: fixed per the contributor's comment — the issue page still shows open in this snapshot, but the contributor says #4275 landed and verified the change. On 0.4.1, every step ran as
$(cat graphify-out/.graphify_python) -c "…"with 10–20 lines of Python containing#comments; both Claude Code heuristics that fire on that are content-based and cannot be allowlisted, hence the ~30 prompts. An earlier fix (#114, v0.3.18) replaced only one inlinesave_query_resultblock withgraphify save-result; all other steps and reference flows kept inline Python, which is what this issue tracked.The #4275 fix moved step bodies into
graphify/pipeline.pyand exposed them asgraphify pipeline <step>subcommands:detect,extract-ast,empty-semantic,cache-check,merge-chunks,save-cache,merge-semantic,merge-extraction,build,diagnose,label,save-manifest,cleanup, plusvocab,transcribe,detect-incremental,code-only-check,empty-extract,update-merge, andgraph-difffor the reference flows. References now call those plus existing commands (graphify query/path/explain/save-result/add/watch) and thegraphify-mcpconsole script. The skill is generated fromtools/skillgen/fragments/; fragments were edited and all artifacts regenerated with a drift guard that fails if an inline-cblock reappears.Result: no
$(cat …), no inlinepython -c, andBash(graphify *)is allowlistable, so the ~30 prompts per run are gone. The contributor verified byte-identical.graphify_*sidecars,graph.json,manifest.json, andGRAPH_REPORT.mdon a real corpus, with no new test failures. Until you upgrade, the only partial workaround from the thread is patchingskill.mdto use the literal interpreter path instead of$(cat …)— that removes the command-substitution prompt but not the quoted-argument one; broad settings.json allow-rules do not bypass these heuristics. Security note: after the fix, arguments go through argparse instead of string interpolation, which reduces injection risk, andBash(graphify *)is scoped to what the CLI exposes.Did this work for you?What @nothariharan tried on GitHub (Worked)
Contributor fix in #4275: moved step bodies into graphify/pipeline.py exposed as
graphify pipeline <step>subcommands, edited the skill fragments in tools/skillgen/fragments, regenerated all artifacts, and verified byte-identical output on a real corpus with no new test failures plus a drift guard against inline-cblocks.Source: https://github.com/Graphify-Labs/graphify/issues/197#issuecomment-6094458945 (opens external site)
Did this work for you?What a GitHub user tried on GitHub (Partly worked)
Patching skill.md locally to replace
$(cat graphify-out/.graphify_python)with the literal interpreter path. Users report this avoids the command-substitution heuristic but not the newline-and-#-in-quoted-argument heuristic, so prompts remain.Source: https://github.com/Graphify-Labs/graphify/issues/197 (opens external site)
Did this work for you?What @biggates tried on GitHub (Partly worked)
Pointing to the earlier fix in issue #114, which had replaced one inline
save_query_resultblock withgraphify save-result(v0.3.18). The comment notes that previous fix does not solve all of the remaining inline Python steps.Source: https://github.com/Graphify-Labs/graphify/issues/197#issuecomment-4256690773 (opens external site)
Did this work for you?
Related questions
- Does graphify support Antigravity as a client?
- Does graphify support local PDF parsing without the LLM API?
- Graphify manifest.json absolute path keys — how do I share graphify-out?
- Is `graphify` (one y) a PyPI typosquat? Should I install `graphifyy` instead?
- Does graphify support GDScript (.gd) files in Godot 4.x projects?