-
Notifications
You must be signed in to change notification settings - Fork 156
Remove ghalint workaround and fix all security policy violations #2208
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Remove workaround filtering logic from ghalint.yml that only checked action_ref_should_be_full_length_commit_sha - Add persist-credentials: false to all checkout actions for enhanced security - Add proper permissions blocks to jobs following least-privilege principle - Add timeout-minutes to jobs missing them to prevent runaway processes - Fix GitHub App token permissions format in license-report-update.yml and release.yml - All ghalint policy violations now resolved across the entire codebase Co-Authored-By: [email protected] <[email protected]>
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
|
Updates to Preview Branch (devin/1750848019-remove-ghalint-workaround) ↗︎
Tasks are run on every commit but only new migration files are pushed.
View logs for this Workflow Run ↗︎. |
permission-contents: write | ||
permission-pull-requests: write |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed GitHub App token permissions
Updated GitHub App token creation to use proper permission format:
license-report-update.yml
- Addedpermission-contents: write
andpermission-pull-requests: write
release.yml
- Addedpermission-contents: write
,permission-pull-requests: write
, andpermission-actions: write
Oh, this was added automatically based on some heuristic or something, right?
Pretty cool — how does it even figure that out, Devin?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I’m not sure if the Fixed GitHub App token permissions change
is the bare minimum, but it doesn’t seem critical anyway. so LGTM!
@@ -31,6 +32,7 @@ jobs: | |||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |||
with: | |||
fetch-depth: 1 | |||
persist-credentials: false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ref: https://github.com/suzuki-shunsuke/ghalint/blob/main/docs/policies/013.md
Making the token persistent allows subsequent steps such as git push
.For security risk, it should be false if not needed.
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀🚀
Remove ghalint workaround and fix all security policy violations
Summary
This PR removes the temporary workaround code from the ghalint workflow that was filtering to only check for
action_ref_should_be_full_length_commit_sha
violations, and comprehensively fixes all ghalint security policy violations across the GitHub Actions workflow files.Changes Made
1. Removed Workaround Code
.github/workflows/ghalint.yml
ghalint run
command2. Fixed Security Policy Violations
Added
persist-credentials: false
to checkout actionsEnhanced security by preventing accidental credential exposure in the following workflows:
claude.yml
database-ci.yml
e2e_tests.yml
figma-to-css-variables.yml
frontend-ci.yml
(3 jobs)license-report-update.yml
license.yml
notify_supabase_failure.yml
released_package_test.yml
stale.yml
trigger_dev_preview.yml
trigger_dev_production.yml
Added proper job permissions
Implemented least-privilege access by adding
permissions: contents: read
to jobs that were missing them:claude.yml
-claude-code-action
jobdatabase-ci.yml
-pg_tap_tests
jobdiscussion-comment-to-slack.yml
-discussion_commented
jobfrontend-ci.yml
-frontend-lint
andfrontend-ci
jobslicense.yml
-license_finder
jobnotify_supabase_failure.yml
-notify_slack
jobreleased_package_test.yml
-test
jobtrigger_dev_preview.yml
-trigger_dev
jobtrigger_dev_production.yml
-trigger_dev
jobAdded missing timeout configurations
Added
timeout-minutes: 10
to jobs that were missing them:claude.yml
-claude-code-action
jobnotify_supabase_failure.yml
-notify_slack
jobstale.yml
-stale
jobFixed GitHub App token permissions
Updated GitHub App token creation to use proper permission format:
license-report-update.yml
- Addedpermission-contents: write
andpermission-pull-requests: write
release.yml
- Addedpermission-contents: write
,permission-pull-requests: write
, andpermission-actions: write
Testing
✅ Local ghalint verification: Ran
ghalint run
locally and confirmed all violations are resolved (exit code 0)✅ Security improvements verified: All changes follow GitHub Actions security best practices:
persist-credentials: false
to prevent credential leakageTesting Transparency
What I Actually Checked
persist-credentials: false
What I Did Not Check
pnpm lint
command due to environment dependency issues (unrelated to these changes)contents: read
Reviewer Checklist
Please verify:
persist-credentials: false
Link to Devin run
https://app.devin.ai/sessions/f1784c3e07d74e548db665012f68f178
Requested by: [email protected]