@sentriflow/core 0.1.5 → 0.1.7
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/package.json
CHANGED
|
@@ -89,6 +89,7 @@ export class JsonRuleCompiler {
|
|
|
89
89
|
id: jsonRule.id,
|
|
90
90
|
selector: jsonRule.selector,
|
|
91
91
|
vendor: jsonRule.vendor,
|
|
92
|
+
category: jsonRule.category,
|
|
92
93
|
metadata: jsonRule.metadata,
|
|
93
94
|
check: (node: ConfigNode, _ctx: Context): RuleResult => {
|
|
94
95
|
// Check defines failure conditions - invert to get pass status
|
package/src/json-rules/types.ts
CHANGED
|
@@ -80,6 +80,9 @@ export interface JsonRule {
|
|
|
80
80
|
/** Optional vendor(s) this rule applies to */
|
|
81
81
|
vendor?: RuleVendor | RuleVendor[];
|
|
82
82
|
|
|
83
|
+
/** Optional category for tree view grouping */
|
|
84
|
+
category?: string | string[];
|
|
85
|
+
|
|
83
86
|
/** Rule metadata including severity, description, remediation */
|
|
84
87
|
metadata: RuleMetadata;
|
|
85
88
|
|
package/src/types/IRule.ts
CHANGED
|
@@ -256,6 +256,16 @@ export interface IRule {
|
|
|
256
256
|
*/
|
|
257
257
|
vendor?: RuleVendor | RuleVendor[];
|
|
258
258
|
|
|
259
|
+
/**
|
|
260
|
+
* Optional category/framework for grouping rules in the tree view.
|
|
261
|
+
* Used for compliance frameworks (NIST, PCI-DSS, CIS) or custom categories.
|
|
262
|
+
* - Single category: 'NIST-AC'
|
|
263
|
+
* - Multiple categories: ['NIST-AC', 'PCI-DSS-8']
|
|
264
|
+
*
|
|
265
|
+
* When omitted, rules are grouped under 'Uncategorized' if category grouping is enabled.
|
|
266
|
+
*/
|
|
267
|
+
category?: string | string[];
|
|
268
|
+
|
|
259
269
|
/**
|
|
260
270
|
* The function that contains the core logic of the rule.
|
|
261
271
|
* It takes a `ConfigNode` and a `Context` object, and returns a `RuleResult`.
|