Skip to content

Commit e02f1a4

Browse files
committed
test: credential-store — cover TLS sensitive field detection
The ClickHouse driver (#574) added tls_key, tls_cert, tls_ca_cert to SENSITIVE_FIELDS but the isSensitiveField test didn't cover them. Without this, a refactor could silently remove TLS fields from the set, causing ClickHouse TLS credentials to be stored in plaintext in connections.json instead of the OS keychain. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> https://claude.ai/code/session_01XnDpfWC8aJfUm1xrAtWq4E
1 parent 0d34855 commit e02f1a4

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

packages/opencode/test/altimate/connections.test.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,13 +249,17 @@ describe("CredentialStore", () => {
249249
})
250250

251251
// altimate_change start — cover remaining SENSITIVE_FIELDS entries not in the test above
252-
test("isSensitiveField covers BigQuery, SSL, and SSH credential fields", () => {
252+
test("isSensitiveField covers BigQuery, SSL, SSH, and TLS credential fields", () => {
253253
expect(CredentialStore.isSensitiveField("credentials_json")).toBe(true)
254254
expect(CredentialStore.isSensitiveField("keyfile_json")).toBe(true)
255255
expect(CredentialStore.isSensitiveField("ssl_key")).toBe(true)
256256
expect(CredentialStore.isSensitiveField("ssl_cert")).toBe(true)
257257
expect(CredentialStore.isSensitiveField("ssl_ca")).toBe(true)
258258
expect(CredentialStore.isSensitiveField("ssh_password")).toBe(true)
259+
// ClickHouse TLS fields added in #574
260+
expect(CredentialStore.isSensitiveField("tls_key")).toBe(true)
261+
expect(CredentialStore.isSensitiveField("tls_cert")).toBe(true)
262+
expect(CredentialStore.isSensitiveField("tls_ca_cert")).toBe(true)
259263
})
260264
// altimate_change end
261265

0 commit comments

Comments
 (0)