Skip to content

🛡️ Sentinel: Pin GitHub Actions to SHAs and restrict workflow permissions - #125

Draft
google-labs-jules[bot] wants to merge 2 commits into
mainfrom
sec-harden-workflows-16490658253199903106
Draft

🛡️ Sentinel: Pin GitHub Actions to SHAs and restrict workflow permissions#125
google-labs-jules[bot] wants to merge 2 commits into
mainfrom
sec-harden-workflows-16490658253199903106

Conversation

@google-labs-jules

Copy link
Copy Markdown
Contributor

This pull request introduces key security hardening improvements to the repository's GitHub Actions workflows and clean up type checking errors:

  1. Workflow Hardening:

    • Pins all third-party GitHub Actions (actions/checkout and jdx/mise-action) to secure, immutable full-length commit SHAs instead of mutable tags, satisfying a major security best practice (OpenSSF/Scorecard).
    • Fixes the use of the non-existent @v7 tag for actions/checkout which compromised pipeline stability.
    • Restricts GITHUB_TOKEN permissions in check.yml to the minimal necessary (contents: read) to follow the principle of least privilege.
  2. Clean up Type Checker Errors:

    • Updates tests/test_app.py name-main block to use import pytest and call pytest.main() directly, avoiding name shadowing of main imported from project.app. This results in clean pyright check with zero errors.
  3. Security Journaling:

    • Documents the supply chain security patterns/learnings in .jules/sentinel.md.

PR created automatically by Jules for task 16490658253199903106 started by @amrabed

- Hardens GitHub Actions workflow security by pinning 'actions/checkout' and 'jdx/mise-action' to secure, immutable full-length commit SHAs.
- Resolves the use of the non-existent and unstable '@v7' tag.
- Configures explicit 'permissions: contents: read' for least-privilege security in check.yml.
- Resolves name shadowing in 'tests/test_app.py' to clean up pyright type-checking errors.
- Records key learnings in Sentinel's security journal.
@google-labs-jules

Copy link
Copy Markdown
Contributor Author

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

- Hardens GitHub Actions workflow security by pinning 'actions/checkout' and 'jdx/mise-action' to secure, immutable full-length commit SHAs.
- Resolves the use of the non-existent and unstable '@v7' tag.
- Configures explicit 'permissions: contents: read' for least-privilege security in check.yml.
- Resolves name shadowing in 'tests/test_app.py' to clean up pyright type-checking errors.
- Records key learnings in Sentinel's security journal.
@sonarqubecloud

Copy link
Copy Markdown

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.

0 participants