Problem
From verification of #48:
Logic P1.2 + Security F3: run_id uses ISO-8601 second-precision timestamp as jsonl filename. Same-second invocations produce identical filename → silent audit trail overwrite, violating D2 contract ("per-invocation 一檔").
— Source: team:logic + team:security + team:devils-advocate (upgraded HIGH), Verify comment
Collision (P1 / HIGH)
Two invocations within the same second (parallel /loop, CI batch, two terminals) produce run_id = "2026-05-10T17:00:00" — second invocation silently overwrites the first's jsonl. The audit trail is permanently lost with no error or warning. IDD's audit trail is a core promise; silent loss is worse than a secret leak (secrets can be rotated; audit trail cannot be reconstructed).
TOCTOU symlink overwrite (MEDIUM)
Predictable filename at a known path: an attacker with local FS write access can pre-create a symlink at .claude/.idd/issue-runs/2026-05-12T10:00:00.jsonl pointing to ~/.ssh/authorized_keys. The skill's jq -n ... > $JSONL_PATH truncates-and-writes without checking for symlinks.
Type
bug
Expected
run_id format changed to sub-second or adds random suffix: 2026-05-10T17:00:00.123Z or 2026-05-10T17:00:00-a3f9
- Jsonl write uses collision-detect semantics:
set -C (noclobber) + retry with suffix, or mktemp-style
- Symlink check before write:
[ -L "$JSONL_PATH" ] && abort
- Footer body updated to use new run_id format (jsonl ↔ footer ↔ comment_url alignment)
Related: #48
Problem
Collision (P1 / HIGH)
Two invocations within the same second (parallel
/loop, CI batch, two terminals) producerun_id = "2026-05-10T17:00:00"— second invocation silently overwrites the first's jsonl. The audit trail is permanently lost with no error or warning. IDD's audit trail is a core promise; silent loss is worse than a secret leak (secrets can be rotated; audit trail cannot be reconstructed).TOCTOU symlink overwrite (MEDIUM)
Predictable filename at a known path: an attacker with local FS write access can pre-create a symlink at
.claude/.idd/issue-runs/2026-05-12T10:00:00.jsonlpointing to~/.ssh/authorized_keys. The skill'sjq -n ... > $JSONL_PATHtruncates-and-writes without checking for symlinks.Type
bug
Expected
run_idformat changed to sub-second or adds random suffix:2026-05-10T17:00:00.123Zor2026-05-10T17:00:00-a3f9set -C(noclobber) + retry with suffix, ormktemp-style[ -L "$JSONL_PATH" ] && abortRelated: #48