You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
sonarcloud.yml runs the PR's Python test code with the SonarCloud token in the job environment #1392
Coverage generation executes the queued revision's Python code with the analysis credential inherited from the job environment. Contributor-controlled code admitted to the queue can read that credential before the change merges.
Source/control: Contributor changes to the selected test, its imported validator, or other Python code loaded during test execution.
Sink/decision: Python execution through pytest with SONAR_TOKEN in its environment.
Missing mitigation: Contributor-selected coverage code and the credentialed scanner share a runner and security context. There is no isolation preventing that code from reading the analysis credential.
Assumptions
Based on these assumptions: A3 (Deployment configuration): The documented merge-queue deployment uses the shipped workflow and PR approval policy.; A4 (Third-party behavior): GitHub Actions follows its documented merge_group behavior: checkout defaults to the event revision, and a configured repository secret is available to this base-repository job.
Findings that rely on assumptions are published at medium severity at most. If an assumption does not hold for your deployment, dismiss this finding.
.github/workflows/sonarcloud.yml:37 — execute contributor-selected Python through pytest [sink]
test/feature-ideation/test_validate_signals.py:17 — execute the checked-out validator during test collection
Filed from a CodeRabbit security scan (scan 2d23b5ee-606a-403f-b407-81ddebdb0115, revision 1ea9ee1fbecc). Finding IDs: aa7bb943-17b5-409f-ae50-d430101e8e52. CodeRabbit notes that findings relying on its stated assumptions are capped at medium severity; dismiss if an assumption does not hold.
Activity
fix(security): scope SONAR_TOKEN to scan steps and fail unanalysed fo…
fix(security): don't persist the checkout token in the SonarCloud sca…
test(sonarcloud): require each SONAR_TOKEN reference in an allow-list…
fix(security): scope SONAR_TOKEN to scan steps and fail unanalysed fo…