Skip to content

fix(security): pin and update github actions - #898

Closed
davidspek wants to merge 1 commit into
permitio:masterfrom
FLYR-Open-Source:fix/gha-digest-pinning
Closed

davidspek wants to merge 1 commit into
permitio:masterfrom
FLYR-Open-Source:fix/gha-digest-pinning

Conversation

@davidspek

Copy link
Copy Markdown

Fixes Issue

This PR fixes potential of supply chain attacks by pinning the GitHub Actions used within this repository to digests. Along with that, it updates and aligns the versions of various actions as well.

Changes proposed

Check List (Check all the applicable boxes)

  • I sign off on contributing this submission to open-source
  • My code follows the code style of this project.
  • My change requires changes to the documentation.
  • I have updated the documentation accordingly.
  • All new and existing tests passed.
  • This PR does not contain plagiarized content.
  • The title of my pull request is a short description of the requested changes.

Screenshots

Note to reviewers

Signed-off-by: David van der Spek <david.vanderspek@flyrlabs.com>
@netlify

netlify Bot commented Apr 20, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for opal-docs canceled.

Name Link
🔨 Latest commit af18437
🔍 Latest deploy log https://app.netlify.com/projects/opal-docs/deploys/69e6090f53c9ab0008ccbd59

@zeevmoney

Copy link
Copy Markdown
Member

Thank you for putting this together, and sorry it waited so long for an answer.

The 0.10 release work rewrites these workflows: every action is pinned to a full commit SHA, workflow linting is added, and the release jobs change along with the new container images. That covers what this PR set out to do. The branch has also drifted from master; for example, it edits sync_opal_plus.yml, which was removed in #911. So we're closing it in favour of that work.

Thanks again for pushing on this. It helped shape the change.

@zeevmoney zeevmoney closed this Nov 6, 2026
zeevmoney added a commit that referenced this pull request Nov 9, 2026
…tandard (#1008)

Fixes the release workflow, which failed for 0.10.0-rc.6, and brings
the GitHub Actions setup up to Permit's repo standard.

Fixed
- Release: Python setup uses 3.11 instead of 3.11.8, which Ubuntu 26.04
  runners don't have. This fixes the failed 0.10.0-rc.6 publish.
- Every workflow and job has least-privilege permissions. This closes
  the five "Workflow does not contain permissions" code-scanning alerts.

Added
- actionlint, zizmor, gitleaks, shellcheck and shfmt as pre-commit
  hooks. CI runs them with a sha256-pinned prek.
- A gitleaks scan of each PR's commits, as part of the required CI
  check.
- Dependency review on PRs. It fails when a change adds a high or
  critical vulnerability.
- Dependabot version updates for pip, npm (docs), docker, GitHub
  Actions and pre-commit hooks, grouped, with a 7-day cooldown.
- A security scan on Monday and Thursday and a weekly digest, both
  reported to Slack. The scan covers the dependency trees, the
  published images, Dependabot alerts and the git history. It reads
  Dependabot alerts with a GitHub App token, not a personal access
  token.
- Tests for the scripts behind the required checks.

Changed
- Every action is pinned to a full commit SHA. The release workflow
  keeps the exact action versions it ran before.
- No checkout persists its credentials.
- Release: the PyPI job runs in the pypi environment, and image builds
  no longer use a registry cache. The unused token env and the unused
  docker-compose v1 download are removed.
- CI runners are pinned to ubuntu-24.04, and tool versions are pinned
  exactly.
- A new push to a PR cancels its older CI run, and the required CI
  check also runs on stacked PRs.
- CONTRIBUTING.md asks for prek 0.5.5 or later.

The Dependabot config comes from #957 by Eli Moshkovich. Supersedes
#957 and #898.

Co-authored-by: eli <eli@permit.io>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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