Skip to content

[SECURITY] Harden GitHub workflows#294

Merged
John McCall (lowlydba) merged 3 commits intomainfrom
306-devops-create-omf-ruleset-for-all-public-repos
Apr 9, 2026
Merged

[SECURITY] Harden GitHub workflows#294
John McCall (lowlydba) merged 3 commits intomainfrom
306-devops-create-omf-ruleset-for-all-public-repos

Conversation

@lowlydba
Copy link
Copy Markdown
Contributor

Harden GitHub workflows against findings from zizmor static analysis.

Once fixed, the new OMF Security Checks workflow will be required for PRs here, keeping a stable baseline of GH Actions secure-by-default.

Signed-off-by: John McCall <[email protected]>
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 8, 2026

🗺️ Overture Maps Explorer preview is live!

🌍 Preview https://staging.overturemaps.org/explore-site/pr/294/index.html
🕐 Updated 2026-04-08T15:13:44Z
📝 Commit 020e4b1

Note

♻️ This preview updates automatically with each push to this PR.

Pin GitHub Action usages to specific SHAs for reproducible builds and upgrade several actions across deploy-gh-pages.yml and deploy-staging.yml. Move sensitive permissions (pages/id-token/pull-requests) from repo-level to the specific jobs that need them and add per-job contents: read to limit scopes. Add concurrency for staging, and standardize PR URL handling by introducing PR_NUMBER env var used in S3 paths and CloudFront invalidations. These changes improve security, reliability, and clarity of the CI/CD workflows.

Signed-off-by: John McCall <[email protected]>
Update .github/workflows/deploy-gh-pages.yml and deploy-staging.yml to expand top-level comments with trigger and job overviews (production: push to main; staging: PRs targeting main) and add run-name entries (Publish prod site / Publish staging site). These edits improve clarity and documentation only—no functional workflow steps were changed.

Signed-off-by: John McCall <[email protected]>
@github-advanced-security
Copy link
Copy Markdown

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Hardens the repo’s GitHub Actions workflows in response to zizmor findings by tightening permissions and pinning third-party actions, aiming to establish a secure-by-default baseline for CI/CD.

Changes:

  • Pinned GitHub Actions to full-length commit SHAs and disabled persist-credentials on checkout.
  • Scoped permissions down to job-level where possible and added PR-level concurrency control for staging deploys.
  • Added Dependabot cooldown settings for GitHub Actions updates.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
.github/workflows/deploy-staging.yml Pins actions, scopes permissions per job, adds concurrency, and reduces credential persistence for staging deploys.
.github/workflows/deploy-gh-pages.yml Pins actions and moves Pages/OIDC permissions to the deploy job for production Pages deployments.
.github/dependabot.yml Adds a Dependabot cooldown window for GitHub Actions dependency updates.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/deploy-gh-pages.yml
Comment thread .github/workflows/deploy-staging.yml
@lowlydba John McCall (lowlydba) merged commit 8b84752 into main Apr 9, 2026
14 checks passed
@lowlydba John McCall (lowlydba) deleted the 306-devops-create-omf-ruleset-for-all-public-repos branch April 9, 2026 13:29
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.

4 participants