playwright-security-scan 0.0.0 → 0.1.0-beta.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,192 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://pkg.invalid/schemas/run-report.schema.json",
4
+ "title": "Run report",
5
+ "description": "reports/pw-sec/report.json (02, chapter 6): the full result of one run, redacted (P-07).",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": [
9
+ "schemaVersion",
10
+ "runId",
11
+ "startedAt",
12
+ "finishedAt",
13
+ "mode",
14
+ "pkgVersion",
15
+ "playwrightVersion",
16
+ "scope",
17
+ "coverage",
18
+ "findings",
19
+ "resolved",
20
+ "notCovered",
21
+ "testsWithoutTraffic",
22
+ "gate",
23
+ "diagnostics",
24
+ "outcome"
25
+ ],
26
+ "properties": {
27
+ "schemaVersion": {
28
+ "const": 1
29
+ },
30
+ "runId": {
31
+ "type": "string"
32
+ },
33
+ "startedAt": {
34
+ "type": "string"
35
+ },
36
+ "finishedAt": {
37
+ "type": "string"
38
+ },
39
+ "mode": {
40
+ "enum": ["scan", "baseline"]
41
+ },
42
+ "pkgVersion": {
43
+ "type": "string"
44
+ },
45
+ "playwrightVersion": {
46
+ "type": "string"
47
+ },
48
+ "scope": {
49
+ "type": "object",
50
+ "additionalProperties": false,
51
+ "required": ["origins"],
52
+ "properties": {
53
+ "origins": {
54
+ "description": "Scope origins and patterns.",
55
+ "type": "array",
56
+ "items": {
57
+ "type": "string"
58
+ }
59
+ }
60
+ }
61
+ },
62
+ "coverage": {
63
+ "$ref": "common.schema.json#/$defs/coverage"
64
+ },
65
+ "findings": {
66
+ "type": "array",
67
+ "items": {
68
+ "$ref": "#/$defs/classifiedFinding"
69
+ }
70
+ },
71
+ "resolved": {
72
+ "description": "Baseline entries not seen although their scope was covered (08-REQ-05).",
73
+ "type": "array",
74
+ "items": {
75
+ "$ref": "#/$defs/entryRef"
76
+ }
77
+ },
78
+ "notCovered": {
79
+ "description": "Baseline entries whose scope the run did not cover (08-REQ-05).",
80
+ "type": "array",
81
+ "items": {
82
+ "$ref": "#/$defs/entryRef"
83
+ }
84
+ },
85
+ "testsWithoutTraffic": {
86
+ "description": "Tests with no in-scope response (05-REQ-02), at most 50.",
87
+ "type": "array",
88
+ "maxItems": 50,
89
+ "items": {
90
+ "$ref": "common.schema.json#/$defs/testContextRef"
91
+ }
92
+ },
93
+ "gate": {
94
+ "type": "object",
95
+ "additionalProperties": false,
96
+ "required": ["minSeverity", "minConfidence", "failed", "blocking"],
97
+ "properties": {
98
+ "minSeverity": {
99
+ "$ref": "common.schema.json#/$defs/severity"
100
+ },
101
+ "minConfidence": {
102
+ "$ref": "common.schema.json#/$defs/confidence"
103
+ },
104
+ "failed": {
105
+ "type": "boolean"
106
+ },
107
+ "blocking": {
108
+ "description": "Fingerprints that fail the run.",
109
+ "type": "array",
110
+ "items": {
111
+ "type": "string"
112
+ }
113
+ }
114
+ }
115
+ },
116
+ "diagnostics": {
117
+ "type": "array",
118
+ "items": {
119
+ "$ref": "common.schema.json#/$defs/diagnostic"
120
+ }
121
+ },
122
+ "outcome": {
123
+ "$ref": "outcome.schema.json"
124
+ }
125
+ },
126
+ "$defs": {
127
+ "classifiedFinding": {
128
+ "title": "ClassifiedFinding",
129
+ "description": "A finding of the run with its classification against the baseline (08, chapter 3).",
130
+ "allOf": [
131
+ {
132
+ "$ref": "common.schema.json#/$defs/findingFields"
133
+ },
134
+ {
135
+ "type": "object",
136
+ "required": ["classification", "blocking"],
137
+ "properties": {
138
+ "classification": {
139
+ "enum": ["new", "accepted", "false-positive", "wontfix", "expired"]
140
+ },
141
+ "blocking": {
142
+ "description": "The finding fails the run.",
143
+ "type": "boolean"
144
+ },
145
+ "baseline": {
146
+ "description": "The baseline entry of the finding, if any.",
147
+ "type": "object",
148
+ "additionalProperties": false,
149
+ "required": ["status", "addedAt"],
150
+ "properties": {
151
+ "status": {
152
+ "enum": ["accepted", "false-positive", "wontfix"]
153
+ },
154
+ "note": {
155
+ "type": "string"
156
+ },
157
+ "until": {
158
+ "$ref": "common.schema.json#/$defs/isoDate"
159
+ },
160
+ "addedAt": {
161
+ "$ref": "common.schema.json#/$defs/isoDate"
162
+ },
163
+ "expiresInDays": {
164
+ "description": "Set when until is at most 14 days away (08-REQ-03).",
165
+ "type": "integer"
166
+ }
167
+ }
168
+ }
169
+ }
170
+ }
171
+ ],
172
+ "unevaluatedProperties": false,
173
+ "type": "object"
174
+ },
175
+ "entryRef": {
176
+ "type": "object",
177
+ "additionalProperties": false,
178
+ "required": ["fingerprint", "ruleId", "subject"],
179
+ "properties": {
180
+ "fingerprint": {
181
+ "type": "string"
182
+ },
183
+ "ruleId": {
184
+ "type": "string"
185
+ },
186
+ "subject": {
187
+ "type": "string"
188
+ }
189
+ }
190
+ }
191
+ }
192
+ }