Skip to content

Pin CI actions, widen CodeQL, and update tap dependencies - #6

Merged
justsrc merged 11 commits into
mainfrom
feat/ci-hardening
Nov 11, 2026
Merged

justsrc merged 11 commits into
mainfrom
feat/ci-hardening

Conversation

@justsrc

@justsrc justsrc commented Nov 11, 2026 •

Copy link
Copy Markdown
Owner

This pull request implements a repository-wide switch to pin all external GitHub Actions to full 40-character commit SHAs, with release tags in trailing comments, as a supply-chain security measure. It updates all workflow files to use SHA-pinned references for actions/checkout and actions/upload-artifact, and updates documentation and comments to reflect the new convention and its implications. The CodeQL workflow is further improved to exclude test code from analysis and to handle Dependabot PR merges more robustly.

Action Pinning and Workflow Security

  • All external actions in workflow files (actions/checkout, actions/upload-artifact, github/codeql-action/init and analyze) are now pinned to immutable commit SHAs with release tags as comments, following a new convention described in .github/dependabot.yml. This mitigates the risk of tag retargeting and supply-chain attacks. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12]

  • .github/dependabot.yml and workflow comments are extensively updated to document the SHA-pinning policy, its rationale, the trade-offs (e.g., loss of Dependabot security alerts for SHA-pinned actions), and the required review/merge procedures for Dependabot PRs. [1] [2]

CodeQL Workflow Improvements

  • The CodeQL workflow (.github/workflows/codeql.yml) is updated to:
    • Remove the filter that restricted PR analysis to workflow file changes, so all PRs now trigger C++ analysis.
    • Exclude test code (and thus doctest) from the analysis set by setting TETHERKIT_BUILD_TESTS=OFF during the build, reducing noise from vendored code and focusing analysis on shipped code.
    • Add logic to skip SARIF uploads for Dependabot-authored commits on push events, avoiding failures due to read-only tokens, while ensuring uploads still occur for PR runs.

Other Notable Changes

  • The release workflow now uses a more narrowly scoped HOMEBREW_TAP_TOKEN secret instead of the previous deploy key, further tightening security around tap publishing.

Documentation and Comment Updates

  • Workflow and configuration file comments are updated throughout to clarify the new conventions, the reasons for these security measures, and the correct procedures for merging Dependabot PRs. [1] [2] [3]

These changes collectively strengthen the security and maintainability of the repository’s CI/CD workflows.

The required status checks live in a repository ruleset, not in a file:
adding or removing a CI job means editing the ruleset's context list too.
A Dependabot PR merged with squash produces a commit on main that is
authored by Dependabot, so the workflow on it gets a read-only token and
the SARIF upload 403s, failing the run. The analyze step now asks the
action not to publish for a Dependabot-authored push.

The pull_request path is left alone: code scanning allows uploading there
because the results are scoped to that one pull request.
SHA pinning made Dependabot a weekly event, so the procedure for merging
its pull request belongs in the repo: merge-commit rather than squash, and
the REST endpoint rather than gh pr merge for the review bypass.
@justsrc
justsrc merged commit 800915a into main Nov 11, 2026
20 checks passed
@justsrc
justsrc deleted the feat/ci-hardening branch November 11, 2026 16:07
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.

1 participant