Repository navigation
ci: harden workflows and add security policy - #825
Merged
Merged
Conversation
Apply open-source security best practices from Astral's recommendations:
- Pin cachix/install-nix-action to commit SHA (was the only unpinned action)
- Replace pull_request_target with push trigger in release.yml to eliminate
a dangerous trigger class; the resolve job now uses the GitHub API to look
up the merged PR and validates the same gates (repo, branch, label, author)
- Set permissions: {} at workflow level and grant per-job in release.yml,
compat.yml, fuzz-full.yml, publish-custom-gcl.yml, prepare-release.yml
- Disable Go and pnpm caching during releases to prevent cache poisoning
- Add minimumReleaseAge of 3 days to Renovate config
- Add SECURITY.md with vulnerability disclosure policy
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1bf5199266
ℹ️ 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".
Add pull-requests: read permission to the resolve job so the commits-to-PR lookup has the required token scope. Remove || true so API failures surface as errors instead of silently skipping the release.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Applies open-source security best practices from Astral's recommendations:
cachix/install-nix-actionto SHA — was the only action using a mutable tag instead of a commit digestpull_request_targetwithpushtrigger inrelease.yml— eliminates a dangerous trigger class; the resolve job now uses the GitHub API (commits/{sha}/pulls) to look up the merged PR and validates the same 4 gates (repo match,release/v*branch,releaselabel,github-actions[bot]author)permissions: {}at workflow level inrelease.yml,compat.yml,fuzz-full.yml,publish-custom-gcl.yml, andprepare-release.yml; each job declares only what it needscache: falseon setup-go, removed pnpm cache)minimumReleaseAgein Renovate config avoids adopting freshly-published compromised packagesSECURITY.md— vulnerability disclosure policy pointing to GitHub private advisory reportingTest plan
pushtrigger change torelease.ymlwon't fire since this targetsmainand the resolve job exits early for non-release commits)actionlintreports no new issues (pre-existing shellcheck style warnings only)make releasecycle still triggers the publish workflow correctly via thepush-to-main path