From a06e1c59abf587300e76235c8c893fb964999825 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Sat, 5 Feb 2022 06:56:19 +0000 Subject: [PATCH] Auto Generate Syntax Docs + JSONSchema [Sat Feb 5 06:56:19 UTC 2022] :robot: --- SYNTAX-REFERENCE.md | 65 +++++++++++++++++++++++++++++++ nuclei-jsonschema.json | 30 ++++++++++++++ v2/pkg/templates/templates_doc.go | 31 ++++++++++++++- 3 files changed, 125 insertions(+), 1 deletion(-) diff --git a/SYNTAX-REFERENCE.md b/SYNTAX-REFERENCE.md index 94e14315f..0f881d658 100755 --- a/SYNTAX-REFERENCE.md +++ b/SYNTAX-REFERENCE.md @@ -3447,6 +3447,71 @@ Address contains address for the request
+
+ +min_version string + +
+
+ +Minimum tls version - auto if not specified. + + +Valid values: + + + - sslv3 + + - tls10 + + - tls11 + + - tls12 + + - tls13 +
+ +
+ +
+ +max_version string + +
+
+ +Max tls version - auto if not specified. + + +Valid values: + + + - sslv3 + + - tls10 + + - tls11 + + - tls12 + + - tls13 +
+ +
+ +
+ +cipher_suites []string + +
+
+ +Client Cipher Suites - auto if not specified. + +
+ +
+ diff --git a/nuclei-jsonschema.json b/nuclei-jsonschema.json index a0bed62d9..06eda52ae 100755 --- a/nuclei-jsonschema.json +++ b/nuclei-jsonschema.json @@ -951,6 +951,36 @@ "type": "string", "title": "address for the ssl request", "description": "Address contains address for the request" + }, + "min_version": { + "enum": [ + "sslv3", + "tls10", + "tls11", + "tls12", + "tls13" + ], + "type": "string", + "title": "TLS version", + "description": "Minimum tls version - automatic if not specified." + }, + "max_version": { + "enum": [ + "sslv3", + "tls10", + "tls11", + "tls12", + "tls13" + ], + "type": "string", + "title": "TLS version", + "description": "Max tls version - automatic if not specified." + }, + "cipher_suites": { + "items": { + "type": "string" + }, + "type": "array" } }, "additionalProperties": false, diff --git a/v2/pkg/templates/templates_doc.go b/v2/pkg/templates/templates_doc.go index 8cffb6778..2c1c7205f 100644 --- a/v2/pkg/templates/templates_doc.go +++ b/v2/pkg/templates/templates_doc.go @@ -1556,7 +1556,7 @@ func init() { Value: "Matched is the input which was matched upon", }, } - SSLRequestDoc.Fields = make([]encoder.Doc, 4) + SSLRequestDoc.Fields = make([]encoder.Doc, 7) SSLRequestDoc.Fields[0].Name = "matchers" SSLRequestDoc.Fields[0].Type = "[]matchers.Matcher" SSLRequestDoc.Fields[0].Note = "" @@ -1581,6 +1581,35 @@ func init() { SSLRequestDoc.Fields[3].Note = "" SSLRequestDoc.Fields[3].Description = "Address contains address for the request" SSLRequestDoc.Fields[3].Comments[encoder.LineComment] = "Address contains address for the request" + SSLRequestDoc.Fields[4].Name = "min_version" + SSLRequestDoc.Fields[4].Type = "string" + SSLRequestDoc.Fields[4].Note = "" + SSLRequestDoc.Fields[4].Description = "Minimum tls version - auto if not specified." + SSLRequestDoc.Fields[4].Comments[encoder.LineComment] = "Minimum tls version - auto if not specified." + SSLRequestDoc.Fields[4].Values = []string{ + "sslv3", + "tls10", + "tls11", + "tls12", + "tls13", + } + SSLRequestDoc.Fields[5].Name = "max_version" + SSLRequestDoc.Fields[5].Type = "string" + SSLRequestDoc.Fields[5].Note = "" + SSLRequestDoc.Fields[5].Description = "Max tls version - auto if not specified." + SSLRequestDoc.Fields[5].Comments[encoder.LineComment] = "Max tls version - auto if not specified." + SSLRequestDoc.Fields[5].Values = []string{ + "sslv3", + "tls10", + "tls11", + "tls12", + "tls13", + } + SSLRequestDoc.Fields[6].Name = "cipher_suites" + SSLRequestDoc.Fields[6].Type = "[]string" + SSLRequestDoc.Fields[6].Note = "" + SSLRequestDoc.Fields[6].Description = "Client Cipher Suites - auto if not specified." + SSLRequestDoc.Fields[6].Comments[encoder.LineComment] = "Client Cipher Suites - auto if not specified." WEBSOCKETRequestDoc.Type = "websocket.Request" WEBSOCKETRequestDoc.Comments[encoder.LineComment] = " Request is a request for the Websocket protocol"