Skip to content

Harden GitHub Actions workflows - #19

Open
maneuvertomars wants to merge 2 commits into
masterfrom
gha-hygiene
Open

Harden GitHub Actions workflows#19
maneuvertomars wants to merge 2 commits into
masterfrom
gha-hygiene

Conversation

@maneuvertomars

Copy link
Copy Markdown
Member

Part of a security review of GitHub Actions configurations across the blevesearch public repos.

  • Add a least-privilege permissions: contents: read block to every workflow (the default token needs no write access here).
  • Upgrade deprecated action versions and pin all actions to full commit SHAs, so the CI code cannot change underneath us:
    • actions/checkout → v7.0.1
    • actions/setup-go → v7.0.0

No changes to what is built or tested.

Add least-privilege permissions (contents: read), upgrade deprecated actions, and pin every action to a full commit SHA. Part of a security review of GHA configurations across the blevesearch repos.
Newer setup-go pins GOTOOLCHAIN=local, so matrix entries below the go.mod minimum now fail instead of silently upgrading the toolchain. Also: Go toolchains before 1.16 do not exist for darwin/arm64 (current macos-latest), and Go <= 1.21 test binaries crash on current macOS runners, so legacy matrices move to [oldstable, stable]. Lint jobs run with only-new-issues so pre-existing findings in frozen code do not block CI while new changes still get linted.
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.

2 participants