mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-30 14:16:53 +00:00
SecretRef: harden custom/provider secret persistence and reuse (#42554)
* Models: gate custom provider keys by usable secret semantics * Config: project runtime writes onto source snapshot * Models: prevent stale apiKey preservation for marker-managed providers * Runner: strip SecretRef marker headers from resolved models * Secrets: scan active agent models.json path in audit * Config: guard runtime-source projection for unrelated configs * Extensions: fix onboarding type errors in CI * Tests: align setup helper account-enabled expectation * Secrets audit: harden models.json file reads * fix: harden SecretRef custom/provider secret persistence (#42554) (thanks @joshavant)
This commit is contained in:
committed by
Peter Steinberger
parent
20237358d9
commit
36d2ae2a22
@@ -21,6 +21,8 @@ const resolveAuthStorePathForDisplay = vi
|
||||
const resolveProfileUnusableUntilForDisplay = vi.fn().mockReturnValue(null);
|
||||
const resolveEnvApiKey = vi.fn().mockReturnValue(undefined);
|
||||
const resolveAwsSdkEnvVarName = vi.fn().mockReturnValue(undefined);
|
||||
const hasUsableCustomProviderApiKey = vi.fn().mockReturnValue(false);
|
||||
const resolveUsableCustomProviderApiKey = vi.fn().mockReturnValue(null);
|
||||
const getCustomProviderApiKey = vi.fn().mockReturnValue(undefined);
|
||||
const modelRegistryState = {
|
||||
models: [] as Array<Record<string, unknown>>,
|
||||
@@ -57,6 +59,8 @@ vi.mock("../agents/auth-profiles.js", () => ({
|
||||
vi.mock("../agents/model-auth.js", () => ({
|
||||
resolveEnvApiKey,
|
||||
resolveAwsSdkEnvVarName,
|
||||
hasUsableCustomProviderApiKey,
|
||||
resolveUsableCustomProviderApiKey,
|
||||
getCustomProviderApiKey,
|
||||
}));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user