Repository navigation
ci: enable Tracebit canary credentials in GitHub workflows - #1409
Conversation
Add a SHA-pinned tracebit-com/tracebit-community-action (v1.4.0) step to every workflow job so that CI runs carry canary AWS/SSH credentials. If a compromised dependency or action leaks and uses them, Tracebit alerts us. The step is gated on TRACEBIT_ENABLED, which is false when SECURITY_API_TOKEN is unavailable (fork pull requests, Dependabot), so those runs continue unchanged. Also add a Dependabot github-actions entry limited to the Tracebit action and a 'Protected by Tracebit' README badge.
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
ABI compatibility check✅
|
Tracebit creates ~/.ssh/config ending in a Host block for its canary key. vmactions/freebsd-vm then appends 'Include config.d/*.conf' at the end, so the Include only applies to that Host and 'ssh freebsd' fails with 'Could not resolve hostname freebsd'. Prepend the Include before the VM step so it applies globally; freebsd-vm skips adding its own when present.
The FreeBSD job builds and tests inside a vmactions/freebsd-vm guest, so canaries on the Ubuntu host were never visible to that code. Run the Tracebit step with HOME pointing into the workspace, which freebsd-vm syncs into the VM, and move those files into the guest $HOME as the first 'prepare' command (rewriting the SSH IdentityFile path). Forward the __AWS__/__NPM__/__PYPI__ canary variables via 'envs'. This also keeps Tracebit's Host block out of the runner's ~/.ssh/config, which broke freebsd-vm's 'Include config.d/*.conf' alias lookup, so the earlier SSH config workaround is dropped.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3c2b339290
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Tracebit writes its canary files in the pre phase, which runs before actions/checkout; checkout then deletes the workspace contents, so the .tracebit-home directory never reached the VM and 'prepare' skipped planting. Point HOME at runner.temp instead, copy the files into the workspace after checkout (rewriting the SSH IdentityFile to ~/), and log which canary files were installed in the guest.
Enables Tracebit Community Edition canary credentials in CI, following the approach in redis/redis-snap#43.
What changes
tracebit-com/tracebit-community-actionpinned tob149c6c(v1.4.0, withasync: true). The step goes right after checkout, or first in the job when other install steps run before checkout. It plants short-lived canary AWS and SSH credentials, so if a compromised dependency or third-party action harvests and uses them, we get an alert.TRACEBIT_ENABLEDis true, which is set fromsecrets.SECURITY_API_TOKEN != ''. Fork PRs and Dependabot runs get no secrets, so they skip the step and behave as before.github-actionsentry limited totracebit-com/tracebit-community-action(weekly)..github/assets/tracebit-badge.svg).SECURITY_API_TOKENis already configured as a repository secret.🤖 Generated with Claude Code