From d7d896b75ac9d95f50608ac6f5e4d3c0f8fdb83e Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Thu, 10 Feb 2022 10:30:58 +0000 Subject: [PATCH] Auto Generate Syntax Docs + JSONSchema [Thu Feb 10 10:30:58 UTC 2022] :robot: --- SYNTAX-REFERENCE.md | 20 ++++++++++++++++++++ nuclei-jsonschema.json | 5 +++++ v2/pkg/templates/templates_doc.go | 11 ++++++++++- 3 files changed, 35 insertions(+), 1 deletion(-) diff --git a/SYNTAX-REFERENCE.md b/SYNTAX-REFERENCE.md index 0f2b10f56..c2847e217 100755 --- a/SYNTAX-REFERENCE.md +++ b/SYNTAX-REFERENCE.md @@ -1694,6 +1694,26 @@ Valid values:
+
+ +match-all bool + +
+
+ +MatchAll enables matching for all matcher values. Default is false. + + +Valid values: + + + - false + + - true +
+ +
+ diff --git a/nuclei-jsonschema.json b/nuclei-jsonschema.json index a964954d7..a552f8087 100755 --- a/nuclei-jsonschema.json +++ b/nuclei-jsonschema.json @@ -300,6 +300,11 @@ "type": "boolean", "title": "use case insensitive match", "description": "use case insensitive match" + }, + "match-all": { + "type": "boolean", + "title": "match all values", + "description": "match all matcher values ignoring condition" } }, "additionalProperties": false, diff --git a/v2/pkg/templates/templates_doc.go b/v2/pkg/templates/templates_doc.go index e45e00ff1..778b4f6ed 100644 --- a/v2/pkg/templates/templates_doc.go +++ b/v2/pkg/templates/templates_doc.go @@ -599,7 +599,7 @@ func init() { FieldName: "matchers", }, } - MATCHERSMatcherDoc.Fields = make([]encoder.Doc, 13) + MATCHERSMatcherDoc.Fields = make([]encoder.Doc, 14) MATCHERSMatcherDoc.Fields[0].Name = "type" MATCHERSMatcherDoc.Fields[0].Type = "MatcherTypeHolder" MATCHERSMatcherDoc.Fields[0].Note = "" @@ -702,6 +702,15 @@ func init() { "false", "true", } + MATCHERSMatcherDoc.Fields[13].Name = "match-all" + MATCHERSMatcherDoc.Fields[13].Type = "bool" + MATCHERSMatcherDoc.Fields[13].Note = "" + MATCHERSMatcherDoc.Fields[13].Description = "MatchAll enables matching for all matcher values. Default is false." + MATCHERSMatcherDoc.Fields[13].Comments[encoder.LineComment] = "MatchAll enables matching for all matcher values. Default is false." + MATCHERSMatcherDoc.Fields[13].Values = []string{ + "false", + "true", + } MatcherTypeHolderDoc.Type = "MatcherTypeHolder" MatcherTypeHolderDoc.Comments[encoder.LineComment] = " MatcherTypeHolder is used to hold internal type of the matcher"