@f4bioo/berry-shield 2026.3.17 → 2026.3.20

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.
@@ -14,7 +14,7 @@ This guide defines two installation tracks and when each one should be used.
14
14
 
15
15
  ## Prerequisites
16
16
 
17
- - Node.js 20 or newer.
17
+ - Node.js 22.16.0 or newer.
18
18
  - OpenClaw runtime available in environment.
19
19
  - Git available in environment.
20
20
 
@@ -76,14 +76,23 @@ openclaw bshield rules list
76
76
  Expected: CLI shows baseline and custom IDs, including `[ENABLED]` and `[DISABLED]` status.
77
77
 
78
78
  ### 6) Disable one baseline rule
79
- Use this to disable one baseline rule by stable ID.
79
+ Use this to disable baseline rules by stable ID. This applies to both internal `berry:` patterns and `gitleaks:` community rules.
80
+
81
+ Example (Berry Shield):
80
82
  ```bash
81
- openclaw bshield rules disable baseline secret:openai-key
83
+ openclaw bshield rules disable baseline berry:secret:openai-key
84
+ ```
85
+
86
+ Example (Gitleaks Community):
87
+ ```bash
88
+ openclaw bshield rules disable baseline gitleaks:secret:aws-access-token
82
89
  ```
83
90
  Expected: CLI marks the target baseline rule as disabled.
84
91
 
85
92
  ### 7) Disable one custom rule
86
93
  Use this to keep a custom rule stored but inactive.
94
+
95
+ Example (User custom):
87
96
  ```bash
88
97
  openclaw bshield rules disable custom secret:my-token-rule
89
98
  ```
@@ -97,7 +97,7 @@ If cancel is selected, the wizard exits without persisting data.
97
97
  ### Step 2: Preset or custom pattern
98
98
  After choosing type, the wizard offers:
99
99
  - custom pattern
100
- - built-in presets for the selected type
100
+ - baseline presets for the selected type
101
101
  - cancel
102
102
 
103
103
  If a preset is selected, name/pattern/placeholder values are prefilled from that preset.
@@ -40,6 +40,8 @@ Positional arguments:
40
40
 
41
41
  ### Remove an existing custom rule
42
42
  Use this when the exact custom rule id is known.
43
+
44
+ Example (User custom):
43
45
  ```bash
44
46
  openclaw bshield rules remove custom secret:MyToken
45
47
  ```
@@ -47,6 +49,8 @@ Result: CLI confirms custom rule removal.
47
49
 
48
50
  ### Remove a custom file rule
49
51
  Use this when a file-pattern custom rule must be removed.
52
+
53
+ Example (User custom):
50
54
  ```bash
51
55
  openclaw bshield rules remove custom file:team-key
52
56
  ```
@@ -61,8 +65,15 @@ Result: Removed custom rule no longer appears in custom entries.
61
65
 
62
66
  ### Disable a baseline rule (separate command)
63
67
  Use this when the target is a baseline ID.
68
+
69
+ Example (Berry Shield):
70
+ ```bash
71
+ openclaw bshield rules disable baseline berry:secret:openai-key
72
+ ```
73
+
74
+ Example (Gitleaks Community):
64
75
  ```bash
65
- openclaw bshield rules disable baseline secret:openai-key
76
+ openclaw bshield rules disable baseline gitleaks:secret:aws-access-token
66
77
  ```
67
78
  Result: Baseline rule is marked disabled in rules inventory.
68
79
 
@@ -70,13 +81,24 @@ Result: Baseline rule is marked disabled in rules inventory.
70
81
 
71
82
  ### Wrong target
72
83
  Use this to validate explicit target semantics.
84
+
85
+ Example (Berry Shield):
73
86
  ```bash
74
- openclaw bshield rules remove baseline secret:openai-key
87
+ # openclaw bshield rules remove baseline <id>
88
+ openclaw bshield rules remove baseline berry:secret:openai-key
89
+ ```
90
+
91
+ Example (Gitleaks Community):
92
+ ```bash
93
+ # openclaw bshield rules remove baseline <id>
94
+ openclaw bshield rules remove baseline gitleaks:secret:aws-access-key
75
95
  ```
76
96
  Expected: CLI returns usage error because remove supports only custom target.
77
97
 
78
98
  ### Rule not found
79
99
  Use this to verify missing-rule behavior.
100
+
101
+ Example (User custom):
80
102
  ```bash
81
103
  openclaw bshield rules remove custom secret:UnknownRule
82
104
  ```
@@ -46,30 +46,54 @@ openclaw bshield rules remove custom <id>
46
46
  Expected: Removes one custom rule by typed id (`secret:<name> | file:<name> | command:<name>`).
47
47
 
48
48
  ### Disable one baseline rule
49
- Use this to disable a single baseline rule when you need a controlled exception.
49
+ Use this to disable baseline rules by stable ID. This applies to both internal `berry:` patterns and `gitleaks:` community rules.
50
+
51
+ Example (Berry Shield):
52
+ ```bash
53
+ # openclaw bshield rules disable baseline <id>
54
+ openclaw bshield rules disable baseline berry:secret:openai-key
55
+ ```
56
+
57
+ Example (Gitleaks Community):
50
58
  ```bash
51
- openclaw bshield rules disable baseline <id>
59
+ # openclaw bshield rules disable baseline <id>
60
+ openclaw bshield rules disable baseline gitleaks:secret:aws-access-token
52
61
  ```
53
62
  Expected: Marks one baseline rule as disabled.
54
63
 
55
64
  ### Disable one custom rule
56
65
  Use this to disable one custom rule without deleting it.
66
+
67
+ Example (User custom):
57
68
  ```bash
58
- openclaw bshield rules disable custom <id>
69
+ # openclaw bshield rules disable custom <id>
70
+ openclaw bshield rules disable custom secret:my-token-rule
59
71
  ```
60
72
  Expected: Marks one custom rule as disabled and keeps it in inventory.
61
73
 
62
74
  ### Enable one baseline rule
63
- Use this to re-enable a previously disabled baseline rule by ID.
75
+ Use this to re-enable baseline rules by stable ID. This applies to both internal `berry:` patterns and `gitleaks:` community rules.
76
+
77
+ Example (Berry Shield):
78
+ ```bash
79
+ # openclaw bshield rules enable baseline <id>
80
+ openclaw bshield rules enable baseline berry:secret:openai-key
81
+ ```
82
+
83
+ Example (Gitleaks Community):
64
84
  ```bash
65
- openclaw bshield rules enable baseline <id>
85
+ # openclaw bshield rules enable baseline <id>
86
+ openclaw bshield rules enable baseline gitleaks:secret:aws-access-token
66
87
  ```
67
88
  Expected: Marks one baseline rule as enabled.
68
89
 
69
90
  ### Enable one custom rule
70
91
  Use this to re-enable one custom rule by ID.
92
+
93
+ Example (User custom):
71
94
  ```bash
72
- openclaw bshield rules enable custom <id>
95
+ # openclaw bshield rules enable custom <id>
96
+ openclaw bshield rules enable custom secret:my-token-rule
73
97
  ```
74
98
  Expected: Marks one custom rule as enabled.
75
99
 
@@ -128,21 +152,36 @@ Expected: Applies enable to full rule scope (`baseline + custom`).
128
152
 
129
153
  ### Wrong target for remove
130
154
  Use this check to validate that remove only accepts the custom target.
155
+
156
+ Example (Berry Shield):
157
+ ```bash
158
+ # openclaw bshield rules remove baseline <id>
159
+ openclaw bshield rules remove baseline berry:secret:openai-key
160
+ ```
161
+
162
+ Example (Gitleaks Community):
131
163
  ```bash
132
- openclaw bshield rules remove baseline secret:openai-key
164
+ # openclaw bshield rules remove baseline <id>
165
+ openclaw bshield rules remove baseline gitleaks:secret:aws-access-token
133
166
  ```
134
167
  Expected: Usage failure (remove supports only custom target).
135
168
 
136
169
  ### Unknown baseline ID
137
170
  Use this check to validate error handling when an ID does not exist in baseline catalog.
171
+
172
+ Example (Berry Shield):
138
173
  ```bash
139
- openclaw bshield rules disable baseline secret:does-not-exist
174
+ # openclaw bshield rules disable baseline <id>
175
+ openclaw bshield rules disable baseline berry:secret:does-not-exist
140
176
  ```
141
177
  Expected: Operation failure (`Unknown baseline rule id`).
142
178
 
143
179
  ### Unknown custom ID
144
180
  Use this check to validate error handling when a custom rule is not found.
181
+
182
+ Example (User custom):
145
183
  ```bash
184
+ # openclaw bshield rules disable custom <id>
146
185
  openclaw bshield rules disable custom secret:does-not-exist
147
186
  ```
148
187
  Expected: Operation failure (`Unknown custom rule id`).
@@ -1,17 +1,17 @@
1
1
  ---
2
2
  summary: "CLI reference for `openclaw bshield test` (test one input against active match patterns)"
3
3
  read_when:
4
- - You need to verify if a string matches built-in or custom patterns
4
+ - You need to verify if a string matches baseline or custom patterns
5
5
  - You are validating custom regex behavior before production use
6
6
  title: "test"
7
7
  ---
8
8
 
9
9
  # `openclaw bshield test`
10
10
 
11
- Test one input string against active built-in and custom match patterns.
11
+ Test one input string against active baseline and custom match patterns.
12
12
 
13
13
  ## What it does
14
- - Loads built-in secret/PII patterns and custom secret rules.
14
+ - Loads baseline secret/PII patterns and custom secret rules.
15
15
  - Evaluates the provided input against active patterns.
16
16
  - Prints either no-match output or match details with rule source and redaction placeholder.
17
17
 
@@ -45,7 +45,7 @@ Expected: CLI reports no matches or prints one or more matching rule entries.
45
45
 
46
46
  ## Options
47
47
  Positional argument:
48
- - `<input>`: string to test against active built-in and custom patterns.
48
+ - `<input>`: string to test against active baseline and custom patterns.
49
49
 
50
50
  ## Examples
51
51
 
@@ -78,9 +78,24 @@ openclaw bshield test "SMOKE_WEB_CMD"
78
78
  Expected: `No matches found` because this command does not evaluate custom command/file rules.
79
79
 
80
80
  ### Typed ID input is not a payload value
81
- Use this when input is a rule ID format.
81
+ Use this when input is a rule ID format to confirm it is not used as a test literal.
82
+
83
+ Example (Berry Shield):
84
+ ```bash
85
+ # openclaw bshield test "<input>"
86
+ openclaw bshield test "berry:command:smoke-web-cmd"
87
+ ```
88
+
89
+ Example (Gitleaks Community):
90
+ ```bash
91
+ # openclaw bshield test "<input>"
92
+ openclaw bshield test "gitleaks:secret:aws-access-token"
93
+ ```
94
+
95
+ Example (User custom):
82
96
  ```bash
83
- openclaw bshield test "command:smoke-web-cmd"
97
+ # openclaw bshield test "<input>"
98
+ openclaw bshield test "secret:my-token"
84
99
  ```
85
100
  Expected: no matches and guidance that typed IDs are rule identifiers, not payload values for this command.
86
101
 
@@ -1,4 +1,4 @@
1
- ---
1
+ ---
2
2
  summary: "Use report output for incident triage and policy follow-up"
3
3
  read_when:
4
4
  - You need to investigate suspicious activity patterns
@@ -2,7 +2,7 @@
2
2
  "id": "berry-shield",
3
3
  "name": "Berry Shield",
4
4
  "description": "Security plugin that helps to block destructive commands, redact secrets and PII",
5
- "version": "2026.3.17",
5
+ "version": "2026.3.20",
6
6
  "configSchema": {
7
7
  "type": "object",
8
8
  "additionalProperties": false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@f4bioo/berry-shield",
3
- "version": "2026.3.17",
3
+ "version": "2026.3.20",
4
4
  "description": "OpenClaw plugin for policy checks, command/file blocking, and sensitive-data redaction.",
5
5
  "keywords": [
6
6
  "openclaw",