Skip to content

SCA-2284: exempt generated API types and add David as UI approver - #25315

Merged
Git-on-my-level merged 1 commit into
mainfrom
agent/m1-studio-codex-sol/d44b4e3120b8
Nov 14, 2026
Merged

Git-on-my-level merged 1 commit into
mainfrom
agent/m1-studio-codex-sol/d44b4e3120b8

Conversation

@Git-on-my-level

@Git-on-my-level Git-on-my-level commented Nov 14, 2026 •

Copy link
Copy Markdown
Member

Updates the account-scoped UI approval policy requested by David. The five exact outputs of the TypeScript and Swift OpenAPI generators no longer count as UI; the Swift output also skips immutable source inspection. Real UI files, including other generated Swift files and renamed UI, remain gated.

Nik (43514161) and David (9387252, Git-on-my-level) can issue current-head /approve-ui <sha> and /reject-ui <sha> commands. The newest matching command wins. Incomplete-evidence failures, same-head multi-PR reconciliation, the bot marker comment, and workflow triggers/permissions are preserved. The check manifest's rationale reflects the new policy; its registration and CI budget are unchanged.

Consequence

9387252 is also ACTOR_ID, the account this gate checks, and coding agents push and comment as that account. After this change, a comment from that account can approve that account's own UI changes. The gate will no longer separate “an agent working as David” from “David”.

Verification

  • node --test .github/scripts/tests/ui-author-approval.test.cjs: 18 tests pass, covering generated-only diffs, mixed UI diffs, real web UI, both approvers, stale SHAs, revocation, ignored third accounts, Swift inspection/rename boundaries, and existing fail-closed behavior.
  • make preflight: passed all 14 selected checks.
  • Post-commit scripts/pr-preflight --pr-body-file ../pr-body.md: passed all 14 selected checks and PR metadata validation.
  • CI Hygiene: passed at 2e757e18f29a062b7540450ec37f9642a75486dc; logs confirm all 18 gate tests and all 14 preflight checks pass. Other CI jobs were still running when this evidence was collected.
  • After merge, verify “UI author approval” succeeds without approval on feat(sync): end-of-recording proof lets notes start without the quiet wait (server) [SCA-2344] #25309 once it targets main; record its then-current head SHA.

Product invariants affected

none

Tracks SCA-2284.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-14T18:26:31.183145Z 2e757e1 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agentic security review found two issues in the UI-author-approval gate: self-approval by the gated GitHub identity, and skipping Swift UI inspection for the generated OpenAPI client.

Open in Web View Automation 

Sent by Cursor Security Agent: Security Reviewer

// Account-scoped UI approval. All inputs are API data, never executable PR code.
const ACTOR_ID = 9387252; // Git-on-my-level, stable across login renames.
const NIK_ID = 43514161;
const APPROVER_IDS = new Set([NIK_ID, ACTOR_ID]);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔒 Agentic Security Review
Severity: HIGH

APPROVER_IDS now includes ACTOR_ID, the same GitHub account this gate is meant to constrain. Coding agents already push and comment as that account, so an agent-authored UI change can be cleared by that same identity posting /approve-ui with the current head SHA. That removes the previous Nik-only split between the gated principal and the approver.

Impact: Unreviewed UI from this account can satisfy the required UI author approval check without an independent human commenter.

Fix in Cursor Fix in Web

Reviewed by Cursor Security Reviewer for commit 2e757e1. Configure here.

for (const file of first.files) {
for (const path of new Set([file.filename,file.previous_filename].filter(Boolean))) {
if (!/^desktop\/macos\/.*\.swift$/.test(path)) continue;
if (GENERATED_API_FILES.has(path) || !/^desktop\/macos\/.*\.swift$/.test(path)) continue;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔒 Agentic Security Review
Severity: MEDIUM

The generated Swift OpenAPI client is now skipped by the immutable source inspection that exists to catch SwiftUI/AppKit UI in arbitrarily named files. isUI() also does not treat this path as UI by name, and tests assert that import SwiftUI here succeeds with no content fetch and no approval.

Impact: UI declarations can live only in this exempt file and still compile in the macOS module without triggering /approve-ui.

Fix in Cursor Fix in Web

Reviewed by Cursor Security Reviewer for commit 2e757e1. Configure here.

@Git-on-my-level
Git-on-my-level merged commit 2d59f75 into main Nov 14, 2026
69 of 70 checks passed
@Git-on-my-level
Git-on-my-level deleted the agent/m1-studio-codex-sol/d44b4e3120b8 branch November 14, 2026 23:33
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.

1 participant