← Back to Pull requests

bug: pin SonarSource and GitHub actions to commit SHAs (sfind-df668999) #136

Open
unknown opened this pull request with 580 lines diff across 7 files
View on GitHub
unknown unknown commented on Nov 06, 2026 19:24 UTC
Author

Summary

Fixes sfind-df668999e49c43b2bc775f50ac352fcb (low): .github/workflows/sonarqube-scan.yml referenced SonarSource/sonarcloud-github-action@master and SonarSource/sonarqube-quality-gate-action@master. @master is mutable, so any new upstream commit would run on every PR with SONAR_TOKEN and GITHUB_TOKEN in its env.

- uses: actions/checkout@v4
+ uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
- uses: actions/setup-python@v5
+ uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
- uses: actions/cache@v4
+ uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
- uses: SonarSource/sonarcloud-github-action@master        # deprecated
-   GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ uses: SonarSource/sonarqube-scan-action@e805d875275f728fac1885b413934be6d7c63f65 # v8.4.1
- uses: SonarSource/sonarqube-quality-gate-action@master
+ uses: SonarSource/sonarqube-quality-gate-action@7a5fffe8e523c40e0c740b6bc2712ab503e52efa # v1.2.1

  • sonarcloud-github-action is deprecated; its official replacement sonarqube-scan-action does not use GITHUB_TOKEN, so that token is no longer passed to the scan step. The host still comes from sonar.host.url=https://sonarcloud.io in sonar-project.properties, and the scan still writes .scannerwork/report-task.txt, which the quality-gate action reads.

  • New .github/dependabot.yml (package-ecosystem: github-actions, weekly) keeps the pinned SHAs current through reviewed PRs.
  • Verification

    A script checks that every uses: is a 40-char SHA and that the SHA equals the commented tag upstream (git ls-remote), and that Dependabot covers github-actions:

  • main (2f77dca): FAIL — 5 mutable refs, no Dependabot.

  • this branch: PASS — all 5 SHAs match v4.4.0, v5.6.0, v4.3.0, v8.4.1, v1.2.1; Dependabot present. grep -n "@master" .github/workflows/*.yml returns nothing.
  • Token scope: pull-requests: write stays on the job: the Get changed files and Trigger Devin Remediation steps call the PR files and issue-comments APIs with GITHUB_TOKEN. GitHub has no per-step permissions, so narrowing it means splitting the job; #128 does that (moves the Devin trigger into its own devin-remediation job). With every action pinned to a reviewed SHA, a third-party action can no longer change under the job, so an upstream compromise can no longer reach the GITHUB_PATH / curl swap path to DEVIN_API_KEY described in the finding; new versions only arrive through reviewed Dependabot PRs.

    Not tested: the workflow was not actually run (no SONAR_TOKEN in this environment).

    Pre-existing, not from this PR: actionlint reports could not parse as YAML at line 173 on main too (the Devin prompt text in the Trigger Devin Remediation step's run: | starts at column 0). Until that is fixed GitHub may not load the workflow; the pins still apply once it does.

    Duplicates

    Same change (cherry-picked commit, identical tree) as #96 (sfind-d527b633), #105 (sfind-0c7d806a), #111 (sfind-2ad20ba0), #121 (sfind-12faeafe) and #130 (sfind-9444907b), opened separately under the one-PR-per-ticket rule. Only one should be merged.

    Devin-Org: engineering

    Link to Devin session: https://devin-gtm.devinenterprise.com/sessions/94fd5cab02f74a4986443cc53c83494c
    Open in Devin Desktop: https://devin-gtm.devinenterprise.com/desktop/session/94fd5cab02f74a4986443cc53c83494c?variant=devin
    <!-- devin-review-badge-staging-begin -->

    ---

    Devin Review


    | Status | Commit |
    |---|---|
    | ⚪ Not started | — |

    Run Devin Review

    Enable auto-review to review your pull requests automatically.

    <a href="https://staging.itsdev.in/review/cog-gtm/etl-pipeline/pull/136" target="_blank"><picture><source media="(prefers-color-scheme: dark)" srcset="https://static.devin.ai/assets/gh-devin-review-staging-dark.svg?v=4"><img src="https://static.devin.ai/assets/gh-devin-review-staging-light.svg?v=4" alt="Devin Review (Staging)"></picture></a>
    <!-- devin-review-badge-staging-end -->
    <!-- devin-review-badge-begin -->

    ---

    <a href="https://devin-gtm.devinenterprise.com/review/cog-gtm/etl-pipeline/pull/136" target="_blank"><picture><source media="(prefers-color-scheme: dark)" srcset="https://static.devin.ai/assets/gh-devin-review-dark.svg?v=4"><img src="https://static.devin.ai/assets/gh-devin-review-light.svg?v=4" alt="Devin Review"></picture></a>
    <!-- devin-review-badge-end -->

    Diff: 580 lines (+435 / -145) across 7 files Reviewer: devin-ai-integration[bot] Review duration: 22m
    All Vouch review confidence checks passed
    Residual risk 0.27 = Change Risk (0.50) × (1 − Review Confidence (0.47)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.50 · 580 lines diff across 7 files
    0.50
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    46%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.381
    Shallow Review Depth shallow_review_depth
    0.344
    Real PR Conversation Timeline
    1 comments
    "Review active on #136"
    general weight: 0.35
    Assignees
    Unassigned
    Labels
    risk: low confidence: 46.7% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 49.9% (MEDIUM) · Higher = larger blast radius
    49.9%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 46.7% · Lower = rushed or shallow review
    46.7%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 26.6% · Safe to merge
    26.6%