Problem
From verification of #60:
「/tmp/touched-plugins.txt race / TOCTOU on shared /tmp. macOS single-user dev workstation reduces realistic threat.」
— Source: idd-verify #60 (security MEDIUM, DA→LOW)
Phase 0.5 Step 5 cross-plugin warning at SKILL.md L233 writes to hardcoded /tmp/touched-plugins.txt then reads back. On multi-user systems or shared /tmp mounts, this could race or be tampered.
Type
refactor (defensive hardening, LOW priority)
Expected behavior
Use mktemp with random suffix instead of hardcoded /tmp/touched-plugins.txt:
TMPFILE=$(mktemp -t plugin-update-touched.XXXXXX)
trap "rm -f '$TMPFILE'" EXIT
git log --name-only --pretty=format: $UPSTREAM..HEAD ... > "$TMPFILE"
Or inline the variable assignment without a temp file at all.
Actual behavior
Hardcoded /tmp/touched-plugins.txt per Phase 0.5 Step 5.
Priority
P3 / LOW — single-user macOS dev workstation realistic threat is low, but defensive hygiene is cheap. Address when next touching Phase 0.5 logic.
Related
Problem
Phase 0.5 Step 5 cross-plugin warning at SKILL.md L233 writes to hardcoded
/tmp/touched-plugins.txtthen reads back. On multi-user systems or shared/tmpmounts, this could race or be tampered.Type
refactor (defensive hardening, LOW priority)
Expected behavior
Use
mktempwith random suffix instead of hardcoded/tmp/touched-plugins.txt:Or inline the variable assignment without a temp file at all.
Actual behavior
Hardcoded
/tmp/touched-plugins.txtper Phase 0.5 Step 5.Priority
P3 / LOW — single-user macOS dev workstation realistic threat is low, but defensive hygiene is cheap. Address when next touching Phase 0.5 logic.
Related