fix(evidence): expect private Cloud source visibility at signing - #292
Merged
Conversation
_validate_verified_provenance required the GitHub signing certificate field sourceRepositoryVisibilityAtSigning to equal "public", but the repository it verifies against, CLOUD_REPOSITORY = "OpenAdaptAI/openadapt-cloud", is private and stays private: it is the proprietary hosted control plane, its acceptance workflow (.github/workflows/execute-live-acceptance.yml) lives there on main, and it runs on production-scoped secrets. A genuine attestation produced in that repository carries "private", so the check would have refused every real certificate once the private-export gate opened. The check is currently unreachable because import_files() refuses every import until an approved private-export contract exists, so no released behaviour changes. Expect "private" instead of "public", keep the comparison exact and fail-closed, and cover the drift explicitly so the gate cannot regress: the new parametrized case asserts a certificate signed in a public source repository is still refused. No other gate is relaxed. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
_validate_verified_provenancein scripts/import_production_acceptance.py required the GitHub signing-certificate fieldsourceRepositoryVisibilityAtSigningto equal"public".The repository it verifies against is
CLOUD_REPOSITORY = "OpenAdaptAI/openadapt-cloud", which is private:A real GitHub artifact attestation produced in a private repository carries
"private", so a genuine certificate would always have been refused.The path is currently unreachable:
import_files()refuses every import with"full admission/campaign import is pending an approved private-export contract", and it fails closed. No released behaviour changes. The defect had to be fixed before the private-export gate opens.Decision: option 1 — the workflow stays private
The acceptance workflow stays in the private
openadapt-cloudrepository, so the expected value becomes"private". Evidence for that reading:openadapt-cloudis the proprietary hosted control plane under the workspace source-availability boundary. Publishing it is out of the question, so option 2 would mean splitting the acceptance workflow out to a new public repository..github/workflows/execute-live-acceptance.ymlalready exists onopenadapt-cloudmainand oncodex/native-admission-cloud. It runs in theproductionenvironment on production-scoped secrets (bearer tokens, webhook signing secret, qualification IDs) and checks out the Cloud source to runscripts/execute-live-acceptance.mjs. That workflow cannot move to a public repository without exposing the production acceptance wiring.docs/eval_results/PRODUCTION_READINESS.mdalready states the verifier binds "the exactOpenAdaptAI/openadapt-cloudworkflow onrefs/heads/main".CLOUD_REPOSITORYandCLOUD_CERTIFICATE_IDENTITYtherefore stay as they are.The Cloud track can still object — the constants and the expected value are one line each — but nothing in the Cloud branch points toward a public host.
Changes
scripts/import_production_acceptance.py: expectedsourceRepositoryVisibilityAtSigningis now"private". The comparison stays exact and fail-closed; no other expected field, gate, or constant changed.tests/test_import_production_acceptance.py: the_verified_provenancefixture now carries"private", andtest_verifier_rejects_real_gh_certificate_policy_driftgains a case asserting that"public"is refused, so the gate cannot regress silently.docs/eval_results/PRODUCTION_READINESS.md: records why the verifier requires private visibility.Verification
tests/test_import_production_acceptance.py.sourceRepositoryVisibilityAtSigningentry fails the new drift case; restoring it passes. The test guards the gate rather than restating it.ruff check .passes.Follow-up for the Cloud track (not fixed here)
Two further items must be settled before the private-export gate opens. Neither is touched by this PR.
type: "Tlog"aturi: "https://rekor.sigstore.dev". Attestations from private repositories are not signed by the public-good Sigstore instance: GitHub uses its own internal Fulcio and its own timestamp authority in place of Rekor. A genuine private-repository attestation is therefore likely to fail this check too — the same class of defect as the one fixed here. Resolving it needs the exacttypeandurifrom a realgh attestation verify --format jsonrun againstopenadapt-cloud, so it is not guessed here.attest-build-provenancestep exists anywhere inopenadapt-cloud(search/codeforattest-build-provenancein that repository returns 0 hits). The Cloud workflow must be extended to sign the certificate bytes, withid-token: writeandattestations: write, before any of this verification path can run.🤖 Generated with Claude Code