From 0dfcd7fdd986643fa7c0b1c32a26602a7ce79ca9 Mon Sep 17 00:00:00 2001 From: ayushcodes10 Date: Tue, 22 Sep 2026 15:15:13 +0530 Subject: [PATCH] Regenerate skill artifacts for the Step 1 injection fix Ran the generator, then the bless command, with no manual edits. Confirmed clean with the check, audit coverage, monolith roundtrip, and schema singleton verification commands. Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_017qfdzgbA5KedGEjD1AayNh (cherry picked from commit 2b41299b89d23e4a2760e0fb9e9b023cf023e3ec) --- graphify/skill-agents.md | 10 ++++++++-- graphify/skill-amp.md | 10 ++++++++-- graphify/skill-claw.md | 10 ++++++++-- graphify/skill-codex.md | 10 ++++++++-- graphify/skill-copilot.md | 10 ++++++++-- graphify/skill-droid.md | 10 ++++++++-- graphify/skill-kilo.md | 10 ++++++++-- graphify/skill-kiro.md | 10 ++++++++-- graphify/skill-opencode.md | 10 ++++++++-- graphify/skill-pi.md | 10 ++++++++-- graphify/skill-trae.md | 10 ++++++++-- graphify/skill-vscode.md | 10 ++++++++-- graphify/skill-windows.md | 11 +++++++++-- graphify/skill.md | 10 ++++++++-- tools/skillgen/expected/graphify__skill-agents.md | 10 ++++++++-- tools/skillgen/expected/graphify__skill-amp.md | 10 ++++++++-- tools/skillgen/expected/graphify__skill-claw.md | 10 ++++++++-- tools/skillgen/expected/graphify__skill-codex.md | 10 ++++++++-- tools/skillgen/expected/graphify__skill-copilot.md | 10 ++++++++-- tools/skillgen/expected/graphify__skill-droid.md | 10 ++++++++-- tools/skillgen/expected/graphify__skill-kilo.md | 10 ++++++++-- tools/skillgen/expected/graphify__skill-kiro.md | 10 ++++++++-- tools/skillgen/expected/graphify__skill-opencode.md | 10 ++++++++-- tools/skillgen/expected/graphify__skill-pi.md | 10 ++++++++-- tools/skillgen/expected/graphify__skill-trae.md | 10 ++++++++-- tools/skillgen/expected/graphify__skill-vscode.md | 10 ++++++++-- tools/skillgen/expected/graphify__skill-windows.md | 11 +++++++++-- tools/skillgen/expected/graphify__skill.md | 10 ++++++++-- 28 files changed, 226 insertions(+), 56 deletions(-) diff --git a/graphify/skill-agents.md b/graphify/skill-agents.md index 190827d9a..ac1ea3189 100644 --- a/graphify/skill-agents.md +++ b/graphify/skill-agents.md @@ -96,8 +96,14 @@ fi # Write interpreter path for all subsequent steps (persists across invocations) mkdir -p graphify-out "$PYTHON" -c "import sys; open('graphify-out/.graphify_python', 'w', encoding='utf-8').write(sys.executable)" -# Save scan root so `graphify update` (no args) knows where to look next time -echo "$(cd INPUT_PATH && pwd)" > graphify-out/.graphify_root +# Save scan root so `graphify update` (no args) knows where to look next time. +# INPUT_PATH is passed through a quoted heredoc, never substituted into the +# command line itself: a bare `cd INPUT_PATH` (or an unquoted heredoc, which +# still expands $()/backticks in its body) would let a malicious path execute +# as shell code the moment this line runs. +"$PYTHON" -c "import os, sys; out_path = os.path.abspath('graphify-out/.graphify_root'); os.chdir(sys.stdin.readline().rstrip('\n')); open(out_path, 'w', encoding='utf-8').write(os.getcwd())" <<'GRAPHIFY_ROOT_EOF' +INPUT_PATH +GRAPHIFY_ROOT_EOF ``` If the import succeeds, print nothing and move straight to Step 2. diff --git a/graphify/skill-amp.md b/graphify/skill-amp.md index 190827d9a..ac1ea3189 100644 --- a/graphify/skill-amp.md +++ b/graphify/skill-amp.md @@ -96,8 +96,14 @@ fi # Write interpreter path for all subsequent steps (persists across invocations) mkdir -p graphify-out "$PYTHON" -c "import sys; open('graphify-out/.graphify_python', 'w', encoding='utf-8').write(sys.executable)" -# Save scan root so `graphify update` (no args) knows where to look next time -echo "$(cd INPUT_PATH && pwd)" > graphify-out/.graphify_root +# Save scan root so `graphify update` (no args) knows where to look next time. +# INPUT_PATH is passed through a quoted heredoc, never substituted into the +# command line itself: a bare `cd INPUT_PATH` (or an unquoted heredoc, which +# still expands $()/backticks in its body) would let a malicious path execute +# as shell code the moment this line runs. +"$PYTHON" -c "import os, sys; out_path = os.path.abspath('graphify-out/.graphify_root'); os.chdir(sys.stdin.readline().rstrip('\n')); open(out_path, 'w', encoding='utf-8').write(os.getcwd())" <<'GRAPHIFY_ROOT_EOF' +INPUT_PATH +GRAPHIFY_ROOT_EOF ``` If the import succeeds, print nothing and move straight to Step 2. diff --git a/graphify/skill-claw.md b/graphify/skill-claw.md index abd2811d2..e872ce905 100644 --- a/graphify/skill-claw.md +++ b/graphify/skill-claw.md @@ -96,8 +96,14 @@ fi # Write interpreter path for all subsequent steps (persists across invocations) mkdir -p graphify-out "$PYTHON" -c "import sys; open('graphify-out/.graphify_python', 'w', encoding='utf-8').write(sys.executable)" -# Save scan root so `graphify update` (no args) knows where to look next time -echo "$(cd INPUT_PATH && pwd)" > graphify-out/.graphify_root +# Save scan root so `graphify update` (no args) knows where to look next time. +# INPUT_PATH is passed through a quoted heredoc, never substituted into the +# command line itself: a bare `cd INPUT_PATH` (or an unquoted heredoc, which +# still expands $()/backticks in its body) would let a malicious path execute +# as shell code the moment this line runs. +"$PYTHON" -c "import os, sys; out_path = os.path.abspath('graphify-out/.graphify_root'); os.chdir(sys.stdin.readline().rstrip('\n')); open(out_path, 'w', encoding='utf-8').write(os.getcwd())" <<'GRAPHIFY_ROOT_EOF' +INPUT_PATH +GRAPHIFY_ROOT_EOF ``` If the import succeeds, print nothing and move straight to Step 2. diff --git a/graphify/skill-codex.md b/graphify/skill-codex.md index af3f723c7..cce6551b2 100644 --- a/graphify/skill-codex.md +++ b/graphify/skill-codex.md @@ -96,8 +96,14 @@ fi # Write interpreter path for all subsequent steps (persists across invocations) mkdir -p graphify-out "$PYTHON" -c "import sys; open('graphify-out/.graphify_python', 'w', encoding='utf-8').write(sys.executable)" -# Save scan root so `graphify update` (no args) knows where to look next time -echo "$(cd INPUT_PATH && pwd)" > graphify-out/.graphify_root +# Save scan root so `graphify update` (no args) knows where to look next time. +# INPUT_PATH is passed through a quoted heredoc, never substituted into the +# command line itself: a bare `cd INPUT_PATH` (or an unquoted heredoc, which +# still expands $()/backticks in its body) would let a malicious path execute +# as shell code the moment this line runs. +"$PYTHON" -c "import os, sys; out_path = os.path.abspath('graphify-out/.graphify_root'); os.chdir(sys.stdin.readline().rstrip('\n')); open(out_path, 'w', encoding='utf-8').write(os.getcwd())" <<'GRAPHIFY_ROOT_EOF' +INPUT_PATH +GRAPHIFY_ROOT_EOF ``` If the import succeeds, print nothing and move straight to Step 2. diff --git a/graphify/skill-copilot.md b/graphify/skill-copilot.md index abd2811d2..e872ce905 100644 --- a/graphify/skill-copilot.md +++ b/graphify/skill-copilot.md @@ -96,8 +96,14 @@ fi # Write interpreter path for all subsequent steps (persists across invocations) mkdir -p graphify-out "$PYTHON" -c "import sys; open('graphify-out/.graphify_python', 'w', encoding='utf-8').write(sys.executable)" -# Save scan root so `graphify update` (no args) knows where to look next time -echo "$(cd INPUT_PATH && pwd)" > graphify-out/.graphify_root +# Save scan root so `graphify update` (no args) knows where to look next time. +# INPUT_PATH is passed through a quoted heredoc, never substituted into the +# command line itself: a bare `cd INPUT_PATH` (or an unquoted heredoc, which +# still expands $()/backticks in its body) would let a malicious path execute +# as shell code the moment this line runs. +"$PYTHON" -c "import os, sys; out_path = os.path.abspath('graphify-out/.graphify_root'); os.chdir(sys.stdin.readline().rstrip('\n')); open(out_path, 'w', encoding='utf-8').write(os.getcwd())" <<'GRAPHIFY_ROOT_EOF' +INPUT_PATH +GRAPHIFY_ROOT_EOF ``` If the import succeeds, print nothing and move straight to Step 2. diff --git a/graphify/skill-droid.md b/graphify/skill-droid.md index fd148d485..c60ec15a5 100644 --- a/graphify/skill-droid.md +++ b/graphify/skill-droid.md @@ -96,8 +96,14 @@ fi # Write interpreter path for all subsequent steps (persists across invocations) mkdir -p graphify-out "$PYTHON" -c "import sys; open('graphify-out/.graphify_python', 'w', encoding='utf-8').write(sys.executable)" -# Save scan root so `graphify update` (no args) knows where to look next time -echo "$(cd INPUT_PATH && pwd)" > graphify-out/.graphify_root +# Save scan root so `graphify update` (no args) knows where to look next time. +# INPUT_PATH is passed through a quoted heredoc, never substituted into the +# command line itself: a bare `cd INPUT_PATH` (or an unquoted heredoc, which +# still expands $()/backticks in its body) would let a malicious path execute +# as shell code the moment this line runs. +"$PYTHON" -c "import os, sys; out_path = os.path.abspath('graphify-out/.graphify_root'); os.chdir(sys.stdin.readline().rstrip('\n')); open(out_path, 'w', encoding='utf-8').write(os.getcwd())" <<'GRAPHIFY_ROOT_EOF' +INPUT_PATH +GRAPHIFY_ROOT_EOF ``` If the import succeeds, print nothing and move straight to Step 2. diff --git a/graphify/skill-kilo.md b/graphify/skill-kilo.md index 3e70b050a..39c2cbdcd 100644 --- a/graphify/skill-kilo.md +++ b/graphify/skill-kilo.md @@ -96,8 +96,14 @@ fi # Write interpreter path for all subsequent steps (persists across invocations) mkdir -p graphify-out "$PYTHON" -c "import sys; open('graphify-out/.graphify_python', 'w', encoding='utf-8').write(sys.executable)" -# Save scan root so `graphify update` (no args) knows where to look next time -echo "$(cd INPUT_PATH && pwd)" > graphify-out/.graphify_root +# Save scan root so `graphify update` (no args) knows where to look next time. +# INPUT_PATH is passed through a quoted heredoc, never substituted into the +# command line itself: a bare `cd INPUT_PATH` (or an unquoted heredoc, which +# still expands $()/backticks in its body) would let a malicious path execute +# as shell code the moment this line runs. +"$PYTHON" -c "import os, sys; out_path = os.path.abspath('graphify-out/.graphify_root'); os.chdir(sys.stdin.readline().rstrip('\n')); open(out_path, 'w', encoding='utf-8').write(os.getcwd())" <<'GRAPHIFY_ROOT_EOF' +INPUT_PATH +GRAPHIFY_ROOT_EOF ``` If the import succeeds, print nothing and move straight to Step 2. diff --git a/graphify/skill-kiro.md b/graphify/skill-kiro.md index abd2811d2..e872ce905 100644 --- a/graphify/skill-kiro.md +++ b/graphify/skill-kiro.md @@ -96,8 +96,14 @@ fi # Write interpreter path for all subsequent steps (persists across invocations) mkdir -p graphify-out "$PYTHON" -c "import sys; open('graphify-out/.graphify_python', 'w', encoding='utf-8').write(sys.executable)" -# Save scan root so `graphify update` (no args) knows where to look next time -echo "$(cd INPUT_PATH && pwd)" > graphify-out/.graphify_root +# Save scan root so `graphify update` (no args) knows where to look next time. +# INPUT_PATH is passed through a quoted heredoc, never substituted into the +# command line itself: a bare `cd INPUT_PATH` (or an unquoted heredoc, which +# still expands $()/backticks in its body) would let a malicious path execute +# as shell code the moment this line runs. +"$PYTHON" -c "import os, sys; out_path = os.path.abspath('graphify-out/.graphify_root'); os.chdir(sys.stdin.readline().rstrip('\n')); open(out_path, 'w', encoding='utf-8').write(os.getcwd())" <<'GRAPHIFY_ROOT_EOF' +INPUT_PATH +GRAPHIFY_ROOT_EOF ``` If the import succeeds, print nothing and move straight to Step 2. diff --git a/graphify/skill-opencode.md b/graphify/skill-opencode.md index 91ced6067..c5dd37d91 100644 --- a/graphify/skill-opencode.md +++ b/graphify/skill-opencode.md @@ -96,8 +96,14 @@ fi # Write interpreter path for all subsequent steps (persists across invocations) mkdir -p graphify-out "$PYTHON" -c "import sys; open('graphify-out/.graphify_python', 'w', encoding='utf-8').write(sys.executable)" -# Save scan root so `graphify update` (no args) knows where to look next time -echo "$(cd INPUT_PATH && pwd)" > graphify-out/.graphify_root +# Save scan root so `graphify update` (no args) knows where to look next time. +# INPUT_PATH is passed through a quoted heredoc, never substituted into the +# command line itself: a bare `cd INPUT_PATH` (or an unquoted heredoc, which +# still expands $()/backticks in its body) would let a malicious path execute +# as shell code the moment this line runs. +"$PYTHON" -c "import os, sys; out_path = os.path.abspath('graphify-out/.graphify_root'); os.chdir(sys.stdin.readline().rstrip('\n')); open(out_path, 'w', encoding='utf-8').write(os.getcwd())" <<'GRAPHIFY_ROOT_EOF' +INPUT_PATH +GRAPHIFY_ROOT_EOF ``` If the import succeeds, print nothing and move straight to Step 2. diff --git a/graphify/skill-pi.md b/graphify/skill-pi.md index abd2811d2..e872ce905 100644 --- a/graphify/skill-pi.md +++ b/graphify/skill-pi.md @@ -96,8 +96,14 @@ fi # Write interpreter path for all subsequent steps (persists across invocations) mkdir -p graphify-out "$PYTHON" -c "import sys; open('graphify-out/.graphify_python', 'w', encoding='utf-8').write(sys.executable)" -# Save scan root so `graphify update` (no args) knows where to look next time -echo "$(cd INPUT_PATH && pwd)" > graphify-out/.graphify_root +# Save scan root so `graphify update` (no args) knows where to look next time. +# INPUT_PATH is passed through a quoted heredoc, never substituted into the +# command line itself: a bare `cd INPUT_PATH` (or an unquoted heredoc, which +# still expands $()/backticks in its body) would let a malicious path execute +# as shell code the moment this line runs. +"$PYTHON" -c "import os, sys; out_path = os.path.abspath('graphify-out/.graphify_root'); os.chdir(sys.stdin.readline().rstrip('\n')); open(out_path, 'w', encoding='utf-8').write(os.getcwd())" <<'GRAPHIFY_ROOT_EOF' +INPUT_PATH +GRAPHIFY_ROOT_EOF ``` If the import succeeds, print nothing and move straight to Step 2. diff --git a/graphify/skill-trae.md b/graphify/skill-trae.md index 050667bc2..fc533f1c1 100644 --- a/graphify/skill-trae.md +++ b/graphify/skill-trae.md @@ -96,8 +96,14 @@ fi # Write interpreter path for all subsequent steps (persists across invocations) mkdir -p graphify-out "$PYTHON" -c "import sys; open('graphify-out/.graphify_python', 'w', encoding='utf-8').write(sys.executable)" -# Save scan root so `graphify update` (no args) knows where to look next time -echo "$(cd INPUT_PATH && pwd)" > graphify-out/.graphify_root +# Save scan root so `graphify update` (no args) knows where to look next time. +# INPUT_PATH is passed through a quoted heredoc, never substituted into the +# command line itself: a bare `cd INPUT_PATH` (or an unquoted heredoc, which +# still expands $()/backticks in its body) would let a malicious path execute +# as shell code the moment this line runs. +"$PYTHON" -c "import os, sys; out_path = os.path.abspath('graphify-out/.graphify_root'); os.chdir(sys.stdin.readline().rstrip('\n')); open(out_path, 'w', encoding='utf-8').write(os.getcwd())" <<'GRAPHIFY_ROOT_EOF' +INPUT_PATH +GRAPHIFY_ROOT_EOF ``` If the import succeeds, print nothing and move straight to Step 2. diff --git a/graphify/skill-vscode.md b/graphify/skill-vscode.md index 20c7c0835..31d1e983b 100644 --- a/graphify/skill-vscode.md +++ b/graphify/skill-vscode.md @@ -96,8 +96,14 @@ fi # Write interpreter path for all subsequent steps (persists across invocations) mkdir -p graphify-out "$PYTHON" -c "import sys; open('graphify-out/.graphify_python', 'w', encoding='utf-8').write(sys.executable)" -# Save scan root so `graphify update` (no args) knows where to look next time -echo "$(cd INPUT_PATH && pwd)" > graphify-out/.graphify_root +# Save scan root so `graphify update` (no args) knows where to look next time. +# INPUT_PATH is passed through a quoted heredoc, never substituted into the +# command line itself: a bare `cd INPUT_PATH` (or an unquoted heredoc, which +# still expands $()/backticks in its body) would let a malicious path execute +# as shell code the moment this line runs. +"$PYTHON" -c "import os, sys; out_path = os.path.abspath('graphify-out/.graphify_root'); os.chdir(sys.stdin.readline().rstrip('\n')); open(out_path, 'w', encoding='utf-8').write(os.getcwd())" <<'GRAPHIFY_ROOT_EOF' +INPUT_PATH +GRAPHIFY_ROOT_EOF ``` If the import succeeds, print nothing and move straight to Step 2. diff --git a/graphify/skill-windows.md b/graphify/skill-windows.md index 764c1914d..456244a24 100644 --- a/graphify/skill-windows.md +++ b/graphify/skill-windows.md @@ -123,8 +123,15 @@ if (-not $GRAPHIFY_PYTHON) { # encoding writes the bytes POSIX writes, and adds no trailing newline. $Utf8NoBom = New-Object System.Text.UTF8Encoding $false [System.IO.File]::WriteAllText((Join-Path $PWD 'graphify-out\.graphify_python'), [string]$GRAPHIFY_PYTHON, $Utf8NoBom) -# Save scan root so `graphify update` (no args) knows where to look next time -[System.IO.File]::WriteAllText((Join-Path $PWD 'graphify-out\.graphify_root'), (Resolve-Path INPUT_PATH).Path, $Utf8NoBom) +# Save scan root so `graphify update` (no args) knows where to look next time. +# INPUT_PATH is captured through a single-quoted (literal) here-string, never +# substituted directly into the command line: an unquoted bareword argument +# substituted here would let a malicious path (a stray `;`, `|`, or `$(...)`) +# execute as script code the moment this line runs. +$InputPathRaw = @' +INPUT_PATH +'@ +[System.IO.File]::WriteAllText((Join-Path $PWD 'graphify-out\.graphify_root'), (Resolve-Path $InputPathRaw.Trim()).Path, $Utf8NoBom) ``` If the import succeeds, print nothing and move straight to Step 2. diff --git a/graphify/skill.md b/graphify/skill.md index abd2811d2..e872ce905 100644 --- a/graphify/skill.md +++ b/graphify/skill.md @@ -96,8 +96,14 @@ fi # Write interpreter path for all subsequent steps (persists across invocations) mkdir -p graphify-out "$PYTHON" -c "import sys; open('graphify-out/.graphify_python', 'w', encoding='utf-8').write(sys.executable)" -# Save scan root so `graphify update` (no args) knows where to look next time -echo "$(cd INPUT_PATH && pwd)" > graphify-out/.graphify_root +# Save scan root so `graphify update` (no args) knows where to look next time. +# INPUT_PATH is passed through a quoted heredoc, never substituted into the +# command line itself: a bare `cd INPUT_PATH` (or an unquoted heredoc, which +# still expands $()/backticks in its body) would let a malicious path execute +# as shell code the moment this line runs. +"$PYTHON" -c "import os, sys; out_path = os.path.abspath('graphify-out/.graphify_root'); os.chdir(sys.stdin.readline().rstrip('\n')); open(out_path, 'w', encoding='utf-8').write(os.getcwd())" <<'GRAPHIFY_ROOT_EOF' +INPUT_PATH +GRAPHIFY_ROOT_EOF ``` If the import succeeds, print nothing and move straight to Step 2. diff --git a/tools/skillgen/expected/graphify__skill-agents.md b/tools/skillgen/expected/graphify__skill-agents.md index 190827d9a..ac1ea3189 100644 --- a/tools/skillgen/expected/graphify__skill-agents.md +++ b/tools/skillgen/expected/graphify__skill-agents.md @@ -96,8 +96,14 @@ fi # Write interpreter path for all subsequent steps (persists across invocations) mkdir -p graphify-out "$PYTHON" -c "import sys; open('graphify-out/.graphify_python', 'w', encoding='utf-8').write(sys.executable)" -# Save scan root so `graphify update` (no args) knows where to look next time -echo "$(cd INPUT_PATH && pwd)" > graphify-out/.graphify_root +# Save scan root so `graphify update` (no args) knows where to look next time. +# INPUT_PATH is passed through a quoted heredoc, never substituted into the +# command line itself: a bare `cd INPUT_PATH` (or an unquoted heredoc, which +# still expands $()/backticks in its body) would let a malicious path execute +# as shell code the moment this line runs. +"$PYTHON" -c "import os, sys; out_path = os.path.abspath('graphify-out/.graphify_root'); os.chdir(sys.stdin.readline().rstrip('\n')); open(out_path, 'w', encoding='utf-8').write(os.getcwd())" <<'GRAPHIFY_ROOT_EOF' +INPUT_PATH +GRAPHIFY_ROOT_EOF ``` If the import succeeds, print nothing and move straight to Step 2. diff --git a/tools/skillgen/expected/graphify__skill-amp.md b/tools/skillgen/expected/graphify__skill-amp.md index 190827d9a..ac1ea3189 100644 --- a/tools/skillgen/expected/graphify__skill-amp.md +++ b/tools/skillgen/expected/graphify__skill-amp.md @@ -96,8 +96,14 @@ fi # Write interpreter path for all subsequent steps (persists across invocations) mkdir -p graphify-out "$PYTHON" -c "import sys; open('graphify-out/.graphify_python', 'w', encoding='utf-8').write(sys.executable)" -# Save scan root so `graphify update` (no args) knows where to look next time -echo "$(cd INPUT_PATH && pwd)" > graphify-out/.graphify_root +# Save scan root so `graphify update` (no args) knows where to look next time. +# INPUT_PATH is passed through a quoted heredoc, never substituted into the +# command line itself: a bare `cd INPUT_PATH` (or an unquoted heredoc, which +# still expands $()/backticks in its body) would let a malicious path execute +# as shell code the moment this line runs. +"$PYTHON" -c "import os, sys; out_path = os.path.abspath('graphify-out/.graphify_root'); os.chdir(sys.stdin.readline().rstrip('\n')); open(out_path, 'w', encoding='utf-8').write(os.getcwd())" <<'GRAPHIFY_ROOT_EOF' +INPUT_PATH +GRAPHIFY_ROOT_EOF ``` If the import succeeds, print nothing and move straight to Step 2. diff --git a/tools/skillgen/expected/graphify__skill-claw.md b/tools/skillgen/expected/graphify__skill-claw.md index abd2811d2..e872ce905 100644 --- a/tools/skillgen/expected/graphify__skill-claw.md +++ b/tools/skillgen/expected/graphify__skill-claw.md @@ -96,8 +96,14 @@ fi # Write interpreter path for all subsequent steps (persists across invocations) mkdir -p graphify-out "$PYTHON" -c "import sys; open('graphify-out/.graphify_python', 'w', encoding='utf-8').write(sys.executable)" -# Save scan root so `graphify update` (no args) knows where to look next time -echo "$(cd INPUT_PATH && pwd)" > graphify-out/.graphify_root +# Save scan root so `graphify update` (no args) knows where to look next time. +# INPUT_PATH is passed through a quoted heredoc, never substituted into the +# command line itself: a bare `cd INPUT_PATH` (or an unquoted heredoc, which +# still expands $()/backticks in its body) would let a malicious path execute +# as shell code the moment this line runs. +"$PYTHON" -c "import os, sys; out_path = os.path.abspath('graphify-out/.graphify_root'); os.chdir(sys.stdin.readline().rstrip('\n')); open(out_path, 'w', encoding='utf-8').write(os.getcwd())" <<'GRAPHIFY_ROOT_EOF' +INPUT_PATH +GRAPHIFY_ROOT_EOF ``` If the import succeeds, print nothing and move straight to Step 2. diff --git a/tools/skillgen/expected/graphify__skill-codex.md b/tools/skillgen/expected/graphify__skill-codex.md index af3f723c7..cce6551b2 100644 --- a/tools/skillgen/expected/graphify__skill-codex.md +++ b/tools/skillgen/expected/graphify__skill-codex.md @@ -96,8 +96,14 @@ fi # Write interpreter path for all subsequent steps (persists across invocations) mkdir -p graphify-out "$PYTHON" -c "import sys; open('graphify-out/.graphify_python', 'w', encoding='utf-8').write(sys.executable)" -# Save scan root so `graphify update` (no args) knows where to look next time -echo "$(cd INPUT_PATH && pwd)" > graphify-out/.graphify_root +# Save scan root so `graphify update` (no args) knows where to look next time. +# INPUT_PATH is passed through a quoted heredoc, never substituted into the +# command line itself: a bare `cd INPUT_PATH` (or an unquoted heredoc, which +# still expands $()/backticks in its body) would let a malicious path execute +# as shell code the moment this line runs. +"$PYTHON" -c "import os, sys; out_path = os.path.abspath('graphify-out/.graphify_root'); os.chdir(sys.stdin.readline().rstrip('\n')); open(out_path, 'w', encoding='utf-8').write(os.getcwd())" <<'GRAPHIFY_ROOT_EOF' +INPUT_PATH +GRAPHIFY_ROOT_EOF ``` If the import succeeds, print nothing and move straight to Step 2. diff --git a/tools/skillgen/expected/graphify__skill-copilot.md b/tools/skillgen/expected/graphify__skill-copilot.md index abd2811d2..e872ce905 100644 --- a/tools/skillgen/expected/graphify__skill-copilot.md +++ b/tools/skillgen/expected/graphify__skill-copilot.md @@ -96,8 +96,14 @@ fi # Write interpreter path for all subsequent steps (persists across invocations) mkdir -p graphify-out "$PYTHON" -c "import sys; open('graphify-out/.graphify_python', 'w', encoding='utf-8').write(sys.executable)" -# Save scan root so `graphify update` (no args) knows where to look next time -echo "$(cd INPUT_PATH && pwd)" > graphify-out/.graphify_root +# Save scan root so `graphify update` (no args) knows where to look next time. +# INPUT_PATH is passed through a quoted heredoc, never substituted into the +# command line itself: a bare `cd INPUT_PATH` (or an unquoted heredoc, which +# still expands $()/backticks in its body) would let a malicious path execute +# as shell code the moment this line runs. +"$PYTHON" -c "import os, sys; out_path = os.path.abspath('graphify-out/.graphify_root'); os.chdir(sys.stdin.readline().rstrip('\n')); open(out_path, 'w', encoding='utf-8').write(os.getcwd())" <<'GRAPHIFY_ROOT_EOF' +INPUT_PATH +GRAPHIFY_ROOT_EOF ``` If the import succeeds, print nothing and move straight to Step 2. diff --git a/tools/skillgen/expected/graphify__skill-droid.md b/tools/skillgen/expected/graphify__skill-droid.md index fd148d485..c60ec15a5 100644 --- a/tools/skillgen/expected/graphify__skill-droid.md +++ b/tools/skillgen/expected/graphify__skill-droid.md @@ -96,8 +96,14 @@ fi # Write interpreter path for all subsequent steps (persists across invocations) mkdir -p graphify-out "$PYTHON" -c "import sys; open('graphify-out/.graphify_python', 'w', encoding='utf-8').write(sys.executable)" -# Save scan root so `graphify update` (no args) knows where to look next time -echo "$(cd INPUT_PATH && pwd)" > graphify-out/.graphify_root +# Save scan root so `graphify update` (no args) knows where to look next time. +# INPUT_PATH is passed through a quoted heredoc, never substituted into the +# command line itself: a bare `cd INPUT_PATH` (or an unquoted heredoc, which +# still expands $()/backticks in its body) would let a malicious path execute +# as shell code the moment this line runs. +"$PYTHON" -c "import os, sys; out_path = os.path.abspath('graphify-out/.graphify_root'); os.chdir(sys.stdin.readline().rstrip('\n')); open(out_path, 'w', encoding='utf-8').write(os.getcwd())" <<'GRAPHIFY_ROOT_EOF' +INPUT_PATH +GRAPHIFY_ROOT_EOF ``` If the import succeeds, print nothing and move straight to Step 2. diff --git a/tools/skillgen/expected/graphify__skill-kilo.md b/tools/skillgen/expected/graphify__skill-kilo.md index 3e70b050a..39c2cbdcd 100644 --- a/tools/skillgen/expected/graphify__skill-kilo.md +++ b/tools/skillgen/expected/graphify__skill-kilo.md @@ -96,8 +96,14 @@ fi # Write interpreter path for all subsequent steps (persists across invocations) mkdir -p graphify-out "$PYTHON" -c "import sys; open('graphify-out/.graphify_python', 'w', encoding='utf-8').write(sys.executable)" -# Save scan root so `graphify update` (no args) knows where to look next time -echo "$(cd INPUT_PATH && pwd)" > graphify-out/.graphify_root +# Save scan root so `graphify update` (no args) knows where to look next time. +# INPUT_PATH is passed through a quoted heredoc, never substituted into the +# command line itself: a bare `cd INPUT_PATH` (or an unquoted heredoc, which +# still expands $()/backticks in its body) would let a malicious path execute +# as shell code the moment this line runs. +"$PYTHON" -c "import os, sys; out_path = os.path.abspath('graphify-out/.graphify_root'); os.chdir(sys.stdin.readline().rstrip('\n')); open(out_path, 'w', encoding='utf-8').write(os.getcwd())" <<'GRAPHIFY_ROOT_EOF' +INPUT_PATH +GRAPHIFY_ROOT_EOF ``` If the import succeeds, print nothing and move straight to Step 2. diff --git a/tools/skillgen/expected/graphify__skill-kiro.md b/tools/skillgen/expected/graphify__skill-kiro.md index abd2811d2..e872ce905 100644 --- a/tools/skillgen/expected/graphify__skill-kiro.md +++ b/tools/skillgen/expected/graphify__skill-kiro.md @@ -96,8 +96,14 @@ fi # Write interpreter path for all subsequent steps (persists across invocations) mkdir -p graphify-out "$PYTHON" -c "import sys; open('graphify-out/.graphify_python', 'w', encoding='utf-8').write(sys.executable)" -# Save scan root so `graphify update` (no args) knows where to look next time -echo "$(cd INPUT_PATH && pwd)" > graphify-out/.graphify_root +# Save scan root so `graphify update` (no args) knows where to look next time. +# INPUT_PATH is passed through a quoted heredoc, never substituted into the +# command line itself: a bare `cd INPUT_PATH` (or an unquoted heredoc, which +# still expands $()/backticks in its body) would let a malicious path execute +# as shell code the moment this line runs. +"$PYTHON" -c "import os, sys; out_path = os.path.abspath('graphify-out/.graphify_root'); os.chdir(sys.stdin.readline().rstrip('\n')); open(out_path, 'w', encoding='utf-8').write(os.getcwd())" <<'GRAPHIFY_ROOT_EOF' +INPUT_PATH +GRAPHIFY_ROOT_EOF ``` If the import succeeds, print nothing and move straight to Step 2. diff --git a/tools/skillgen/expected/graphify__skill-opencode.md b/tools/skillgen/expected/graphify__skill-opencode.md index 91ced6067..c5dd37d91 100644 --- a/tools/skillgen/expected/graphify__skill-opencode.md +++ b/tools/skillgen/expected/graphify__skill-opencode.md @@ -96,8 +96,14 @@ fi # Write interpreter path for all subsequent steps (persists across invocations) mkdir -p graphify-out "$PYTHON" -c "import sys; open('graphify-out/.graphify_python', 'w', encoding='utf-8').write(sys.executable)" -# Save scan root so `graphify update` (no args) knows where to look next time -echo "$(cd INPUT_PATH && pwd)" > graphify-out/.graphify_root +# Save scan root so `graphify update` (no args) knows where to look next time. +# INPUT_PATH is passed through a quoted heredoc, never substituted into the +# command line itself: a bare `cd INPUT_PATH` (or an unquoted heredoc, which +# still expands $()/backticks in its body) would let a malicious path execute +# as shell code the moment this line runs. +"$PYTHON" -c "import os, sys; out_path = os.path.abspath('graphify-out/.graphify_root'); os.chdir(sys.stdin.readline().rstrip('\n')); open(out_path, 'w', encoding='utf-8').write(os.getcwd())" <<'GRAPHIFY_ROOT_EOF' +INPUT_PATH +GRAPHIFY_ROOT_EOF ``` If the import succeeds, print nothing and move straight to Step 2. diff --git a/tools/skillgen/expected/graphify__skill-pi.md b/tools/skillgen/expected/graphify__skill-pi.md index abd2811d2..e872ce905 100644 --- a/tools/skillgen/expected/graphify__skill-pi.md +++ b/tools/skillgen/expected/graphify__skill-pi.md @@ -96,8 +96,14 @@ fi # Write interpreter path for all subsequent steps (persists across invocations) mkdir -p graphify-out "$PYTHON" -c "import sys; open('graphify-out/.graphify_python', 'w', encoding='utf-8').write(sys.executable)" -# Save scan root so `graphify update` (no args) knows where to look next time -echo "$(cd INPUT_PATH && pwd)" > graphify-out/.graphify_root +# Save scan root so `graphify update` (no args) knows where to look next time. +# INPUT_PATH is passed through a quoted heredoc, never substituted into the +# command line itself: a bare `cd INPUT_PATH` (or an unquoted heredoc, which +# still expands $()/backticks in its body) would let a malicious path execute +# as shell code the moment this line runs. +"$PYTHON" -c "import os, sys; out_path = os.path.abspath('graphify-out/.graphify_root'); os.chdir(sys.stdin.readline().rstrip('\n')); open(out_path, 'w', encoding='utf-8').write(os.getcwd())" <<'GRAPHIFY_ROOT_EOF' +INPUT_PATH +GRAPHIFY_ROOT_EOF ``` If the import succeeds, print nothing and move straight to Step 2. diff --git a/tools/skillgen/expected/graphify__skill-trae.md b/tools/skillgen/expected/graphify__skill-trae.md index 050667bc2..fc533f1c1 100644 --- a/tools/skillgen/expected/graphify__skill-trae.md +++ b/tools/skillgen/expected/graphify__skill-trae.md @@ -96,8 +96,14 @@ fi # Write interpreter path for all subsequent steps (persists across invocations) mkdir -p graphify-out "$PYTHON" -c "import sys; open('graphify-out/.graphify_python', 'w', encoding='utf-8').write(sys.executable)" -# Save scan root so `graphify update` (no args) knows where to look next time -echo "$(cd INPUT_PATH && pwd)" > graphify-out/.graphify_root +# Save scan root so `graphify update` (no args) knows where to look next time. +# INPUT_PATH is passed through a quoted heredoc, never substituted into the +# command line itself: a bare `cd INPUT_PATH` (or an unquoted heredoc, which +# still expands $()/backticks in its body) would let a malicious path execute +# as shell code the moment this line runs. +"$PYTHON" -c "import os, sys; out_path = os.path.abspath('graphify-out/.graphify_root'); os.chdir(sys.stdin.readline().rstrip('\n')); open(out_path, 'w', encoding='utf-8').write(os.getcwd())" <<'GRAPHIFY_ROOT_EOF' +INPUT_PATH +GRAPHIFY_ROOT_EOF ``` If the import succeeds, print nothing and move straight to Step 2. diff --git a/tools/skillgen/expected/graphify__skill-vscode.md b/tools/skillgen/expected/graphify__skill-vscode.md index 20c7c0835..31d1e983b 100644 --- a/tools/skillgen/expected/graphify__skill-vscode.md +++ b/tools/skillgen/expected/graphify__skill-vscode.md @@ -96,8 +96,14 @@ fi # Write interpreter path for all subsequent steps (persists across invocations) mkdir -p graphify-out "$PYTHON" -c "import sys; open('graphify-out/.graphify_python', 'w', encoding='utf-8').write(sys.executable)" -# Save scan root so `graphify update` (no args) knows where to look next time -echo "$(cd INPUT_PATH && pwd)" > graphify-out/.graphify_root +# Save scan root so `graphify update` (no args) knows where to look next time. +# INPUT_PATH is passed through a quoted heredoc, never substituted into the +# command line itself: a bare `cd INPUT_PATH` (or an unquoted heredoc, which +# still expands $()/backticks in its body) would let a malicious path execute +# as shell code the moment this line runs. +"$PYTHON" -c "import os, sys; out_path = os.path.abspath('graphify-out/.graphify_root'); os.chdir(sys.stdin.readline().rstrip('\n')); open(out_path, 'w', encoding='utf-8').write(os.getcwd())" <<'GRAPHIFY_ROOT_EOF' +INPUT_PATH +GRAPHIFY_ROOT_EOF ``` If the import succeeds, print nothing and move straight to Step 2. diff --git a/tools/skillgen/expected/graphify__skill-windows.md b/tools/skillgen/expected/graphify__skill-windows.md index 764c1914d..456244a24 100644 --- a/tools/skillgen/expected/graphify__skill-windows.md +++ b/tools/skillgen/expected/graphify__skill-windows.md @@ -123,8 +123,15 @@ if (-not $GRAPHIFY_PYTHON) { # encoding writes the bytes POSIX writes, and adds no trailing newline. $Utf8NoBom = New-Object System.Text.UTF8Encoding $false [System.IO.File]::WriteAllText((Join-Path $PWD 'graphify-out\.graphify_python'), [string]$GRAPHIFY_PYTHON, $Utf8NoBom) -# Save scan root so `graphify update` (no args) knows where to look next time -[System.IO.File]::WriteAllText((Join-Path $PWD 'graphify-out\.graphify_root'), (Resolve-Path INPUT_PATH).Path, $Utf8NoBom) +# Save scan root so `graphify update` (no args) knows where to look next time. +# INPUT_PATH is captured through a single-quoted (literal) here-string, never +# substituted directly into the command line: an unquoted bareword argument +# substituted here would let a malicious path (a stray `;`, `|`, or `$(...)`) +# execute as script code the moment this line runs. +$InputPathRaw = @' +INPUT_PATH +'@ +[System.IO.File]::WriteAllText((Join-Path $PWD 'graphify-out\.graphify_root'), (Resolve-Path $InputPathRaw.Trim()).Path, $Utf8NoBom) ``` If the import succeeds, print nothing and move straight to Step 2. diff --git a/tools/skillgen/expected/graphify__skill.md b/tools/skillgen/expected/graphify__skill.md index abd2811d2..e872ce905 100644 --- a/tools/skillgen/expected/graphify__skill.md +++ b/tools/skillgen/expected/graphify__skill.md @@ -96,8 +96,14 @@ fi # Write interpreter path for all subsequent steps (persists across invocations) mkdir -p graphify-out "$PYTHON" -c "import sys; open('graphify-out/.graphify_python', 'w', encoding='utf-8').write(sys.executable)" -# Save scan root so `graphify update` (no args) knows where to look next time -echo "$(cd INPUT_PATH && pwd)" > graphify-out/.graphify_root +# Save scan root so `graphify update` (no args) knows where to look next time. +# INPUT_PATH is passed through a quoted heredoc, never substituted into the +# command line itself: a bare `cd INPUT_PATH` (or an unquoted heredoc, which +# still expands $()/backticks in its body) would let a malicious path execute +# as shell code the moment this line runs. +"$PYTHON" -c "import os, sys; out_path = os.path.abspath('graphify-out/.graphify_root'); os.chdir(sys.stdin.readline().rstrip('\n')); open(out_path, 'w', encoding='utf-8').write(os.getcwd())" <<'GRAPHIFY_ROOT_EOF' +INPUT_PATH +GRAPHIFY_ROOT_EOF ``` If the import succeeds, print nothing and move straight to Step 2.