tests: fix detect-secrets false positives (#39084)

* Tests: rename gateway status env token fixture

* Tests: allowlist feishu onboarding fixtures

* Tests: allowlist Google Chat private key fixture

* Docs: allowlist Brave API key example

* Tests: allowlist pairing password env fixtures

* Chore: refresh detect-secrets baseline
This commit is contained in:
Vincent Koc
2026-03-07 13:21:29 -05:00
committed by GitHub
parent 3acf46ed45
commit f966dde476
6 changed files with 20 additions and 20 deletions

View File

@@ -149,7 +149,7 @@ function makeRemoteGatewayConfig(url: string, token = "rtok", localToken = "ltok
};
}
function mockLocalTokenSecretRefConfig(secretId = "MISSING_GATEWAY_TOKEN") {
function mockLocalTokenEnvRefConfig(envTokenId = "MISSING_GATEWAY_TOKEN") {
loadConfig.mockReturnValueOnce({
secrets: {
providers: {
@@ -160,7 +160,7 @@ function mockLocalTokenSecretRefConfig(secretId = "MISSING_GATEWAY_TOKEN") {
mode: "local",
auth: {
mode: "token",
token: { source: "env", provider: "default", id: secretId },
token: { source: "env", provider: "default", id: envTokenId },
},
},
} as unknown as ReturnType<typeof loadConfig>);
@@ -204,7 +204,7 @@ describe("gateway-status command", () => {
it("surfaces unresolved SecretRef auth diagnostics in warnings", async () => {
const { runtime, runtimeLogs, runtimeErrors } = createRuntimeCapture();
await withEnvAsync({ MISSING_GATEWAY_TOKEN: undefined }, async () => {
mockLocalTokenSecretRefConfig();
mockLocalTokenEnvRefConfig();
await runGatewayStatus(runtime, { timeout: "1000", json: true });
});
@@ -232,7 +232,7 @@ describe("gateway-status command", () => {
MISSING_GATEWAY_TOKEN: undefined,
},
async () => {
mockLocalTokenSecretRefConfig();
mockLocalTokenEnvRefConfig();
await runGatewayStatus(runtime, { timeout: "1000", json: true });
},

View File

@@ -72,7 +72,7 @@ describe("pairing setup code", () => {
},
{
env: {
GW_PASSWORD: "resolved-password",
GW_PASSWORD: "resolved-password", // pragma: allowlist secret
},
},
);
@@ -104,7 +104,7 @@ describe("pairing setup code", () => {
},
{
env: {
OPENCLAW_GATEWAY_PASSWORD: "password-from-env",
OPENCLAW_GATEWAY_PASSWORD: "password-from-env", // pragma: allowlist secret
},
},
);
@@ -221,7 +221,7 @@ describe("pairing setup code", () => {
},
{
env: {
OPENCLAW_GATEWAY_PASSWORD: "password-from-env",
OPENCLAW_GATEWAY_PASSWORD: "password-from-env", // pragma: allowlist secret
},
},
);
@@ -275,7 +275,7 @@ describe("pairing setup code", () => {
{
env: {
GW_TOKEN: "resolved-token",
GW_PASSWORD: "resolved-password",
GW_PASSWORD: "resolved-password", // pragma: allowlist secret
},
},
),
@@ -302,7 +302,7 @@ describe("pairing setup code", () => {
},
{
env: {
GW_PASSWORD: "resolved-password",
GW_PASSWORD: "resolved-password", // pragma: allowlist secret
},
},
),