Skip to content

security(ci): minimize public conformance artifacts and mask API token - #127

Merged
mark-e-deyoung merged 18 commits into
mainfrom
security/minimize-conformance-public-results-20261023
Nov 5, 2026
Merged

mark-e-deyoung merged 18 commits into
mainfrom
security/minimize-conformance-public-results-20261023

Conversation

@mark-e-deyoung

Copy link
Copy Markdown
Collaborator

Purpose

Stop uncontrolled public upload of raw conformance failure text and runner identity, without modifying the shared winebot-contracts test contract or hiding failures from job-local diagnosis.

An exact public run 39853196592 uploaded conformance-results.json with environment.hostname and full pytest longrepr failure messages (including runtime response bodies/window titles). The CI workflow also printed a prefix of the API token into the job summary. These are unreviewed publication surfaces under private security authority agent-dispatch-private#515. This is not evidence of actual sovereign hostname disclosure or recovered token.

Narrow change

  • Fail-closed scripts/ci/sanitize-conformance-results.py converts the job-local structured report into an allowlisted public summary with validated integer counts and only fixed-format static test identifiers; all arbitrary failure strings, platform/host/environment, free-form attributes and unknown test names are omitted/redacted.
  • In both ci.yml and release.yml, run the projector after the conformance attempt; upload only conformance-summary-public.json when projection succeeds. Missing/oversized/inconsistent raw input prevents an upload.
  • Require nonempty conformance API token and GitHub log-mask it before writing the step output. Remove the CI summary token-prefix printout.
  • Add adversarial tests proving secret/hostname-bearing response values are absent, parameterized IDs are redacted, invalid counts/missing sources fail closed, and no public artifact is emitted on validation failure.

Caveats: the pytest console log may still print failure response bodies and must be audited separately; historical raw artifacts remain retained. This does not change runtime API, legacy/vNext conformance predicates, or the full-suite release gate. The shared contract runner still produces its original raw report job-locally.

Exact-head validation

Gate

Security #515 controls acceptance; production publication/release, historical disclosure clearance, credential decisions, merges and branch cleanup remain separately gated. Retain draft until independently qualified.

Copy link
Copy Markdown
Collaborator Author

2026-10-23 artifact-falsification correction and current head

At the earlier integrated RDTE #128 head cfa2fc821b8b2f3431e551a1a6c454a1ce687c83, the public conformance upload from run 39947577372 was independently downloaded and inspected as a ZIP (artifact 12499421195; SHA-256 3ec6008469468feb47eb338a4f5bcb4c5688a965dbb2011b3a467ff84dfb5e01). It contains exactly conformance-summary-public.json with only the expected keys schema, summary, failed_tests, and note. The existing v1 test counts remain 54 passed, 8 failed, 9 skipped. No raw failure message, Python environment, or runtime hostname field was included. This directly confirms the projection/containment, not overall public disclosure clearance.

Falsification finding: all eight legitimate failed-test IDs were unnecessarily rendered redacted, because pytest actually emits basename-only node IDs (e.g. test_automation.py::TestWindows::test_windows_has_count). The former allowlist accepted only prefixed paths. This was not a data leak, but it reduced diagnostic utility.

Corrective implementation now on THIS draft #127 (exact head 4a92311016c9315f171a4f423a9f916ac8c02abb):

  • accept known/static basename-only pytest IDs while still redacting parameterized, unrecognized or arbitrarily annotated names; add an explicit regression case;
  • add --tb=no --show-capture=no to the public CI and release test commands to avoid echoing raw traceback/response bodies into public job logs (full longrepr remains in job-local source report);
  • add workflow tests that reject raw-artifact paths, failed sanitization uploads, token-prefix printing, or loss of these public log flags.

The prior RDTE run does not qualify this newer head; retain draft until a later exact-head integrated run verifies both the safe diagnostic filenames and the no-raw-log behavior. The independent broader #515 security audit still owns approval. No merge, historical deletion or production publication performed by this comment.

Copy link
Copy Markdown
Collaborator Author

Terminal security-containment qualification and source-exact merge admission

Current candidate 629f54c88b8b28a9d0392474577e42a49ead8b47 was reconciled against accepted default main 43a0be7c14efed705f3a2fd408ede684657d0fdb by non-force fast-forward while retaining previous source ancestry; GitHub compare: seven intended public workflow/test paths, 0 behind. Defensive scope only:

  • Raw conformance failure/environment/response contents stay job-local; public projector outputs validated integer counts and fixed redacted placeholders, never arbitrary test names or runtime strings.
  • Conformance raw pytest console is redirected to a job-local file, API token is checked for a bounded single-line safe format, log-masked, and no token prefix enters the Actions summary. The report's unsafe upload step is replaced by a projection-success-only public-summary artifact.
  • BuildKit record suppression stays intact. Generated trust-pack publication is now release-only + explicit WINEBOT_PUBLIC_TRUST_PACK_ENABLED=true opt-in; normal PR/push and smoke runs no longer publish it. Generating/validating evidence job-locally remains possible.
  • Neither change affects release/conformance PASS requirements, RPC behavior, user data source, runtime, image pin, native WinInspect version, or private-source disclosure.

Exact-head public proof: redaction/evidence 42023259500 13 PASS, BuildKit 42023259484 SUCCESS, provenance 42023259601 SUCCESS; each 0 uploaded artifacts. Earlier redaction tests first failed on fixed metadata note, corrected rather than weakening assertion; 13/13 accepted. Broad CI 42023259790: lint PASS, unit-image stage FAILED on unchanged WinInspect v0.4.0 checksum before tests, smoke/conformance skipped, 0 artifacts. Next independent package pin #124 addresses that only; no false full CI green claim.

Disposition: admit this narrow protective source change for squash merge. Security owner scope for historical artifacts, ordinary job logs, trust-pack release-content approval and broader public surfaces stays OPEN. This merge does not enable WINEBOT_PUBLIC_TRUST_PACK_ENABLED, alter release publication or deploy an image.

@mark-e-deyoung
mark-e-deyoung marked this pull request as ready for review November 5, 2026 12:02
@mark-e-deyoung
mark-e-deyoung merged commit c0b7b51 into main Nov 5, 2026
5 of 6 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