-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
151 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,148 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"$id": "https://raw.githubusercontent.com/chaitin/gamma/master/static/schema/schema-v1.json", | ||
"title": "POC Check", | ||
"description": "A tool that checks XRay POC", | ||
"type": "object", | ||
"definitions": { | ||
"rules": { | ||
"description": "POC rules", | ||
"type": "array", | ||
"minItems": 1, | ||
"items": { | ||
"description": "A rule", | ||
"type": "object", | ||
"properties": { | ||
"method": { | ||
"description": "request method", | ||
"type": "string", | ||
"enum": [ | ||
"HEAD", | ||
"GET", | ||
"POST", | ||
"PUT", | ||
"PATCH", | ||
"DELETE", | ||
"OPTIONS", | ||
"CONNECT", | ||
"MOVE", | ||
"TRACE", | ||
"PROPFIND" | ||
] | ||
}, | ||
"path": { | ||
"description": "request path", | ||
"type": "string", | ||
"pattern": "^/.*" | ||
}, | ||
"headers": { | ||
"description": "request HTTP headers", | ||
"type": "object", | ||
"additionalProperties": { | ||
"type": "string" | ||
} | ||
}, | ||
"body": { | ||
"description": "request body", | ||
"type": "string" | ||
}, | ||
"follow_redirects": { | ||
"description": "This option determines whether the HTTP request will follow the jump", | ||
"type": "boolean" | ||
}, | ||
"expression": { | ||
"description": "a CEL expression what determines whether the vulnerability exists", | ||
"type": "string" | ||
}, | ||
"search": { | ||
"description": "a pattern to search the keywords in last response body", | ||
"type": "string" | ||
} | ||
}, | ||
"required": [ | ||
"expression" | ||
], | ||
"additionalProperties": false | ||
} | ||
} | ||
}, | ||
"properties": { | ||
"name": { | ||
"description": "POC name", | ||
"type": "string", | ||
"pattern": "^(?:poc-yaml|custom)-[a-z0-9\\-]+$" | ||
}, | ||
"set": { | ||
"description": "set variables", | ||
"type": "object", | ||
"additionalProperties": { | ||
"type": "string" | ||
} | ||
}, | ||
"rules": { | ||
"$ref": "#/definitions/rules" | ||
}, | ||
"groups": { | ||
"description": "Group Rules", | ||
"type": "object", | ||
"additionalProperties": { | ||
"$ref": "#/definitions/rules" | ||
} | ||
}, | ||
"detail": { | ||
"description": "output details", | ||
"type": "object", | ||
"properties": { | ||
"author": { | ||
"description": "POC author", | ||
"type": "string" | ||
}, | ||
"links": { | ||
"description": "some links that describe or reproduce the vulnerability", | ||
"type": "array", | ||
"items": { | ||
"description": "link", | ||
"type": "string", | ||
"format": "iri" | ||
}, | ||
"minItems": 1 | ||
} | ||
}, | ||
"additionalProperties": true, | ||
"required": [ | ||
"links" | ||
] | ||
}, | ||
"test": { | ||
"description": "for unittest", | ||
"type": "object", | ||
"properties": { | ||
"target": { | ||
"description": "test env target", | ||
"type": "string", | ||
"format": "iri" | ||
}, | ||
"skip": { | ||
"description": "This option determines whether the test is skip", | ||
"type": "boolean" | ||
} | ||
}, | ||
"additionalProperties": false | ||
} | ||
}, | ||
"oneOf": [ | ||
{ | ||
"required": [ | ||
"name", | ||
"rules" | ||
] | ||
}, | ||
{ | ||
"required": [ | ||
"name", | ||
"groups" | ||
] | ||
} | ||
], | ||
"additionalProperties": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
./schema-v2.json |