@broberg/secret-scan 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -89,6 +89,18 @@ tempting-but-wrong version: a bare "3–32 alphanumerics on the first line" rege
|
|
|
89
89
|
matches `Hej`, `Tak` and `FYI`. Harmless where a non-match costs nothing,
|
|
90
90
|
dangerous in anything that redacts.
|
|
91
91
|
|
|
92
|
+
**A label needs something to follow it.** `Password:` on its own is `false`; the
|
|
93
|
+
value must actually be there. buddy found this the sharp way after adopting
|
|
94
|
+
0.2.0 — their own patch keyed on *label + separator* and flagged an ordinary
|
|
95
|
+
mail that merely said "I forgot my password". That is the line between a guard
|
|
96
|
+
and a noise source.
|
|
97
|
+
|
|
98
|
+
**A value on the next line still counts.** `Adgangskode:\nhunter2` fires, because
|
|
99
|
+
mail wraps and a wrapped secret is still a secret. The deliberate cost: a line
|
|
100
|
+
ending in `password:` followed by a paragraph will redact that paragraph's first
|
|
101
|
+
word. One visibly-marked word, never a silent miss — and both halves are tested,
|
|
102
|
+
so neither is an accident of the regex.
|
|
103
|
+
|
|
92
104
|
**Detection order is load-bearing.** The announced pass runs *last* and refuses a
|
|
93
105
|
value that is already a redaction marker, so `API key: sk-ant-…` still redacts as
|
|
94
106
|
`anthropic-api-key` rather than flattening to a generic `announced-secret`.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@broberg/secret-scan",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "Pure, dependency-free secret/credential redaction for the broberg.ai fleet — redactSecrets / hasSecret over a curated, ordered SECRET_PATTERNS set. Redact at write + egress boundaries so keys never land in a DB, chat, or KB. Lifted from broberg/trail F197.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|