You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -147,65 +146,13 @@ Using the rules section of your configurations, you can specify the list of rule
147
146
"rules": {
148
147
"<RuleName>": {
149
148
"severity": "<Severity>",
150
-
"expression": "<Expression>",
151
-
"path": "<Path>"
149
+
"expression": "<Expression>"
152
150
}
153
151
}
154
152
}
155
153
```
156
154
157
-
### \*\*Beta\*\* Advanced Rule Configuration
158
-
159
-
Advanced rules provide granular control by allowing rules to be intentionally disabled at the rule level, ensuring consistent application across all flows. Additionally, the concept of suppressions is introduced, enabling users to "whitelist" specific components. This mechanism allows for exceptions to be defined, offering flexibility in rule enforcement while maintaining overall governance and compliance.
160
-
161
-
JSON
162
-
163
-
```json
164
-
{
165
-
"rules": {
166
-
"<RuleName>": {
167
-
"path": "local_path_of_your_js_file", // optional: when defined, this configuration will be used for the engine to recognize your custom rule
168
-
"severity": "<User Configured Severity>",
169
-
"expression": "<User Configured Expression which only applies to rules that take in `options`>",
170
-
"disabled": "true", // optional: when true, rule will not be applied to all flows being scanned
171
-
"suppressions": ["<User Configured Suppressions>"] // optional: when defined, takes an array of suppressed elements (not based on name but on specific type)
172
-
}
173
-
}
174
-
}
175
-
```
176
-
177
-
YAML
178
-
179
-
```yaml
180
-
rules:
181
-
MissingFaultPath: # User Defined Rule configuration
182
-
path: "local_path_of_your_js_file"# Optional: when defined, this configuration will be used for the engine to recognize your rule
183
-
severity: error # Optional: User Defined severity, can be `info`, `warn`, `error`
184
-
expression: ">=58"# Optional: User defined expression, only applies if rule is Configurable=true
185
-
disabled: "true"# Optional: when true, rule will not be applied to all flows being scanned
186
-
suppressions: # Optional: when defined, takes an array of elements to be suppressed, keys can be found on suppressionElements on the rule definition
187
-
- LogACall # Optional: when defined, rule engine will look at suppressionElement defined on the rule to match against this list
188
-
```
189
-
190
-
- **Severity:**
191
-
192
-
- Optional values for severity are "error", "warning", and "note".
193
-
- If severity is provided, it overwrites the default severity, which is "error".
194
-
195
-
- **Expression:**
196
-
197
-
- Expression is used to overwrite standard values in configurable rules.
198
-
199
-
- **Path:**
200
-
201
-
- If a path is provided, it can either replace an existing rule with a new rule definition or load a custom rule.
202
-
- Ensure that the rule name used in the path matches the exported class name of the rule.
203
-
204
-
### Custom Rule Interface
205
-
206
-
To create custom rules that can be loaded using the path attribute of the rule configurations, they need to adhere to the IRuleInterface. Please refer to the _[Custom Rule Creation Guide](https://github.com/Lightning-Flow-Scanner/lightning-flow-scanner-core/tree/master/docs/customruleguide.md)_ for detailed instructions.
207
-
208
-
### Exception Configuration
155
+
### \*\Exception Configuration
209
156
210
157
Specifying exceptions allows you to exclude specific scenarios from rule enforcement. Exceptions can be specified at the flow, rule, or result level to provide fine-grained control. Below is a breakdown of the available attributes of exception configuration:
211
158
@@ -225,15 +172,12 @@ Specifying exceptions allows you to exclude specific scenarios from rule enforce
225
172
```
226
173
227
174
-**FlowName:**
228
-
229
175
- The name of the flow where exceptions apply.
230
176
231
177
-**RuleName:**
232
-
233
178
- The name of the rule for which exceptions are defined.
234
179
235
180
-**ResultName:**
236
-
237
181
- The specific result or condition within the rule for which exceptions are specified.
0 commit comments