Repository navigation
Closed
Labels
priority/p1-highPriority P1: high-impact work for the next planned milestonescope/reviewMulti-persona code review engine, verification, and findingstype/featureType feature: a new function
Milestone
Description
Problem
- The one valid persona row has no rule. S11's only valid persona row (otel
ipBlock 0.0.0.0/0on port 16686, fix(k8s): deploy-stack applies the monitoring namespace perimeter #913) has no tool rule, and the loop found it in 4/10 runs, titled "Egress" each time [measured: loop §4]. - Two of the six recall entries are this class [code: tests/fixtures/review_recall/recall_set.json].
- A 12-line rule matched both offline, in 7.1 s [measured: d-guarantees].
- "Tested" would mean nothing without CI. The rule tests would otherwise run only by hand, and CI's test step already takes 183 s [REST via c-feasibility].
Acceptance criteria
-
src/devops_cli/review/rules/k8s-networkpolicy-ingress-any.yaml(MIT) carries CWE and metadata.- Its tests hold
ruleid:cases for both recall shapes, andok:cases for a private CIDR and an egress-only policy.
- Its tests hold
- Each recall entry names the tool and rule expected to catch it, or
none(the VISION.md claim). - A rules manifest guards the tests.
devops review rules testrunssemgrep --test. On a pass, it writesrules.lockwith (rule sha256, test sha256, Semgrep version) per rule.- An offline gate test asserts that every pack rule has a matching entry.
- A path-filtered GitHub Actions job (
src/devops_cli/review/rules/**) runssemgrep --testwith the pinned Semgrep, outside the pre-push gate. - (person-run) A path review of 38517a8 matches both network entries.
- Tests run offline with fakes and recorded tool output: no network, no real scanner, no model; each test under 1 s.
-
changelog.d/<n>.mdrecords the change;CHANGELOG.mdanddocs/ROADMAP.mdare not edited. -
uv run devops cipasses.
Key questions
- Egress
0.0.0.0/0? (proposed) A separate opt-in rule. - How does the pack grow? (proposed) Each miss a person reports becomes a pack rule with tests. That is the learning loop that replaces the catalog.
Strategic alignment
- Milestone: none; the roadmap tooling places it. Related: fix(k8s): deploy-stack applies the monitoring namespace perimeter #913, fix(review): the devsecops persona reports misconfiguration and error-handling defects again, scored against a fixed recall set #1015.
- Parent: feat(review): evidence-first code review — tools find, version-pinned facts ground, models explain and plan, fixes are re-checked #1137 (phase P1a).
- Evidence tags ([measured: …], [code: path:line], [sourced: …], [estimate], [inference]; "S11" is the single review run of 2026-10-03 and "the loop" the ten runs S12–S21; c-feasibility and c-fidelity are the two design critiques) are explained in feat(review): evidence-first code review — tools find, version-pinned facts ground, models explain and plan, fixes are re-checked #1137.
Proposed design
Problem statement
The devops-cli review process needs to turn recall set's network-exposure entries into tested Semgrep rules and run those tests in CI when a rule changes, ensuring that security findings are validated through automated testing rather than manual verification.
Acceptance criteria
- Criterion 1: A Semgrep rule file exists with MIT license, CWE metadata, and proper test cases for both recall shapes
Verification: Check that src/devops_cli/review/rules/k8s-networkpolicy-ingress-any.yaml exists with MIT license, CWE metadata, and contains test cases for both recall shapes (ruleid: for matches and ok: for non-matches) - Criterion 2: Each recall entry in the set has a corresponding tool and rule expected to catch it
Verification: Verify that every entry in tests/fixtures/review_recall/recall_set.json has a matching tool and rule or is marked as 'none' - Criterion 3: A rules manifest guards tests by running semgrep --test and writing rules.lock with rule sha256, test sha256, and Semgrep version
Verification: Run devops review rules test and confirm that rules.lock is created with proper entries containing rule sha256, test sha256, and Semgrep version - Criterion 4: An offline gate test asserts that every pack rule has a matching entry in the manifest
Verification: Run offline gate test to verify all pack rules have corresponding entries in the manifest - Criterion 5: A path-filtered GitHub Actions job runs semgrep --test with pinned Semgrep outside the pre-push gate
Verification: Verify that .github/workflows/ci.yml contains a job that filters on src/devops_cli/review/rules/** and runs semgrep --test with pinned Semgrep version - Criterion 6: Tests run offline with fakes and recorded tool output, completing under 1 second each
Verification: Run tests in offline mode with fakes and confirm each test completes within 1 second
Key questions
- Egress
0.0.0.0/0? (proposed): A separate opt-in rule (proposed) - How does the pack grow?: Each miss a person reports becomes a pack rule with tests. That is the learning loop that replaces the catalog. (proposed)
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
Metadata
Metadata
Assignees
Labels
priority/p1-highPriority P1: high-impact work for the next planned milestonescope/reviewMulti-persona code review engine, verification, and findingstype/featureType feature: a new function
Type
Projects
- StatusShow more project fieldsDone
Activity
dan-petty commentedon Oct 11, 2026
Status set to Ready at 33bc45c (see proposed design in issue body).
feat(review): devops-cli's rule pack turns the recall set's network-e…
dan-petty commentedon Oct 16, 2026
What changed
#1598, merged into
release/v0.2.36as 76dd52a.18 file(s) changed.
How it was verified
Check runs at 24f1adc:
Acceptance Criteria of
docs/agent/tasks/task-1145-review-rule-pack.md:No Acceptance Criteria section.
feat(release): v0.2.36 (#1615)