Repository navigation
Description
Problem
Findings from item 3 need a path to a person. Today a person must remember to look. devops survey --emit-candidates shows the pattern, but it covers pyproject.toml only.
Expected
devops research sweep runs inventory and advisories, drops findings that were filed before (marker line research-finding: <source_id> found by issue search), and files one intake candidate per actionable finding through devops roadmap intake with --confirm. Actionable: severity high or critical and the pin is affected; or exploited; or past end of life. It prints a digest text. It sets the gauge devops_cli_research_open_findings by severity and adds one Alertmanager rule for critical or exploited findings to the existing Mattermost route. --dry-run makes no request and returns the would-be requests and a result of the same type.
Acceptance criteria
- Tests that fail on the base: a new actionable finding gives one candidate; a second run gives none; a non-actionable finding gives only a digest line.
- A test:
--dry-runmakes zero external requests. - A test: the candidate body holds advisory ids and URLs and no private host name or address.
- The intake duplicate flag stays on; the sweep never drops a candidate or closes an issue.
- docs/TELEMETRY.md has a row for the new instrument; the Prometheus rule test passes.
Existing tool considered
devops roadmap intake and NewCandidate (reused by survey and review intake), Alertmanager to Mattermost, devops survey. No new alert path.
Related
Part of the research agent plan. Related: #2044, #3495.
Part of the research agent plan of 2026-11-07 (design by the research-agent design workflow; the ADR is delivered through #3877).
Proposed design
Problem statement
Findings from research inventory and advisories need a path to a person. A person must remember to look today. The sweep files one intake candidate for each actionable finding. It skips findings that are already filed. It prints a digest, sets a severity gauge and adds one Mattermost alert rule.
Acceptance criteria
Requirement: Actionable finding files one intake candidate
The sweep SHALL file exactly one intake candidate for each actionable finding that has no earlier marker.
Scenario: First sweep of an actionable finding
- WHEN the sweep runs on a high-severity finding whose affected pin is in the inventory and no issue body holds its marker
- THEN the sweep calls intake once with --confirm and the candidate body holds the finding's advisory ids and URLs
Requirement: Second sweep skips a filed finding
The sweep SHALL file no candidate for a finding whose marker line already appears in an issue body.
Scenario: Second sweep of the same finding
- WHEN the sweep runs again on the same finding and GitHub issue search returns its marker
- THEN the sweep files no candidate and prints one digest line that says the finding was filed before
Requirement: Non-actionable finding stays in digest
The sweep SHALL print a digest line and file no candidate for a finding that is not actionable.
Scenario: Low-severity unaffected finding
- WHEN the sweep runs on a low-severity finding whose pin is not affected and is not exploited or past end of life
- THEN the sweep prints one digest line for the finding and makes no intake call
Requirement: Dry run makes no request
The sweep SHALL make zero external requests in dry-run mode and return the would-be requests and a result of the same type.
Scenario: Dry run with an actionable finding
- WHEN the sweep runs with --dry-run on an actionable finding
- THEN no GitHub search, intake, metric export or alert request leaves the process and the result lists the would-be intake request
Requirement: Candidate body has public advisory data only
The sweep MUST put advisory ids and URLs in the candidate body and MUST NOT put a private host name or address there.
Scenario: Candidate body from a finding with a private inventory path
- WHEN the sweep files a candidate for a finding whose inventory record holds a private host name or address
- THEN the candidate body holds the advisory ids and URLs and holds no private host name or address
Requirement: Intake duplicate flag stays on
The sweep SHALL call intake with its duplicate check enabled and SHALL NOT drop a candidate or close an issue.
Scenario: Intake reports a duplicate
- WHEN intake reports that a candidate duplicates an item
- THEN the sweep keeps the intake result and closes no issue
Requirement: Telemetry row and alert rule
The sweep SHALL set the gauge devops_cli_research_open_findings by severity and the project SHALL document it in docs/TELEMETRY.md.
Scenario: Critical finding sends gauge
- WHEN the sweep finds one critical open finding
- THEN the gauge has a severity=critical sample with value 1 and docs/TELEMETRY.md has a row for the instrument
Requirement: Prometheus rule test passes
The project SHALL add one Alertmanager rule for critical or exploited findings to the existing Mattermost route and its rule test SHALL pass.
Scenario: Alert rule test
- WHEN the Prometheus rule test runs on the new rule
- THEN the test passes and the rule routes to the existing Mattermost receiver
Requirement: Digest reports each finding
The sweep SHALL print a digest that lists each finding and its result.
Scenario: Digest with one filed and one skipped finding
- WHEN the sweep handles one filed finding and one non-actionable finding
- THEN the digest has one line for each finding and names the result of each
Existing Tool Considered
No alternatives check has run. No open, maintained external tool covers this repository-specific sweep. devops survey covers discovery but lacks advisory correlation, intake filing and deduplication. devops roadmap intake covers intake but lacks finding discovery. The change reuses both and the existing Alertmanager Mattermost route. The build cost is about 20,000 model tokens to build, keep and fix the sweep, and about 2 engineer-days of elapsed time.
Key questions
- How does a new metric instrument reach Prometheus?: Declare the gauge in
INSTRUMENTSinsrc/devops_cli/telemetry/instruments.py, send it withemit(), and add a row to docs/TELEMETRY.md. [sources: docs/TELEMETRY.md, src/devops_cli/telemetry/instruments.py] - Should the sweep call intake in process or as a subprocess?: Reuse the in-process intake path that
surveyuses. Keep the duplicate check on and pass the confirm behavior. (best practice) [sources: src/devops_cli/survey/intake.py, src/devops_cli/commands/survey.py, tests/commands/test_survey_cmd.py]- Chosen: In-process intake path. It reuses tested code, keeps the duplicate flag on and lets the test stub the call.
- Rejected:
devops roadmap intakesubprocess. It adds a shell boundary, hides the duplicate flag and makes the test slower.
- How does the sweep detect a finding that was filed before?: Search issue bodies for the exact marker line
research-finding: <source_id>before intake. Treat any match as filed. (best practice) [sources: CONTEXT.md]- Chosen: Search issue bodies for the marker line. It is durable, searchable and survives a new process.
- Rejected: Keep a local cache. It loses state on a new host and can file duplicates.
- Rejected: Use a label on the issue. The body already holds the marker and a label adds a second source.
- How should the candidate body avoid private data?: Build the body from an allowlist of public advisory fields and run the existing mask over it. (best practice) [sources: src/devops_cli/survey/models.py, src/devops_cli/survey/intake.py, docs/TELEMETRY.md]
- Chosen: Allowlist public advisory fields and mask. It keeps advisory ids and URLs and leaves private host data out.
- Rejected: Copy the finding text. It can carry a private host name or address into a public issue.
- What does
--dry-runreturn?: It builds the would-be intake requests and a result of the same type. It makes no GitHub search, intake, metric export or alert request. (best practice) [sources: src/devops_cli/commands/survey.py, tests/commands/test_all_commands_help_dryrun.py]- Chosen: Build and skip all network calls. It is testable and leaves no state.
- Rejected: Run intake and roll back. It makes requests and can leave a candidate.
- Which telemetry type and labels does the open-findings metric use?: Use a gauge named
devops_cli_research_open_findingswith aseveritylabel. (best practice) [sources: docs/TELEMETRY.md]- Chosen: Gauge by severity. Open findings are a snapshot, and severity is the dimension that the body names.
- Rejected: Counter by severity. A counter measures events, not the current open count.
- Rejected: Histogram by severity. Severity is categorical, not a distribution.
- What should the sweep do when intake reports a duplicate?: Keep the duplicate flag on, keep the intake result and close no issue. (best practice) [sources: CONTEXT.md, src/devops_cli/survey/intake.py]
- Chosen: Keep the duplicate result and close nothing. Intake owns duplicate handling, and the sweep must not close or drop.
- Rejected: Drop the candidate. It loses the finding and breaks the intake rule.
- Rejected: Close the issue. The sweep never closes an issue.
- Which findings count for the sweep?: Only anchored findings from inventory and advisories count. Model text is not a finding. [sources: docs/adr/0005-review-findings-come-from-tools-not-models.md, CONTEXT.md]
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
dan-petty commentedon Nov 7, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.
featprefix of the title gives the type.research, and .github/labels.yml declares no scope/research label. Add the label to the file to give the scope to this item.It automates filing of security findings but does not fix a current failure or block a release.It removes the manual step of remembering to check advisories and file candidates, reducing the chance that a critical finding is missed.It reuses existing intake and survey patterns but adds dedup logic, a new gauge, an Alertmanager rule, a dry-run path, and five acceptance tests.devops roadmap discover) #745, which asks for a different change.Both find security advisories and create intake candidates, but #745 is a broader 'roadmap discover' with multiple signal sources while the candidate is a focused 'research sweep' with dedup, gauge, and alerting.devops-cli-service commentedon Nov 7, 2026
Status set to Ready at 226394c (see proposed design in issue body).
dan-petty commentedon Nov 7, 2026
Pull request #4055 delivers this issue for findings of severity critical or high. The data for the two other conditions of "Actionable" does not exist on
main, so each moves to the issue that adds the data:ResearchCriticalFindingsget the exploited condition there.Everything else in the acceptance criteria is in #4055: the tests for one candidate and a second run with none, the non-actionable digest line, the dry run with zero requests, the public candidate body, the intake duplicate flag, the
docs/TELEMETRY.mdrow and the Prometheus rule test.feat(research): add research sweep that files intake candidates (#4055)
devops-cli-service commentedon Nov 7, 2026
Released in v0.84.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.84.0
devops-cli-service commentedon Nov 7, 2026
Live since 2026-11-07 22:00 UTC