Commit Graph

2 Commits

Author SHA1 Message Date
CarterPerez-dev 873257ad4b feat(rotators): GitHub fine-grained PAT rotator + thin GitHub API client
Github::Client wraps the bearer-auth REST API with required
'X-GitHub-Api-Version: 2022-11-28' header. Implements me, create_pat
(POST /user/personal-access-tokens), delete_pat (DELETE by id).

GithubPatRotator's 4-step contract:
- generate: create_pat returns new id + token value (fresh PAT alongside old)
- apply: no-op (create_pat already active)
- verify: probe-client uses the NEW PAT to GET /user; success means it works
- commit: delete OLD PAT by id (tracked via old_pat_id tag)
- rollback_apply: delete NEW PAT

7 unit specs verify create/delete/me round-trips, full rotation path,
verify-on-401, and rollback deletion.
2026-04-29 01:05:10 -04:00
CarterPerez-dev 8ebdd3fee7 feat(cre): source tree skeleton with empty module dirs and CI workflow
- src/cre.cr entry point + version.cr
- Empty module dirs: cli, tui, engine, events, rotators, policy, audit, crypto, persistence, notifiers, compliance, config, domain, aws, vault, github, demo
- spec/ unit + integration + fixtures structure mirroring src/
- spec_helper.cr with stdlib spec + cre require
- GitHub Actions CI: format, unit matrix (Crystal 1.19/1.20/nightly x ubuntu/macos), integration with PG service, build job
2026-04-28 23:54:59 -04:00