Skip to content

Commit

Permalink
refactor: vulnapi report schemas
Browse files Browse the repository at this point in the history
  • Loading branch information
emmanuelgautier committed Oct 14, 2024
1 parent d1ef8b1 commit 142c0b1
Show file tree
Hide file tree
Showing 16 changed files with 206 additions and 66 deletions.
2 changes: 1 addition & 1 deletion schemas/2024-09/feature.schema.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://schemas.cerberauth.com/content/draft/2024-09/feature.schema.json",
"$id": "https://refactor-report-schemas.cerberauth-schemas.pages.dev/content/draft/2024-09/feature.schema.json",
"title": "Feature",
"description": "",
"type": "object",
Expand Down
4 changes: 2 additions & 2 deletions schemas/2024-09/features.schema.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://schemas.cerberauth.com/content/draft/2024-09/features.schema.json",
"$id": "https://refactor-report-schemas.cerberauth-schemas.pages.dev/content/draft/2024-09/features.schema.json",
"title": "Features",
"description": "",
"type": "object",
Expand All @@ -15,7 +15,7 @@
"featureList": {
"type": "array",
"items": {
"$ref": "https://schemas.cerberauth.com/content/draft/2024-09/feature.schema.json"
"$ref": "https://refactor-report-schemas.cerberauth-schemas.pages.dev/content/draft/2024-09/feature.schema.json"
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion schemas/2024-09/image.schema.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://schemas.cerberauth.com/content/draft/2024-09/image.schema.json",
"$id": "https://refactor-report-schemas.cerberauth-schemas.pages.dev/content/draft/2024-09/image.schema.json",
"title": "Image",
"description": "https://schema.org/ImageObject",
"type": "object",
Expand Down
6 changes: 3 additions & 3 deletions schemas/openid/draft/2024-09/provider.schema.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://schemas.cerberauth.com/openid/draft/2024-09/provider.schema.json",
"$id": "https://refactor-report-schemas.cerberauth-schemas.pages.dev/openid/draft/2024-09/provider.schema.json",
"title": "OpenID Connect Provider",
"description": "",
"type": "object",
Expand Down Expand Up @@ -28,7 +28,7 @@
"format": "uri"
},
"icon": {
"$ref": "https://schemas.cerberauth.com/content/draft/2024-09/image.schema.json"
"$ref": "https://refactor-report-schemas.cerberauth-schemas.pages.dev/content/draft/2024-09/image.schema.json"
},
"license": {
"type": "string"
Expand All @@ -39,7 +39,7 @@
"featureList": {
"type": "array",
"items": {
"$ref": "https://schemas.cerberauth.com/content/draft/2024-09/feature.schema.json"
"$ref": "https://refactor-report-schemas.cerberauth-schemas.pages.dev/content/draft/2024-09/feature.schema.json"
}
}
}
Expand Down
8 changes: 4 additions & 4 deletions schemas/templates/draft/2024-09/application.schema.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://schemas.cerberauth.com/templates/draft/2024-09/application.schema.json",
"$id": "https://refactor-report-schemas.cerberauth-schemas.pages.dev/templates/draft/2024-09/application.schema.json",
"title": "Application",
"description": "",
"type": "object",
Expand Down Expand Up @@ -47,13 +47,13 @@
}
},
"icon": {
"$ref": "https://schemas.cerberauth.com/content/draft/2024-09/image.schema.json"
"$ref": "https://refactor-report-schemas.cerberauth-schemas.pages.dev/content/draft/2024-09/image.schema.json"
},
"client": {
"$ref": "https://schemas.cerberauth.com/templates/draft/2024-09/client.schema.json"
"$ref": "https://refactor-report-schemas.cerberauth-schemas.pages.dev/templates/draft/2024-09/client.schema.json"
},
"example": {
"$ref": "https://schemas.cerberauth.com/templates/draft/2024-09/example.schema.json"
"$ref": "https://refactor-report-schemas.cerberauth-schemas.pages.dev/templates/draft/2024-09/example.schema.json"
}
}
}
2 changes: 1 addition & 1 deletion schemas/templates/draft/2024-09/client.schema.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://schemas.cerberauth.com/templates/draft/2024-09/client.schema.json",
"$id": "https://refactor-report-schemas.cerberauth-schemas.pages.dev/templates/draft/2024-09/client.schema.json",
"title": "Client Template",
"description": "",
"type": "object",
Expand Down
2 changes: 1 addition & 1 deletion schemas/templates/draft/2024-09/example.schema.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://schemas.cerberauth.com/templates/draft/2024-09/example.schema.json",
"$id": "https://refactor-report-schemas.cerberauth-schemas.pages.dev/templates/draft/2024-09/example.schema.json",
"title": "Example",
"description": "",
"type": "object",
Expand Down
40 changes: 40 additions & 0 deletions schemas/vulnapi/draft/2024-10/curl-report.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://refactor-report-schemas.cerberauth-schemas.pages.dev/vulnapi/draft/2024-10/curl-report.schema.json",
"title": "cURL Report",
"description": "",
"type": "object",
"required": [],
"properties": {
"method": {
"type": "string"
},
"url": {
"type": "string"
},
"data": {
"type": "object"
},
"headers": {
"type": "object"
},
"cookies": {
"type": "array",
"items": {
"type": "object"
}
},
"securitySchemes": {
"type": "array",
"items": {
"$ref": "https://refactor-report-schemas.cerberauth-schemas.pages.dev/vulnapi/draft/2024-10/security-scheme-report.schema.json"
}
},
"issues": {
"type": "array",
"items": {
"$ref": "https://refactor-report-schemas.cerberauth-schemas.pages.dev/vulnapi/draft/2024-10/issue-report.schema.json"
}
}
}
}
23 changes: 23 additions & 0 deletions schemas/vulnapi/draft/2024-10/graphql-report.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://refactor-report-schemas.cerberauth-schemas.pages.dev/vulnapi/draft/2024-10/graphql-report.schema.json",
"title": "GraphQL Report",
"description": "",
"type": "object",
"required": [
"url",
"queries",
"mutations"
],
"properties": {
"url": {
"type": "string"
},
"queries": {
"type": "object"
},
"mutations": {
"type": "object"
}
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://schemas.cerberauth.com/vulnapi/draft/2024-10/vulnerability.schema.json",
"title": "Vulnerability",
"$id": "https://refactor-report-schemas.cerberauth-schemas.pages.dev/vulnapi/draft/2024-10/issue-report.schema.json",
"title": "Issue",
"description": "",
"type": "object",
"required": [
Expand Down
35 changes: 35 additions & 0 deletions schemas/vulnapi/draft/2024-10/openapi-operation-report.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://refactor-report-schemas.cerberauth-schemas.pages.dev/vulnapi/draft/2024-10/openapi-operation-report.schema.json",
"title": "OpenAPI Operation Report",
"description": "",
"type": "object",
"required": [
"operationId",
"securitySchemes",
"issues"
],
"properties": {
"operationId": {
"type": "string"
},
"tags": {
"type": "array",
"items": {
"type": "string"
}
},
"securitySchemes": {
"type": "array",
"items": {
"$ref": "https://refactor-report-schemas.cerberauth-schemas.pages.dev/vulnapi/draft/2024-10/security-scheme-report.schema.json"
}
},
"issues": {
"type": "array",
"items": {
"$ref": "https://refactor-report-schemas.cerberauth-schemas.pages.dev/vulnapi/draft/2024-10/issue-report.schema.json"
}
}
}
}
25 changes: 25 additions & 0 deletions schemas/vulnapi/draft/2024-10/openapi-report.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://refactor-report-schemas.cerberauth-schemas.pages.dev/vulnapi/draft/2024-10/openapi-report.schema.json",
"title": "OpenAPI Report",
"description": "",
"type": "object",
"required": [],
"properties": {
"paths": {
"title": "Map<string, PathItem object>",
"type": "object",
"patternProperties": {
"^.*$": {
"title": "Map<string, Operation object>",
"type": "object",
"patternProperties": {
"^.*$": {
"$ref": "https://refactor-report-schemas.cerberauth-schemas.pages.dev/vulnapi/draft/2024-10/openapi-operation-report.schema.json"
}
}
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://schemas.cerberauth.com/vulnapi/draft/2024-10/operation.schema.json",
"title": "Report Operation",
"$id": "https://refactor-report-schemas.cerberauth-schemas.pages.dev/vulnapi/draft/2024-10/operation-report.schema.json",
"title": "Operation Report",
"description": "",
"type": "object",
"required": [
"id",
"tags",
"method",
"url",
"securitySchemes"
Expand Down Expand Up @@ -42,7 +41,7 @@
"securitySchemes": {
"type": "array",
"items": {
"$ref": "https://schemas.cerberauth.com/vulnapi/draft/2024-10/security-scheme.schema.json"
"$ref": "https://refactor-report-schemas.cerberauth-schemas.pages.dev/vulnapi/draft/2024-10/security-scheme-report.schema.json"
}
}
}
Expand Down
104 changes: 61 additions & 43 deletions schemas/vulnapi/draft/2024-10/report.schema.json
Original file line number Diff line number Diff line change
@@ -1,50 +1,68 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://schemas.cerberauth.com/vulnapi/report/draft/2024-10/report.schema.json",
"$id": "https://refactor-report-schemas.cerberauth-schemas.pages.dev/vulnapi/draft/2024-10/report.schema.json",
"title": "Report",
"description": "",
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"name",
"startTime",
"operation",
"scans",
"vulnerabilities"
],
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"startTime": {
"type": "string",
"format": "date-time"
},
"endTime": {
"type": "string",
"format": "date-time"
},
"operation": {
"$ref": "https://schemas.cerberauth.com/vulnapi/draft/2024-10/operation.schema.json"
},
"data": {
"type": "object"
},
"scans": {
"type": "array",
"items": {
"$ref": "https://schemas.cerberauth.com/vulnapi/draft/2024-10/scan.schema.json"
}
},
"vulnerabilities": {
"type": "array",
"items": {
"$ref": "https://schemas.cerberauth.com/vulnapi/draft/2024-10/vulnerability.schema.json"
"type": "object",
"required": ["options", "reports"],
"properties": {
"options": {
"type": "object"
},
"curl": {
"$ref": "https://refactor-report-schemas.cerberauth-schemas.pages.dev/vulnapi/draft/2024-10/curl-report.schema.json"
},
"openapi": {
"$ref": "https://refactor-report-schemas.cerberauth-schemas.pages.dev/vulnapi/draft/2024-10/openapi-report.schema.json"
},
"graphql": {
"$ref": "https://refactor-report-schemas.cerberauth-schemas.pages.dev/vulnapi/draft/2024-10/graphql-report.schema.json"
},
"reports": {
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"name",
"startTime",
"operation",
"scans",
"issues"
],
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"startTime": {
"type": "string",
"format": "date-time"
},
"endTime": {
"type": "string",
"format": "date-time"
},
"operation": {
"$ref": "https://refactor-report-schemas.cerberauth-schemas.pages.dev/vulnapi/draft/2024-10/operation-report.schema.json"
},
"data": {
"type": "object"
},
"scans": {
"type": "array",
"items": {
"$ref": "https://refactor-report-schemas.cerberauth-schemas.pages.dev/vulnapi/draft/2024-10/scan-report.schema.json"
}
},
"issues": {
"type": "array",
"items": {
"$ref": "https://refactor-report-schemas.cerberauth-schemas.pages.dev/vulnapi/draft/2024-10/issue-report.schema.json"
}
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://schemas.cerberauth.com/vulnapi/draft/2024-10/scan.schema.json",
"title": "Report Scan",
"$id": "https://refactor-report-schemas.cerberauth-schemas.pages.dev/vulnapi/draft/2024-10/scan-report.schema.json",
"title": "Scan Report",
"description": "",
"type": "object",
"required": [],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://schemas.cerberauth.com/vulnapi/draft/2024-10/security-scheme.schema.json",
"title": "Reporty Operation Security Scheme",
"$id": "https://refactor-report-schemas.cerberauth-schemas.pages.dev/vulnapi/draft/2024-10/security-scheme-report.schema.json",
"title": "Operation Security Scheme Report",
"description": "",
"type": "object",
"required": [
Expand Down

0 comments on commit 142c0b1

Please sign in to comment.