code-intelligence 0.0.0-stage → 0.1.0

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.
@@ -0,0 +1,126 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://raw.githubusercontent.com/micio86dev/code-intelligence/main/schema/report.schema.json",
4
+ "title": "code-intel scan --format json (schemaVersion 1)",
5
+ "type": "object",
6
+ "required": [
7
+ "schemaVersion",
8
+ "tool",
9
+ "profile",
10
+ "target",
11
+ "complete",
12
+ "durationMs",
13
+ "engines",
14
+ "summary",
15
+ "findings",
16
+ "exitCode"
17
+ ],
18
+ "properties": {
19
+ "schemaVersion": { "const": 1 },
20
+ "tool": {
21
+ "type": "object",
22
+ "required": ["name", "version"],
23
+ "properties": { "name": { "type": "string" }, "version": { "type": "string" } }
24
+ },
25
+ "profile": { "enum": ["quick", "deep"] },
26
+ "target": {
27
+ "type": "object",
28
+ "required": ["mode", "fileCount", "excludedCount"],
29
+ "properties": {
30
+ "mode": { "enum": ["changed", "staged", "since", "all"] },
31
+ "ref": { "type": ["string", "null"] },
32
+ "isGit": { "type": "boolean" },
33
+ "fileCount": { "type": "integer" },
34
+ "excludedCount": { "type": "integer" }
35
+ }
36
+ },
37
+ "complete": {
38
+ "description": "False when any planned engine timed out, errored, or was missing (unless allowed).",
39
+ "type": "boolean"
40
+ },
41
+ "durationMs": { "type": "integer" },
42
+ "engines": { "type": "array", "items": { "$ref": "#/definitions/engineResult" } },
43
+ "summary": {
44
+ "type": "object",
45
+ "required": ["total", "bySeverity", "failOn", "newOnly", "suppressed"],
46
+ "properties": {
47
+ "total": { "type": "integer" },
48
+ "bySeverity": { "type": "object" },
49
+ "failOn": { "enum": ["info", "low", "medium", "high", "critical"] },
50
+ "newOnly": { "type": "boolean" },
51
+ "suppressed": {
52
+ "type": "object",
53
+ "properties": {
54
+ "outsideChangedLines": { "type": "integer" },
55
+ "baseline": { "type": "integer" }
56
+ }
57
+ }
58
+ }
59
+ },
60
+ "findings": { "type": "array", "items": { "$ref": "#/definitions/finding" } },
61
+ "config": {
62
+ "description": "Repository-supplied configuration that shaped the scan. A repository can configure a scan to find less, so non-default settings are always listed.",
63
+ "type": "object",
64
+ "required": ["file", "ignored", "inEffect"],
65
+ "properties": {
66
+ "file": { "type": ["string", "null"] },
67
+ "ignored": { "type": "boolean" },
68
+ "inEffect": { "type": "array", "items": { "type": "string" } }
69
+ }
70
+ },
71
+ "exitCode": { "enum": [0, 1, 3] }
72
+ },
73
+ "definitions": {
74
+ "engineResult": {
75
+ "type": "object",
76
+ "required": ["engine", "category", "status", "durationMs", "findingCount"],
77
+ "properties": {
78
+ "engine": { "type": "string" },
79
+ "category": { "enum": ["secrets", "sast", "deps", "architecture"] },
80
+ "version": { "type": ["string", "null"] },
81
+ "status": { "enum": ["ok", "findings", "skipped", "unavailable", "timeout", "error"] },
82
+ "reason": { "type": ["string", "null"] },
83
+ "warnings": { "type": "array", "items": { "type": "string" } },
84
+ "durationMs": { "type": "integer" },
85
+ "findingCount": { "type": "integer" },
86
+ "cached": { "type": "boolean" },
87
+ "filesScanned": { "type": ["integer", "null"] }
88
+ }
89
+ },
90
+ "finding": {
91
+ "type": "object",
92
+ "required": [
93
+ "fingerprint",
94
+ "engine",
95
+ "ruleId",
96
+ "category",
97
+ "severity",
98
+ "file",
99
+ "line",
100
+ "message"
101
+ ],
102
+ "properties": {
103
+ "fingerprint": {
104
+ "description": "Stable across line shifts; use it to track a finding over time.",
105
+ "type": "string",
106
+ "pattern": "^[0-9a-f]{16}$"
107
+ },
108
+ "engine": { "type": "string" },
109
+ "ruleId": { "type": "string" },
110
+ "category": { "enum": ["secrets", "sast", "deps", "architecture"] },
111
+ "severity": { "enum": ["info", "low", "medium", "high", "critical"] },
112
+ "file": { "description": "Repo-relative POSIX path.", "type": "string" },
113
+ "line": { "type": ["integer", "null"] },
114
+ "endLine": { "type": ["integer", "null"] },
115
+ "message": { "type": "string" },
116
+ "remediation": { "type": ["string", "null"] },
117
+ "references": { "type": "array", "items": { "type": "string" } },
118
+ "alsoReportedBy": {
119
+ "description": "Other engines that independently reported the same issue at the same line (merged, not duplicated).",
120
+ "type": "array",
121
+ "items": { "type": "string" }
122
+ }
123
+ }
124
+ }
125
+ }
126
+ }