sonarcloud-triage
/sonarcloud-triage
Triage SonarCloud issues and hotspots via the SonarCloud Web API — check gate status, list open BLOCKER/CRITICAL bugs + vulns, group hotspots by rule, bulk-mark hotspots Safe per rule, transition issues to False Positive, and change the New Code period. Use whenever the user mentions SonarCloud, Sonar, quality gate red/failing, code smells to triage, marking hotspots safe, marking issues as false positive, setting new code period, or asks "why is the Sonar gate red" — even if they only reference a specific rule like go:S2245 without naming SonarCloud.
- Author
- sunholo-data ↗
- Repository
- ailang ↗
- Licence
- Apache-2.0
- Last repository change
- 27.10.2026
Assessment and security
- Files in this package
- 11
- Scripts
- 8
- HTML comments
- 0
- URLs in SKILL.md
- 2
No signals detected. Repository changed on 27.10.2026, without references to retired models or APIs.
Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.
- 8 scripts in this package. Review them before installing, as Claude may execute them.
Scripts: scripts/_lib.sh, scripts/fetch_hotspots.sh, scripts/fetch_issues.sh, scripts/gate_status.sh, scripts/mark_fp.sh, scripts/mark_safe.sh, scripts/mark_wontfix.sh, scripts/set_new_code.sh
What it does and when to use it
Triage SonarCloud issues and hotspots via the SonarCloud Web API — check gate status, list open BLOCKER/CRITICAL bugs + vulns, group hotspots by rule, bulk-mark hotspots Safe per rule, transition issues to False Positive, and change the New Code period. Use whenever the user mentions SonarCloud, Sonar, quality gate red/failing, code smells to triage, marking hotspots safe, marking issues as false positive, setting new code period, or asks "why is the Sonar gate red" — even if they only reference a specific rule like go:S2245 without naming SonarCloud.
Triggers from the description
Original author description
Triage SonarCloud issues and hotspots via the SonarCloud Web API — check gate status, list open BLOCKER/CRITICAL bugs + vulns, group hotspots by rule, bulk-mark hotspots Safe per rule, transition issues to False Positive, and change the New Code period. Use whenever the user mentions SonarCloud, Sonar, quality gate red/failing, code smells to triage, marking hotspots safe, marking issues as false positive, setting new code period, or asks "why is the Sonar gate red" — even if they only reference a specific rule like go:S2245 without naming SonarCloud.
How it works
- Prerequisites
- Standard triage workflow
- Scripts
- When to use this skill
- Guardrails
- Progressive disclosure
SKILL.md preview
---
name: sonarcloud-triage
description: Triage SonarCloud issues and hotspots via the SonarCloud Web API — check gate status, list open BLOCKER/CRITICAL bugs + vulns, group hotspots by rule, bulk-mark hotspots Safe per rule, transition issues to False Positive, and change the New Code period. Use whenever the user mentions SonarCloud, Sonar, quality gate red/failing, code smells to triage, marking hotspots safe, marking issues as false positive, setting new code period, or asks "why is the Sonar gate red" — even if they only reference a specific rule like go:S2245 without naming SonarCloud.
---
# SonarCloud Triage
Repeatable triage of SonarCloud findings for `sunholo-data_ailang` via the Web API.
Everything the web UI does for triage is available through the API, and most of it
is faster from the shell.
## Prerequisites
- **`SONAR_PAT`** — personal admin token, exported in `~/.zshenv`. Get one at
<https://sonarcloud.io/account/security>. Read-only scripts (`gate_status`,
`fetch_*`) don't need it; mutating scripts (`mark_*`, `set_new_code`) do.
- Optional overrides: `SONAR_PROJECT` (default `sunholo-data_ailang`),
`SONAR_ORG` (default `sunholo-data`), `SONAR_HOST` (default `https://sonarcloud.io`).
## Standard triage workflow
```
1. scripts/gate_status.sh → see which conditions fail and on what metric
2. scripts/fetch_hotspots.sh → group TO_REVIEW hotspots by rule + directory
3. For each rule listed in resources/known_fp_rules.md:
scripts/mark_safe.sh RULE_KEY "<comment from known_fp_rules.md>"
4. scripts/fetch_issues.sh → list remaining BLOCKER/CRITICAL bugs + vulns
5. For each issue that matches a known-FP row:
scripts/mark_fp.sh ISSUE_KEY "<comment from known_fp_rules.md>"
6. scripts/set_new_code.sh 30 → rolling 30-day New Code window (if not already)
7. scripts/gate_status.sh → confirm conditions moved
```
Read [`resources/known_fp_rules.md`](resources/known_fp_rules.md) before step 3 —
each entry has the rule key, verdict, and the exact comment to paste.
[`resources/triage_playbook.md`](resources/triage_playbook.md) has the "when you
see X in Y, do Z" reference.
## Scripts
All scripts live in `scripts/` and source `_lib.sh` for shared config.
| Script | Auth | What it does |
|--------|------|--------------|
| `gate_status.sh` | none | Summarize assigned gate, new-code period, condition pass/fail, top-level counts |
| `fetch_issues.sh [SEVERITIES]` | none | List open BUG + VULNERABILITY at given severities (default `BLOCKER,CRITICAL`) |
| `fetch_hotspots.sh [STATUS]` | none | Group hotspots by category/rule/directory (default `TO_REVIEW`) |
| `mark_safe.sh RULE_KEY "comment"` | `$SONAR_PAT` | Bulk mark all TO_REVIEW hotspots with that rule as REVIEWED+SAFE |
| `mark_fp.sh ISSUE_KEY "comment"` | `$SONAR_PAT` | Transition one issue to False Positive with audit-trail comment |
| `set_new_code.sh VALUE` | `$SONAR_PAT` | Set `sonar.leak.period` (number-of-days / `date:YYYY-MM-DD` / `previous_version` / version tag) |
## When to use this skill
Invoke whenever the user:
- Asks about the SonarCloud **quality gate** status or why it's failing
- Wants to **triage**, **clean up**, or **mark safe/false positive** SonarCloud findings
- Mentions a specific **rule key** (e.g. `go:S2245`, `javascript:S5852`) in context of Sonar
- Wants to change the **New Code period** (rolling days, since-date, previous version)
- Asks for a **summary of open bugs/vulns/hotspots** without opening the web UI
- Says something like "our Sonar is noisy" or "make the gate useful"
## Guardrails
- **Do not bulk-mark a rule as Safe without consulting `known_fp_rules.md` first.**
That file is the source of truth for our standing decisions. If the rule isn't
listed there, add it (with a `Review required` verdict) before acting.
- **SQL-injection hotspots (`go:S2077`) require a spot check** of 2–3 files before
bulk-marking — we use dynamic table/column names with whitelisted values; we want
to be sure format-string inputs never reach user content.
- `mark_safe.sh` only scans the first page (500 hotspots). If the rule has more,
rerun until the count drops to zero.
- `mark_fp.sh` is per-issue; for bulk issue triage use the SonarCloud UI or loop
in bash: `for k in K1 K2 K3; do mark_fp.sh $k "..."; done`.
## Progressive disclosure
- Always loaded: this SKILL.md
- Read on demand:
- [`resources/known_fp_rules.md`](resources/known_fp_rules.md) — standing per-rule decisions + exact triage comments
- [`resources/triage_playbook.md`](resources/triage_playbook.md) — "when you see X in Y, do Z"
- Run on demand: scripts in `scripts/`
Files in this package (11)
- SKILL.md 5 KB
- resources/known_fp_rules.md 7 KB
- resources/triage_playbook.md 5 KB
- scripts/_lib.sh 1 KB
- scripts/fetch_hotspots.sh 2 KB
- scripts/fetch_issues.sh 1 KB
- scripts/gate_status.sh 3 KB
- scripts/mark_fp.sh 1 KB
- scripts/mark_safe.sh 2 KB
- scripts/mark_wontfix.sh 2 KB
- scripts/set_new_code.sh 1 KB
Versions
The database has no other skills named sonarcloud-triage.
Identical content appears in 1 other GitHub folders. We show one copy with the highest score.
Database snapshot: 13.11.2026 · package version 5f477b421c3f (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 98sonarqube-mcp
Provides SonarQube and SonarCloud integration patterns via the Model Context Protocol (MCP) server. Enables quality gate monitoring, issue discovery and triaging, pre-push code analysis, and rule education directly in the agent workflow. Use when the user wants to check quality… - 100sonarcloud-api
Expert guidance for using the SonarCloud API to interact with code quality analysis, projects, issues, quality gates, and metrics. Use this skill when making API calls to SonarCloud, automating code quality workflows, retrieving analysis results, managing projects… - 100sonarqube-code-quality-and-security
Guides deep, tool-specific configuration of SonarQube/SonarCloud for combined code quality and security analysis — quality gate design, pull request decoration, technical debt ratio and maintainability rating, security hotspot triage, and sonar-project.properties/scanner CI… - 100xwiki-fix-sonarqube-issue
Find and fix open SonarCloud (SonarQube) issues in the current XWiki repo and open a PR. Use when asked to fix/clear/triage a SonarQube issue, reduce SonarCloud findings, or run a "fix one Sonar issue" pass. Per-rule fix correctness and drop conditions live in the OKF under… - 100sonarqube-rules
Configures and runs SonarQube / SonarCloud - multi-language SAST + Quality Gate platform with built-in Sonar Way rule profiles + custom rule plugins; integrates `sonar-scanner` with `sonar-project.properties` config; supports Quality Gate definitions including new-code-period… - 100sonarqube
SonarQube/SonarCloud integration for continuous code quality. Setup, configuration, quality gates, and CI/CD integration. USE WHEN: user mentions "SonarQube", "SonarCloud", "quality gates", asks about "code coverage", "technical debt", "code smells", "sonar-project.properties",…