Skip to content

fix(artifacts): reject escaped credentials without changing completion policy - #1301

Merged
aviggiano merged 3 commits into
unstablefrom
codex/fix-1217-secret-publication
Oct 15, 2026
Merged

aviggiano merged 3 commits into
unstablefrom
codex/fix-1217-secret-publication

Conversation

@aviggiano

@aviggiano aviggiano commented Oct 14, 2026 •

Copy link
Copy Markdown
Collaborator

Configured credentials containing JSON escape characters could pass the publication gate and appear in reports. This extracts the security fixes from #1291 while preserving the existing campaign completion policy.

The gate scans decoded JSON values with field boundaries intact, includes configured credential names from the run, and keeps a secret-rejected report unavailable after its credential is rotated or unset. A failed final-report verifier still fails the campaign; the proposed success-with-withheld-report behavior is separated into its own PR.

Validation: artifact tests (336 passing), publication/unverified-report/final-report support tests (87 passing), focused generated-verifier tests (5 passing), runtime build and test compilation, strict ESLint, and formatting. Focused synchronization regressions cover rejection, credential rotation, and retry recovery.

Closes #1217. Replaces the security portion of #1291; original implementation commits retain their authorship.

The independent completion-policy proposal is isolated in draft #1302.

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge, with no actionable issues found.

Summary

This PR extends publication checks to decoded JSON strings and common escaped forms of configured credentials. It also records final-report secret rejections so unchecked reads cannot expose the rejected draft after a credential changes.

  • Artifact checks catch credentials hidden by JSON and common text escapes.
  • A final report rejected for secrets stays unavailable until retry.

No actionable issues were found. The review checked source and regression tests; tests were not run.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Agent output] --> B[Check bytes and decoded JSON strings]
  B --> C{Secret found?}
  C -->|No| D[Publish verified output]
  C -->|Final report rejected| E[Save rejection reason]
  E --> F[Keep unchecked draft unavailable]
  F --> G[Operator retries report task]
  G --> A
Loading

Reviews (1) · Last reviewed commit: "fix(runtime): preserve completion policy..." · Reviewed by Greptile

thankyou and others added 3 commits October 14, 2026 19:41
…ld a rejected report (#1217)

The artifact secret gate matched configured credentials byte for byte, so a
value holding a quote, a backslash, a tab or a line break never matched the
JSON that escapes it, and a verified report could publish it. The gate now
also scans a JSON publication's decoded strings, joined by NUL so adjacent
fields never form one phrase. Configured values are also found
percent-encoded, with Markdown backslash escapes, or broken across lines.

The verifier, synchronization and the rejected-report check now match every
credential an agent can see: the configured api_key_env variables and the
allowlisted variables that hold a credential, not only names like *_API_KEY.
The value of ULTRAFUZZ_PROVIDER_CREDENTIAL_ENV_NAMES, a list of names, is no
longer treated as a credential. The Modal public bundle, eval diagnostics and
recovery lifecycle checks reuse the same scan.

A final report the gate rejects is withheld instead of failing the run: the
report verifier tolerates failure in the engine, the failure records
reason_code ARTIFACT_SECRET_GATE_REJECTED, the run ends succeeded when
everything else did, status reports report-withheld-secret, and
`resume --retry-failed` regenerates the report. Any other report
verification failure, and a withheld report under --require-complete, still
fail the run.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ped escaped credentials (#1217)

Review follow-up:
- The unchecked report fallback rescanned a rejected draft against the
  current environment, so once the credential it matched was unset or
  rotated, `ultrafuzz report` could publish the withheld draft. A report
  attempt whose failure records ARTIFACT_SECRET_GATE_REJECTED now stays
  unavailable until a fresh attempt replaces it.
- The line-break check compared a configured value only against the
  Markdown-unescaped text, which had already lost the value's own
  backslash. The text as written is now checked too.
- The compileSmithersWorkflow continueOnFail count expects the report
  verifier's own continue policy.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@aviggiano
aviggiano requested a review from a team as a code owner October 14, 2026 19:41
@aviggiano
aviggiano merged commit 87325e0 into unstable Oct 15, 2026
17 checks passed
@aviggiano
aviggiano deleted the codex/fix-1217-secret-publication branch October 15, 2026 00:09
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.

Verifier secret gate misses configured credentials that contain JSON-escaped characters

1 participant