ci: harden all workflows against CI best practices checklist#57
Merged
Conversation
- Add step-security/harden-runner to all 17 jobs (egress-policy: audit) - Add merge_group trigger to ci.yml and security.yml for merge queue - Add workflow_dispatch to auto-approve, dependabot-auto-merge, post-merge, and pr-title workflows - Add concurrency groups to auto-approve and post-merge workflows - Create composite action for Node.js setup (deduplicates 5 jobs) - Fix github.actor to github.event.pull_request.user.login in auto-approve, dependabot-auto-merge, and pr-title workflows - Move stale.yml write permissions from workflow to job level - Add links.yml to its own path filters - Add CodeQL analysis to ruleset required status checks Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>
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
Systematically closes all gaps identified by comparing the CI pipeline against our CI skills checklist (ci-workflow-hygiene, ci-workflow-structure, ci-github-actions-gotchas).
Changes
Security hardening
step-security/harden-runner@v2.12.0as first step in all 17 jobs across 11 workflows (egress-policy: audit)github.actor(unreliable) togithub.event.pull_request.user.loginin auto-approve, dependabot-auto-merge, and pr-title workflowsstale.ymlwrite permissions from workflow level to job level (principle of least privilege)CodeQL analysisto ruleset required status checksMerge queue readiness
merge_grouptrigger toci.ymlandsecurity.ymlOperational reliability
workflow_dispatchto auto-approve, dependabot-auto-merge, post-merge, and pr-title workflowslinks.ymlto its own path filters (workflow changes now trigger link checks)DRY improvements
.github/actions/setup-nodecomposite action (Node.js setup + npm ci)Checklist compliance
Signed-off-by: Sebastien Tardif seb@tardif.ca