From 1b8ad856d65a5a9204e39eb53cf1ea13e58b1945 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Sat, 9 Oct 2021 14:28:15 +0000 Subject: [PATCH] Auto Generate Syntax Docs + JSONSchema [Sat Oct 9 14:28:15 UTC 2021] :robot: --- SYNTAX-REFERENCE.md | 13 +++++++++++++ nuclei-jsonschema.json | 5 +++++ v2/pkg/templates/templates_doc.go | 7 ++++++- 3 files changed, 24 insertions(+), 1 deletion(-) diff --git a/SYNTAX-REFERENCE.md b/SYNTAX-REFERENCE.md index bb1ad86b..691c25af 100755 --- a/SYNTAX-REFERENCE.md +++ b/SYNTAX-REFERENCE.md @@ -1192,6 +1192,19 @@ StopAtFirstMatch stops the execution of the requests and template as soon as a m
+
+ +skip-variables-check bool + +
+
+ +SkipVariablesCheck skips the check for unresolved variables in request + +
+ +
+ diff --git a/nuclei-jsonschema.json b/nuclei-jsonschema.json index 20da4372..1578630e 100755 --- a/nuclei-jsonschema.json +++ b/nuclei-jsonschema.json @@ -720,6 +720,11 @@ "type": "boolean", "title": "stop at first match", "description": "Stop the execution after a match is found" + }, + "skip-variables-check": { + "type": "boolean", + "title": "skip variable checks", + "description": "Skips the check for unresolved variables in request" } }, "additionalProperties": false, diff --git a/v2/pkg/templates/templates_doc.go b/v2/pkg/templates/templates_doc.go index e7758c96..30ac25af 100644 --- a/v2/pkg/templates/templates_doc.go +++ b/v2/pkg/templates/templates_doc.go @@ -270,7 +270,7 @@ func init() { FieldName: "requests", }, } - HTTPRequestDoc.Fields = make([]encoder.Doc, 25) + HTTPRequestDoc.Fields = make([]encoder.Doc, 26) HTTPRequestDoc.Fields[0].Name = "matchers" HTTPRequestDoc.Fields[0].Type = "[]matchers.Matcher" HTTPRequestDoc.Fields[0].Note = "" @@ -437,6 +437,11 @@ func init() { HTTPRequestDoc.Fields[24].Note = "" HTTPRequestDoc.Fields[24].Description = "StopAtFirstMatch stops the execution of the requests and template as soon as a match is found." HTTPRequestDoc.Fields[24].Comments[encoder.LineComment] = "StopAtFirstMatch stops the execution of the requests and template as soon as a match is found." + HTTPRequestDoc.Fields[25].Name = "skip-variables-check" + HTTPRequestDoc.Fields[25].Type = "bool" + HTTPRequestDoc.Fields[25].Note = "" + HTTPRequestDoc.Fields[25].Description = "SkipVariablesCheck skips the check for unresolved variables in request" + HTTPRequestDoc.Fields[25].Comments[encoder.LineComment] = "SkipVariablesCheck skips the check for unresolved variables in request" MATCHERSMatcherDoc.Type = "matchers.Matcher" MATCHERSMatcherDoc.Comments[encoder.LineComment] = " Matcher is used to match a part in the output from a protocol."