Skip to content

Commit 15fd1b3

Browse files
committed
test(claude): shorten the dotenv fixture key so privacy:scan stays green
The #701 fixtures used sk-ant-from-project-dotenv, whose suffix is long enough to trip the token-looking rule in scripts/privacy-scan.ts (sk- followed by 20+ characters). Matching the existing sk-ant-user idiom keeps that gate green without widening the scanner allowlist for a value that is not a credential.
1 parent c402994 commit 15fd1b3

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

tests/claude-auth-mode.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ const PRE_BUN = "OCX_PRE_BUN_ANTHROPIC_ENV";
160160
test("auto mode drops an Anthropic key that only Bun's dotenv introduced", () => {
161161
const env = buildClaudeEnv(
162162
cfg(), 10100,
163-
{ ANTHROPIC_API_KEY: "sk-ant-from-project-dotenv", [PRE_BUN]: "" },
163+
{ ANTHROPIC_API_KEY: "sk-ant-dotenv", [PRE_BUN]: "" },
164164
{},
165165
{ authDetect: fileAuth("present") },
166166
);
@@ -183,7 +183,7 @@ test("a shell-exported Anthropic key survives the dotenv strip", () => {
183183
test("explicit subscription mode also drops a dotenv-only credential", () => {
184184
const env = buildClaudeEnv(
185185
cfg({ authMode: "subscription" }), 10100,
186-
{ ANTHROPIC_API_KEY: "sk-ant-from-project-dotenv", ANTHROPIC_AUTH_TOKEN: "token-from-dotenv", [PRE_BUN]: "" },
186+
{ ANTHROPIC_API_KEY: "sk-ant-dotenv", ANTHROPIC_AUTH_TOKEN: "token-from-dotenv", [PRE_BUN]: "" },
187187
{},
188188
{ authDetect: fileAuth("present") },
189189
);
@@ -195,7 +195,7 @@ test("explicit subscription mode also drops a dotenv-only credential", () => {
195195
test("the configured admission key survives the dotenv strip", () => {
196196
const env = buildClaudeEnv(
197197
cfg(undefined, [{ key: "admission-key" }]), 10100,
198-
{ ANTHROPIC_API_KEY: "sk-ant-from-project-dotenv", [PRE_BUN]: "" },
198+
{ ANTHROPIC_API_KEY: "sk-ant-dotenv", [PRE_BUN]: "" },
199199
{},
200200
{ authDetect: fileAuth("present") },
201201
);
@@ -221,7 +221,7 @@ test("without the launcher marker an inherited key is left alone", () => {
221221
test("a stripped dotenv key lets detection fall through to the proxy marker", () => {
222222
const env = buildClaudeEnv(
223223
cfg(), 10100,
224-
{ ANTHROPIC_API_KEY: "sk-ant-from-project-dotenv", [PRE_BUN]: "" },
224+
{ ANTHROPIC_API_KEY: "sk-ant-dotenv", [PRE_BUN]: "" },
225225
{},
226226
{ authDetect: fileAuth("absent") },
227227
);

0 commit comments

Comments
 (0)