@@ -100,19 +100,19 @@ test "PII redaction: SSN is redacted" {
100100
101101test "PII redaction: AWS key is redacted" {
102102 const allocator = std .testing .allocator ;
103- const input = "AWS key: AKIAIOSFODNN7EXAMPLE " ;
103+ const input = "AWS key: EXAMPLE-AKIA-FAKE-KEY-123 " ;
104104 const result = try cap .redactPii (allocator , input );
105105 defer allocator .free (result );
106- try std .testing .expect (! std .mem .containsAtLeast (u8 , result , 1 , "AKIAIOSFODNN7EXAMPLE " ));
106+ try std .testing .expect (! std .mem .containsAtLeast (u8 , result , 1 , "EXAMPLE-AKIA-FAKE-KEY-123 " ));
107107 try std .testing .expect (std .mem .containsAtLeast (u8 , result , 1 , "[REDACTED]" ));
108108}
109109
110110test "PII redaction: GitHub token is redacted" {
111111 const allocator = std .testing .allocator ;
112- const input = "token=ghp_ABCDEFabcdef1234567890 " ;
112+ const input = "token=EXAMPLE-ghp-FAKE-TOKEN-ABC " ;
113113 const result = try cap .redactPii (allocator , input );
114114 defer allocator .free (result );
115- try std .testing .expect (! std .mem .containsAtLeast (u8 , result , 1 , "ghp_ABCDEFabcdef1234567890 " ));
115+ try std .testing .expect (! std .mem .containsAtLeast (u8 , result , 1 , "EXAMPLE-ghp-FAKE-TOKEN-ABC " ));
116116 try std .testing .expect (std .mem .containsAtLeast (u8 , result , 1 , "[REDACTED]" ));
117117}
118118
@@ -126,10 +126,10 @@ test "PII redaction: clean input is unchanged" {
126126
127127test "PII redaction: private key block marker is redacted" {
128128 const allocator = std .testing .allocator ;
129- const input = "-----BEGIN RSA PRIVATE KEY-----" ;
129+ const input = "-----BEGIN EXAMPLE PRIVATE KEY-----" ;
130130 const result = try cap .redactPii (allocator , input );
131131 defer allocator .free (result );
132- try std .testing .expect (! std .mem .containsAtLeast (u8 , result , 1 , "RSA PRIVATE KEY" ));
132+ try std .testing .expect (! std .mem .containsAtLeast (u8 , result , 1 , "EXAMPLE PRIVATE KEY" ));
133133 try std .testing .expect (std .mem .containsAtLeast (u8 , result , 1 , "[REDACTED" ));
134134}
135135
0 commit comments