fix(security): address CodeRabbit PR#195 review findings#196
Merged
Conversation
- scope id-token:write to build/docker jobs only (least privilege) - pin cosign-sign composite ref to v1.23.0 (remove mutable branch) - use inputs.ghcr_org fallback in build.yml cosign-refs step - scope certificate-identity-regexp in all cosign verify examples - add id-token:write to typescript-build.md basic example - qualify image ref in cosign-sign README single-image example - warn against secrets in docker_build_args descriptions - fix workflow_dispatch contradiction in cursor rules
|
Caution Review failedPull request was closed or merged during review WalkthroughRestructured workflow-level OIDC token permissions to job-level scope across multiple GitHub Actions workflows, pinned the cosign signing action to version v1.23.0, tightened certificate identity regexps in verification examples from permissive wildcards to specific GitHub workflow patterns, and clarified security guidance regarding Docker build arguments visibility in image history. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
🔍 Lint Analysis
|
🛡️ CodeQL Analysis ResultsLanguages analyzed: Found 1 issue(s): 1 Medium
🔍 View full scan logs | 🛡️ Security tab |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
GitHub Actions Shared Workflows
Description
Address all 13 actionable findings from CodeRabbit's review on PR #195. Changes span security hardening (least-privilege permissions, pinned refs), documentation accuracy (scoped cosign verify examples, missing permissions in examples), and rule consistency (cursor rules contradiction).
Workflows affected:
build.yml,go-release.yml,typescript-build.yml,pr-security-scan.ymlDocs affected:
docs/build-workflow.md,docs/go-release-workflow.md,docs/typescript-build.md,src/security/cosign-sign/README.mdRules affected:
.cursor/rules/reusable-workflows.mdcChanges
id-token: write: Moved from workflow-scope to job-scope (build/dockerjobs only) inbuild.yml,go-release.yml,typescript-build.yml— other jobs no longer receive OIDC access@feat/cosign-signbranch with immutable@v1.23.0tag in all three build workflowsghcr_orgfallback:build.ymlcosign-refs step now respectsinputs.ghcr_orgwith fallback to normalized owner--certificate-identity-regexp: Replaced permissive".*"with LerianStudio-scoped regexp in all cosign verify examples (4 docs)id-token: writeto example:typescript-build.mdBasic Example now includes the required OIDC permissiondocker.io/prefixdocker_build_argssecret warning: Updated description inbuild.ymlandpr-security-scan.ymlto warn against passing secrets via build argsworkflow_dispatchcontradiction: Cursor rules no longer state reusable workflows must supportworkflow_dispatchType of Change
fix: Bug fix in a workflow (incorrect behavior, broken step, wrong condition)perf: Performance improvement (e.g. caching, parallelism, reduced steps)refactor: Internal restructuring with no behavior changedocs: Documentation only (README, docs/, inline comments)ci: Changes to self-CI (workflows under.github/workflows/that run on this repo)chore: Dependency bumps, config updates, maintenancetest: Adding or updating testsBREAKING CHANGE: Callers must update their configuration after this PRBreaking Changes
None. All changes are backwards-compatible:
id-token: writeis now job-scoped but still available to the jobs that need itghcr_orgfallback preserves existing behavior when input is emptyTesting
@developor the beta tagCaller repo / workflow run: N/A — changes are permission scoping, ref pinning, and documentation only.
Related Issues
Addresses review findings from #195
Summary by CodeRabbit
Documentation
Security