mirror of
https://github.com/Studio-Saelix/sencho.git
synced 2026-08-19 23:06:49 +00:00
b1c5fe8391
* fix: harden deploy enforcement paths * fix: update Docker toolchain to Go 1.26.3 * fix: repair Dockerfile tr argument split across lines * fix: bump protobufjs to clear npm audit high-severity advisories * fix(test): add execFile to child_process mock in compose-images test * fix: resolve merge conflicts with main * fix: resolve merge conflicts with main * fix: resolve merge conflicts with main
20 lines
785 B
TypeScript
20 lines
785 B
TypeScript
import { describe, expect, it } from 'vitest';
|
|
import { redactSensitiveText } from '../utils/safeLog';
|
|
|
|
describe('redactSensitiveText', () => {
|
|
it('redacts credentials from durable log text', () => {
|
|
const text = redactSensitiveText(
|
|
'connect https://user:pass@example.invalid failed Authorization: Bearer abc.def.ghi token=secret123 password=hunter2',
|
|
);
|
|
|
|
expect(text).toContain('https://[redacted]@example.invalid');
|
|
expect(text).toContain('Authorization: [redacted]');
|
|
expect(text).toContain('token=[redacted]');
|
|
expect(text).toContain('password=[redacted]');
|
|
expect(text).not.toContain('user:pass');
|
|
expect(text).not.toContain('abc.def.ghi');
|
|
expect(text).not.toContain('secret123');
|
|
expect(text).not.toContain('hunter2');
|
|
});
|
|
});
|