feat: add bill attachment download command

This commit is contained in:
gitea committed 2026-09-05 20:55:39 +08:00
1 parent a5bfaafa10
commit 17e5418005
8 files changed
+225 -6

No files matched your search

+9
View File
@@ -21,6 +21,15 @@ describe("cli/printer - 上下文防爆与敏感脱敏", () => {
expect(redacted).toContain("corpId=corpxx");
});
test("脱敏对象存储签名 URL 中的临时凭证", () => {
const input = "https://files.example/a.png?Expires=1&OSSAccessKeyId=key&Signature=sig&security-token=secret";
const redacted = redactSensitiveText(input);
expect(redacted).toContain("OSSAccessKeyId=<redacted>");
expect(redacted).toContain("Signature=<redacted>");
expect(redacted).toContain("security-token=<redacted>");
expect(redacted).not.toContain("secret");
});
test("脱敏 Authorization Bearer token", () => {
const input = "Request headers: Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.xyz";
const redacted = redactSensitiveText(input);