|
| 1 | +{ |
| 2 | + "$schema": "https://json-schema.org/draft/2020-12/schema", |
| 3 | + "$id": "https://raw.githubusercontent.com/DataDog/schema/main/code-security/sast/v1.0/schema.json", |
| 4 | + "title": "Datadog SAST Configuration", |
| 5 | + "type": "object", |
| 6 | + "properties": { |
| 7 | + "use-default-rulesets": { |
| 8 | + "type": "boolean", |
| 9 | + "default": true, |
| 10 | + "description": "Enable Datadog's default rulesets. Defaults to true." |
| 11 | + }, |
| 12 | + "use-rulesets": { |
| 13 | + "type": "array", |
| 14 | + "items": { |
| 15 | + "type": "string", |
| 16 | + "minLength": 1 |
| 17 | + }, |
| 18 | + "description": "List of rulesets to enable (in addition to defaults, if use-default-rulesets is true)." |
| 19 | + }, |
| 20 | + "ignore-rulesets": { |
| 21 | + "type": "array", |
| 22 | + "items": { |
| 23 | + "type": "string", |
| 24 | + "minLength": 1 |
| 25 | + }, |
| 26 | + "description": "List of rulesets to disable. Takes precedence over default rulesets and those listed in use-rulesets." |
| 27 | + }, |
| 28 | + "ruleset-configs": { |
| 29 | + "type": "object", |
| 30 | + "additionalProperties": { |
| 31 | + "$ref": "#/$defs/rulesetConfig" |
| 32 | + }, |
| 33 | + "description": "Per-ruleset configurations" |
| 34 | + }, |
| 35 | + "global-config": { |
| 36 | + "$ref": "#/$defs/globalConfig", |
| 37 | + "description": "Global settings for the static analyzer." |
| 38 | + } |
| 39 | + }, |
| 40 | + "required": [], |
| 41 | + "additionalProperties": false, |
| 42 | + "$defs": { |
| 43 | + "globalConfig": { |
| 44 | + "type": "object", |
| 45 | + "properties": { |
| 46 | + "only-paths": { |
| 47 | + "$ref": "#/$defs/pathList" |
| 48 | + }, |
| 49 | + "ignore-paths": { |
| 50 | + "$ref": "#/$defs/pathList" |
| 51 | + }, |
| 52 | + "use-gitignore": { |
| 53 | + "type": "boolean", |
| 54 | + "default": true, |
| 55 | + "description": "Use .gitignore to exclude files. Defaults to true." |
| 56 | + }, |
| 57 | + "ignore-generated-files": { |
| 58 | + "type": "boolean", |
| 59 | + "default": true, |
| 60 | + "description": "Ignore generated files. Defaults to true." |
| 61 | + }, |
| 62 | + "max-file-size-kb": { |
| 63 | + "type": "number", |
| 64 | + "minimum": 0 |
| 65 | + } |
| 66 | + }, |
| 67 | + "additionalProperties": false |
| 68 | + }, |
| 69 | + "rulesetConfig": { |
| 70 | + "type": "object", |
| 71 | + "properties": { |
| 72 | + "only-paths": { |
| 73 | + "$ref": "#/$defs/pathList", |
| 74 | + "description": "Paths to analyze for this ruleset." |
| 75 | + }, |
| 76 | + "ignore-paths": { |
| 77 | + "$ref": "#/$defs/pathList", |
| 78 | + "description": "Paths to exclude for this ruleset." |
| 79 | + }, |
| 80 | + "rule-configs": { |
| 81 | + "type": "object", |
| 82 | + "additionalProperties": { |
| 83 | + "$ref": "#/$defs/ruleConfig" |
| 84 | + }, |
| 85 | + "description": "Per-rule configurations within this ruleset." |
| 86 | + } |
| 87 | + }, |
| 88 | + "additionalProperties": false |
| 89 | + }, |
| 90 | + "ruleConfig": { |
| 91 | + "type": "object", |
| 92 | + "properties": { |
| 93 | + "only-paths": { |
| 94 | + "$ref": "#/$defs/pathList" |
| 95 | + }, |
| 96 | + "ignore-paths": { |
| 97 | + "$ref": "#/$defs/pathList" |
| 98 | + }, |
| 99 | + "arguments": { |
| 100 | + "type": "object", |
| 101 | + "additionalProperties": { |
| 102 | + "$ref": "#/$defs/argumentValue" |
| 103 | + } |
| 104 | + }, |
| 105 | + "severity": { |
| 106 | + "$ref": "#/$defs/severityValue" |
| 107 | + }, |
| 108 | + "category": { |
| 109 | + "enum": [ |
| 110 | + "BEST_PRACTICES", |
| 111 | + "CODE_STYLE", |
| 112 | + "ERROR_PRONE", |
| 113 | + "PERFORMANCE", |
| 114 | + "SECURITY" |
| 115 | + ] |
| 116 | + } |
| 117 | + }, |
| 118 | + "additionalProperties": false |
| 119 | + }, |
| 120 | + "pathList": { |
| 121 | + "type": "array", |
| 122 | + "items": { |
| 123 | + "type": "string", |
| 124 | + "minLength": 1 |
| 125 | + }, |
| 126 | + "description": "List of file paths or glob patterns." |
| 127 | + }, |
| 128 | + "argumentValue": { |
| 129 | + "anyOf": [ |
| 130 | + { |
| 131 | + "$ref": "#/$defs/singularArgumentValue" |
| 132 | + }, |
| 133 | + { |
| 134 | + "type": "object", |
| 135 | + "additionalProperties": { |
| 136 | + "$ref": "#/$defs/singularArgumentValue" |
| 137 | + } |
| 138 | + } |
| 139 | + ], |
| 140 | + "description": "Argument value (singular or by-path)." |
| 141 | + }, |
| 142 | + "singularArgumentValue": { |
| 143 | + "anyOf": [ |
| 144 | + { |
| 145 | + "type": "string" |
| 146 | + }, |
| 147 | + { |
| 148 | + "type": "number", |
| 149 | + "$comment": "will be internally coerced to string" |
| 150 | + }, |
| 151 | + { |
| 152 | + "type": "boolean", |
| 153 | + "$comment": "will be internally coerced to string" |
| 154 | + } |
| 155 | + ] |
| 156 | + }, |
| 157 | + "severityValue": { |
| 158 | + "anyOf": [ |
| 159 | + { |
| 160 | + "$ref": "#/$defs/singularSeverityValue" |
| 161 | + }, |
| 162 | + { |
| 163 | + "type": "object", |
| 164 | + "additionalProperties": { |
| 165 | + "$ref": "#/$defs/singularSeverityValue" |
| 166 | + } |
| 167 | + } |
| 168 | + ] |
| 169 | + }, |
| 170 | + "singularSeverityValue": { |
| 171 | + "enum": [ |
| 172 | + "ERROR", |
| 173 | + "WARNING", |
| 174 | + "NOTICE", |
| 175 | + "NONE" |
| 176 | + ] |
| 177 | + } |
| 178 | + } |
| 179 | +} |
0 commit comments