Repository navigation
Reporting: traffic-light scorecard, health overlay, CSV/JSON export (§8.1, §8.3) - #21
Yoshiofthewire wants to merge 17 commits into
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process: ⏱️ Estimated effort to review: 4 🔵🔵🔵🔵⚪🧪 PR contains tests⚡ No major issues detectedAdvisory only: this comment never gates the pull request. |
Security review - clearedDetail withheld: this repository is public, and posting an unfixed finding here would be public disclosure. The full report was posted to the hand-off board at https://myslop.urlxl.us/f/pr-reviewer-busnes-app-kyguard-server-21, where it is readable by the operator and expires seven days after the last post. gpt-6.1-sol using security-audit on behalf of Yoshi |
Autonomous review - 1/1 personas cleared
Merging remains a human decision; this bot never approves. gpt-6.1-sol using security-audit on behalf of Yoshi |
a46a02d to
84d6a4c
Compare
…§8.1, §8.3) internal/reporting builds one authorized dataset (admins see every account; others the accounts they own or whose current policy lists a principal enrolled with their own issuer and subject), classifies each active account Green / Yellow / Red by schedule plus release evidence, then current envelope, overlays one health value, and filters by class, health, pool, account attributes and owner attributes. GET /api/reports/scorecard serves the dashboard; format=json|csv serves the same rows and totals as an audited download. Percentages always sum to 100; CSV formula cells are neutralized. GET /api/jobs lists rotation runs and checkout leases for the jobs screen. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The scorecard read every release receipt and kept the newest in Go, so the work grew with rotation history. The query now returns only each account's newest release row. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A pool or attribute filter now applies to the decommissioned count; a class or health filter matches no decommissioned account, since they have neither. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
bf69f17 to
cc0079e
Compare
# Conflicts: # internal/store/inventory_test.go
# Conflicts: # internal/store/inventory.go
A break-glass session counts as an admin, so before stating its reason it could read the deployment-wide scorecard and its exports. The route now uses requireSession (403 break_glass_reason_required). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Note 🤖 Claude Opus 5.5 responding on behalf of Yoshiofthewire Security finding (P2, |
# Conflicts: # docs/DECISIONS.md
…suer main's route registry (#18) refuses routes registered outside it, and main now stores the SSO issuer on the user (§7.2), so a principal is matched by the caller's stored issuer and subject, not only for KySignOn. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
In one line: Every account now gets one traffic-light class (Green managed / Yellow vaulted / Red listed) with a health overlay, served as a dashboard JSON and as audited CSV/JSON exports that always agree.
§13 Phase 1A items: "Traffic light, health … scorecard and CSV/JSON export (§8.1–§8.3)". Acceptance test 12.
What changed
internal/reporting: one dataset builder, one classifier, one filter, one CSV writer.releasereceipt; else Yellow = current envelope; else Red. Decommissioned accounts are counted separately, never classified. Classes always sum to the active count; percentages always sum to 100.checkout_open,pending_first_rotation,overdue, elsehealthy); it never changes the class.GET /api/reports/scorecard(any session) with filtersclass,health,pool,attr.<key>,owner.<key>;format=json|csvreturns the same rows as a download, audited (report.exported) before the body is sent. CSV formula cells are neutralized.GET /api/jobs(admin): rotation runs and checkout leases for the jobs screen.Review this
reporting.Buildvisibility: who sees which accounts.callerIssuer: the caller's issuer is nowusers.sso_issuerfrommain(§7.2), empty for a local account (DECISIONS 207).Classify: class order and health priority.Checked: acceptance 12 end to end (
TestScorecard: sums, dashboard = JSON = CSV for one department filter, two export audits, owner and listed-principal visibility, a same-subject user from another IdP sees nothing); 15 mutations killed.Not checked: the classifier against real broker-produced receipts (fixtures write store rows directly).
Decided for you: DECISIONS 205–208 (overdue definition, one health value, issuer+subject match, dashboard view not audited but every download is).
You need to: nothing.
Detail
requireAuthenticated(break-glass session without a reason gets the dashboard, 200)Guide finding (unbounded scan of every release receipt) fixed in 3c633ac: SQL now returns only each account's newest release row. Second round (bf69f17): pool and attribute filters now apply to the decommissioned count; a class or health filter counts none.
Routes marked
TODO(hawthorn §7.5): GET/api/reports/scorecard, GET/api/jobs.Round 4 (a7db71b): security P2. A break-glass session counts as an admin, so the scorecard and its JSON and CSV exports now use
requireSessionfrom #20 (403break_glass_reason_requireduntil the session states its reason, 200 after). The test is table-driven over the dashboard,format=jsonandformat=csv(B15).Round 6 (alder):
maincame in through #20.GET /api/reports/scorecardandGET /api/jobsgo throughmain's route registry (session class, no step-up window; they are reads). Without this,TestEveryRouteIsClassifiedfails.callerIssuerreturnsusers.sso_issuer, so a non-KySignOn SSO user is listed on a policy too, still only by issuer and subject.TestScorecardgives carol and dave their stored issuers.users.sso_issuer.callerIssuerreturns a fixed issuer, so a subject alone matchesTestScorecard: dave (carol's subject, another IdP) sees carol's accountChecks (round 6): full suites at the bottom (#20) and top (#24) of the stack; see those PRs.
🤖 Generated with Claude Code