← Back to Pull requests

sign-macos: add opt-in grpcurl notarization signing #1

Open
unknown opened this pull request with 316 lines diff across 3 files
View on GitHub
unknown unknown commented on Nov 03, 2026 22:22 UTC
Author

Summary

Apple's Notary API requires a JWT signed with the App Store Connect key. Add notarization-backend: signer-service to sign the existing JWT digest through signer-service; Azure remains the default.

Keep signer-service requests in notarize-release-macos.py. Validate Vault and KeyName on construction, preserve specific OIDC validation errors, and keep credential-sensitive details out of error output. Install astral-dev-toolchain-grpcurl==1.9.4 through the script’s PEP 723 dependencies and hash-locked wheels. A minimal proto defines the two required RPCs; no separate installer or action installation step is needed.

Require an exact Azure metadata key version, signer key ID, independent DER SPKI SHA-256 pin, and ES256 algorithm. Errors stop notarization without falling back to Azure. Preflight verifies metadata and public-key access without signing or submitting to Apple. JWT claims, ZIP creation, upload, polling, and acceptance handling are unchanged.

Stack

Stacked on Astral signing #52. This PR targets its branch in the fork so the diff contains only notarization. After #52 lands, submit this branch against upstream main.

Validation

  • Nine temporary offline checks passed, including ECDSA verification of the constructed JWT, key/SPKI/algorithm rejection, exact metadata checks, Azure defaults, OIDC audience and errors, credential redaction, no fallback, and read-only preflight.

  • AST comparison confirms JWT creation, Apple requests, upload/polling, and Azure request functions are unchanged by the simplification.

  • The minimal proto compiles and preserves the original field numbers/types, enum values, and RPC definitions.

  • The locked script environment installed successfully; packaged grpcurl 1.9.4 parsed both RPCs from the checked-in proto.

  • Ruff formatting/lint, CLI --help, and git diff --check passed. Existing dependency versions are unchanged.

  • No test files added; no live signing, Apple submission, or release workflow ran.
  • Before enabling

  • Verify Astral's Apple key/issuer tags, Azure metadata version, signer key ID, and independently sourced SPKI hash identify the same key.

  • Confirm the endpoint/OIDC audience, purpose/key binding, and workflow grants for both SIGN and GET_PUBLIC_KEYS.

  • Run a protected-runner rehearsal through Apple acceptance and native artifact verification before changing callers.
  • Codex Task: codex://threads/01a1a4df-2c51-7813-b5a2-1f668062fd0d

    -Banditbot

    Diff: 316 lines (+237 / -79) across 3 files Reviewer: zanieb Review duration: 2884m
    All Vouch review confidence checks passed
    Residual risk 0.22 = Change Risk (0.40) × (1 − Review Confidence (0.47)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.40 · 316 lines diff across 3 files
    0.40
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    46%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.345
    Shallow Review Depth shallow_review_depth
    0.344
    Real PR Conversation Timeline
    1 comments
    "Review active on #1"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 46.7% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 40.4% (MEDIUM) · Higher = larger blast radius
    40.4%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 46.7% · Lower = rushed or shallow review
    46.7%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 21.5% · Safe to merge
    21.5%