diff --git a/schemas/vulnapi/draft/2024-10/curl-report.schema.json b/schemas/vulnapi/draft/2024-10/curl-report.schema.json new file mode 100644 index 0000000..e53d222 --- /dev/null +++ b/schemas/vulnapi/draft/2024-10/curl-report.schema.json @@ -0,0 +1,40 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://schemas.cerberauth.com/vulnapi/draft/2024-10/curl-report.schema.json", + "title": "cURL Report", + "description": "", + "type": "object", + "required": ["method", "url", "securitySchemes", "issues"], + "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://schemas.cerberauth.com/vulnapi/draft/2024-10/security-scheme-report.schema.json" + } + }, + "issues": { + "type": "array", + "items": { + "$ref": "https://schemas.cerberauth.com/vulnapi/draft/2024-10/issue-report.schema.json" + } + } + } +} \ No newline at end of file diff --git a/schemas/vulnapi/draft/2024-10/graphql-report.schema.json b/schemas/vulnapi/draft/2024-10/graphql-report.schema.json new file mode 100644 index 0000000..02514aa --- /dev/null +++ b/schemas/vulnapi/draft/2024-10/graphql-report.schema.json @@ -0,0 +1,23 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://schemas.cerberauth.com/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" + } + } +} \ No newline at end of file diff --git a/schemas/vulnapi/draft/2024-10/vulnerability.schema.json b/schemas/vulnapi/draft/2024-10/issue-report.schema.json similarity index 96% rename from schemas/vulnapi/draft/2024-10/vulnerability.schema.json rename to schemas/vulnapi/draft/2024-10/issue-report.schema.json index 8625fc3..592378f 100644 --- a/schemas/vulnapi/draft/2024-10/vulnerability.schema.json +++ b/schemas/vulnapi/draft/2024-10/issue-report.schema.json @@ -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://schemas.cerberauth.com/vulnapi/draft/2024-10/issue-report.schema.json", + "title": "Issue", "description": "", "type": "object", "required": [ diff --git a/schemas/vulnapi/draft/2024-10/openapi-operation-report.schema.json b/schemas/vulnapi/draft/2024-10/openapi-operation-report.schema.json new file mode 100644 index 0000000..10054e6 --- /dev/null +++ b/schemas/vulnapi/draft/2024-10/openapi-operation-report.schema.json @@ -0,0 +1,35 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://schemas.cerberauth.com/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://schemas.cerberauth.com/vulnapi/draft/2024-10/security-scheme-report.schema.json" + } + }, + "issues": { + "type": "array", + "items": { + "$ref": "https://schemas.cerberauth.com/vulnapi/draft/2024-10/issue-report.schema.json" + } + } + } +} \ No newline at end of file diff --git a/schemas/vulnapi/draft/2024-10/openapi-report.schema.json b/schemas/vulnapi/draft/2024-10/openapi-report.schema.json new file mode 100644 index 0000000..f9a2cf0 --- /dev/null +++ b/schemas/vulnapi/draft/2024-10/openapi-report.schema.json @@ -0,0 +1,25 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://schemas.cerberauth.com/vulnapi/draft/2024-10/openapi-report.schema.json", + "title": "OpenAPI Report", + "description": "", + "type": "object", + "required": ["paths"], + "properties": { + "paths": { + "title": "Map", + "type": "object", + "patternProperties": { + "^.*$": { + "title": "Map", + "type": "object", + "patternProperties": { + "^.*$": { + "$ref": "https://schemas.cerberauth.com/vulnapi/draft/2024-10/openapi-operation-report.schema.json" + } + } + } + } + } + } +} \ No newline at end of file diff --git a/schemas/vulnapi/draft/2024-10/operation.schema.json b/schemas/vulnapi/draft/2024-10/operation-report.schema.json similarity index 89% rename from schemas/vulnapi/draft/2024-10/operation.schema.json rename to schemas/vulnapi/draft/2024-10/operation-report.schema.json index d3367aa..cfcd9af 100644 --- a/schemas/vulnapi/draft/2024-10/operation.schema.json +++ b/schemas/vulnapi/draft/2024-10/operation-report.schema.json @@ -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://schemas.cerberauth.com/vulnapi/draft/2024-10/operation-report.schema.json", + "title": "Operation Report", "description": "", "type": "object", "required": [ "id", - "tags", "method", "url", "securitySchemes" @@ -42,7 +41,7 @@ "securitySchemes": { "type": "array", "items": { - "$ref": "https://schemas.cerberauth.com/vulnapi/draft/2024-10/security-scheme.schema.json" + "$ref": "https://schemas.cerberauth.com/vulnapi/draft/2024-10/security-scheme-report.schema.json" } } } diff --git a/schemas/vulnapi/draft/2024-10/report.schema.json b/schemas/vulnapi/draft/2024-10/report.schema.json index a887170..3574595 100644 --- a/schemas/vulnapi/draft/2024-10/report.schema.json +++ b/schemas/vulnapi/draft/2024-10/report.schema.json @@ -1,50 +1,73 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://schemas.cerberauth.com/vulnapi/report/draft/2024-10/report.schema.json", + "$id": "https://schemas.cerberauth.com/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://schemas.cerberauth.com/vulnapi/draft/2024-10/curl-report.schema.json" + }, + "openapi": { + "$ref": "https://schemas.cerberauth.com/vulnapi/draft/2024-10/openapi-report.schema.json" + }, + "graphql": { + "$ref": "https://schemas.cerberauth.com/vulnapi/draft/2024-10/graphql-report.schema.json" + }, + "reports": { + "type": "array", + "items": { + "type": "object", + "required": [ + "id", + "name", + "startTime", + "scans", + "issues" + ], + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "startTime": { + "type": "string", + "format": "date-time" + }, + "endTime": { + "type": "string", + "format": "date-time" + }, + "operation": { + "type": "object", + "required": ["id"], + "properties": { + "id": { + "type": "string" + } + } + }, + "data": { + "type": "object" + }, + "scans": { + "type": "array", + "items": { + "$ref": "https://schemas.cerberauth.com/vulnapi/draft/2024-10/scan-report.schema.json" + } + }, + "issues": { + "type": "array", + "items": { + "$ref": "https://schemas.cerberauth.com/vulnapi/draft/2024-10/issue-report.schema.json" + } + } } } } diff --git a/schemas/vulnapi/draft/2024-10/scan.schema.json b/schemas/vulnapi/draft/2024-10/scan-report.schema.json similarity index 96% rename from schemas/vulnapi/draft/2024-10/scan.schema.json rename to schemas/vulnapi/draft/2024-10/scan-report.schema.json index 4d0c61c..616ed28 100644 --- a/schemas/vulnapi/draft/2024-10/scan.schema.json +++ b/schemas/vulnapi/draft/2024-10/scan-report.schema.json @@ -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://schemas.cerberauth.com/vulnapi/draft/2024-10/scan-report.schema.json", + "title": "Scan Report", "description": "", "type": "object", "required": [], diff --git a/schemas/vulnapi/draft/2024-10/security-scheme.schema.json b/schemas/vulnapi/draft/2024-10/security-scheme-report.schema.json similarity index 91% rename from schemas/vulnapi/draft/2024-10/security-scheme.schema.json rename to schemas/vulnapi/draft/2024-10/security-scheme-report.schema.json index 7c6e986..7e393fa 100644 --- a/schemas/vulnapi/draft/2024-10/security-scheme.schema.json +++ b/schemas/vulnapi/draft/2024-10/security-scheme-report.schema.json @@ -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://schemas.cerberauth.com/vulnapi/draft/2024-10/security-scheme-report.schema.json", + "title": "Operation Security Scheme Report", "description": "", "type": "object", "required": [