Skip to content

🔒 security(scripts): use mktemp scratch dir for run-matrix.sh temp files - #206

Merged
scttbnsn merged 1 commit into
dev/v1.6from
fix/205-keygen-mktemp
Aug 9, 2026
Merged

scttbnsn merged 1 commit into
dev/v1.6from
fix/205-keygen-mktemp

Conversation

@scttbnsn

@scttbnsn scttbnsn commented Aug 9, 2026 •

Copy link
Copy Markdown
Contributor

Closes #205.

CodeRabbit flagged the keygen error file's predictable /tmp path on #204. The same pre-creatable-symlink pattern covered every transient err/log/cid file in run-matrix.sh, so all of them now live under one mktemp -d scratch dir removed by an EXIT trap, with the expansions quoted.

Verified: bash -n, shellcheck (no new findings), and run-matrix.sh --self-test all pass.

Changelog

  • 🔒 Security: Replace predictable /tmp paths with a unique per-run mktemp -d scratch directory.
  • 🔧 Changed: Store error logs, command output, and trigger response files in the scratch directory.
  • 🗑️ Removed: Remove temporary files through an EXIT trap on success and failure.
  • 🔧 Changed: Quote temporary file expansions.
  • ✅ Validation: bash -n, ShellCheck, and run-matrix.sh --self-test pass.

CodeRabbit flagged the keygen error file's predictable /tmp path on #204;
the same pre-creatable-symlink pattern covered every transient err/log/cid
file in the script. All of them now live under one mktemp -d scratch dir
removed by an EXIT trap.

Closes #205
@vercel

vercel Bot commented Aug 9, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
sockguard-website Ready Ready Preview Aug 9, 2026 12:46am

@coderabbitai

coderabbitai Bot commented Aug 9, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 860f0e20-7ff7-4296-adb5-5b7e4e3ed2b7

📥 Commits

Reviewing files that changed from the base of the PR and between db8c738 and df24966.

📒 Files selected for processing (1)
  • scripts/tri-tool-conformance/run-matrix.sh

📝 Walkthrough

Walkthrough

The conformance matrix now creates a unique private scratch directory under TMPDIR or /tmp for each run. It removes the directory on exit. Validation errors, command output, probe artifacts, key-generation errors, compose output, and remote-update responses now use files in this directory instead of fixed /tmp paths. Remote-update failure reporting reads the response body from the per-run file.

🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The change replaces predictable temporary paths with a private mktemp directory and removes it through an EXIT trap, satisfying issue #205.
Out of Scope Changes check ✅ Passed All changes address temporary-file safety and cleanup in run-matrix.sh; no unrelated scope is present.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/205-keygen-mktemp

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@scttbnsn
scttbnsn merged commit 2e19c70 into dev/v1.6 Aug 9, 2026
39 checks passed
@scttbnsn
scttbnsn deleted the fix/205-keygen-mktemp branch August 9, 2026 01:08
scttbnsn added a commit that referenced this pull request Aug 9, 2026
Single sync commit on top of main carrying the dev/v1.6 tip tree (9d8ea57):
🔒 security(exec): bounded exec-inspect response decode (#208)
🧪 test(integration): portwing/drydock preset conformance suites (#210)
🧪 test(ci): weekly engine-matrix integration workflow (#209)
🔧 config(ci): fuzz deadline-flake retry (#207)
🔧 chore(conformance): mktemp scratch dir + live /events + trigger contracts (#206, #212)
🔧 chore(release): GA promotion — changelog, README, chart, website (#213)
scttbnsn added a commit that referenced this pull request Aug 9, 2026
Single sync commit on top of main carrying the dev/v1.6 tip tree (de8015b):
🔒 security(exec): bounded exec-inspect response decode (#208)
🧪 test(integration): portwing/drydock preset conformance suites (#210)
🧪 test(ci): weekly engine-matrix integration workflow (#209)
🔧 config(ci): fuzz deadline-flake retry + exit-status propagation (#207, #215)
🔧 chore(conformance): mktemp scratch dir + live /events + trigger contracts (#206, #212)
🔧 chore(release): GA promotion — changelog, README, chart, website (#213, #215)
scttbnsn added a commit that referenced this pull request Aug 9, 2026
Single sync commit on top of main carrying the dev/v1.6 tip tree (de8015b):
🔒 security(exec): bounded exec-inspect response decode (#208)
🧪 test(integration): portwing/drydock preset conformance suites (#210)
🧪 test(ci): weekly engine-matrix integration workflow (#209)
🔧 config(ci): fuzz deadline-flake retry + exit-status propagation (#207, #215)
🔧 chore(conformance): mktemp scratch dir + live /events + trigger contracts (#206, #212)
🔧 chore(release): GA promotion — changelog, README, chart, website (#213, #215)

This branch was successfully deployed

1 active deployment
Preview — df249663 Deployed Aug 9, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant