fix(ci/security): workflow injection + unpinned action (quality-gate + latency-budget) - #186
Conversation
quality-gate.yml: bind workflow_call inputs to env vars before shell
use to prevent script injection via inputs.not-applicable,
inputs.coverage-report, inputs.coverage-format, inputs.threshold.
Pattern: env: VARNAME: ${{ inputs.x }} then $VARNAME in run:.
latency-budget.yml: pin actions/github-script to full commit SHA
(f28e40c7f34bde8b3046d885e986cb6290c5673b, v7) — was unpinned @v7
tag on a workflow with pull-requests:write scope, allowing tag
mutation to execute arbitrary code with write permissions.
|
Note Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported. |
|
Warning Review limit reached
Next review available in: 27 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
Note
|
L17 Latency Budget ReportChecked against: budgets/rest-endpoints.yaml. |
|
Code Review SummaryStatus: Approved | Recommendation: Merge OverviewNo issues found in the changed code. Files Reviewed (2 files)
Both changes correctly address the documented security findings:
No pre-existing regressions detected in the changed lines. Reviewed by step-3.7-flash-20260528 · Input: 112.9K · Output: 4.2K · Cached: 480.3K |



Security fixes — 2 findings
Finding 1: Script injection via workflow_call inputs (quality-gate.yml)
File:
.github/workflows/reusable/quality-gate.ymlRisk:
${{ inputs.not-applicable }},${{ inputs.coverage-report }},${{ inputs.coverage-format }},${{ inputs.threshold }}were interpolated directly intorun:blocks. A caller passing a crafted input value could inject arbitrary shell commands.Fix: Bind each input to a step-level
env:var and reference via$VARNAMEin shell. This is the canonical safe pattern (GitHub security guidance: https://github.blog/security/vulnerability-research/how-to-catch-github-actions-workflow-injections-before-attackers-do/).Finding 2: Unpinned third-party action with write scope (latency-budget.yml)
File:
.github/workflows/latency-budget.ymlRisk:
actions/github-script@v7(tag reference) used 2× on a workflow withpull-requests: write. Tag mutation by the action owner would execute arbitrary code with write permission on PR comments.Fix: Pin both instances to full commit SHA
f28e40c7f34bde8b3046d885e986cb6290c5673b(v7 tag as of 2026-07-02).Verification
${{ env.* }}interpolations inrun:blocks are safe (env context is not attacker-controlled)${{ steps.*.outputs.* }}from internal step outputs — safe