Skip to content

Commit 8cf056d

Browse files
committed
fix(redaction): keep Infisical secret names visible; redact only deployKey
1 parent 1a605bc commit 8cf056d

2 files changed

Lines changed: 4 additions & 6 deletions

File tree

‎apps/sim/lib/core/security/redaction.test.ts‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,8 @@ describe('isSensitiveKey', () => {
3131
'exa_api_key',
3232
'secretAccessKey',
3333
'awsSecretAccessKey',
34-
'secretKey',
35-
'bedrockSecretKey',
3634
'deployKey',
35+
'convexDeployKey',
3736
`${'a'.repeat(10000)}password`,
3837
])('treats %s as sensitive', (key) => {
3938
expect(isSensitiveKey(key)).toBe(true)
@@ -42,7 +41,7 @@ describe('isSensitiveKey', () => {
4241
it.concurrent.each([
4342
'tokenCount',
4443
'tokenizer',
45-
'secretKeyId',
44+
'secretKey',
4645
'deployKeyName',
4746
'passwordStrength',
4847
'authMethod',

‎apps/sim/lib/core/security/redaction.ts‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,8 @@ const SENSITIVE_KEY_PATTERNS: RegExp[] = [
2929
/^.*api[_-]?key$/i,
3030
// AWS's `secretAccessKey` / `awsSecretAccessKey`, which no suffix above covers.
3131
/^.*secret[_-]?access[_-]?key$/i,
32-
// Credential fields named for the key itself: Clerk's `secretKey`, Bedrock's
33-
// `bedrockSecretKey`, and Convex's `deployKey`.
34-
/^.*secret[_-]?key$/i,
32+
// Convex's `deployKey`. A bare `secretKey` is left out: Infisical returns each
33+
// secret's name in that field, and redacting it would hide every listed name.
3534
/^.*deploy[_-]?key$/i,
3635
/^passphrase$/i,
3736
/^authorization$/i,

0 commit comments

Comments
 (0)