Skip to content

chore(ci): auto-close resolved issues in the vulnerability triage pipeline#1501

Draft
brendan-kellam wants to merge 2 commits into
mainfrom
brendan/sou-1587-auto-close-resolved-issues-in-the-triage-pipeline-b2df
Draft

chore(ci): auto-close resolved issues in the vulnerability triage pipeline#1501
brendan-kellam wants to merge 2 commits into
mainfrom
brendan/sou-1587-auto-close-resolved-issues-in-the-triage-pipeline-b2df

Conversation

@brendan-kellam

Copy link
Copy Markdown
Contributor

The vulnerability triage pipeline created and reopened Linear issues for CVEs/alerts, but never closed them once the vulnerability was resolved. So a fix that landed (e.g. #1474) left the corresponding issue open and it kept breaching SLA.

This adds a reconciliation step that closes resolved issues:

  • After creating/reopening issues, fetch every open pipeline-created issue (those with the [<repository>] title prefix) and close any whose finding id no longer appears in the current scan results, moving it to the team's Done (completed) state.
  • The Linear Triage job now also runs on the canonical repo when scans come back clean, so reconciliation happens even when there are zero findings (the exact case where a resolved CVE would otherwise linger open).
  • The close step is guarded on both scanners succeeding, so a failed scan (which yields an empty findings set) can't mass-close every open issue.
  • Resolves a completed workflow state (done_state_id) alongside the existing Triage state to perform the close.

Since create/reopen only touch issues whose id is present in findings and close only touches issues whose id is absent, the two operate on disjoint sets and don't conflict.

The triage pipeline created/reopened Linear issues for vulnerabilities but
never closed them once resolved, so a fixed CVE could linger as an open,
SLA-breaching issue. Reconcile open pipeline-created issues against the
current findings each run and move any whose vulnerability is no longer
reported to Done. Run triage on the canonical repo even when scans are clean
so reconciliation happens, and guard the close step on successful scans to
avoid mass-closing on scan failure.

Co-authored-by: linear-code[bot] <222613912+linear-code[bot]@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 1755a56e-4433-419c-adfe-63ff5f9442d7

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch brendan/sou-1587-auto-close-resolved-issues-in-the-triage-pipeline-b2df

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Co-authored-by: linear-code[bot] <222613912+linear-code[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant