Repository navigation
Conversation
Pin all GitHub Actions to full commit SHAs with version comments to protect against tag-rewrite attacks, add least-privilege permissions blocks to all workflows, disable credential persistence on checkouts that do not push, add a Dependabot config to keep Actions and Python dependencies up to date, and add the OpenSSF Scorecard workflow. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Member
|
You assert that these are recommended best practices, but I am suspect of AI generated assertions. Can you provide links to the documentation for each assertion? |
Member
|
We intentionally have all code-scanning automations turned off for this project. I am not interested in getting updates from an automated tool and will be annoyed by them and ignore them. This will not be accepted so long as such tools are being utilized. |
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.
Description
Hardens the supply chain security of the repository's GitHub Actions workflows, following OpenSSF/GitHub security hardening guidance:
actions/checkout@11d5960a… # v4.4.0). Mutable tags can be rewritten to point at malicious commits (as happened in thetj-actions/changed-filescompromise); commit SHAs are immutable. All pins stay within the currently used major versions, so no behavior changes.permissionsblocks to every workflow. All workflows now default tocontents: read; thechangelog-enforceradditionally getspull-requests: read(needed to list PR files), and thepypideploy job getscontents: write(needed byncipollo/release-actionto create the GitHub release).persist-credentials: falseon everyactions/checkoutthat does not need push credentials. The docs-target checkout keeps its SSH deploy key, whichghp-import --pushrequires..github/dependabot.yml) with weekly, grouped updates for GitHub Actions (Dependabot also bumps pinned SHAs and keeps the version comments in sync) and weekly updates for pip (covers the exactly-pinneddocsextra inpyproject.toml).master, uploading SARIF results to the code scanning dashboard and publishing results to the OpenSSF API (enables the Scorecard badge).Validation: all workflow files and the Dependabot config were checked with a YAML parser (
yaml.safe_load) — all parse successfully. These are CI-configuration-only changes, so the Python test suite is unaffected; no changes were made undermarkdown/, so no changelog entry is required per the changelog-enforcer rules.A follow-up PR migrates PyPI publishing to Trusted Publishing (OIDC), kept separate because it requires maintainer configuration on PyPI.
AI Assistance Disclosure
No AI tools were used in preparing this PR.
AI tools were used and I have disclosed which ones, and have fully reviewed and verified their output.
AI tools were use to assist with the following:
Checklist