Skip to content

feat(report): identity & service-account hygiene pass (#17) - #33

Merged
lex00 merged 1 commit into
mainfrom
feat/identity-report
Jun 19, 2026
Merged

feat(report): identity & service-account hygiene pass (#17)#33
lex00 merged 1 commit into
mainfrom
feat/identity-report

Conversation

@lex00

@lex00 lex00 commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Closes #17. Implemented as a report-style detect pass (per roadmap decision).

Adds identity & service-account hygiene as a detect-and-report pass (no mutation), folded into the report subcommand.

What it does

  • Inventories installed Apps (GET /orgs/{org}/installations) — Apps consume no seat — with per-installation permission counts.
  • Flags machine users: operator-declared logins (OrgConfig.machineUsers) that are currently seat-consuming org members, with a recommendation to migrate each to a GitHub App.

Why operator-declared

GitHub's API doesn't reliably mark a "machine user" (they're ordinary user accounts), so warden can't auto-detect them — the org declares the known ones and the report cross-references them against live membership.

Shape

  • Pure module src/report/identity.ts: buildIdentityReport(installations, memberLogins, machineUsers) + renderIdentityReport. Unit-tested with mock inputs.
  • Folded into the compliance report as an optional identity field (flips clean when a machine user is flagged) and rendered as a section.
  • Surfaced via github-warden report --identity (fetches installations + members, tolerating 403/404 as "no access/none").

Verification

  • npx tsc --noEmit clean
  • npm test green (420 tests; +8 identity, +2 compliance-integration, +1 CLI)
  • Action bundle rebuilt for the CI freshness check

🤖 Generated with Claude Code

Detect-and-report (report-style, per roadmap decision): inventories the
org's installed Apps and flags operator-declared machine users
(OrgConfig.machineUsers) that are seat-consuming org members, recommending
migration to Apps. Pure buildIdentityReport + render, folded into the
compliance report (optional identity field, flips clean) and surfaced via
`report --identity`. Machine users are operator-declared because the API
can't reliably mark them.

Action bundle rebuilt.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@lex00
lex00 merged commit 4daa2ff into main Jun 19, 2026
2 checks passed
@lex00 lex00 mentioned this pull request Jun 19, 2026
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

cycle: identity & service-account hygiene

1 participant