Skip to content

feat(runtime): bound GitHub issuer and JWKS verification - #50

Merged
brettheap merged 5 commits into
mainfrom
017-bounded-issuer-jwks
Nov 12, 2026
Merged

brettheap merged 5 commits into
mainfrom
017-bounded-issuer-jwks

Conversation

@brettheap

@brettheap brettheap commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Add an opt-in GitHub issuer/JWKS source for the accepted workload verifier. Trusted embeddings previously supplied an offline snapshot; this source obtains bounded fresh public metadata and delegates signature/claim verification to the unchanged core. Existing offline entrypoints remain unchanged.

The source fixes issuer/discovery/JWKS locations, verifies TLS chain/hostname, excludes redirects and ambient proxy/CA/keylog/credential inputs, bounds connection/shared-fetch deadlines and response/key sizes, coalesces/throttles refresh, replaces rotated snapshots and refuses stale fallback. One issuer source is shared across its audience-specific verifiers. It validates up to 64 external entries and projects only the selected eligible RSA key into the unchanged core API. Fresh time and generation checks surround I/O and crypto. The short-lived helper receives only fixed endpoint selectors and CA references; its HTTP request paths are literals. It is killed/reaped on timeout or interruption. OS process creation/scheduling remains a trusted-host boundary, not a hard realtime guarantee.

Authority: Brett Heap ratified opensoft/openXfactory#1307 at 04fad0559 with #49 at 0a2dda9, commissioning this slice after all three preparation PRs landed, including codeXfactory/codeXfactory#582. Feature 017 T003 is complete. Only its issuer/audience/transport/clock constructor fragment is supplied; full T002 operational/source/protection binding and all remaining runtime/live/human tasks stay pending. There is no neutral schema, dependency/pin/workflow change, signing service, protected dispatch, consumer lock, release or human assurance.

Validation: 569 full-suite tests passed, including 113 issuer tests and seven existing selected-owning-source integrations, with zero failures/errors/skips. Both pin verifiers, syntax, plain/strict validators and all five canonical verified OpenSpec items pass. Actual loopback TLS and injected real-RSA cases cover trust, claims, deadlines, cache/rotation/races, malformed/truncated responses, zero-padded/overflowing freshness and helper cleanup. No public issuer or provider credential is used.

The local expert panel found two P2 issues; both were reproduced, corrected, regression-tested and independently closed. Hosted Sonar follow-up made the fixed endpoint boundary literal and reduced complexity without waivers or exclusions. At published head 7c6c113, all runnable hosted checks pass. Hosted Sonar quality gate is OK with zero open issues and no waiver or exclusion. The general hosted suite passed 566 tests with three existing shallow-history skips; the dedicated full-history carve and neutrality/pruning suites passed 84 and 60 tests respectively. The neutrality comparator reports IDENTICAL; its informational mirrored-child test failure is also present in preparation PR #49 and is separate from the passing dedicated suite. Tested source/tests at 5cef834 are unchanged by the final receipt-only commit. Full JUnit SHA-256: c41d8ce636295e347ef12eb14fe19dc0030dff1a3d4ab521164352c0640a4f6d. Independent readback found no attributable helper/fixture process, and owned key/state temporary roots were removed.

Rollback keeps the existing offline verifier selected; this PR activates no runtime. GitHub Codex review is requested separately; quota refusal is not approval. Feedback remains deferred; neither historical blocked write was replayed.

@brettheap

Copy link
Copy Markdown
Contributor Author

@codex review

@sourcery-ai

sourcery-ai Bot commented Nov 12, 2026

Copy link
Copy Markdown

Sorry @brettheap, you've used your own review budget of 250,000 diff characters for the last 7 days.

You can request another review in 2 days and 17 hours by commenting @sourcery-ai review. Upgrade to get a review now.

@chatgpt-codex-connector

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

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

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

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-12T20:12:31.978653Z
We couldn’t complete this review. Comment @codex review to try again.
7c6c113 Manual request
ℹ️ 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.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@sourcery-ai

sourcery-ai Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

Reviewer's Guide

API

Expose the opt-in issuer verifier, key source, fixed issuer constants, transport protocol and response type for trusted embeddings.

  • scripts/workload_factory_binding_runtime/__init__.py L1-4
  • scripts/workload_factory_binding_runtime/issuer.py L169-298
  • scripts/workload_factory_binding_runtime/transport.py L1-38

Implementation

Implement fixed-endpoint HTTPS acquisition in an isolated helper, with verified TLS, bounded framing and deadlines, safe process cleanup, and freshness, rotation, coalescing and verification checks.

  • scripts/workload_factory_binding_runtime/_https_worker.py L1-135
  • scripts/workload_factory_binding_runtime/issuer.py L1-168
  • scripts/workload_factory_binding_runtime/transport.py L39-82

Documentation

Record the ratified issuer-only commission, implementation scope, validation evidence, remaining gates and usage boundary across the feature artifacts.

  • AGENTS.md L15-23
  • specs/017-protected-runtime-qualification/analysis.md L3, L22-26
  • specs/017-protected-runtime-qualification/evidence.md L1-6, L39-182
  • specs/017-protected-runtime-qualification/operational-inputs.md L7-10
  • specs/017-protected-runtime-qualification/plan.md L5, L17-22
  • specs/017-protected-runtime-qualification/quickstart.md L1-47, L53-54
  • specs/017-protected-runtime-qualification/research.md L3-14
  • specs/017-protected-runtime-qualification/spec.md L5-13
  • specs/017-protected-runtime-qualification/tasks.md L3-5, L14-19

Tests

Exercise issuer verification and transport behavior with synthetic issuer data, real RSA signatures and isolated loopback TLS, including freshness, concurrency, failure and cleanup cases.

  • tests/runtime_binding/__init__.py L1
  • tests/runtime_binding/conftest.py L1-66
  • tests/runtime_binding/test_https.py L1-262
  • tests/runtime_binding/test_issuer.py L1-231
  • tests/runtime_binding/test_issuer_edges.py L1-196

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@brettheap

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@sonarqubecloud

Copy link
Copy Markdown

@brettheap
brettheap merged commit 75b88ea into main Nov 12, 2026
11 checks passed
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