@sentriflow/core 0.1.8 → 0.1.9
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 +1 -1
- package/src/json-rules/schema.json +35 -5
- package/src/types/IRule.ts +27 -6
package/package.json
CHANGED
|
@@ -135,6 +135,41 @@
|
|
|
135
135
|
},
|
|
136
136
|
"security": {
|
|
137
137
|
"$ref": "#/definitions/SecurityMetadata"
|
|
138
|
+
},
|
|
139
|
+
"tags": {
|
|
140
|
+
"type": "array",
|
|
141
|
+
"items": { "$ref": "#/definitions/Tag" },
|
|
142
|
+
"description": "Typed tags for multi-dimensional rule categorization"
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
"TagType": {
|
|
147
|
+
"type": "string",
|
|
148
|
+
"enum": ["security", "operational", "compliance", "general"],
|
|
149
|
+
"description": "Tag classification type"
|
|
150
|
+
},
|
|
151
|
+
"Tag": {
|
|
152
|
+
"type": "object",
|
|
153
|
+
"required": ["type", "label"],
|
|
154
|
+
"additionalProperties": false,
|
|
155
|
+
"properties": {
|
|
156
|
+
"type": {
|
|
157
|
+
"$ref": "#/definitions/TagType"
|
|
158
|
+
},
|
|
159
|
+
"label": {
|
|
160
|
+
"type": "string",
|
|
161
|
+
"minLength": 1,
|
|
162
|
+
"description": "Short identifier/label for the tag"
|
|
163
|
+
},
|
|
164
|
+
"text": {
|
|
165
|
+
"type": "string",
|
|
166
|
+
"description": "Optional extended description"
|
|
167
|
+
},
|
|
168
|
+
"score": {
|
|
169
|
+
"type": "number",
|
|
170
|
+
"minimum": 0,
|
|
171
|
+
"maximum": 10,
|
|
172
|
+
"description": "Optional severity/priority score (0-10 range)"
|
|
138
173
|
}
|
|
139
174
|
}
|
|
140
175
|
},
|
|
@@ -156,11 +191,6 @@
|
|
|
156
191
|
"cvssVector": {
|
|
157
192
|
"type": "string",
|
|
158
193
|
"description": "CVSS v3.1 vector string"
|
|
159
|
-
},
|
|
160
|
-
"tags": {
|
|
161
|
-
"type": "array",
|
|
162
|
-
"items": { "type": "string" },
|
|
163
|
-
"description": "Security-related tags"
|
|
164
194
|
}
|
|
165
195
|
}
|
|
166
196
|
},
|
package/src/types/IRule.ts
CHANGED
|
@@ -179,9 +179,34 @@ export interface RulePack extends RulePackMetadata {
|
|
|
179
179
|
disables?: PackDisableConfig;
|
|
180
180
|
}
|
|
181
181
|
|
|
182
|
+
/**
|
|
183
|
+
* Tag type classification for rule categorization.
|
|
184
|
+
* Allows multi-dimensional tagging beyond security-only metadata.
|
|
185
|
+
*/
|
|
186
|
+
export type TagType = 'security' | 'operational' | 'compliance' | 'general';
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* A typed classification object for categorizing rules.
|
|
190
|
+
* Replaces the simpler string-based security tags with structured metadata.
|
|
191
|
+
*/
|
|
192
|
+
export interface Tag {
|
|
193
|
+
/** Tag classification type */
|
|
194
|
+
type: TagType;
|
|
195
|
+
|
|
196
|
+
/** Short identifier/label for the tag (e.g., "vlan-hopping", "access-control") */
|
|
197
|
+
label: string;
|
|
198
|
+
|
|
199
|
+
/** Optional extended description */
|
|
200
|
+
text?: string;
|
|
201
|
+
|
|
202
|
+
/** Optional severity/priority score (0-10 range) */
|
|
203
|
+
score?: number;
|
|
204
|
+
}
|
|
205
|
+
|
|
182
206
|
/**
|
|
183
207
|
* SEC-007: Security metadata for SARIF integration.
|
|
184
208
|
* Provides CWE mappings and CVSS scores for security-related rules.
|
|
209
|
+
* Note: tags field has been moved to RuleMetadata.tags for generalization.
|
|
185
210
|
*/
|
|
186
211
|
export interface SecurityMetadata {
|
|
187
212
|
/**
|
|
@@ -201,12 +226,6 @@ export interface SecurityMetadata {
|
|
|
201
226
|
* Example: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H'
|
|
202
227
|
*/
|
|
203
228
|
cvssVector?: string;
|
|
204
|
-
|
|
205
|
-
/**
|
|
206
|
-
* Security-related tags for categorization.
|
|
207
|
-
* Example: ['authentication', 'hardcoded-credentials', 'encryption']
|
|
208
|
-
*/
|
|
209
|
-
tags?: string[];
|
|
210
229
|
}
|
|
211
230
|
|
|
212
231
|
/**
|
|
@@ -226,6 +245,8 @@ export interface RuleMetadata {
|
|
|
226
245
|
remediation?: string;
|
|
227
246
|
/** SEC-007: Optional security metadata for SARIF integration */
|
|
228
247
|
security?: SecurityMetadata;
|
|
248
|
+
/** Typed tags for multi-dimensional rule categorization */
|
|
249
|
+
tags?: Tag[];
|
|
229
250
|
}
|
|
230
251
|
|
|
231
252
|
/**
|