chore(ci): add fork-side SSO audit script + workflow#19
Conversation
Adds a per-fork deterministic audit. Mirrors Pressingly/plane#32, Pressingly/twenty#9, Pressingly/outline#20. Rows covered: 14 — SPA logout (frontend/src/app/main/data/auth.cljs) MUST NOT call /oauth2/sign_out 20 — backend/src/app/http/auth_request.clj MUST contain BOTH `session/delete-fn` (drop+expire path for unresolvable mismatch) AND `create-session!` (re-key path for resolvable mismatch). SECURITY-CRITICAL. 21 — No polynomial-backtracking email-shape regex Local dry-run on foss-main: row 14 ✅, row 20 ❌ (no session/delete-fn yet), row 21 ✅. Waiting for #18 to introduce session/delete-fn on the unresolvable-mismatch path. When #18 merges, the audit goes green. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Penpot SSO Fork AuditCross-app contract: https://github.com/awais786/sso-rules-moneta/blob/main/openspec/specs/proxy-auth-middleware/spec.md
1 violations. Security-critical (row 20): 1. |
There was a problem hiding this comment.
Pull request overview
Adds a CI-side audit script and GitHub Actions workflow that statically verify Penpot's source tree against the cross-app SSO contract (rows 14, 20, 21 of the openspec table). The audit is intended to catch regressions in the SPA logout shape, the session-identity reconciliation in wrap-authz (which is introduced in companion PR #18), and the reintroduction of polynomial-backtracking email regex.
Changes:
- New
scripts/sso-audit.shperforming three grep-based invariant checks againstauth_request.cljandauth.cljs, exiting non-zero only on the security-critical row 20 failure. - New
.github/workflows/sso-audit.ymlrunning the script on PRs touching auth code, on push tofoss-main, weekly, and on dispatch — publishing results to the job summary and a sticky PR comment.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| scripts/sso-audit.sh | Bash audit script implementing the three fork-side spec checks and printing a markdown status table. |
| .github/workflows/sso-audit.yml | Workflow that invokes the script, surfaces results to the step summary and a sticky PR comment, and fails on security-critical violations. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Scope `pull-requests: write` to the job, not the whole workflow — the audit step itself only needs `contents: read`. Bump actions/checkout to @v5 to match the convention used in Pressingly/outline. Same hardening Pressingly/plane and Pressingly/outline received during Copilot review; applied preemptively here for consistency. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Closing: fork-side audit tooling not needed on this fork. The audit is being maintained in sso-rules-moneta instead, which is the single source of truth across all forks. |
Summary
Per-fork SSO contract audit in CI. Mirrors Pressingly/plane#32, Pressingly/twenty#9, Pressingly/outline#20.
Checks
frontend/src/app/main/data/auth.cljs/oauth2/sign_outbackend/src/app/http/auth_request.cljsession/delete-fn(drop+expire path) ANDcreate-session!(re-key path)Spec source:
sso-rules-moneta/openspec/specs/proxy-auth-middleware/spec.md.Current state
Local dry-run on
foss-main: row 20 ❌ —auth_request.cljdoesn't have thesession/delete-fncall yet. PR #18 introduces it. When #18 merges, the audit goes green.To unblock this PR, rebase onto
fix/proxy-auth-stale-session-on-user-switch.🤖 Generated with Claude Code