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
refactor: group CodeQL alerts by rule into single Linear issues
Multiple CodeQL alerts with the same rule ID (e.g., js/path-injection
in different files) are now grouped into one finding with all locations
and details included in the description.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1. **Trivy scan results** in `trivy-alerts.json` — each entry has `id` (CVE ID, e.g., `CVE-2024-1234`)
404
404
2. **Dependabot alerts** in `dependabot-alerts.json` — each entry has `id` (CVE ID or GHSA ID)
405
-
3. **CodeQL alerts** in `codeql-alerts.json` — each entry has `id` (prefixed, e.g., `codeql:js/sql-injection#33`)
405
+
3. **CodeQL alerts** in `codeql-alerts.json` — each entry has `id` (prefixed, e.g., `codeql:js/sql-injection`). Multiple entries may share the same `id` (same rule, different locations).
406
406
407
407
## Your Task
408
408
@@ -419,19 +419,20 @@ jobs:
419
419
- Include the affected package, severity, remediation steps, and whether it is direct or transitive.
420
420
421
421
4. For **CodeQL findings**:
422
-
- Each CodeQL alert is a **separate finding** — do NOT group alerts by rule ID. Two alerts with the
423
-
same rule but different files/locations must be separate entries.
424
-
- Use the `id` field as `cveId` (e.g., `codeql:js/path-injection#18`).
422
+
- **Group all alerts with the same `id` (rule ID) into a single entry.** Multiple alerts for
423
+
the same rule in different files/locations should produce ONE finding, not separate ones.
424
+
- Use the `id` field as `cveId` (e.g., `codeql:js/path-injection`).
425
425
- Set `source` to `"codeql"`.
426
-
- Set `affectedPackage` to the file path from `location_path`.
426
+
- Set `affectedPackage` to a comma-separated list of affected file paths, or the primary one
427
+
if there are many.
427
428
- Normalize `security_severity_level` to uppercase (CRITICAL/HIGH/MEDIUM/LOW).
428
-
- The `description` should include:
429
+
- The `description` MUST include details for **every alert instance** in the group:
429
430
- The rule ID and what it detects
430
-
- The exact file path and line number(s) from the alert
431
-
- A link to the alert URL (`html_url`)
432
-
- An explanation of the specific code at that location and why it's flagged
431
+
- For **each** alert: the exact file path, line number(s), and a link to its alert URL (`html_url`)
432
+
- For **each** alert: an explanation of the specific code at that location and why it's flagged
433
433
- Concrete remediation steps with code examples where possible
434
434
- A link to the CodeQL rule documentation
435
+
- A summary count (e.g., "This rule was triggered in 3 locations:")
435
436
436
437
5. For each finding, determine:
437
438
- A short `title` suitable for a Linear issue title.
0 commit comments