Skip to content

[refactor] plugin-update Phase 0.5 Step 5 use mktemp instead of /tmp/touched-plugins.txt (sibling concern from #60) #70

Description

@kiki830621

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions