@wrongstack/plugins 0.306.2 → 0.306.4
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/dist/index.js +23 -1
- package/dist/prompt-firewall.js +23 -1
- package/dist/secret-scanner.js +23 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -16033,7 +16033,29 @@ var CREDENTIAL_PATTERNS = [
|
|
|
16033
16033
|
regex: /postgres(?:ql)?:\/\/(?:[^\s:/@"'`]*:[^\s/@"'`]+@[^\s"'`]+|[^&\s?"'`#]{1,2048}\?(?:(?!(?:p|%70)(?:a|%61)(?:s|%73)(?:s|%73)(?:w|%77)(?:o|%6[fF])(?:r|%72)(?:d|%64)=)[^&\s#"'`]{1,256}&){0,32}(?:p|%70)(?:a|%61)(?:s|%73)(?:s|%73)(?:w|%77)(?:o|%6[fF])(?:r|%72)(?:d|%64)=[^&\s#"'`]{1,4096})/g
|
|
16034
16034
|
},
|
|
16035
16035
|
{ type: "mysql_uri", regex: /mysql:\/\/[^\s:/@"'`]*:[^\s/@"'`]+@[^\s"'`]+/g },
|
|
16036
|
-
{ type: "redis_uri", regex: /redis:\/\/[^\s:/@"'`]*:[^\s/@"'`]+@[^\s"'`]+/g }
|
|
16036
|
+
{ type: "redis_uri", regex: /redis:\/\/[^\s:/@"'`]*:[^\s/@"'`]+@[^\s"'`]+/g },
|
|
16037
|
+
{
|
|
16038
|
+
// Credentials serialised as JSON, keyed rather than prefixed. Every other
|
|
16039
|
+
// entry in this table recognises a credential by its SHAPE (`ghp_`, `sk-`,
|
|
16040
|
+
// `eyJ`), which means a key with no distinctive prefix — Azure, a
|
|
16041
|
+
// self-hosted gateway, an Anthropic/Codex OAuth token — was invisible to
|
|
16042
|
+
// both surfaces. `prompt-firewall` guards the outgoing provider request, so
|
|
16043
|
+
// this is what stops a JSON-shaped tool result carrying such a value to a
|
|
16044
|
+
// third party.
|
|
16045
|
+
//
|
|
16046
|
+
// The key is matched in a LOOKBEHIND, so the reported match is the secret
|
|
16047
|
+
// itself and the pattern keeps zero capturing groups — `secret-scanner`
|
|
16048
|
+
// maps a combined-regex group index back to the pattern that fired, and an
|
|
16049
|
+
// inner group would shift that mapping (see the style note above, enforced
|
|
16050
|
+
// by credential-pattern-parity.test.ts).
|
|
16051
|
+
//
|
|
16052
|
+
// Mirrors `json_credential_key` in
|
|
16053
|
+
// `@wrongstack/core` → `src/security/secret-scrubber.ts`. Keep the two key
|
|
16054
|
+
// lists in step; the core side additionally preserves the key name when it
|
|
16055
|
+
// rewrites, which is why it is written with capture groups instead.
|
|
16056
|
+
type: "json_credential_key",
|
|
16057
|
+
regex: /(?<="[A-Za-z0-9_]{0,64}(?:apiKey|api_key|token|secret|password|authorization|bearer|private_key|access_token|refresh_token|client_secret)"\s{0,8}:\s{0,8}")[^"\\]{8,512}(?=")/gi
|
|
16058
|
+
}
|
|
16037
16059
|
];
|
|
16038
16060
|
function cloneCredentialPatterns() {
|
|
16039
16061
|
return CREDENTIAL_PATTERNS.map((p) => ({
|
package/dist/prompt-firewall.js
CHANGED
|
@@ -99,7 +99,29 @@ var CREDENTIAL_PATTERNS = [
|
|
|
99
99
|
regex: /postgres(?:ql)?:\/\/(?:[^\s:/@"'`]*:[^\s/@"'`]+@[^\s"'`]+|[^&\s?"'`#]{1,2048}\?(?:(?!(?:p|%70)(?:a|%61)(?:s|%73)(?:s|%73)(?:w|%77)(?:o|%6[fF])(?:r|%72)(?:d|%64)=)[^&\s#"'`]{1,256}&){0,32}(?:p|%70)(?:a|%61)(?:s|%73)(?:s|%73)(?:w|%77)(?:o|%6[fF])(?:r|%72)(?:d|%64)=[^&\s#"'`]{1,4096})/g
|
|
100
100
|
},
|
|
101
101
|
{ type: "mysql_uri", regex: /mysql:\/\/[^\s:/@"'`]*:[^\s/@"'`]+@[^\s"'`]+/g },
|
|
102
|
-
{ type: "redis_uri", regex: /redis:\/\/[^\s:/@"'`]*:[^\s/@"'`]+@[^\s"'`]+/g }
|
|
102
|
+
{ type: "redis_uri", regex: /redis:\/\/[^\s:/@"'`]*:[^\s/@"'`]+@[^\s"'`]+/g },
|
|
103
|
+
{
|
|
104
|
+
// Credentials serialised as JSON, keyed rather than prefixed. Every other
|
|
105
|
+
// entry in this table recognises a credential by its SHAPE (`ghp_`, `sk-`,
|
|
106
|
+
// `eyJ`), which means a key with no distinctive prefix — Azure, a
|
|
107
|
+
// self-hosted gateway, an Anthropic/Codex OAuth token — was invisible to
|
|
108
|
+
// both surfaces. `prompt-firewall` guards the outgoing provider request, so
|
|
109
|
+
// this is what stops a JSON-shaped tool result carrying such a value to a
|
|
110
|
+
// third party.
|
|
111
|
+
//
|
|
112
|
+
// The key is matched in a LOOKBEHIND, so the reported match is the secret
|
|
113
|
+
// itself and the pattern keeps zero capturing groups — `secret-scanner`
|
|
114
|
+
// maps a combined-regex group index back to the pattern that fired, and an
|
|
115
|
+
// inner group would shift that mapping (see the style note above, enforced
|
|
116
|
+
// by credential-pattern-parity.test.ts).
|
|
117
|
+
//
|
|
118
|
+
// Mirrors `json_credential_key` in
|
|
119
|
+
// `@wrongstack/core` → `src/security/secret-scrubber.ts`. Keep the two key
|
|
120
|
+
// lists in step; the core side additionally preserves the key name when it
|
|
121
|
+
// rewrites, which is why it is written with capture groups instead.
|
|
122
|
+
type: "json_credential_key",
|
|
123
|
+
regex: /(?<="[A-Za-z0-9_]{0,64}(?:apiKey|api_key|token|secret|password|authorization|bearer|private_key|access_token|refresh_token|client_secret)"\s{0,8}:\s{0,8}")[^"\\]{8,512}(?=")/gi
|
|
124
|
+
}
|
|
103
125
|
];
|
|
104
126
|
function cloneCredentialPatterns() {
|
|
105
127
|
return CREDENTIAL_PATTERNS.map((p) => ({
|
package/dist/secret-scanner.js
CHANGED
|
@@ -99,7 +99,29 @@ var CREDENTIAL_PATTERNS = [
|
|
|
99
99
|
regex: /postgres(?:ql)?:\/\/(?:[^\s:/@"'`]*:[^\s/@"'`]+@[^\s"'`]+|[^&\s?"'`#]{1,2048}\?(?:(?!(?:p|%70)(?:a|%61)(?:s|%73)(?:s|%73)(?:w|%77)(?:o|%6[fF])(?:r|%72)(?:d|%64)=)[^&\s#"'`]{1,256}&){0,32}(?:p|%70)(?:a|%61)(?:s|%73)(?:s|%73)(?:w|%77)(?:o|%6[fF])(?:r|%72)(?:d|%64)=[^&\s#"'`]{1,4096})/g
|
|
100
100
|
},
|
|
101
101
|
{ type: "mysql_uri", regex: /mysql:\/\/[^\s:/@"'`]*:[^\s/@"'`]+@[^\s"'`]+/g },
|
|
102
|
-
{ type: "redis_uri", regex: /redis:\/\/[^\s:/@"'`]*:[^\s/@"'`]+@[^\s"'`]+/g }
|
|
102
|
+
{ type: "redis_uri", regex: /redis:\/\/[^\s:/@"'`]*:[^\s/@"'`]+@[^\s"'`]+/g },
|
|
103
|
+
{
|
|
104
|
+
// Credentials serialised as JSON, keyed rather than prefixed. Every other
|
|
105
|
+
// entry in this table recognises a credential by its SHAPE (`ghp_`, `sk-`,
|
|
106
|
+
// `eyJ`), which means a key with no distinctive prefix — Azure, a
|
|
107
|
+
// self-hosted gateway, an Anthropic/Codex OAuth token — was invisible to
|
|
108
|
+
// both surfaces. `prompt-firewall` guards the outgoing provider request, so
|
|
109
|
+
// this is what stops a JSON-shaped tool result carrying such a value to a
|
|
110
|
+
// third party.
|
|
111
|
+
//
|
|
112
|
+
// The key is matched in a LOOKBEHIND, so the reported match is the secret
|
|
113
|
+
// itself and the pattern keeps zero capturing groups — `secret-scanner`
|
|
114
|
+
// maps a combined-regex group index back to the pattern that fired, and an
|
|
115
|
+
// inner group would shift that mapping (see the style note above, enforced
|
|
116
|
+
// by credential-pattern-parity.test.ts).
|
|
117
|
+
//
|
|
118
|
+
// Mirrors `json_credential_key` in
|
|
119
|
+
// `@wrongstack/core` → `src/security/secret-scrubber.ts`. Keep the two key
|
|
120
|
+
// lists in step; the core side additionally preserves the key name when it
|
|
121
|
+
// rewrites, which is why it is written with capture groups instead.
|
|
122
|
+
type: "json_credential_key",
|
|
123
|
+
regex: /(?<="[A-Za-z0-9_]{0,64}(?:apiKey|api_key|token|secret|password|authorization|bearer|private_key|access_token|refresh_token|client_secret)"\s{0,8}:\s{0,8}")[^"\\]{8,512}(?=")/gi
|
|
124
|
+
}
|
|
103
125
|
];
|
|
104
126
|
function cloneCredentialPatterns() {
|
|
105
127
|
return CREDENTIAL_PATTERNS.map((p) => ({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wrongstack/plugins",
|
|
3
|
-
"version": "0.306.
|
|
3
|
+
"version": "0.306.4",
|
|
4
4
|
"description": "Official WrongStack collection of focused plugins for code quality, security, observability, planning, and agent coordination",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "ECOSTACK TECHNOLOGY OÜ",
|
|
@@ -303,8 +303,8 @@
|
|
|
303
303
|
"vitest": "^4.1.10"
|
|
304
304
|
},
|
|
305
305
|
"dependencies": {
|
|
306
|
-
"@wrongstack/core": "0.306.
|
|
307
|
-
"@wrongstack/tools": "0.306.
|
|
306
|
+
"@wrongstack/core": "0.306.4",
|
|
307
|
+
"@wrongstack/tools": "0.306.4"
|
|
308
308
|
},
|
|
309
309
|
"scripts": {
|
|
310
310
|
"build": "node ../../scripts/build-package.mjs",
|