Skip to content

ci: enable Tracebit canary credentials in GitHub workflows - #1409

Merged
uglide merged 4 commits into
masterfrom
ci/tracebit
Nov 26, 2026
Merged

uglide merged 4 commits into
masterfrom
ci/tracebit

Conversation

@uglide

@uglide uglide commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

Enables Tracebit Community Edition canary credentials in CI, following the approach in redis/redis-snap#43.

What changes

  • Every workflow job now has a Configure credentials step that uses tracebit-com/tracebit-community-action pinned to b149c6c (v1.4.0, with async: 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.
  • The step runs only when TRACEBIT_ENABLED is true, which is set from secrets.SECURITY_API_TOKEN != ''. Fork PRs and Dependabot runs get no secrets, so they skip the step and behave as before.
  • Covers the macOS, Windows, rockylinux:8 container and FreeBSD-VM jobs (in the FreeBSD jobs the step runs on the Ubuntu host).
  • Dependabot: adds a github-actions entry limited to tracebit-com/tracebit-community-action (weekly).
  • README: adds a "Protected by Tracebit" badge (.github/assets/tracebit-badge.svg).

SECURITY_API_TOKEN is already configured as a repository secret.

🤖 Generated with Claude Code

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.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-26T16:27:04.449521Z 3f55dc4 New commits
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

github-actions Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

ABI compatibility check

✅ libhiredis — compatible

No ABI changes detected.

✅ libhiredis_ssl — compatible

No ABI changes detected.

Baseline 6e0d55b3ff42a4801d756f6ebdceee21019c1e86 vs head 3f55dc4a1b903d80ba2886e12aa9a5281a1e32c5. Apply the ignore-abi-check label to skip this check for an intentional, SONAME-bumped ABI break.

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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread .github/workflows/build.yml Resolved
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.
@uglide
uglide merged commit 19a4db2 into master Nov 26, 2026
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant