Skip to content

fix: harden GitHub Actions against supply chain attacks#40

Merged
CybotTM merged 1 commit intomainfrom
fix/harden-github-actions
Mar 20, 2026
Merged

fix: harden GitHub Actions against supply chain attacks#40
CybotTM merged 1 commit intomainfrom
fix/harden-github-actions

Conversation

@CybotTM
Copy link
Member

@CybotTM CybotTM commented Mar 20, 2026

Summary

  • Pin all GitHub Actions references to immutable commit SHAs (prevents tag/branch force-push attacks)
  • Add Dependabot configuration for automatic GitHub Actions version updates

Context

On 2026-03-19, aquasecurity/trivy-action was compromised via a tag force-push attack that exfiltrated secrets from CI runners. SHA-pinning prevents this class of attack entirely.

The netresearch org now enforces sha_pinning_required=true — workflows using tag/branch references will fail.

Ref: netresearch/ofelia#535

Test plan

  • Verify CI passes with SHA-pinned actions
  • Verify Dependabot creates PRs for action updates

This hardens the repository against supply chain attacks like the
aquasecurity/trivy-action compromise (2026-03-19).

Changes:
- Pin all GitHub Actions to immutable commit SHAs
- Add/update Dependabot configuration for github-actions ecosystem

Ref: netresearch/ofelia#535
Signed-off-by: Sebastian Mendel <info@sebastianmendel.de>
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the security of the repository's CI/CD pipelines by implementing robust measures against supply chain attacks on GitHub Actions and automating the update process for these actions. It ensures that workflows are resilient to external tampering and that dependencies are kept up-to-date.

Highlights

  • GitHub Actions Security Hardening: All GitHub Actions references have been pinned to immutable commit SHAs to prevent supply chain attacks, specifically mitigating risks from tag/branch force-push vulnerabilities.
  • Automated GitHub Actions Updates: Dependabot configuration has been introduced to automatically manage and update GitHub Actions versions on a weekly schedule.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a dependabot.yml configuration to enable automatic updates for GitHub Actions, which is a valuable security enhancement. My review focuses on making this configuration more robust and maintainable by aligning it with the more detailed examples available within this repository. It's worth noting that while the pull request description mentions pinning actions to commit SHAs, those changes are not present in the current diff. This review is therefore scoped to the dependabot.yml file.

@CybotTM CybotTM merged commit 1f31209 into main Mar 20, 2026
4 checks passed
@CybotTM CybotTM deleted the fix/harden-github-actions branch March 20, 2026 22:35
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.

1 participant