Repository navigation
feat: add RBAC scan diff endpoint - #82
Conversation
Signed-off-by: Floze <[email protected]>
rrskris
left a comment
There was a problem hiding this comment.
Thanks — this is a clean implementation of #4, and it matches the issue spec exactly (same key tuple, stable empty-diff contract).
Verified locally on your branch: full suite 75 passed. The fake-session unit tests plus the API-level contract tests are exactly the shape I want for service-layer features.
One product nuance I noticed, not a blocker: because findings are keyed by (rule_type, role.name, binding.name), a finding whose severity escalates between scans (e.g. HIGH → CRITICAL on the same role/binding) lands in unchanged_count — so severity escalations won't surface as "new". That's fine for v1 of this endpoint; I'll file a follow-up issue for a severity_changed bucket.
CI needs my manual approval since this is your first PR here — kicking that off now. Once it's green this merges. Appreciated!
|
Thanks for the approval. The remaining CI, DCO, and CodeQL workflows are still in |
The architecture diagram still labelled SARIF as "(#1, in review)" and JUnit XML as "(#2)", and the CI-integration roadmap paragraph listed both plus the scan-diff endpoint as planned. All three have shipped (#10/#56, #81, #82). Also fixes two stale references found while verifying the above: - the `--output` flag table omitted `sarif` and `junit`, though the CLI has accepted both for several releases (`app/cli.py` choices) - `docs/api.md` did not document `GET /rbac/scan/diff` at all Prometheus /metrics (#3) and the Helm chart (#8) remain the open roadmap items, so they stay under "planned next". Signed-off-by: Vamshi Krishna Santhapuri <[email protected]>
@floze-the-genius shipped three PRs, but only the bugfix (#100) appeared in the changelog — the two features it built on, GET /rbac/scan/diff (#82) and the kaaval doctor preflight (#80), were missing entirely. Anyone reading the release notes would see the fix to a feature whose arrival was never recorded. Scope of each entry was taken from the merge commits rather than the issue titles: #80 adds the CLI command and typed health results on top of the deep health checks that #75 already provided, so it is credited for the wrapper it actually wrote, not for the checks themselves. Prep for the v1.2.0 release notes, so the credit ships in the release rather than as a later correction. Signed-off-by: Vamshi Krishna Santhapuri <[email protected]>
What this changes
diff_latest_scans(db)over the two newest persisted RBAC scans(rule_type, role.name, binding.name)GET /rbac/scan/diffCloses #4.
Type
Checklist
make testpasseshack/dev/rbac-fixtures.yamlif it's a new rule (not applicable)How you verified it
KAAVAL_ADMIN_PASSWORD=test-admin-password make test- 75 passednpm run lint- 0 errors (7 existing hook dependency warnings)npm run build- production build and TypeScript passedgit diff --checkpassedAI assistance
Implemented with OpenAI Codex. I reviewed the diff and validated all behavior and checks listed above.