fix(ci): qodana-code-scanning-noise auf blocker begrenzen#101
fix(ci): qodana-code-scanning-noise auf blocker begrenzen#101tomtastisch merged 4 commits intomainfrom
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 25a768c592
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Pull request overview
This pull request limits Qodana code scanning uploads to policy-relevant blocker findings (High+ severity), filtering out noise from non-critical issues. The goal is to converge the security/code-scanning/tools alerts to only show blocking findings, while still validating all findings locally.
Changes:
- Added filtering logic to
QodanaContractValidatorto generate a separate upload SARIF containing only High+ severity findings (excluding explicitly non-blocking rule IDs) - Updated CI script to invoke the validator with
--filtered-sarif-outand verify the filtered output exists - Modified GitHub Actions workflow to upload the filtered SARIF instead of the full SARIF to Code Scanning
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| tools/ci/checks/QodanaContractValidator/Program.cs | Added --filtered-sarif-out parameter parsing, implemented TryWriteFilteredSarif function to filter SARIF results based on severity and non-blocking rule IDs, added helper function ExtractSeverityFromNode to extract severity from JsonNode objects |
| tools/ci/bin/run.sh | Updated run_qodana_contract to pass --filtered-sarif-out parameter and verify the filtered SARIF file exists |
| .github/workflows/qodana.yml | Changed SARIF upload path from qodana.sarif.json to qodana.upload.sarif.json |
Ziel & Scope
security/code-scanning/toolsfuer Qodana auf policy-relevante Blocker konvergieren, damit Alert-Noise nicht als Merge-Blocker bleibt.Umgesetzte Aufgaben (abhaken)
QodanaContractValidatorum--filtered-sarif-outerweitert.High+, ausgenommen explizit non-blocking Rule-IDs.tools/ci/bin/run.sh qodanaschreibt/verifiziertqodana.upload.sarif.jsonfail-closed..github/workflows/qodana.ymlauf gefiltertes Upload-SARIF umgestellt..github/workflows/qodana.ymlsetzenarea:qodanadeterministisch.Nachbesserungen aus Review (iterativ)
Program.cskorrigiert (CS8803).ci-qodana-Artifact validiert (gefilterte Results =0).Security- und Merge-Gates
High+ausser Non-Blocking-Allowlist) lassen den Check weiter fehlschlagen.security/code-scanning/toolsund0 offene Alertsfuer policy-relevante Findings.Evidence (auditierbar)
dotnet build tools/ci/checks/QodanaContractValidator/QodanaContractValidator.csproj -c Releasegh run download 22185505457 -n ci-qodana -D /tmp/qodana-main-22185505457-...QODANA_TOKEN=dummy dotnet .../QodanaContractValidator.dll --sarif /tmp/.../qodana.sarif.json --filtered-sarif-out /tmp/.../qodana.upload.sarif.jsonjq '[.runs[].results|length] | add' /tmp/.../qodana.upload.sarif.json=>0QODANA_TOKEN=dummy bash tools/ci/bin/run.sh qodanajq -r '.status + " | " + .check_id' artifacts/ci/qodana/result.json=>pass | qodanaDoD (mindestens 2 pro Punkt)
Punkt A: Gefiltertes SARIF
--filtered-sarif-outund schreibt Datei deterministisch.0Results).Punkt B: CI-Integration
run.sh qodanavalidiert Existenz des gefilterten Outputs fail-closed.artifacts/ci/qodana/qodana.upload.sarif.json.Punkt C: Sicherheitsverhalten
CI-QODANA-004).Punkt D: Governance-Stabilitaet
area:qodanaauch bei Workflow-only-Qodana-Aenderungen.code-scanning-tools-zerokann fuer Qodana-Cleanup-PRs deterministisch den vorgesehenen Ausnahmepfad nutzen.Preflight-Query schaltet bei Qodana-Dateiaenderungen (ohne Label-Race) deterministisch auf PR-Ref um.