Skip to content

fix(ci): isolate Trunk execution environment - #539

Merged
ss-o merged 1 commit into
mainfrom
bug-538
Aug 25, 2026
Merged

fix(ci): isolate Trunk execution environment#539
ss-o merged 1 commit into
mainfrom
bug-538

Conversation

@ss-o

@ss-o ss-o commented Aug 25, 2026

Copy link
Copy Markdown
Member

Summary

  • run Trunk with a minimal allowlisted environment and disposable runtime directories
  • remove persisted checkout credentials, GitHub token exposure, inline annotations, and checks write permission from the reusable workflow
  • add sentinel-based regression tests and safe incident-response guidance

Security behavior

The Trunk process no longer receives GitHub tokens or unrelated inherited environment variables. Credential-bearing token arguments are rejected. Internal failure diagnostics are suppressed and runtime state is deleted. Inline annotations are intentionally removed; pass or fail status and normal lint output remain.

Verification

  • sh scripts/test-trunk-safe-check.sh
  • bash scripts/test-trunk-safe-ci.sh
  • shell syntax and shfmt
  • actionlint .github/workflows/trunk.yml .github/workflows/trunk-safe-check-test.yml
  • targeted safe Trunk checks with no issues
  • 75 agent-policy tests
  • 98 Zsh-policy tests
  • standalone policy validators
  • git diff --check

The explicit eight-file Trunk scan reported no lint issues. Its git-diff-check adapter failed on three locally modified tracked files, while direct isolated git diff --check passed.

Agent handoff

No handoff needed.

Fixes #538

@ss-o
ss-o requested a review from a team as a code owner August 25, 2026 02:35
@ss-o
ss-o merged commit 4f2114a into main Aug 25, 2026
9 checks passed
@ss-o
ss-o deleted the bug-538 branch August 25, 2026 02:37
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.

Prevent lint failures from exposing inherited environment

1 participant