Skip to content

Security run notification: mark which Security finding the fix's pull request addresses #1072

Closed

Description

@JacobStephens2

This was generated by AI during triage.

Problem

When a Security run audits and then fixes a finding in the same pass, its Run notification reads as if the merged pull request resolved every listed Security finding. It resolved only one.

A real notification from 2026-10-22 had this shape (the repository and findings are left out because the unfixed ones are still private):

Result:       merged
Command:      Security run
Audit:        PR https://github.com/<owner>/<repo>/pull/26 is merged

Security findings:
- medium: <title>: <advisory URL>
- high:   <title>: <advisory URL>     <- the only one PR #26 fixed
- ... 5 more ...

Pull request: https://github.com/<owner>/<repo>/pull/26

The Day shift asked whether all seven were resolved by the PR. Six still wait for triage.

Why it happens

  • src/security.rs:198-213: after audit_and_record, when next_fix() returns a finding, the Outcome::Fixed from fix() has its findings (just the fixed one, vec![metadata] at src/security.rs:271) replaced with audited.findings, which is every finding the audit recorded.
  • When the Security run fixes a previously recorded finding without auditing (src/security.rs:177-183), findings is just the fixed one. So the same layout means two different things depending on the path the run took.
  • src/run_ending.rs:37-40 and src/notification.rs:272-306: for Ending::SecurityFix, the Audit: line shows the fix Run's ended line ("PR … is merged"), not how the audit ended, and the findings list has no per-finding status.

Wanted

The notification body alone should let the Day shift tell:

  1. which finding, if any, the dispatched fix's pull request addresses (by its private link; still never its write-up)
  2. which listed findings were only recorded by this run's audit and are still waiting for the Day shift
  3. how the audit itself ended, separately from how the fix Run ended

This applies to both paths, audit-then-fix and fix-without-audit, and to a fix Run that failed or was interrupted (the finding was attempted, not fixed).

Open for triage

  • Exact layout: a status per finding (for example - high (fixed by PR #26): …), or separate Fixed: and Recorded, waiting: sections.
  • Whether the Audit: line should say "findings recorded" or "not run" on a fix-only pass, with the fix's ending moved to the existing Pull request: and Result: lines.
  • Whether the Activity log end line and the Console/Inbox (src/logs/status/inbox.rs:348) need the same distinction; they read the same security_findings.

Activity

  1. added
    enhancement
    needs-triage
    ready-for-agent
    in-progress
    and removed
    needs-triage
    ready-for-agent
    on Oct 22, 2026
  2. removed
    in-progress
    on Oct 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions