mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-26 23:53:32 +00:00
Secrets: reject exec SecretRef traversal ids across schema/runtime/gateway (#42370)
* Secrets: harden exec SecretRef validation and reload LKG coverage * Tests: harden exec fast-exit stdin regression case * Tests: align lifecycle daemon test formatting with oxfmt 0.36
This commit is contained in:
@@ -8,6 +8,8 @@ import {
|
||||
import { encodeJsonPointerToken } from "../secrets/json-pointer.js";
|
||||
import { PROVIDER_ENV_VARS } from "../secrets/provider-env-vars.js";
|
||||
import {
|
||||
formatExecSecretRefIdValidationMessage,
|
||||
isValidExecSecretRefId,
|
||||
isValidFileSecretRefId,
|
||||
resolveDefaultSecretProviderAlias,
|
||||
} from "../secrets/ref-contract.js";
|
||||
@@ -238,6 +240,9 @@ export async function promptSecretRefForOnboarding(params: {
|
||||
) {
|
||||
return 'singleValue mode expects id "value".';
|
||||
}
|
||||
if (providerEntry.source === "exec" && !isValidExecSecretRefId(candidate)) {
|
||||
return formatExecSecretRefIdValidationMessage();
|
||||
}
|
||||
return undefined;
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user