Skip to content

Harden GitHub Actions workflows - #4097

Merged
adutra merged 6 commits into
apache:mainfrom
adutra:harden-ci-actions
Apr 7, 2026
Merged

adutra merged 6 commits into
apache:mainfrom
adutra:harden-ci-actions

Conversation

@adutra

@adutra adutra commented Mar 31, 2026

Copy link
Copy Markdown
Contributor

This PR strengthens our CI jobs:

  • Prevent template injection by moving ${{ }} expressions out of run blocks
  • Prevent "ArtiPACKED"-like exploits by avoiding persisting credentials
  • Fix excessive permissions wherever possible
  • Add new job to run Zizmor checks on PRs that modify workflows

Release workflows that push branches/tags (release-1, release-2, release-4) intentionally retain persisted credentials.

Checklist

  • 🛡️ Don't disclose security issues! (contact security@apache.org)
  • 🔗 Clearly explained why the changes are needed, or linked related issues: Fixes #
  • 🧪 Added/updated tests with good coverage, or manually tested (and explained how)
  • 💡 Added comments for complex logic
  • 🧾 Updated CHANGELOG.md (if needed)
  • 📚 Updated documentation in site/content/in-dev/unreleased (if needed)

@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.

@adutra
adutra force-pushed the harden-ci-actions branch 3 times, most recently from 2e00fd9 to b76bb7c Compare March 31, 2026 19:30
jbonofre
jbonofre previously approved these changes Apr 1, 2026
@github-project-automation github-project-automation Bot moved this from PRs In Progress to Ready to merge in Basic Kanban Board Apr 1, 2026
Comment thread .github/workflows/ci-zizmor.yml Resolved
Comment thread .github/workflows/ci.yml Resolved
dimas-b

This comment was marked as off-topic.

dimas-b
dimas-b previously approved these changes Apr 2, 2026
adutra added 6 commits April 3, 2026 11:39
This PR strengthens our CI jobs:

- Prevent template injection by moving ${{ }} expressions out of run blocks
- Prevent "ArtiPACKED"-like exploits by avoiding persisting credentials
- Fix excessive permissions wherever possible
- Add new job to run Zizmor checks on PRs that modify workflows

Release workflows that push branches/tags (release-1, release-2,
release-4) intentionally retain persisted credentials.
Comment thread .github/workflows/ci.yml
Comment on lines +386 to +387
AWS_ACCESS_KEY_ID: ${{secrets.AWS_ACCESS_KEY_ID}} # zizmor: ignore[secrets-outside-env]
AWS_SECRET_ACCESS_KEY: ${{secrets.AWS_SECRET_ACCESS_KEY}} # zizmor: ignore[secrets-outside-env]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

optional: AFAIK, these two secrets are not actually used (and not defined). I suppose we could remove them for the sake of clarity.

@adutra

adutra commented Apr 7, 2026

Copy link
Copy Markdown
Contributor Author

Heads up: I'm going to merge this by today EOD.

@adutra
adutra merged commit 2dcd937 into apache:main Apr 7, 2026
20 checks passed
@github-project-automation github-project-automation Bot moved this from Ready to merge to Done in Basic Kanban Board Apr 7, 2026
@adutra
adutra deleted the harden-ci-actions branch April 7, 2026 13:54
adutra added a commit to adutra/polaris that referenced this pull request Apr 7, 2026
This is a follow-up to apache#4097 that adds two more checks, taking Apache Iceberg CI as an example.
adutra added a commit to adutra/polaris that referenced this pull request Apr 7, 2026
This is a follow-up to apache#4097 that adds two more checks, taking Apache Iceberg CI as an example.
adutra added a commit that referenced this pull request Apr 8, 2026
This is a follow-up to #4097 that adds two more checks, taking Apache Iceberg CI as an example.
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.

5 participants