Skip to content

Conversation

@cgwalters
Copy link
Contributor

A while ago I was working on goose and found they'd committed binary files into their git repo, and worked on a PR to block that:
block/goose#6031

However at the time I'd investigated OpenSSF (which has a check for this among other things) but didn't quite get it to work.

After some iteration with my agent, this model seems to work well. That said I think what I'd like to do is propose something like this to upstream OpenSSF - their default action doesn't check each commit for example, but we want to deny binaries in all commits.

This also implements a model where the check only fails if the score regresses.

Assisted-by: OpenCode (Opus 4.5)

@gemini-code-assist
Copy link

Summary of Changes

Hello @cgwalters, 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 introduces a new GitHub Action aimed at bolstering the security posture of the repository by integrating OpenSSF Scorecard checks directly into the CI/CD pipeline. The action is designed to proactively identify and prevent any regression in the project's OpenSSF Scorecard rating by evaluating each commit within a pull request against a defined baseline. This ensures that security standards are consistently maintained and any potential vulnerabilities or deviations are caught early in the development cycle.

Highlights

  • New GitHub Action: Introduces a new composite GitHub Action named 'OpenSSF Scorecard Gate' to integrate security checks into the CI/CD pipeline.
  • Regression Detection: The action is designed to detect and prevent regressions in the OpenSSF Scorecard score by comparing each commit within a pull request against a baseline SHA.
  • Commit-by-Commit Analysis: Unlike standard OpenSSF actions, this custom action checks the scorecard score for each commit in the PR's range, failing the workflow if any commit's score drops below the baseline.
  • Tooling Setup: The action includes steps to install the OpenSSF Scorecard CLI tool and jq for efficient JSON parsing within the action's execution environment.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

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.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

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.

cgwalters added a commit to cgwalters/infra that referenced this pull request Jan 15, 2026
Adds a stub workflow that calls bootc-dev/actions/openssf-scorecard
to gate PRs on scorecard regressions.

Also adds scorecard to devenv images for local development, and a
renovate custom manager for VERSION= patterns in YAML files.

Requires: bootc-dev/actions#2

Assisted-by: OpenCode (Claude Sonnet 4)
Signed-off-by: Colin Walters <walters@verbum.org>
Copy link

@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 new composite GitHub Action to gate pull requests based on OpenSSF Scorecard regressions. While the implementation is clean, a medium-severity command injection vulnerability was identified in openssf-scorecard/action.yml. The git checkout command uses user-controlled inputs without proper sanitization, which could allow an attacker to pass malicious options. The provided suggestions address this by ensuring user inputs are treated as arguments and also include improvements for readability.

@cgwalters cgwalters force-pushed the openssf branch 2 times, most recently from a6e8eda to f0a2a24 Compare January 15, 2026 19:27
Add a GitHub Action that checks for OpenSSF Scorecard regressions
across commits in a PR. The action fails if any commit's score
drops below the baseline.

Assisted-by: OpenCode (claude-sonnet-4-20250514)
Signed-off-by: Colin Walters <walters@verbum.org>
Copy link

@jeckersb jeckersb left a comment

Choose a reason for hiding this comment

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

Looks sane at a glance, I'm not familiar with any of this but it's low-risk just as a gating action so let's see how it goes!

@jeckersb
Copy link

Oh apparently I don't have write access to this repo 😿

@cgwalters
Copy link
Contributor Author

Oh apparently I don't have write access to this repo 😿

bootc-dev/infra#18 (comment)

Does it work now?

@cgwalters cgwalters disabled auto-merge January 15, 2026 22:36
@cgwalters cgwalters merged commit 1b781d8 into bootc-dev:main Jan 15, 2026
1 check passed
cgwalters added a commit to bootc-dev/infra that referenced this pull request Jan 15, 2026
Adds a stub workflow that calls bootc-dev/actions/openssf-scorecard
to gate PRs on scorecard regressions.

Also adds scorecard to devenv images for local development, and a
renovate custom manager for VERSION= patterns in YAML files.

Requires: bootc-dev/actions#2

Assisted-by: OpenCode (Claude Sonnet 4)

Signed-off-by: Colin Walters <walters@verbum.org>
@jeckersb
Copy link

Does it work now?

Yep I was able to approve+merge #4 🥳

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