-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrule-template.json
More file actions
48 lines (48 loc) · 1.3 KB
/
rule-template.json
File metadata and controls
48 lines (48 loc) · 1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
{
"rules": [
{
"id": "CATEGORY_RULE_NAME",
"name": "Human readable rule name",
"category": "category-name",
"severity": "medium",
"frameworks": [],
"description": "Brief description of what this rule detects",
"catches": [
"What problems this rule detects",
"Why this is a problem for the project"
],
"fix": [
"Step 1: How to fix the issue",
"Step 2: Alternative approaches"
],
"recommendation": {
"title": "Fix the detected issue",
"description": "Detailed explanation of the issue and why it matters",
"library": "Optional: related library or pattern to use",
"docsLink": "Optional: link to documentation",
"codeExample": {
"before": "Code that triggers the finding",
"after": "Code that fixes the issue"
}
},
"patterns": [
{
"type": "regex",
"pattern": "specific-pattern-to-match",
"message": "Finding message shown to user",
"excludePatterns": [
"Optional: pattern to exclude false positives"
],
"fileExtensions": [
".ts",
".js"
]
}
],
"fileExtensions": [
".ts",
".js"
]
}
]
}