Skip to content

fix(secrets): recognize bare env-var name markers in models.json apiKeys - #121633

Closed
LiuwqGit wants to merge 6 commits into
openclaw:mainfrom
LiuwqGit:fix/issue-121543-secretref-models-json
Closed

LiuwqGit wants to merge 6 commits into
openclaw:mainfrom
LiuwqGit:fix/issue-121543-secretref-models-json

Conversation

@LiuwqGit

@LiuwqGit LiuwqGit commented Aug 10, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes #121543. Custom env SecretRefs (e.g. "${FACTCHAT_API_KEY}") are persisted in models.json as bare env-var names ("FACTCHAT_API_KEY"), but only known env markers (e.g. OPENAI_API_KEY) were recognized by the secrets audit — custom variables were misreported as plaintext (PLAINTEXT_FOUND).

Changes

  • src/agents/model-auth-markers.ts: add isBareEnvVarNameApiKeyMarker() that checks the same provider's config declares a matching env SecretRef. Uses normalizeProviderMapKeys (the generator's canonical key-winner rule) so audit provenance and models.json generation select the same provider entry — exact canonical spelling wins, otherwise the later alias wins. No parallel provider-key resolution path.
  • src/secrets/audit.ts: collectModelsJsonSecrets recognizes a bare env-var-name apiKey as a marker when the same provider's config has a matching env SecretRef. No runtime/auth-resolver change.

Evidence

Before fix (on main)

Ran runSecretsAudit with the exact issue #121543 scenario: openclaw.json configures "${FACTCHAT_API_KEY}" as env SecretRef; models.json regenerates with bare "FACTCHAT_API_KEY".

$ openclaw secrets audit --check
Status: findings
Findings: 1
  [PLAINTEXT_FOUND] warn providers.custom-factchat.apiKey: models.json provider apiKey is stored as plaintext.
Result: FAIL (still flagged)

After fix (this PR, commit 82c47a6)

Same scenario, same files:

$ openclaw secrets audit --check
Status: clean
Findings: 0
PASS: bare env-var marker suppressed

The bare env-var name "FACTCHAT_API_KEY" is now recognized as a marker because the same provider (custom-factchat) declares a matching env SecretRef in openclaw.json. No real secret values are exposed.

Boundary safety (test output)

✓ does not flag bare env-var name apiKey when the same provider declares a matching env SecretRef
✓ flags bare env-var name apiKey when a different provider owns the SecretRef (cross-provider)
✓ does not flag bare env-var name apiKey when config uses a mixed-case provider key (#121543)
✓ flags literal apiKey when a conflicting alias hides behind the same env SecretRef (#121543)
✓ flags arbitrary all-caps models.json apiKey values as plaintext (defensive)

CI status

  • check-dependencies (knip): ✅ pass (no unused exports)
  • check-test-types (tsgo): ✅ pass
  • check-lint (oxlint): ✅ pass (audit.ts 695 effective lines, under 700 limit)
  • PR context and evidence: ✅ pass
  • Critical Quality (core-auth-secrets): ✅ pass

Tests

File New tests What they cover
src/secrets/audit.test.ts +4 Same-provider match; cross-provider mismatch; mixed-case canonical match; conflicting-alias plaintext still flags
src/agents/models-config.providers.secrets.bedrock-apikey.test.ts +2 Write contract: env SecretRef → bare marker; non-env SecretRef → managed marker

Full suite: audit 33 ✓ | model-auth 164 ✓ | bedrock-apikey 12 ✓ | model-auth-markers 52 ✓ | auth-provenance 42 ✓

Review items addressed

  • ✅ P1 — Match audit provenance to generator key precedence: Uses normalizeProviderMapKeys (generator's canonical key-winner rule) so audit and generation select the same provider entry.
  • ✅ P1 — Do not reinterpret literal custom-provider keys: No runtime change; model-auth-provider-config.ts is unchanged.
  • ✅ P2 — Match audit suppression to the audited provider: isBareEnvVarNameApiKeyMarker requires the same providerId's config SecretRef.
  • ✅ P2 — Normalize the provider key before checking SecretRef provenance: Canonical key matching handles mixed-case/whitespace config keys.
  • ✅ P3 — Remove the duplicate unbacked-marker test: Removed; retained boundary tests.
  • ✅ Security — Avoid cross-provider/alias audit suppression: Cross-provider and conflicting-alias regression tests added.
  • ✅ Real behavior proof: Redacted runSecretsAudit CLI output above demonstrates before/after behavior.

Compatibility

Keeps the existing persisted format (bare env var name). No runtime behavior change. Only audit classification is narrowed.

@LiuwqGit
LiuwqGit requested a review from a team as a code owner August 10, 2026 15:13
@clawsweeper

clawsweeper Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@openclaw-barnacle openclaw-barnacle Bot added agents Agent runtime and tooling size: M triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence. labels Aug 10, 2026
@clawsweeper clawsweeper Bot added merge-risk: 🚨 auth-provider 🚨 May break OAuth, tokens, provider routing, model choice, or credentials. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P2 Normal backlog priority with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Aug 10, 2026
@clawsweeper

clawsweeper Bot commented Aug 10, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge. Reviewed August 12, 2026, 12:04 PM ET / 16:04 UTC.

ClawSweeper review

What this changes

The PR lets the secrets audit accept a generated bare environment-variable name only when the winning config entry for that provider has the same environment SecretRef.

Merge readiness

⚠️ Needs maintainer review before merge - 5 items remain

Keep open: current main still has the audit false positive, but this PR introduces a blocking runtime import cycle while fixing it.

Priority: P2
Reviewed head: 82c47a6a376fb59d783e81402735014e707c44ad

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The reported behavior has credible CLI proof, but a concrete architecture blocker remains.
Proof confidence 🐚 platinum hermit (4/6) Sufficient (terminal): The PR body provides redacted before/after CLI output for the current-head audit behavior; boundary test output supplements it.
Patch quality 🦐 gold shrimp (3/6) 2 actionable review findings remain.

Verification

Check Result Evidence
Real behavior Verified Sufficient (terminal): The PR body provides redacted before/after CLI output for the current-head audit behavior; boundary test output supplements it.
Evidence reviewed 5 items Current main still exposes the bug: Generation persists an env SecretRef as its bare id, while the audit flags any non-known marker as plaintext.
Generated-marker contract: Current tests preserve literal all-caps keys as plaintext unless they are known markers, requiring provenance-aware rather than blanket suppression.
PR introduces a runtime cycle: The PR head imports the provider-map normalizer into model-auth markers, while the merge module already value-imports isNonSecretApiKeyMarker from that marker module.
Findings 2 actionable findings [P1] Extract the provider-key normalizer from the marker/merge cycle
[P3] Correct the runtime-resolver claim in the new test comment
Security None None.

How this fits together

OpenClaw generates per-agent models.json from configured model providers, then the secrets audit scans it for persisted credentials. This change compares the generated marker with provider configuration provenance before deciding whether it is plaintext.

flowchart LR
  A[Provider config] --> B[Provider key winner]
  B --> C[Generated models.json]
  C --> D[Secrets audit]
  B --> E[SecretRef provenance]
  E --> D
  D --> F[Audit findings]
Loading

Before merge

  • Extract the provider-key normalizer from the marker/merge cycle (P1) - This import completes model-auth-markers → models-config.merge → model-auth-markers. The required cycle checker rejects runtime SCCs, so move the normalizer to a dependency-leaf module and import that from both callers.
  • Correct the runtime-resolver claim in the new test comment (P3) - The comment says a custom bare env name is resolved as an env reference, but this PR deliberately leaves runtime resolution unchanged: current runtime code treats an unrecognized custom bare name as a literal models.json key. Scope the comment to generated persistence and audit behavior.
  • Resolve merge risk (P1) - The new marker-to-merge runtime cycle fails the required import-cycle architecture check.
  • Resolve merge risk (P1) - GitHub reports this PR as dirty, so it needs a fresh mergeability check after the structural repair.
  • Complete next step (P2) - The two findings have a narrow mechanical repair without changing the intended audit boundary.

Findings

  • [P1] Extract the provider-key normalizer from the marker/merge cycle — src/agents/model-auth-markers.ts:16
  • [P3] Correct the runtime-resolver claim in the new test comment — src/agents/models-config.providers.secrets.bedrock-apikey.test.ts:207-208
Agent review details

Security

None.

PR surface

Source +27, Tests +158. Total +185 across 4 files.

View PR surface stats
Area Files Added Removed Net
Source 2 46 19 +27
Tests 2 158 0 +158
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 4 204 19 +185

Review metrics

Metric Value Why it matters
Production versus test LOC production +46/-19, tests +158/-0 The focused audit repair adds production logic, but the new cycle must be removed before the growth is acceptable.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #121543
Summary: This PR is the candidate repair for the open generated-marker audit false positive.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge-risk options

Maintainer options:

  1. Extract the shared provider-key helper (recommended)
    Move the winner-selection helper to a leaf module, retain canonical-key precedence, and rerun the cycle gate before merge.
Copy recommended automerge instruction
@clawsweeper automerge

Special instructions:
Extract the provider-key winner normalizer to a leaf module shared by marker, merge, and source-managed paths; retain exact-canonical-then-later-alias behavior and validate the import-cycle gate.

Technical review

Best possible solution:

Extract the provider-key winner normalizer into a dependency-leaf module shared by merge, source-managed projection, and audit provenance, then rebase and verify the exact head.

Do we have a high-confidence way to reproduce the issue?

Yes: current main writes an env SecretRef id to models.json, while the audit only accepts known marker names and flags custom bare names as plaintext.

Is this the best way to solve the issue?

No: sharing the generator’s precedence rule is right, but importing the merge module from the marker module creates a forbidden runtime cycle; a leaf helper is safer.

Full review comments:

  • [P1] Extract the provider-key normalizer from the marker/merge cycle — src/agents/model-auth-markers.ts:16
    This import completes model-auth-markers → models-config.merge → model-auth-markers. The required cycle checker rejects runtime SCCs, so move the normalizer to a dependency-leaf module and import that from both callers.
    Confidence: 0.99
  • [P3] Correct the runtime-resolver claim in the new test comment — src/agents/models-config.providers.secrets.bedrock-apikey.test.ts:207-208
    The comment says a custom bare env name is resolved as an env reference, but this PR deliberately leaves runtime resolution unchanged: current runtime code treats an unrecognized custom bare name as a literal models.json key. Scope the comment to generated persistence and audit behavior.
    Confidence: 0.98

Overall correctness: patch is incorrect
Overall confidence: 0.99

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 28a5889e9bd0.

Labels

Label changes:

  • add merge-risk: 🚨 automation: The introduced runtime cycle is caught by a required CI architecture check.
  • add proof: sufficient: Contributor real behavior proof is sufficient. The PR body provides redacted before/after CLI output for the current-head audit behavior; boundary test output supplements it.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🐚 platinum hermit and patch quality is 🦐 gold shrimp.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Sufficient (terminal): The PR body provides redacted before/after CLI output for the current-head audit behavior; boundary test output supplements it.
  • remove rating: 🦪 silver shellfish: Current PR rating is rating: 🦐 gold shrimp, so this older rating label is no longer current.
  • remove status: 📣 needs proof: Current PR status label is status: ⏳ waiting on author.

Label justifications:

  • P2: The PR corrects misleading secrets-audit output without changing credential resolution at runtime.
  • merge-risk: 🚨 security-boundary: The patch determines when a potentially literal API-key value is suppressed from a secrets audit.
  • merge-risk: 🚨 automation: The introduced runtime cycle is caught by a required CI architecture check.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🐚 platinum hermit and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Sufficient (terminal): The PR body provides redacted before/after CLI output for the current-head audit behavior; boundary test output supplements it.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body provides redacted before/after CLI output for the current-head audit behavior; boundary test output supplements it.

Evidence

Acceptance criteria:

  • [P1] node scripts/run-vitest.mjs src/secrets/audit.test.ts src/agents/models-config.merge.test.ts src/agents/models-config.runtime-source-snapshot.test.ts.
  • [P1] pnpm check:import-cycles.

What I checked:

Likely related people:

  • steipete: Recent merged work refactored both model-auth marker and secrets paths. (role: recent area contributor; confidence: high; commits: 4bf70be01a21, 19a98c873ce6; files: src/agents/model-auth-markers.ts, src/secrets/audit.ts)
  • joshavant: Introduced the models.json SecretRef persistence hardening underlying the generated-marker contract. (role: SecretRef persistence contributor; confidence: high; commits: 8e20dd22d890, 36d2ae2a2235; files: src/agents/models-config.providers.secret-helpers.ts)
  • pick-cat: Introduced the provider-map normalization behavior the audit must reuse. (role: provider-key precedence contributor; confidence: high; commits: 60040d86b23b; files: src/agents/models-config.merge.ts)
  • xydigit-sj: Introduced the existing known-marker audit exemption. (role: earlier secrets-audit contributor; confidence: medium; commits: 00c9ac55d664; files: src/secrets/audit.ts)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Extract the shared provider-key helper and rerun focused tests plus the import-cycle check.
  • Correct the test comment so it does not claim a runtime behavior the PR intentionally leaves unchanged.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (7 earlier review cycles)
  • reviewed 2026-08-10T17:02:13.326Z sha 55d5f1230a85570a7e38558fae68fbb8a6b50699 :: needs real behavior proof before merge. :: [P1] Do not reinterpret literal custom-provider keys | [P2] Match audit suppression to the audited provider
  • reviewed 2026-08-11T03:05:20.237Z sha 589d74f :: needs real behavior proof before merge. :: [P2] Normalize the provider key before checking SecretRef provenance
  • reviewed 2026-08-11T07:00:04.568Z sha 2d53036 :: needs changes before merge. :: [P2] Resolve provenance through the canonical provider merger | [P3] Remove the duplicate unbacked-marker test
  • reviewed 2026-08-11T09:12:37.208Z sha bb98cb55f988382c5490b84d9a897fea1df7ff6e :: needs maintainer review before merge. :: none
  • reviewed 2026-08-11T10:05:29.284Z sha bb98cb55f988382c5490b84d9a897fea1df7ff6e :: found issues before merge. :: [P1] Preserve generated provider-key collision precedence
  • reviewed 2026-08-11T12:17:04.249Z sha 6787cf9287e89bb2792dd51e074f33014c4d625a :: found issues before merge. :: [P1] Match audit provenance to generator key precedence
  • reviewed 2026-08-12T14:02:46.404Z sha a745432 :: needs real behavior proof before merge. :: [P1] Match audit provenance to the generator’s alias winner

@LiuwqGit

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Command router queued. I will update this comment with the next step.

Custom env SecretRefs (e.g. "${FACTCHAT_API_KEY}") are persisted in
models.json as bare env-var names ("FACTCHAT_API_KEY"), but the secrets
audit only recognized known env markers, so custom variables were
misreported as plaintext and the runtime resolver treated the name itself
as a literal key.

Recognize bare env-var name markers in collectModelsJsonSecrets when they
are backed by an env value or a matching env SecretRef in openclaw.json,
and resolve them from the environment in resolveUsableCustomProviderApiKey
instead of returning the name as a literal credential. Unbacked all-caps
strings still surface as plaintext.

Closes openclaw#121543
…e change

Address ClawSweeper review findings (P1 + P2):

P1 — Revert model-auth-provider-config.ts runtime branch:
  resolveUsableCustomProviderApiKey receives canonical config, not
  models.json. The bare env-var name shape check would have turned
  existing literal all-caps keys into ambient environment credentials,
  breaking the literal-key contract.

P2 — Narrow audit suppression to the audited provider:
  isBareEnvVarNameApiKeyMarker now requires the same providerId's
  canonical config to declare a matching env SecretRef. A literal key
  in one models.json provider is no longer hidden when a different
  provider uses that env id (cross-provider regression test added).

Also fixes check-dependencies: remove unused BARE_ENV_VAR_NAME_RE export.
Move isBareEnvVarNameApiKeyMarker to model-auth-markers.ts so audit.ts
stays under the 700 effective-line lint limit. The helper now resolves
the provider's canonical config SecretRef internally, keeping the audit
call site to a single expression.

No behavior change.
@LiuwqGit
LiuwqGit force-pushed the fix/issue-121543-secretref-models-json branch from 36eec3a to 589d74f Compare August 11, 2026 02:28
@LiuwqGit

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Command router queued. I will update this comment with the next step.

@LiuwqGit

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 11, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@openclaw-barnacle openclaw-barnacle Bot removed the triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence. label Aug 11, 2026
@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 auth-provider 🚨 May break OAuth, tokens, provider routing, model choice, or credentials. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. labels Aug 11, 2026
@clawsweeper clawsweeper Bot added status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Aug 11, 2026
@LiuwqGit
LiuwqGit force-pushed the fix/issue-121543-secretref-models-json branch 2 times, most recently from 9a0b985 to 6787cf9 Compare August 11, 2026 11:44
Address ClawSweeper P2+P3 findings:

P2 — Replace the custom resolveProviderEntry with the existing
resolveMergedModelProviderConfig() so duplicate-whitespace provider
keys are merged correctly (e.g. "custom" literal + " custom " env
SecretRef → generation emits ENV, lookup now reads the merged entry
with the SecretRef, not the literal). This also removes the parallel
provider-key resolution path.

P3 — Remove the duplicate unbacked-marker test ("still flags bare
all-caps apiKey when no config SecretRef matches") that reasserts the
existing arbitrary-all-caps case without exercising the new provenance
path. Same-provider, cross-provider, and mixed-case boundary tests are
retained.

Also reduces audit.ts to 700 effective lines to satisfy max-lines.
@LiuwqGit
LiuwqGit force-pushed the fix/issue-121543-secretref-models-json branch from 6787cf9 to a745432 Compare August 12, 2026 13:31
@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. and removed proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Aug 12, 2026
Address ClawSweeper P1 finding: resolveMergedModelProviderConfig selects
the first normalized provider entry, but models.json generation gives
exact canonical spelling priority and otherwise keeps the later alias.
This mismatch could suppress a real plaintext finding when conflicting
aliases use the same normalized key.

Use normalizeProviderMapKeys (the generator's canonical key-winner rule)
so audit provenance and models.json generation select the same provider
entry. Add a conflicting-alias regression test.

Also reduces audit.ts to 695 effective lines (under the 700 limit) by
merging consecutive continue guards.
@LiuwqGit

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 12, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Aug 12, 2026
@vincentkoc vincentkoc self-assigned this Aug 12, 2026
@vincentkoc vincentkoc added close:superseded PR close reason dedupe:child Duplicate issue/PR child in dedupe cluster labels Aug 12, 2026
@vincentkoc

Copy link
Copy Markdown
Member

Thanks @LiuwqGit. Closing this pull request as superseded by the earlier canonical repair at #121578 for #121543.

Both branches take the correct audit-side approach, but this exact head introduces the runtime import cycle model-auth-markers -> models-config.merge -> model-auth-markers and currently conflicts with main. The canonical branch keeps the ownership check inside the secrets-audit surface and retains the model-provider-only security boundary.

Important: nothing from this cluster has landed yet. #121578 remains open and still needs reconciliation against current main, exact-head security review, and normal landing gates. That reconciliation must preserve the provider-alias winner regression developed here: exact canonical spelling wins, otherwise the later alias wins, without recreating the import cycle. #121543 remains open until a fix lands.

Thank you for the repeated review iterations and the alias-precedence hardening. If the canonical branch is abandoned, this thread can be revisited.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling close:superseded PR close reason dedupe:child Duplicate issue/PR child in dedupe cluster merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: M status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: models.json regenerates with unresolved SecretRef as bare literal string instead of ${VAR}/object

2 participants