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
--json-schema '{"type":"object","properties":{"cves":{"type":"array","items":{"type":"object","properties":{"cveId":{"type":"string","description":"CVE ID, GHSA ID, or codeql:<rule-id>"},"severity":{"type":"string","enum":["CRITICAL","HIGH","MEDIUM","LOW"]},"source":{"type":"string","enum":["trivy","dependabot","codeql","trivy+dependabot"],"description":"Which scanner(s) reported this finding"},"title":{"type":"string","description":"Short summary for the Linear issue title"},"description":{"type":"string","description":"Markdown analysis: affected packages, direct vs transitive, remediation steps, and references"},"affectedPackage":{"type":"string"},"linearIssueExists":{"type":"boolean"}},"required":["cveId","severity","source","title","description","affectedPackage","linearIssueExists"]}}},"required":["cves"]}'
397
+
--json-schema '{"type":"object","properties":{"cves":{"type":"array","items":{"type":"object","properties":{"cveId":{"type":"string","description":"CVE ID, GHSA ID, or codeql:<rule-id>"},"severity":{"type":"string","enum":["CRITICAL","HIGH","MEDIUM","LOW"]},"source":{"type":"string","enum":["trivy","dependabot","codeql","trivy+dependabot"],"description":"Which scanner(s) reported this finding"},"title":{"type":"string","description":"Short summary for the Linear issue title"},"description":{"type":"string","description":"Markdown analysis: affected packages, direct vs transitive, remediation steps, and references"},"affectedPackage":{"type":"string"},"linearIssueExists":{"type":"boolean"},"linearIssueId":{"type":"string","description":"The Linear issue UUID if a matching issue was found, empty string otherwise"},"linearIssueClosed":{"type":"boolean","description":"True if the matching Linear issue is in a completed or canceled state"}},"required":["cveId","severity","source","title","description","affectedPackage","linearIssueExists","linearIssueId","linearIssueClosed"]}}},"required":["cves"]}'
398
398
prompt: |
399
399
You are a security engineer triaging vulnerabilities and security findings for the Sourcebot Docker image.
400
400
You have three data sources to analyze. Each is a JSON array where every entry has a pre-computed
401
401
`id` field for deterministic deduplication:
402
402
403
403
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.
@@ -443,17 +444,19 @@ jobs:
443
444
444
445
7. **Check Linear for existing issues** for each finding:
445
446
- For each `cveId`, run a GraphQL query against the Linear API to search for issues
446
-
whose title contains that ID.
447
-
- **Important**: Exclude cancelled issues so that previously cancelled/rejected findings
448
-
can be re-created. Use a state type filter to only match active issues.
447
+
whose title contains that ID. Search ALL issues regardless of state (open, completed, cancelled).
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
11
11
- Fixed revision selection so the 64-revision cap prefers the newest matching branches and tags instead of pruning by ref-name order. [#1122](https://github.com/sourcebot-dev/sourcebot/pull/1122)
12
12
- Fixed infinite pagination loop in Gitea/Forgejo when an API token can only see a subset of org repos (the `x-total-count` header reports org total while token returns fewer items). [#1130](https://github.com/sourcebot-dev/sourcebot/pull/1130)
13
13
- Fixed path injection vulnerability (CodeQL js/path-injection) in review agent log writing by validating paths stay within the expected log directory. [#1134](https://github.com/sourcebot-dev/sourcebot/pull/1134)
14
+
- Fixed CodeQL missing-workflow-permissions alert by adding explicit empty permissions to `deploy-railway.yml`. [#1132](https://github.com/sourcebot-dev/sourcebot/pull/1132)
0 commit comments