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
Copy file name to clipboardExpand all lines: src/seclab_taskflows/taskflows/pvr_triage/README.md
+67-14Lines changed: 67 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,13 +2,14 @@
2
2
3
3
Tools for triaging GitHub Security Advisories submitted via [Private Vulnerability Reporting (PVR)](https://docs.github.com/en/code-security/security-advisories/guidance-on-reporting-and-writing-information-about-vulnerabilities/privately-reporting-a-security-vulnerability). The taskflows fetch a draft advisory, verify the claimed vulnerability against actual source code, score report quality, and generate a structured analysis and a ready-to-send response draft.
4
4
5
-
Three taskflows cover the full triage lifecycle:
5
+
Four taskflows cover the full triage lifecycle:
6
6
7
7
| Taskflow | Purpose |
8
8
|---|---|
9
9
|`pvr_triage`| Deep-analyse one advisory end-to-end |
10
10
|`pvr_triage_batch`| Score an entire inbox and produce a ranked queue |
11
-
|`pvr_respond`| Post or save the response once you've reviewed the analysis |
11
+
|`pvr_respond`| Post the response for one advisory once you've reviewed the analysis |
12
+
|`pvr_respond_batch`| Scan REPORT_DIR and post all pending response drafts in a single session |
2.**Fetch & parse** — fetches the advisory from the GitHub API and extracts structured metadata: vulnerability type, affected component, file references, PoC quality signals, reporter credits.
65
-
3.**Quality gate** — calls `get_reporter_score` for the reporter's history and `find_similar_triage_reports` to detect duplicates. Computes a `fast_close` flag when the report has no file references, no PoC, no line numbers, *and* a similar report already exists. Fast-close skips deep code analysis.
66
+
3.**Quality gate** — calls `get_reporter_score` for the reporter's history and `find_similar_triage_reports` to detect duplicates. Computes `fast_close` using a reputation-gated decision tree:
-**skepticism reporter** → `fast_close = true` when all three quality signals are absent (prior similar report not required).
69
+
-**normal / no history** → `fast_close = true` only when all three signals are absent *and* a prior similar report exists.
70
+
Fast-close skips deep code analysis.
66
71
4.**Code verification** — resolves the claimed version to a git tag/SHA, fetches the relevant source files, and checks whether the vulnerability pattern is actually present. After verifying at the claimed version, also checks HEAD to determine patch status (`still_vulnerable` / `patched` / `could_not_determine`). Skipped automatically when `fast_close` is true.
The toolbox marks `reject_pvr_advisory`, `withdraw_pvr_advisory`, and `add_pvr_advisory_comment` as `confirm`-gated. The agent will print the verdict, quality rating, and full response draft, then ask for explicit confirmation before making any change to GitHub.
166
173
174
+
After a successful write-back, `pvr_respond` calls `mark_response_sent` to create a `<GHSA-ID>_response_sent.md` marker so `pvr_respond_batch` will skip this advisory in future runs.
Scans `REPORT_DIR` for advisories that have a response draft (`*_response_triage.md`) but no sent marker (`*_response_sent.md`), then posts each response to GitHub in a single session.
**Task 1** calls `list_pending_responses` (local read-only, no confirm gate) to find all unsent drafts and prints a summary table. If there are no pending drafts it stops immediately.
195
+
196
+
**Task 2** iterates over every pending entry:
197
+
1. Reads the triage report and response draft from disk.
198
+
2. Prints a per-item preview (GHSA, verdict, first 200 chars of response).
199
+
3. Executes the chosen action (`comment` / `reject` / `withdraw`) via the confirm-gated write-back tool.
200
+
4. On success, calls `mark_response_sent` to create a `*_response_sent.md` marker so the advisory is skipped in future runs.
201
+
202
+
Prints a final count: `"Sent N / M responses."`
203
+
204
+
### Sent markers
205
+
206
+
`pvr_respond` also calls `mark_response_sent` after a successful write-back, keeping single-advisory and bulk responds in sync. Once a marker exists, neither `pvr_respond` nor `pvr_respond_batch` will attempt to re-send.
207
+
167
208
---
168
209
169
210
## Typical workflow
@@ -178,10 +219,15 @@ The toolbox marks `reject_pvr_advisory`, `withdraw_pvr_advisory`, and `add_pvr_a
178
219
- Check the Verdict and Code Verification sections.
179
220
- Edit the response draft (_response_triage.md) if needed.
180
221
181
-
4. Run pvr_respond to send the response:
182
-
- action=comment → post reply only (advisory stays draft)
183
-
- action=reject → reject + post reply
184
-
- action=withdraw → withdraw + post reply
222
+
4a. Send responses one at a time with pvr_respond:
223
+
- action=comment → post reply only (advisory stays draft)
224
+
- action=reject → reject + post reply
225
+
- action=withdraw → withdraw + post reply
226
+
227
+
4b. Or send all pending drafts at once with pvr_respond_batch:
228
+
Scans REPORT_DIR for unsent drafts (no _response_sent.md marker)
@@ -233,7 +285,7 @@ The quality gate in Task 3 of `pvr_triage` calls `get_reporter_score` automatica
233
285
| confirmed_pct ≤ 20% or Low-quality share ≥ 50% | treat with skepticism |
234
286
| Otherwise | normal |
235
287
236
-
A "treat with skepticism" score alone does not trigger fast-close — it is informational. Fast-close is triggered only by the combination of missing quality signals *and* an existing duplicate report.
288
+
Reputation directly gates the fast-close decision. See [SCORING.md](SCORING.md) Section 3 for the full three-path decision table and reputation × fast-close matrix.
237
289
238
290
---
239
291
@@ -258,4 +310,5 @@ All files are written to `REPORT_DIR` (default: `./reports`).
258
310
|---|---|---|
259
311
|`<GHSA-ID>_triage.md`|`pvr_triage` task 6 | Full triage analysis report |
260
312
|`<GHSA-ID>_response_triage.md`|`pvr_triage` task 8 | Plain-text response draft for the reporter |
0 commit comments