-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsecure-code-agent.schema.json
More file actions
143 lines (143 loc) · 4.86 KB
/
secure-code-agent.schema.json
File metadata and controls
143 lines (143 loc) · 4.86 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/marshallguillory86/secure-code-agent/main/secure-code-agent.schema.json",
"title": "secure-code-agent config",
"description": "Configuration schema for secure-code-agent. See docs/design.md for semantics.",
"type": "object",
"additionalProperties": false,
"properties": {
"version": { "type": "integer", "enum": [1] },
"paths": {
"type": "object",
"additionalProperties": false,
"properties": {
"include_extensions": {
"type": "array",
"items": { "type": "string" },
"description": "File extensions to consider in scope (e.g. '.py', '.ts')."
},
"exclude_patterns": {
"type": "array",
"items": { "type": "string" },
"description": "Glob patterns to exclude. Tested against POSIX-normalized relative paths."
}
}
},
"asvs_level": {
"type": "integer",
"enum": [1, 2, 3],
"default": 2,
"description": "OWASP ASVS verification level. Findings that only violate higher levels are downgraded to LOW."
},
"scanners": {
"type": "object",
"description": "Per-scanner configuration. Unknown scanner names are ignored.",
"additionalProperties": {
"type": "object",
"additionalProperties": false,
"properties": {
"enabled": { "type": "boolean", "default": true },
"timeout_seconds": { "type": "integer", "minimum": 1, "default": 600 },
"online": { "type": "boolean", "default": false },
"extra_args": { "type": "array", "items": { "type": "string" } }
}
}
},
"severity_overrides": {
"type": "object",
"description": "Override scanner-emitted severity per rule id.",
"additionalProperties": {
"type": "string",
"enum": ["critical", "high", "medium", "low", "informational"]
}
},
"category_overrides": {
"type": "object",
"description": "Override category mapping per rule id.",
"additionalProperties": {
"type": "string",
"enum": [
"secrets",
"dependencies",
"code_vulnerabilities",
"auth_authz",
"crypto",
"supply_chain",
"config_iac",
"logging_observability",
"policy_docs"
]
}
},
"gates": {
"type": "object",
"additionalProperties": false,
"properties": {
"fail_on_severity": {
"type": "array",
"items": { "type": "string", "enum": ["critical", "high", "medium", "low"] }
},
"fail_on_category": {
"type": "array",
"items": {
"type": "string",
"enum": [
"secrets",
"dependencies",
"code_vulnerabilities",
"auth_authz",
"crypto",
"supply_chain",
"config_iac",
"logging_observability",
"policy_docs"
]
}
},
"fail_on_new": { "type": "boolean", "default": true },
"min_score": { "type": "number", "minimum": 0, "maximum": 5 },
"require_scanners": {
"type": "array",
"items": { "type": "string" }
},
"max_unsuppressed": {
"type": "object",
"additionalProperties": false,
"properties": {
"critical": { "type": "integer", "minimum": 0 },
"high": { "type": "integer", "minimum": 0 },
"medium": { "type": "integer", "minimum": 0 },
"low": { "type": "integer", "minimum": 0 }
}
}
}
},
"outputs": {
"type": "object",
"additionalProperties": false,
"properties": {
"markdown_path": { "type": "string", "default": "secure-code-report.md" },
"json_path": { "type": "string", "default": "secure-code-report.json" },
"sarif_path": { "type": "string", "default": "secure-code.sarif" },
"comment_path": { "type": "string", "default": "secure-code-pr-comment.md" },
"prompt_path": { "type": "string", "default": "secure-code-remediation-prompt.md" },
"baseline_path": { "type": "string", "default": "secure-code-baseline.json" }
}
},
"suppressions_file": {
"type": "string",
"default": ".scignore.yaml",
"description": "Path to the suppressions file. Per design.md §10."
},
"loc_for_scoring": {
"type": "object",
"description": "Override the auto-computed LOC count (rare).",
"additionalProperties": false,
"properties": {
"value": { "type": "integer", "minimum": 1 },
"reason": { "type": "string" }
},
"required": ["value", "reason"]
}
}
}