From 146fb2f9d7e60953e580398d89bd5f0bcd0230dd Mon Sep 17 00:00:00 2001 From: Hamed Salimian Date: Sat, 18 Jan 2025 08:11:16 +0330 Subject: [PATCH 001/107] Add Project Co-lead Signed-off-by: Hamed Salimian --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 2b0699e..a8eed08 100644 --- a/README.md +++ b/README.md @@ -31,3 +31,4 @@ For detailed information and guidelines about contributing in developing templat #### Core Team The project current core team are: - [Hamed Salimain](https://github.com/Snbig) (Project Leader) +- [AmirHossein Raeisi](https://github.com/Ahsraeisi) (Project Co-lead) From eeb143268a1a4da6bb27fb92b3a45e0a0609c902 Mon Sep 17 00:00:00 2001 From: Hamed Salimian Date: Sat, 18 Jan 2025 16:00:41 +0330 Subject: [PATCH 002/107] Create 2.1.11.yaml Signed-off-by: Hamed Salimian --- templates/headless/2.1.11.yaml | 64 ++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 templates/headless/2.1.11.yaml diff --git a/templates/headless/2.1.11.yaml b/templates/headless/2.1.11.yaml new file mode 100644 index 0000000..0fde935 --- /dev/null +++ b/templates/headless/2.1.11.yaml @@ -0,0 +1,64 @@ +id: ASVS-4-0-3-V2-1-11 + +info: + name: ASVS 2.1.11 Check + author: Hamed Salimian + severity: low + classification: + cwe-id: CWE-521 + reference: + - https://owasp.org/www-project-web-security-testing-guide/v42/4-Web_Application_Security_Testing/04-Authentication_Testing/07-Testing_for_Weak_Password_Policy.html + - https://snbig.github.io/Vulnerable-Pages/ASVS_2_1_11/ + tags: asvs,2.1.11 + description: | + Verify that "paste" functionality, browser password helpers, and external password managers are permitted. + Run with `-show-browser` switch. + +variables: + password_field_name: "password" + +headless: + - steps: + - args: + url: "{{BaseURL}}" + action: navigate + + - action: waitload + + - action: script + name: anyFieldsFunctional + args: + code: | + () => { + return (function verifyPasteFunction(testValue = "{{rand_text_alphanumeric(16)}}") { + const passwordFields = document.querySelectorAll('input[name="{{password_field_name}}"]'); + + if (passwordFields.length === 0) { + return false; // No password fields found + } + + let isAnyPasteFunctional = false; // Flag to track if any field is functional + + passwordFields.forEach((field) => { + // Verify paste functionality + field.value = ""; // Clear the field + + // Simulate paste by directly setting the value + field.focus(); + document.execCommand("insertText", false, testValue); // Programmatic paste + + const pastedValue = field.value; + if (pastedValue === testValue) { + isAnyPasteFunctional = true; // Set the flag to true if paste works + } + }); + + // Return true if any field was functional, otherwise false + return isAnyPasteFunctional; + })(); + } + + matchers: + - type: dsl + dsl: + - anyFieldsFunctional == "true" From 6ff33dc3e2b5a88d45ab15a5c57593b372b9c126 Mon Sep 17 00:00:00 2001 From: Hamed Salimian Date: Sat, 18 Jan 2025 16:20:34 +0330 Subject: [PATCH 003/107] Update template-sign.yml Signed-off-by: Hamed Salimian --- .github/workflows/template-sign.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/template-sign.yml b/.github/workflows/template-sign.yml index fb341bb..3ddd8f1 100644 --- a/.github/workflows/template-sign.yml +++ b/.github/workflows/template-sign.yml @@ -14,7 +14,8 @@ jobs: if: github.repository == 'OWASP/www-project-asvs-security-evaluation-templates-with-nuclei' steps: - uses: actions/checkout@v4 - + with: + token: '${{ secrets.GITHUB_TOKEN }}' - uses: projectdiscovery/actions/setup/nuclei@v1 - run: nuclei -lfa -duc -sign -ud $GITHUB_WORKSPACE -t . env: From 1d159fab16f368d5a54e8ea11400b6fed656b798 Mon Sep 17 00:00:00 2001 From: Hamed Salimian Date: Sat, 18 Jan 2025 16:22:22 +0330 Subject: [PATCH 004/107] Update 2.1.11.yaml Signed-off-by: Hamed Salimian --- templates/headless/2.1.11.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/headless/2.1.11.yaml b/templates/headless/2.1.11.yaml index 0fde935..61c7de1 100644 --- a/templates/headless/2.1.11.yaml +++ b/templates/headless/2.1.11.yaml @@ -30,7 +30,7 @@ headless: args: code: | () => { - return (function verifyPasteFunction(testValue = "{{rand_text_alphanumeric(16)}}") { + return (function verifyPasteFunction(testValue = "{{rand_text_alphanumeric(14)}}") { const passwordFields = document.querySelectorAll('input[name="{{password_field_name}}"]'); if (passwordFields.length === 0) { From 079910fee15503b03bb91bbcd7ed039968a0c6f8 Mon Sep 17 00:00:00 2001 From: Hamed Salimian Date: Sat, 18 Jan 2025 16:29:35 +0330 Subject: [PATCH 005/107] Update template-sign.yml Signed-off-by: Hamed Salimian --- .github/workflows/template-sign.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/template-sign.yml b/.github/workflows/template-sign.yml index 3ddd8f1..60b2ff4 100644 --- a/.github/workflows/template-sign.yml +++ b/.github/workflows/template-sign.yml @@ -14,9 +14,9 @@ jobs: if: github.repository == 'OWASP/www-project-asvs-security-evaluation-templates-with-nuclei' steps: - uses: actions/checkout@v4 + - uses: projectdiscovery/actions/setup/nuclei@v1 with: token: '${{ secrets.GITHUB_TOKEN }}' - - uses: projectdiscovery/actions/setup/nuclei@v1 - run: nuclei -lfa -duc -sign -ud $GITHUB_WORKSPACE -t . env: NUCLEI_USER_CERTIFICATE: ${{ secrets.NUCLEI_USER_CERTIFICATE }} From 5ec0d51dbdb19fd5576b1273379bbadb952cc44e Mon Sep 17 00:00:00 2001 From: Hamed Salimian Date: Sat, 18 Jan 2025 16:31:09 +0330 Subject: [PATCH 006/107] Update 13.1.3.yaml Signed-off-by: Hamed Salimian --- templates/headless/13.1.3.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/templates/headless/13.1.3.yaml b/templates/headless/13.1.3.yaml index 3628c98..e4d3bae 100644 --- a/templates/headless/13.1.3.yaml +++ b/templates/headless/13.1.3.yaml @@ -42,4 +42,3 @@ headless: part: urls regex: - (i?)(https?|wss?)://[^\s?]+(?:\?|&)(?:session|ASP.NET_SessionId|ASPSESSIONID|SITESERVER|cfid|cftoken|jsessionid|sessid|sid|viewstate|zenid|PHPSESSID|ConsumerKey|ConsumerSecret|DB_USERNAME|HEROKU_API_KEY|HOMEBREW_GITHUB_API_TOKEN|JEKYLL_GITHUB_TOKEN|PT_TOKEN|SESSION_TOKEN|SF_USERNAME|SLACK_BOT_TOKEN|access-token|access_token|access_token_secret|accesstoken|admin|api-key|api_key|api_secret_key|api_token|auth_token|authkey|authorization|authorization_key|authorization_token|authtoken|aws_access_key_id|aws_secret_access_key|bearer|bot_access_token|bucket|client-secret|client_id|client_key|client_secret|clientsecret|consumer_key|consumer_secret|dbpasswd|email|encryption-key|encryption_key|encryptionkey|id_dsa|irc_pass|key|oauth_token|pass|password|private_key|private-key|privatekey|secret|secret-key|secret_key|secret_token|secretkey|secretkey|session_key|session_secret|slack_api_token|slack_secret_token|slack_token|ssh-key|ssh_key|sshkey|token|username|xoxa-2|xoxr)=[^&\s]+ -# digest: 4a0a0047304502200bb9a7013c8b23ed6d393454ecc8d3490da0969a5941940b992a0d840a4ec6de022100a2ff4b3d7ae8fd710402c65a53e16516fa5b41e02b7655cb678965104a89d3b3:236a7c23afe836fbe231d6e037cff444 \ No newline at end of file From 9164b1a739538910b5437434440d1f4a2a9f7aa1 Mon Sep 17 00:00:00 2001 From: ghost Date: Sat, 18 Jan 2025 13:01:24 +0000 Subject: [PATCH 007/107] =?UTF-8?q?chore:=20sign=20templates=20?= =?UTF-8?q?=F0=9F=A4=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/9.1.3.yaml | 2 +- templates/headless/13.1.3.yaml | 1 + templates/headless/2.1.11.yaml | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/templates/9.1.3.yaml b/templates/9.1.3.yaml index 31facb1..4d3c235 100644 --- a/templates/9.1.3.yaml +++ b/templates/9.1.3.yaml @@ -45,4 +45,4 @@ ssl: - type: json json: - " .tls_version" -# digest: 4b0a00483046022100e28690ed9b4e02b2f1b32d3e5fea4266b8aea6d668d35365ed9e94ad9515ae8e022100e25e0fd48313f9be115c8f93bb91dc18ad74ebf1997576b72c99e810ac804570:236a7c23afe836fbe231d6e037cff444 \ No newline at end of file +# digest: 490a00463044022066fa9110f4460dba681f02c1a240d1365ac63c8ac1f41ca071fb8c56b7b5f7ef022031fc701e75272c788aa942a2172f04eb0358e218d757a6ec37ed10578fb28164:236a7c23afe836fbe231d6e037cff444 \ No newline at end of file diff --git a/templates/headless/13.1.3.yaml b/templates/headless/13.1.3.yaml index e4d3bae..91ee155 100644 --- a/templates/headless/13.1.3.yaml +++ b/templates/headless/13.1.3.yaml @@ -42,3 +42,4 @@ headless: part: urls regex: - (i?)(https?|wss?)://[^\s?]+(?:\?|&)(?:session|ASP.NET_SessionId|ASPSESSIONID|SITESERVER|cfid|cftoken|jsessionid|sessid|sid|viewstate|zenid|PHPSESSID|ConsumerKey|ConsumerSecret|DB_USERNAME|HEROKU_API_KEY|HOMEBREW_GITHUB_API_TOKEN|JEKYLL_GITHUB_TOKEN|PT_TOKEN|SESSION_TOKEN|SF_USERNAME|SLACK_BOT_TOKEN|access-token|access_token|access_token_secret|accesstoken|admin|api-key|api_key|api_secret_key|api_token|auth_token|authkey|authorization|authorization_key|authorization_token|authtoken|aws_access_key_id|aws_secret_access_key|bearer|bot_access_token|bucket|client-secret|client_id|client_key|client_secret|clientsecret|consumer_key|consumer_secret|dbpasswd|email|encryption-key|encryption_key|encryptionkey|id_dsa|irc_pass|key|oauth_token|pass|password|private_key|private-key|privatekey|secret|secret-key|secret_key|secret_token|secretkey|secretkey|session_key|session_secret|slack_api_token|slack_secret_token|slack_token|ssh-key|ssh_key|sshkey|token|username|xoxa-2|xoxr)=[^&\s]+ +# digest: 4a0a00473045022100a6c13a2d3c3f6022b65ee4a2befbc5ed8b508adaacb00d4cd021850e7684d68402200457b9687680ef120175c025f49e2ae323fb19d7763a537ed250484d19ebfb7a:236a7c23afe836fbe231d6e037cff444 \ No newline at end of file diff --git a/templates/headless/2.1.11.yaml b/templates/headless/2.1.11.yaml index 61c7de1..5c78f61 100644 --- a/templates/headless/2.1.11.yaml +++ b/templates/headless/2.1.11.yaml @@ -62,3 +62,4 @@ headless: - type: dsl dsl: - anyFieldsFunctional == "true" +# digest: 4a0a00473045022100c74aedc8edd1b389d7a60d6ec0d897e107db389e572bfd66fa769afa06b0306b02204b6ff6f459c0338e15b1265f608fa55b533d6f13f808776e4ca95a55642535d1:236a7c23afe836fbe231d6e037cff444 \ No newline at end of file From b4cfe253ff3bbeb1afe10cad081ccb4e55725c39 Mon Sep 17 00:00:00 2001 From: Hamed Salimian Date: Tue, 21 Jan 2025 05:59:06 +0000 Subject: [PATCH 008/107] Update Submodule --- Vulnerable-Pages | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Vulnerable-Pages b/Vulnerable-Pages index d30c157..478e3d9 160000 --- a/Vulnerable-Pages +++ b/Vulnerable-Pages @@ -1 +1 @@ -Subproject commit d30c157b7b6a9685b1b0c54dbf26a9ec57a41a41 +Subproject commit 478e3d9ba8f7dbffe3575d254bcf1cd744ad460e From ca0650758f0b9beb2eef1db1328dbfeaf0eb2492 Mon Sep 17 00:00:00 2001 From: AmirHossein Raeisi <96957814+Ahsraeisi@users.noreply.github.com> Date: Wed, 12 Feb 2025 23:42:41 +0330 Subject: [PATCH 009/107] Create 3.4.2.yaml Signed-off-by: AmirHossein Raeisi <96957814+Ahsraeisi@users.noreply.github.com> --- templates/3.4.2.yaml | 46 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 templates/3.4.2.yaml diff --git a/templates/3.4.2.yaml b/templates/3.4.2.yaml new file mode 100644 index 0000000..03cc2ed --- /dev/null +++ b/templates/3.4.2.yaml @@ -0,0 +1,46 @@ +id: ASVS-4-0-3-V3-4-2 + +info: + name: ASVS 3.4.2 Check + author: AmirHossein Raeisi + severity: info + classification: + cwe-id: CWE-1004 + reference: + - https://owasp.org/www-project-web-security-testing-guide/v42/4-Web_Application_Security_Testing/06-Session_Management_Testing/02-Testing_for_Cookies_Attributes - https://cheatsheetseries.owasp.org/cheatsheets/File_Upload_Cheat_Sheet.html + - https://vulnerable-pages.onrender.com/set-cookie + - https://github.com/projectdiscovery/nuclei-templates/blob/main/http/misconfiguration/cookies-without-httponly.yaml + tags: asvs,3.4.2 + description: | + Verify that cookie-based session tokens have the 'HttpOnly' attribute set. + +flow: | + http() + javascript() + +http: + - method: GET + path: + - "{{BaseURL}}" + host-redirects: true + max-redirects: 2 + +javascript: + - code: | + content = template.http_all_headers + const setCookieLines = content + .split(/\r\n/) + .filter(line => line.trim().toLowerCase().startsWith('set-cookie:')); + + const nonHttpOnlyCookies = setCookieLines.filter(line => !line.toLowerCase().includes('httponly')); + + const cookieNames = nonHttpOnlyCookies.map(line => { + const match = line.match(/set-cookie:\s*([^=]+)=/i); + return match ? match[1] : null; + }).filter(Boolean).filter(cookieName => cookieName.toLowerCase().includes('session')); // Check for 'session' in the cookie name; + cookieNames + + extractors: + - type: regex + regex: + - '[a-zA-Z0-9_-]+' From 2921f9f4305417f134233eaa56097d1be315bb56 Mon Sep 17 00:00:00 2001 From: ghost Date: Wed, 12 Feb 2025 20:12:59 +0000 Subject: [PATCH 010/107] =?UTF-8?q?chore:=20sign=20templates=20?= =?UTF-8?q?=F0=9F=A4=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/3.4.2.yaml | 1 + templates/9.1.3.yaml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/templates/3.4.2.yaml b/templates/3.4.2.yaml index 03cc2ed..114f128 100644 --- a/templates/3.4.2.yaml +++ b/templates/3.4.2.yaml @@ -44,3 +44,4 @@ javascript: - type: regex regex: - '[a-zA-Z0-9_-]+' +# digest: 4a0a00473045022100a1ef06a1cf51a7e5a0399a7893ea37adf853ba4a87d4fa6aeb50503351035f4102204eaef51de28de227045aed5105b480c759249314d8a948a0aab21c518c1f152d:236a7c23afe836fbe231d6e037cff444 \ No newline at end of file diff --git a/templates/9.1.3.yaml b/templates/9.1.3.yaml index 4d3c235..b38a9ec 100644 --- a/templates/9.1.3.yaml +++ b/templates/9.1.3.yaml @@ -45,4 +45,4 @@ ssl: - type: json json: - " .tls_version" -# digest: 490a00463044022066fa9110f4460dba681f02c1a240d1365ac63c8ac1f41ca071fb8c56b7b5f7ef022031fc701e75272c788aa942a2172f04eb0358e218d757a6ec37ed10578fb28164:236a7c23afe836fbe231d6e037cff444 \ No newline at end of file +# digest: 4b0a00483046022100d0a52c913dd7508d29da6d696201484e80cd312a466c1ea6ff2abf3e6385f9f7022100eaf7394ea5c915c6b6dbdbc7c5a0d63ea481a4f08e2d143d3a62bbcffb4cd1c1:236a7c23afe836fbe231d6e037cff444 \ No newline at end of file From 373ba24b579e426b067347cb3b5d3ccf52e92fbd Mon Sep 17 00:00:00 2001 From: AmirHossein Raeisi <96957814+Ahsraeisi@users.noreply.github.com> Date: Mon, 17 Feb 2025 13:19:20 +0330 Subject: [PATCH 011/107] Update 3.4.2.yaml Signed-off-by: AmirHossein Raeisi <96957814+Ahsraeisi@users.noreply.github.com> --- templates/3.4.2.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/3.4.2.yaml b/templates/3.4.2.yaml index 114f128..f969e24 100644 --- a/templates/3.4.2.yaml +++ b/templates/3.4.2.yaml @@ -7,7 +7,7 @@ info: classification: cwe-id: CWE-1004 reference: - - https://owasp.org/www-project-web-security-testing-guide/v42/4-Web_Application_Security_Testing/06-Session_Management_Testing/02-Testing_for_Cookies_Attributes - https://cheatsheetseries.owasp.org/cheatsheets/File_Upload_Cheat_Sheet.html + - https://owasp.org/www-project-web-security-testing-guide/v42/4-Web_Application_Security_Testing/06-Session_Management_Testing/02-Testing_for_Cookies_Attributes - https://vulnerable-pages.onrender.com/set-cookie - https://github.com/projectdiscovery/nuclei-templates/blob/main/http/misconfiguration/cookies-without-httponly.yaml tags: asvs,3.4.2 @@ -44,4 +44,4 @@ javascript: - type: regex regex: - '[a-zA-Z0-9_-]+' -# digest: 4a0a00473045022100a1ef06a1cf51a7e5a0399a7893ea37adf853ba4a87d4fa6aeb50503351035f4102204eaef51de28de227045aed5105b480c759249314d8a948a0aab21c518c1f152d:236a7c23afe836fbe231d6e037cff444 \ No newline at end of file +# digest: 4a0a00473045022100a1ef06a1cf51a7e5a0399a7893ea37adf853ba4a87d4fa6aeb50503351035f4102204eaef51de28de227045aed5105b480c759249314d8a948a0aab21c518c1f152d:236a7c23afe836fbe231d6e037cff444 From e2741d9873420cd10701d15a0321da0d7bf1c55e Mon Sep 17 00:00:00 2001 From: ghost Date: Mon, 17 Feb 2025 09:49:36 +0000 Subject: [PATCH 012/107] =?UTF-8?q?chore:=20sign=20templates=20?= =?UTF-8?q?=F0=9F=A4=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/3.4.2.yaml | 2 +- templates/9.1.3.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/3.4.2.yaml b/templates/3.4.2.yaml index f969e24..aabe41c 100644 --- a/templates/3.4.2.yaml +++ b/templates/3.4.2.yaml @@ -44,4 +44,4 @@ javascript: - type: regex regex: - '[a-zA-Z0-9_-]+' -# digest: 4a0a00473045022100a1ef06a1cf51a7e5a0399a7893ea37adf853ba4a87d4fa6aeb50503351035f4102204eaef51de28de227045aed5105b480c759249314d8a948a0aab21c518c1f152d:236a7c23afe836fbe231d6e037cff444 +# digest: 4a0a00473045022100c2b42cddd46efda37dc9650ed2f881c6b089ca31b65bcc78d53a21ba41c0a5bc022059b47407bcc48d3ff9e40c71aadb6af658570d839d5cf88388e740cc3fd5bd7b:236a7c23afe836fbe231d6e037cff444 \ No newline at end of file diff --git a/templates/9.1.3.yaml b/templates/9.1.3.yaml index b38a9ec..f248229 100644 --- a/templates/9.1.3.yaml +++ b/templates/9.1.3.yaml @@ -45,4 +45,4 @@ ssl: - type: json json: - " .tls_version" -# digest: 4b0a00483046022100d0a52c913dd7508d29da6d696201484e80cd312a466c1ea6ff2abf3e6385f9f7022100eaf7394ea5c915c6b6dbdbc7c5a0d63ea481a4f08e2d143d3a62bbcffb4cd1c1:236a7c23afe836fbe231d6e037cff444 \ No newline at end of file +# digest: 4a0a0047304502206da1d24370e950eaf4d7206cab7a891e6838704cf7b4b7687a0f4d16796b2509022100de82264b01bafb1693f8cc8dc5bf046c07075ba8ca4cde030f6d0dfbd340da09:236a7c23afe836fbe231d6e037cff444 \ No newline at end of file From af7c752816d1f0d6718a7d725be1b4144464fc97 Mon Sep 17 00:00:00 2001 From: AmirHossein Raeisi <96957814+Ahsraeisi@users.noreply.github.com> Date: Thu, 6 Mar 2025 00:13:07 +0330 Subject: [PATCH 013/107] Create update-readme.py Signed-off-by: AmirHossein Raeisi <96957814+Ahsraeisi@users.noreply.github.com> --- .github/scripts/update-readme.py | 63 ++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 .github/scripts/update-readme.py diff --git a/.github/scripts/update-readme.py b/.github/scripts/update-readme.py new file mode 100644 index 0000000..e5d479e --- /dev/null +++ b/.github/scripts/update-readme.py @@ -0,0 +1,63 @@ +import os +import re +import math + +# Function to find .yaml files recursively +def find_yaml_files(root_dir): + yaml_files = [] + for dirpath, _, filenames in os.walk(root_dir): + for filename in filenames: + if filename.endswith('.yaml') and re.match(r'(\d+\.)+\d+\.yaml', filename): + yaml_files.append(os.path.join(dirpath, filename)) + return yaml_files + +# Function to update README.md with an HTML table (5 columns, no .yaml extension) +def update_readme(yaml_files): + readme_file = 'README.md' + try: + with open(readme_file, 'r', encoding='utf-8') as file: + readme_content = file.read() + + # Remove .yaml extension and sort filenames + yaml_filenames = sorted(set(os.path.splitext(os.path.basename(f))[0] for f in yaml_files)) + + # Create a table with 5 columns + table_rows = "" + num_files = len(yaml_filenames) + num_columns = 5 + num_rows = math.ceil(num_files / num_columns) + + for i in range(num_rows): + row_files = yaml_filenames[i * num_columns:(i + 1) * num_columns] + table_rows += "" + "".join(f"{file}" for file in row_files) + "\n" + + table_html = f"""

Available Templates

+ + {table_rows} +
+ +""" + + if "

Available Templates

" in readme_content: + h2_index = readme_content.index("

Available Templates

") + + readme_content = readme_content[:h2_index] + + readme_content += f'{table_html}' + with open(readme_file, 'w', encoding='utf-8') as file: + file.write(readme_content) + + print("README.md updated successfully.") + + except FileNotFoundError: + print(f"{readme_file} not found.") + except Exception as e: + print(f"An error occurred: {e}") + +if __name__ == '__main__': + root_dir = '../../' + yaml_files = find_yaml_files(root_dir) + if yaml_files: + update_readme(yaml_files) + else: + print("No matching YAML files found.") From ac4eb8ccccd2e78440503e58394186876a25c5d8 Mon Sep 17 00:00:00 2001 From: AmirHossein Raeisi <96957814+Ahsraeisi@users.noreply.github.com> Date: Thu, 6 Mar 2025 00:15:17 +0330 Subject: [PATCH 014/107] Create update-readme.yml Signed-off-by: AmirHossein Raeisi <96957814+Ahsraeisi@users.noreply.github.com> --- .github/workflows/update-readme.yml | 34 +++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/update-readme.yml diff --git a/.github/workflows/update-readme.yml b/.github/workflows/update-readme.yml new file mode 100644 index 0000000..5b56b2a --- /dev/null +++ b/.github/workflows/update-readme.yml @@ -0,0 +1,34 @@ +name: Update README with Templates + +on: + push: + branches: + - main + pull_request: + branches: + - dev + +jobs: + update-readme: + runs-on: ubuntu-latest + steps: + - name: Checkout the repository + uses: actions/checkout@v2 + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.x' + + - name: Run Python script to update README + run: python .github/scripts/update-readme.py + + + - name: Commit changes + uses: stefanzweifel/git-auto-commit-action@v4 + with: + commit_message: Update README table + commit_user_name: GitHub Actions + commit_user_email: github-actions[bot]@users.noreply.github.com + branch: main + file_pattern: README.md From 21b6226c8270f3e59f88f4c0cb8e2c322e8042a2 Mon Sep 17 00:00:00 2001 From: AmirHossein Raeisi <96957814+Ahsraeisi@users.noreply.github.com> Date: Thu, 6 Mar 2025 00:15:54 +0330 Subject: [PATCH 015/107] Update update-readme.yml Signed-off-by: AmirHossein Raeisi <96957814+Ahsraeisi@users.noreply.github.com> --- .github/workflows/update-readme.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update-readme.yml b/.github/workflows/update-readme.yml index 5b56b2a..7e84fb0 100644 --- a/.github/workflows/update-readme.yml +++ b/.github/workflows/update-readme.yml @@ -3,7 +3,7 @@ name: Update README with Templates on: push: branches: - - main + - dev pull_request: branches: - dev From 6867de39b86ea5ebca2db0200105e31bae9fc5df Mon Sep 17 00:00:00 2001 From: AmirHossein Raeisi <96957814+Ahsraeisi@users.noreply.github.com> Date: Thu, 6 Mar 2025 00:21:08 +0330 Subject: [PATCH 016/107] Update update-readme.yml Signed-off-by: AmirHossein Raeisi <96957814+Ahsraeisi@users.noreply.github.com> --- .github/workflows/update-readme.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update-readme.yml b/.github/workflows/update-readme.yml index 7e84fb0..2fd0dd9 100644 --- a/.github/workflows/update-readme.yml +++ b/.github/workflows/update-readme.yml @@ -30,5 +30,5 @@ jobs: commit_message: Update README table commit_user_name: GitHub Actions commit_user_email: github-actions[bot]@users.noreply.github.com - branch: main + branch: dev file_pattern: README.md From b87e45ca470dd194075d9c99fe31e7a2937440b1 Mon Sep 17 00:00:00 2001 From: Ahsraeisi Date: Wed, 5 Mar 2025 20:51:19 +0000 Subject: [PATCH 017/107] Update README table --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index a8eed08..e744fd7 100644 --- a/README.md +++ b/README.md @@ -32,3 +32,15 @@ For detailed information and guidelines about contributing in developing templat The project current core team are: - [Hamed Salimain](https://github.com/Snbig) (Project Leader) - [AmirHossein Raeisi](https://github.com/Ahsraeisi) (Project Co-lead) +

Available Templates

+ + + + + + + + + +
12.1.112.1.1.212.3.312.6.113.1.3
13.2.113.2.213.3.114.2.314.3.2
14.4.114.4.214.4.314.4.414.4.5
14.4.614.4.714.5.114.5.214.5.3
2.1.113.4.25.1.55.2.5.15.2.6
5.3.3.15.3.3.25.3.95.5.28.2.1
9.1.29.1.3
+ From c56bf225e85abe2f7f3ca3d4f62fe3de64dc107c Mon Sep 17 00:00:00 2001 From: AmirHossein Raeisi <96957814+Ahsraeisi@users.noreply.github.com> Date: Thu, 6 Mar 2025 00:48:26 +0330 Subject: [PATCH 018/107] Create 3.4.1.yaml Signed-off-by: AmirHossein Raeisi <96957814+Ahsraeisi@users.noreply.github.com> --- templates/3.4.1.yaml | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 templates/3.4.1.yaml diff --git a/templates/3.4.1.yaml b/templates/3.4.1.yaml new file mode 100644 index 0000000..f27809e --- /dev/null +++ b/templates/3.4.1.yaml @@ -0,0 +1,44 @@ +id: ASVS-4-0-3-V3-4-1 + +info: + name: ASVS 3.4.1 Check + author: AmirHossein Raeisi + severity: info + classification: + cwe-id: CWE-614 + reference: + - https://owasp.org/www-project-web-security-testing-guide/v42/4-Web_Application_Security_Testing/06-Session_Management_Testing/02-Testing_for_Cookies_Attributes + - https://vulnerable-pages.onrender.com/set-cookie + - https://github.com/projectdiscovery/nuclei-templates/blob/main/http/misconfiguration/cookies-without-secure.yaml + tags: asvs,3.4.1 + description: | + Verify that cookie-based session tokens have the 'Secure' attribute set. + +flow: | + http() + javascript() + +http: + - method: GET + path: + - "{{BaseURL}}" + host-redirects: true + max-redirects: 2 + +javascript: + - code: | + content = template.http_all_headers + const setCookieLines = content + .split(/\r\n/) + .filter(line => line.trim().toLowerCase().startsWith('set-cookie:')); + const nonSecureCookies = setCookieLines.filter(line => !line.toLowerCase().includes('secure')); + const cookieNames = nonSecureCookies.map(line => { + const match = line.match(/set-cookie:\s*([^=]+)=/i); + return match ? match[1] : null; + }).filter(Boolean).filter(cookieName => cookieName.toLowerCase().includes('session')); // Check for 'session' in the cookie name + cookieNames + + extractors: + - type: regex + regex: + - '[a-zA-Z0-9_-]+' From 58c900555191650158f5275cb9083726f2ca611c Mon Sep 17 00:00:00 2001 From: Ahsraeisi Date: Wed, 5 Mar 2025 21:18:41 +0000 Subject: [PATCH 019/107] Update README table --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index e744fd7..ac60da3 100644 --- a/README.md +++ b/README.md @@ -38,9 +38,9 @@ The project current core team are: 13.2.113.2.213.3.114.2.314.3.2 14.4.114.4.214.4.314.4.414.4.5 14.4.614.4.714.5.114.5.214.5.3 -2.1.113.4.25.1.55.2.5.15.2.6 -5.3.3.15.3.3.25.3.95.5.28.2.1 -9.1.29.1.3 +2.1.113.4.13.4.25.1.55.2.5.1 +5.2.65.3.3.15.3.3.25.3.95.5.2 +8.2.19.1.29.1.3 From ed6d1bd2bbde9918dd85e5b9286c237ce706b351 Mon Sep 17 00:00:00 2001 From: ghost Date: Wed, 5 Mar 2025 21:18:44 +0000 Subject: [PATCH 020/107] =?UTF-8?q?chore:=20sign=20templates=20?= =?UTF-8?q?=F0=9F=A4=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/3.4.1.yaml | 1 + templates/9.1.3.yaml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/templates/3.4.1.yaml b/templates/3.4.1.yaml index f27809e..70c6f2b 100644 --- a/templates/3.4.1.yaml +++ b/templates/3.4.1.yaml @@ -42,3 +42,4 @@ javascript: - type: regex regex: - '[a-zA-Z0-9_-]+' +# digest: 4b0a00483046022100c1e0254d50c3451c33bb071eb32e2d4758cad21347e37d3da3f1a06bde35da160221008cd3283d411ebea175b06af6a32fd25c035e052bce3cbaf67e2f8072f914511e:236a7c23afe836fbe231d6e037cff444 \ No newline at end of file diff --git a/templates/9.1.3.yaml b/templates/9.1.3.yaml index f248229..8c9551e 100644 --- a/templates/9.1.3.yaml +++ b/templates/9.1.3.yaml @@ -45,4 +45,4 @@ ssl: - type: json json: - " .tls_version" -# digest: 4a0a0047304502206da1d24370e950eaf4d7206cab7a891e6838704cf7b4b7687a0f4d16796b2509022100de82264b01bafb1693f8cc8dc5bf046c07075ba8ca4cde030f6d0dfbd340da09:236a7c23afe836fbe231d6e037cff444 \ No newline at end of file +# digest: 490a00463044022034db2f9402ba1972733571621f69685e1ace8b0489129eb49484439ed7514eba0220121b7cf43ba21c46544fd900757a4b45b49927adf6508a52e6c051035128810a:236a7c23afe836fbe231d6e037cff444 \ No newline at end of file From 7a9a3fe9416d12166ea41e4f2cae0a9101a8f12e Mon Sep 17 00:00:00 2001 From: AmirHossein Raeisi <96957814+Ahsraeisi@users.noreply.github.com> Date: Sat, 8 Mar 2025 00:27:12 +0330 Subject: [PATCH 021/107] Update update-readme.yml Signed-off-by: AmirHossein Raeisi <96957814+Ahsraeisi@users.noreply.github.com> --- .github/workflows/update-readme.yml | 30 ++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/.github/workflows/update-readme.yml b/.github/workflows/update-readme.yml index 2fd0dd9..1b8f926 100644 --- a/.github/workflows/update-readme.yml +++ b/.github/workflows/update-readme.yml @@ -4,6 +4,8 @@ on: push: branches: - dev + paths: + - '**.yaml' pull_request: branches: - dev @@ -24,11 +26,25 @@ jobs: run: python .github/scripts/update-readme.py + - name: Run Python script to update README + run: python .github/scripts/update-readme.py + # Set up GPG for commit signing + - name: Set up GPG + run: | + echo "${{ secrets.GPG_PRIVATE_KEY }}" | gpg --batch --import + git config --global user.name "Signing Bot" + git config --global user.email "github-actions@github.com" + git config --global commit.gpgSign true + git config --global user.signingkey ${{ secrets.GPG_KEY_ID }} + + # Commit changes with GPG signing - name: Commit changes - uses: stefanzweifel/git-auto-commit-action@v4 - with: - commit_message: Update README table - commit_user_name: GitHub Actions - commit_user_email: github-actions[bot]@users.noreply.github.com - branch: dev - file_pattern: README.md + run: | + git add README.md + git commit -S -m "Update README table" + + # Push changes + - name: Push changes + run: | + git pull origin dev --rebase + git push origin dev From 52b3a9afb02a8d39a23c7084a117f0d72f72e9ca Mon Sep 17 00:00:00 2001 From: AmirHossein Raeisi <96957814+Ahsraeisi@users.noreply.github.com> Date: Sat, 8 Mar 2025 00:33:22 +0330 Subject: [PATCH 022/107] Update 12.6.1.yaml Signed-off-by: AmirHossein Raeisi <96957814+Ahsraeisi@users.noreply.github.com> --- templates/12.6.1.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/12.6.1.yaml b/templates/12.6.1.yaml index 3ed9c5d..7e2c103 100644 --- a/templates/12.6.1.yaml +++ b/templates/12.6.1.yaml @@ -52,8 +52,8 @@ http: stop-at-first-match: true matchers: - type: word - part: interactsh_protocol # Confirms the HTTP Interaction + part: interactsh_protocol words: - "http" - "dns" -# digest: 4b0a00483046022100c660a7e46a1f17eed707c5912df531e5f2938feba4be175f24f20b0ecb229fde022100a79f952331843fab8d0705fd10d56db51e59bdd935d65ad3a557357129527964:236a7c23afe836fbe231d6e037cff444 \ No newline at end of file +# digest: 4b0a00483046022100c660a7e46a1f17eed707c5912df531e5f2938feba4be175f24f20b0ecb229fde022100a79f952331843fab8d0705fd10d56db51e59bdd935d65ad3a557357129527964:236a7c23afe836fbe231d6e037cff444 From 5a61e6e89e204d394b3f686f6dca8dc5c555d7ea Mon Sep 17 00:00:00 2001 From: ghost Date: Fri, 7 Mar 2025 21:03:37 +0000 Subject: [PATCH 023/107] =?UTF-8?q?chore:=20sign=20templates=20?= =?UTF-8?q?=F0=9F=A4=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/12.6.1.yaml | 2 +- templates/9.1.3.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/12.6.1.yaml b/templates/12.6.1.yaml index 7e2c103..0b5dcd2 100644 --- a/templates/12.6.1.yaml +++ b/templates/12.6.1.yaml @@ -56,4 +56,4 @@ http: words: - "http" - "dns" -# digest: 4b0a00483046022100c660a7e46a1f17eed707c5912df531e5f2938feba4be175f24f20b0ecb229fde022100a79f952331843fab8d0705fd10d56db51e59bdd935d65ad3a557357129527964:236a7c23afe836fbe231d6e037cff444 +# digest: 4a0a00473045022100b04867b818ab4863e21fa82d36a6d76d290df9e3d6cd1f64718b3d79c443c5850220313346e77b2e69e6a7c546177aa2cb19699a5804c5f945e92593846e2c88cade:236a7c23afe836fbe231d6e037cff444 \ No newline at end of file diff --git a/templates/9.1.3.yaml b/templates/9.1.3.yaml index 8c9551e..a5f02b1 100644 --- a/templates/9.1.3.yaml +++ b/templates/9.1.3.yaml @@ -45,4 +45,4 @@ ssl: - type: json json: - " .tls_version" -# digest: 490a00463044022034db2f9402ba1972733571621f69685e1ace8b0489129eb49484439ed7514eba0220121b7cf43ba21c46544fd900757a4b45b49927adf6508a52e6c051035128810a:236a7c23afe836fbe231d6e037cff444 \ No newline at end of file +# digest: 4a0a0047304502205839fede0203f7895be3469075ecf4a19c3f2722535028cb37d2235708b1d153022100a672f6070fadfeb23c69ee6a9dc7a317ebac3136f17c14de884388419e1362be:236a7c23afe836fbe231d6e037cff444 \ No newline at end of file From def555fe77d3d86d8b4a6232af6af4282446393b Mon Sep 17 00:00:00 2001 From: AmirHossein Raeisi <96957814+Ahsraeisi@users.noreply.github.com> Date: Sat, 8 Mar 2025 01:58:02 +0330 Subject: [PATCH 024/107] Update README.md Signed-off-by: AmirHossein Raeisi <96957814+Ahsraeisi@users.noreply.github.com> --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ac60da3..1856e30 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ The project current core team are: 14.4.614.4.714.5.114.5.214.5.3 2.1.113.4.13.4.25.1.55.2.5.1 5.2.65.3.3.15.3.3.25.3.95.5.2 -8.2.19.1.29.1.3 +8.2.19.1.2 From 51a5f6bcaf2d469b627b73393203ae0d7d149abe Mon Sep 17 00:00:00 2001 From: AmirHossein Raeisi <96957814+Ahsraeisi@users.noreply.github.com> Date: Sat, 8 Mar 2025 01:59:30 +0330 Subject: [PATCH 025/107] Update 12.3.3.yaml Signed-off-by: AmirHossein Raeisi <96957814+Ahsraeisi@users.noreply.github.com> --- templates/dast/12.3.3.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/templates/dast/12.3.3.yaml b/templates/dast/12.3.3.yaml index 740b852..2d92495 100644 --- a/templates/dast/12.3.3.yaml +++ b/templates/dast/12.3.3.yaml @@ -45,4 +45,3 @@ http: words: - "http" - "dns" -# digest: 4b0a00483046022100e9049e13075ecd5bbc8127b9f96d1a53760d33467da662895cb19e61dd707cbe02210083d94e0c052abf24a0fad0ef9c48830fac642abaacc5acc42aa239e00b313237:236a7c23afe836fbe231d6e037cff444 \ No newline at end of file From b747a63b5b81bda5f34087a1b8b2bed7006789dd Mon Sep 17 00:00:00 2001 From: Signing Bot Date: Fri, 7 Mar 2025 22:29:43 +0000 Subject: [PATCH 026/107] Update README table --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1856e30..ac60da3 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ The project current core team are: 14.4.614.4.714.5.114.5.214.5.3 2.1.113.4.13.4.25.1.55.2.5.1 5.2.65.3.3.15.3.3.25.3.95.5.2 -8.2.19.1.2 +8.2.19.1.29.1.3 From d2e98274812929ab8559aa174848bb1991fb3822 Mon Sep 17 00:00:00 2001 From: ghost Date: Fri, 7 Mar 2025 22:29:48 +0000 Subject: [PATCH 027/107] =?UTF-8?q?chore:=20sign=20templates=20?= =?UTF-8?q?=F0=9F=A4=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/9.1.3.yaml | 2 +- templates/dast/12.3.3.yaml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/templates/9.1.3.yaml b/templates/9.1.3.yaml index a5f02b1..f722c35 100644 --- a/templates/9.1.3.yaml +++ b/templates/9.1.3.yaml @@ -45,4 +45,4 @@ ssl: - type: json json: - " .tls_version" -# digest: 4a0a0047304502205839fede0203f7895be3469075ecf4a19c3f2722535028cb37d2235708b1d153022100a672f6070fadfeb23c69ee6a9dc7a317ebac3136f17c14de884388419e1362be:236a7c23afe836fbe231d6e037cff444 \ No newline at end of file +# digest: 4a0a0047304502201b57b14bb41c7c7047898a2bb8f8c01a6b7b7c0dca2f723e2342537fd2814767022100ee1c62a5642c21ccbcb649dc4a548415b647018805818a1ae9453be5e4190dc8:236a7c23afe836fbe231d6e037cff444 \ No newline at end of file diff --git a/templates/dast/12.3.3.yaml b/templates/dast/12.3.3.yaml index 2d92495..27b4ede 100644 --- a/templates/dast/12.3.3.yaml +++ b/templates/dast/12.3.3.yaml @@ -45,3 +45,4 @@ http: words: - "http" - "dns" +# digest: 490a00463044022035b6f9539276bd3c6a058b1402e01032e0b692dbe8a3323841ad05b6e507888f02203b3f6b4dba281eab84cf5606e79a25bf147d6f6424a1efba5cea2a9727cb1521:236a7c23afe836fbe231d6e037cff444 \ No newline at end of file From 37db03241a5131a3f34829b7823bb8b850c962af Mon Sep 17 00:00:00 2001 From: Hamed Salimian Date: Sat, 8 Mar 2025 10:42:14 +0330 Subject: [PATCH 028/107] Fix typo. Signed-off-by: Hamed Salimian --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ac60da3..ee447e3 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ For detailed information and guidelines about contributing in developing templat #### Core Team The project current core team are: -- [Hamed Salimain](https://github.com/Snbig) (Project Leader) +- [Hamed Salimian](https://github.com/Snbig) (Project Leader) - [AmirHossein Raeisi](https://github.com/Ahsraeisi) (Project Co-lead)

Available Templates

From de889ae2a9847a0def01c9804dd6d83fed5eaa4b Mon Sep 17 00:00:00 2001 From: Hamed Salimian Date: Sat, 8 Mar 2025 10:45:18 +0330 Subject: [PATCH 029/107] Update template-validate.yml Signed-off-by: Hamed Salimian --- .github/workflows/template-validate.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/template-validate.yml b/.github/workflows/template-validate.yml index 213dda0..4a1eb4e 100644 --- a/.github/workflows/template-validate.yml +++ b/.github/workflows/template-validate.yml @@ -2,6 +2,8 @@ name: 🛠 Template Validate on: push: + paths: + - '**.yaml' pull_request: paths: - '**.yaml' From 9a0c0763f89919b509527435edb604703cdfc065 Mon Sep 17 00:00:00 2001 From: Hamed Salimian Date: Sat, 8 Mar 2025 10:45:48 +0330 Subject: [PATCH 030/107] Update syntax-checking.yml Signed-off-by: Hamed Salimian --- .github/workflows/syntax-checking.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/syntax-checking.yml b/.github/workflows/syntax-checking.yml index f641b2a..e8c83e9 100644 --- a/.github/workflows/syntax-checking.yml +++ b/.github/workflows/syntax-checking.yml @@ -2,6 +2,8 @@ name: ❄️ YAML Lint on: push: + paths: + - '**.yaml' pull_request: paths: - '**.yaml' From 7eba6af7560ad503efd76cb1789959e1c48f9f16 Mon Sep 17 00:00:00 2001 From: AmirHossein Raeisi <96957814+Ahsraeisi@users.noreply.github.com> Date: Sat, 8 Mar 2025 21:47:51 +0330 Subject: [PATCH 031/107] Update update-readme.py Signed-off-by: AmirHossein Raeisi <96957814+Ahsraeisi@users.noreply.github.com> --- .github/scripts/update-readme.py | 34 ++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/.github/scripts/update-readme.py b/.github/scripts/update-readme.py index e5d479e..280b880 100644 --- a/.github/scripts/update-readme.py +++ b/.github/scripts/update-readme.py @@ -2,7 +2,7 @@ import re import math -# Function to find .yaml files recursively +# Function to find .yaml files recursively in all directories under templates def find_yaml_files(root_dir): yaml_files = [] for dirpath, _, filenames in os.walk(root_dir): @@ -11,36 +11,40 @@ def find_yaml_files(root_dir): yaml_files.append(os.path.join(dirpath, filename)) return yaml_files -# Function to update README.md with an HTML table (5 columns, no .yaml extension) -def update_readme(yaml_files): +# Function to update README.md with an HTML table (5 columns, hyperlinks with directory structure) +def update_readme(yaml_files, root_dir): readme_file = 'README.md' + github_base_url = "https://github.com/OWASP/www-project-asvs-security-evaluation-templates-with-nuclei/blob/dev/" + try: with open(readme_file, 'r', encoding='utf-8') as file: readme_content = file.read() - # Remove .yaml extension and sort filenames - yaml_filenames = sorted(set(os.path.splitext(os.path.basename(f))[0] for f in yaml_files)) - # Create a table with 5 columns table_rows = "" - num_files = len(yaml_filenames) + num_files = len(yaml_files) num_columns = 5 - num_rows = math.ceil(num_files / num_columns) + num_rows = math.ceil(num_files / num_columns) for i in range(num_rows): - row_files = yaml_filenames[i * num_columns:(i + 1) * num_columns] - table_rows += "" + "".join(f"" for file in row_files) + "\n" + row_files = yaml_files[i * num_columns:(i + 1) * num_columns] + table_rows += "" + "".join( + ''.format( + github_base_url, + os.path.relpath(file, root_dir).replace(os.sep, '/'), + os.path.splitext(os.path.basename(file))[0] + ) for file in row_files + ) + "\n" - table_html = f"""

Available Templates

+ table_html = f'''

Available Templates

{file}
{}
{table_rows}
-""" +''' if "

Available Templates

" in readme_content: h2_index = readme_content.index("

Available Templates

") - readme_content = readme_content[:h2_index] readme_content += f'{table_html}' @@ -55,9 +59,9 @@ def update_readme(yaml_files): print(f"An error occurred: {e}") if __name__ == '__main__': - root_dir = '../../' + root_dir = 'templates' yaml_files = find_yaml_files(root_dir) if yaml_files: - update_readme(yaml_files) + update_readme(yaml_files, root_dir) else: print("No matching YAML files found.") From fcaf933abc1c90aa06336aa42bb33ef116cec282 Mon Sep 17 00:00:00 2001 From: AmirHossein Raeisi <96957814+Ahsraeisi@users.noreply.github.com> Date: Sat, 8 Mar 2025 21:48:34 +0330 Subject: [PATCH 032/107] Update 3.4.1.yaml Signed-off-by: AmirHossein Raeisi <96957814+Ahsraeisi@users.noreply.github.com> --- templates/3.4.1.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/templates/3.4.1.yaml b/templates/3.4.1.yaml index 70c6f2b..f27809e 100644 --- a/templates/3.4.1.yaml +++ b/templates/3.4.1.yaml @@ -42,4 +42,3 @@ javascript: - type: regex regex: - '[a-zA-Z0-9_-]+' -# digest: 4b0a00483046022100c1e0254d50c3451c33bb071eb32e2d4758cad21347e37d3da3f1a06bde35da160221008cd3283d411ebea175b06af6a32fd25c035e052bce3cbaf67e2f8072f914511e:236a7c23afe836fbe231d6e037cff444 \ No newline at end of file From ab782bfc4d42048410d8b26381d8868fa2543a88 Mon Sep 17 00:00:00 2001 From: Signing Bot Date: Sat, 8 Mar 2025 18:18:46 +0000 Subject: [PATCH 033/107] Update README table --- README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index ee447e3..d670558 100644 --- a/README.md +++ b/README.md @@ -34,13 +34,13 @@ The project current core team are: - [AmirHossein Raeisi](https://github.com/Ahsraeisi) (Project Co-lead)

Available Templates

- - - - - - - + + + + + + +
12.1.112.1.1.212.3.312.6.113.1.3
13.2.113.2.213.3.114.2.314.3.2
14.4.114.4.214.4.314.4.414.4.5
14.4.614.4.714.5.114.5.214.5.3
2.1.113.4.13.4.25.1.55.2.5.1
5.2.65.3.3.15.3.3.25.3.95.5.2
8.2.19.1.29.1.3
14.4.414.5.15.1.513.3.13.4.1
13.2.19.1.314.4.314.5.313.2.2
14.4.514.4.712.6.112.1.18.2.1
14.5.214.4.13.4.29.1.214.4.6
14.4.212.1.1.22.1.1113.1.35.3.3.1
14.2.314.3.212.3.35.5.25.2.5.1
5.2.65.3.3.25.3.9
From 88d0696cd28aec779b7b73a455a48acb52083d8e Mon Sep 17 00:00:00 2001 From: ghost Date: Sat, 8 Mar 2025 18:18:50 +0000 Subject: [PATCH 034/107] =?UTF-8?q?chore:=20sign=20templates=20?= =?UTF-8?q?=F0=9F=A4=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/3.4.1.yaml | 1 + templates/9.1.3.yaml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/templates/3.4.1.yaml b/templates/3.4.1.yaml index f27809e..fb51b02 100644 --- a/templates/3.4.1.yaml +++ b/templates/3.4.1.yaml @@ -42,3 +42,4 @@ javascript: - type: regex regex: - '[a-zA-Z0-9_-]+' +# digest: 4b0a00483046022100a9988bb7771384dad914aecf5a0cb5bb6d5325a662e67ad6045ce032c7c1b352022100cbd76a81cb762ba0ff4d5e9641cac769a7518de3680987639e0565c4832496d7:236a7c23afe836fbe231d6e037cff444 \ No newline at end of file diff --git a/templates/9.1.3.yaml b/templates/9.1.3.yaml index f722c35..60c1cc8 100644 --- a/templates/9.1.3.yaml +++ b/templates/9.1.3.yaml @@ -45,4 +45,4 @@ ssl: - type: json json: - " .tls_version" -# digest: 4a0a0047304502201b57b14bb41c7c7047898a2bb8f8c01a6b7b7c0dca2f723e2342537fd2814767022100ee1c62a5642c21ccbcb649dc4a548415b647018805818a1ae9453be5e4190dc8:236a7c23afe836fbe231d6e037cff444 \ No newline at end of file +# digest: 4b0a00483046022100e98e96047e36307e86910aba72eeb658ec6d15ccc3729b97be48af3a2e70514b022100aef2c261f14088d771f778c4ca9911f3a0b46d6687ba21d3c42d41de070cfe0a:236a7c23afe836fbe231d6e037cff444 \ No newline at end of file From c2410f60cf2444e3ac8ed8fadfd4560c2e9e496c Mon Sep 17 00:00:00 2001 From: AmirHossein Raeisi <96957814+Ahsraeisi@users.noreply.github.com> Date: Sat, 8 Mar 2025 21:50:57 +0330 Subject: [PATCH 035/107] Update update-readme.py Signed-off-by: AmirHossein Raeisi <96957814+Ahsraeisi@users.noreply.github.com> --- .github/scripts/update-readme.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/scripts/update-readme.py b/.github/scripts/update-readme.py index 280b880..434b3f5 100644 --- a/.github/scripts/update-readme.py +++ b/.github/scripts/update-readme.py @@ -14,7 +14,7 @@ def find_yaml_files(root_dir): # Function to update README.md with an HTML table (5 columns, hyperlinks with directory structure) def update_readme(yaml_files, root_dir): readme_file = 'README.md' - github_base_url = "https://github.com/OWASP/www-project-asvs-security-evaluation-templates-with-nuclei/blob/dev/" + github_base_url = "https://github.com/OWASP/www-project-asvs-security-evaluation-templates-with-nuclei/blob/dev/templates/" try: with open(readme_file, 'r', encoding='utf-8') as file: From f1d6e9905392fc2af5df01d28b8f230ea8c3d2f7 Mon Sep 17 00:00:00 2001 From: AmirHossein Raeisi <96957814+Ahsraeisi@users.noreply.github.com> Date: Sat, 8 Mar 2025 21:51:18 +0330 Subject: [PATCH 036/107] Update 12.6.1.yaml Signed-off-by: AmirHossein Raeisi <96957814+Ahsraeisi@users.noreply.github.com> --- templates/12.6.1.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/templates/12.6.1.yaml b/templates/12.6.1.yaml index 0b5dcd2..a97e4a4 100644 --- a/templates/12.6.1.yaml +++ b/templates/12.6.1.yaml @@ -56,4 +56,3 @@ http: words: - "http" - "dns" -# digest: 4a0a00473045022100b04867b818ab4863e21fa82d36a6d76d290df9e3d6cd1f64718b3d79c443c5850220313346e77b2e69e6a7c546177aa2cb19699a5804c5f945e92593846e2c88cade:236a7c23afe836fbe231d6e037cff444 \ No newline at end of file From 773267b41b6ec654438e5ed4304d07ff509fc876 Mon Sep 17 00:00:00 2001 From: Signing Bot Date: Sat, 8 Mar 2025 18:21:30 +0000 Subject: [PATCH 037/107] Update README table --- README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index d670558..7b4f107 100644 --- a/README.md +++ b/README.md @@ -34,13 +34,13 @@ The project current core team are: - [AmirHossein Raeisi](https://github.com/Ahsraeisi) (Project Co-lead)

Available Templates

- - - - - - - + + + + + + +
14.4.414.5.15.1.513.3.13.4.1
13.2.19.1.314.4.314.5.313.2.2
14.4.514.4.712.6.112.1.18.2.1
14.5.214.4.13.4.29.1.214.4.6
14.4.212.1.1.22.1.1113.1.35.3.3.1
14.2.314.3.212.3.35.5.25.2.5.1
5.2.65.3.3.25.3.9
14.4.414.5.15.1.513.3.13.4.1
13.2.19.1.314.4.314.5.313.2.2
14.4.514.4.712.6.112.1.18.2.1
14.5.214.4.13.4.29.1.214.4.6
14.4.212.1.1.22.1.1113.1.35.3.3.1
14.2.314.3.212.3.35.5.25.2.5.1
5.2.65.3.3.25.3.9
From 3552d4a8a86561c5b88d699949bd796d712f0ae2 Mon Sep 17 00:00:00 2001 From: ghost Date: Sat, 8 Mar 2025 18:21:33 +0000 Subject: [PATCH 038/107] =?UTF-8?q?chore:=20sign=20templates=20?= =?UTF-8?q?=F0=9F=A4=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/12.6.1.yaml | 1 + templates/9.1.3.yaml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/templates/12.6.1.yaml b/templates/12.6.1.yaml index a97e4a4..e40f3f7 100644 --- a/templates/12.6.1.yaml +++ b/templates/12.6.1.yaml @@ -56,3 +56,4 @@ http: words: - "http" - "dns" +# digest: 490a004630440220341815d5f611ef81a1b59555ed5c65fe9dbfc0a43c87b758be37757b5235073602205b0bd8b6fb53ea9e6a3ae4caf7357d531ebb05836aca60c3ff3a9d00fc21884e:236a7c23afe836fbe231d6e037cff444 \ No newline at end of file diff --git a/templates/9.1.3.yaml b/templates/9.1.3.yaml index 60c1cc8..946d946 100644 --- a/templates/9.1.3.yaml +++ b/templates/9.1.3.yaml @@ -45,4 +45,4 @@ ssl: - type: json json: - " .tls_version" -# digest: 4b0a00483046022100e98e96047e36307e86910aba72eeb658ec6d15ccc3729b97be48af3a2e70514b022100aef2c261f14088d771f778c4ca9911f3a0b46d6687ba21d3c42d41de070cfe0a:236a7c23afe836fbe231d6e037cff444 \ No newline at end of file +# digest: 490a0046304402206813d2633655111911a08414e046851dac1f6d9f29e2217446f06d100e3794c2022066d71325e2cd4fdb406657ef97566c7c7e8c1b6ed52ee5088bffd9025aa582c6:236a7c23afe836fbe231d6e037cff444 \ No newline at end of file From bc56c442f6bab7544e63eb9cd3ddc3cb5163a3d7 Mon Sep 17 00:00:00 2001 From: Hamed Salimian Date: Sat, 22 Mar 2025 20:40:21 +0330 Subject: [PATCH 039/107] Create 3.1.1.yaml Signed-off-by: Hamed Salimian --- templates/3.1.1.yaml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 templates/3.1.1.yaml diff --git a/templates/3.1.1.yaml b/templates/3.1.1.yaml new file mode 100644 index 0000000..2d00fd0 --- /dev/null +++ b/templates/3.1.1.yaml @@ -0,0 +1,33 @@ +id: ASVS-4-0-3-V3-1-1 + +info: + name: ASVS 3.1.1 Check + author: Hamed Salimian + severity: medium + classification: + cwe-id: CWE-598 + reference: + - https://owasp.org/www-project-web-security-testing-guide/v42/4-Web_Application_Security_Testing/06-Session_Management_Testing/04-Testing_for_Exposed_Session_Variables.html + - https://github.com/danielmiessler/SecLists/blob/master/Miscellaneous/Web/session-id.txt + tags: asvs,3.1.1 + description: | + Verify the application never reveals session tokens in URL parameters. + + +http: + - method: GET + path: + - "{{BaseURL}}" + redirects: true + + extractors: + - type: regex + part: body + regex: + - (i?)((https?|wss?))?(://)?[^\s?]+(?:\?|&)(?:session|sessionID|ASP.NET_SessionId|ASPSESSIONID|SITESERVER|cfid|cftoken|jsessionid|sessid|sid|viewstate|zenid|PHPSESSID|ConsumerKey|ConsumerSecret|DB_USERNAME|HEROKU_API_KEY|HOMEBREW_GITHUB_API_TOKEN|JEKYLL_GITHUB_TOKEN|PT_TOKEN|SESSION_TOKEN|SF_USERNAME|SLACK_BOT_TOKEN|access-token|access_token|access_token_secret|accesstoken|admin|api-key|api_key|api_secret_key|api_token|auth_token|authkey|authorization|authorization_key|authorization_token|authtoken|aws_access_key_id|aws_secret_access_key|bearer|bot_access_token|bucket|client-secret|client_id|client_key|client_secret|clientsecret|consumer_key|consumer_secret|dbpasswd|email|encryption-key|encryption_key|encryptionkey|id_dsa|irc_pass|key|oauth_token|pass|password|private_key|private-key|privatekey|secret|secret-key|secret_key|secret_token|secretkey|secretkey|session_key|session_secret|slack_api_token|slack_secret_token|slack_token|ssh-key|ssh_key|sshkey|token|username|xoxa-2|xoxr)=[^&\s]+ + + matchers: + - type: regex + part: body + regex: + - (i?)((https?|wss?))?(://)?[^\s?]+(?:\?|&)(?:session|sessionID|ASP.NET_SessionId|ASPSESSIONID|SITESERVER|cfid|cftoken|jsessionid|sessid|sid|viewstate|zenid|PHPSESSID|ConsumerKey|ConsumerSecret|DB_USERNAME|HEROKU_API_KEY|HOMEBREW_GITHUB_API_TOKEN|JEKYLL_GITHUB_TOKEN|PT_TOKEN|SESSION_TOKEN|SF_USERNAME|SLACK_BOT_TOKEN|access-token|access_token|access_token_secret|accesstoken|admin|api-key|api_key|api_secret_key|api_token|auth_token|authkey|authorization|authorization_key|authorization_token|authtoken|aws_access_key_id|aws_secret_access_key|bearer|bot_access_token|bucket|client-secret|client_id|client_key|client_secret|clientsecret|consumer_key|consumer_secret|dbpasswd|email|encryption-key|encryption_key|encryptionkey|id_dsa|irc_pass|key|oauth_token|pass|password|private_key|private-key|privatekey|secret|secret-key|secret_key|secret_token|secretkey|secretkey|session_key|session_secret|slack_api_token|slack_secret_token|slack_token|ssh-key|ssh_key|sshkey|token|username|xoxa-2|xoxr)=[^&\s]+ From 656f4b0303cb93e071d39cef0c116da9ed458b9b Mon Sep 17 00:00:00 2001 From: Signing Bot Date: Sat, 22 Mar 2025 17:10:31 +0000 Subject: [PATCH 040/107] Update README table --- README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 7b4f107..edd2a1b 100644 --- a/README.md +++ b/README.md @@ -34,13 +34,13 @@ The project current core team are: - [AmirHossein Raeisi](https://github.com/Ahsraeisi) (Project Co-lead)

Available Templates

- - - - - - - + + + + + + +
14.4.414.5.15.1.513.3.13.4.1
13.2.19.1.314.4.314.5.313.2.2
14.4.514.4.712.6.112.1.18.2.1
14.5.214.4.13.4.29.1.214.4.6
14.4.212.1.1.22.1.1113.1.35.3.3.1
14.2.314.3.212.3.35.5.25.2.5.1
5.2.65.3.3.25.3.9
3.1.114.4.414.5.15.1.513.3.1
3.4.113.2.19.1.314.4.314.5.3
13.2.214.4.514.4.712.6.112.1.1
8.2.114.5.214.4.13.4.29.1.2
14.4.614.4.212.1.1.22.1.1113.1.3
5.3.3.114.2.314.3.212.3.35.5.2
5.2.5.15.2.65.3.3.25.3.9
From 7da3f8d4903fed0b11ca9c5115a2fcb8c832126c Mon Sep 17 00:00:00 2001 From: ghost Date: Sat, 22 Mar 2025 17:10:37 +0000 Subject: [PATCH 041/107] =?UTF-8?q?chore:=20sign=20templates=20?= =?UTF-8?q?=F0=9F=A4=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/3.1.1.yaml | 1 + templates/9.1.3.yaml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/templates/3.1.1.yaml b/templates/3.1.1.yaml index 2d00fd0..71ee47c 100644 --- a/templates/3.1.1.yaml +++ b/templates/3.1.1.yaml @@ -31,3 +31,4 @@ http: part: body regex: - (i?)((https?|wss?))?(://)?[^\s?]+(?:\?|&)(?:session|sessionID|ASP.NET_SessionId|ASPSESSIONID|SITESERVER|cfid|cftoken|jsessionid|sessid|sid|viewstate|zenid|PHPSESSID|ConsumerKey|ConsumerSecret|DB_USERNAME|HEROKU_API_KEY|HOMEBREW_GITHUB_API_TOKEN|JEKYLL_GITHUB_TOKEN|PT_TOKEN|SESSION_TOKEN|SF_USERNAME|SLACK_BOT_TOKEN|access-token|access_token|access_token_secret|accesstoken|admin|api-key|api_key|api_secret_key|api_token|auth_token|authkey|authorization|authorization_key|authorization_token|authtoken|aws_access_key_id|aws_secret_access_key|bearer|bot_access_token|bucket|client-secret|client_id|client_key|client_secret|clientsecret|consumer_key|consumer_secret|dbpasswd|email|encryption-key|encryption_key|encryptionkey|id_dsa|irc_pass|key|oauth_token|pass|password|private_key|private-key|privatekey|secret|secret-key|secret_key|secret_token|secretkey|secretkey|session_key|session_secret|slack_api_token|slack_secret_token|slack_token|ssh-key|ssh_key|sshkey|token|username|xoxa-2|xoxr)=[^&\s]+ +# digest: 4a0a0047304502200b04f148664841a92e2869491bb697da5a91b249b52641cce2fd21b2af3ed58e022100c90f5e35cb5924de9cc68967dfb48baae881590e336956b906b90e7730ca7bdc:236a7c23afe836fbe231d6e037cff444 \ No newline at end of file diff --git a/templates/9.1.3.yaml b/templates/9.1.3.yaml index 946d946..836c69f 100644 --- a/templates/9.1.3.yaml +++ b/templates/9.1.3.yaml @@ -45,4 +45,4 @@ ssl: - type: json json: - " .tls_version" -# digest: 490a0046304402206813d2633655111911a08414e046851dac1f6d9f29e2217446f06d100e3794c2022066d71325e2cd4fdb406657ef97566c7c7e8c1b6ed52ee5088bffd9025aa582c6:236a7c23afe836fbe231d6e037cff444 \ No newline at end of file +# digest: 4b0a00483046022100b16d29dff6b6b5382df80710590e2ce3988681aa2e01cb91084a926a13aa5528022100beafa992376b70d654a266b8023ed084f56e33d39782654601e2764d2f77ab2a:236a7c23afe836fbe231d6e037cff444 \ No newline at end of file From 410464237b57902bb0a5129a3c809e1ed9fb3d88 Mon Sep 17 00:00:00 2001 From: Masoud Abdaal Date: Sun, 23 Mar 2025 15:34:31 +0330 Subject: [PATCH 042/107] Added ASVS V13.2.3.yaml --- templates/13.2.3.yaml | 44 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 templates/13.2.3.yaml diff --git a/templates/13.2.3.yaml b/templates/13.2.3.yaml new file mode 100644 index 0000000..3a87897 --- /dev/null +++ b/templates/13.2.3.yaml @@ -0,0 +1,44 @@ +id: ASVS-4-0-3-V13-2-3 + +info: + name: ASVS 13.2.3 Check + author: Masoud Abdaal + severity: medium + classification: + cwe-id: CWE-352 + reference: + - https://github.com/OWASP/ASVS/blob/master/4.0/en/0x21-V13-API.md#v132-restful-web-service + tags: asvs,13.2.3 + description: | + Verify that RESTful web services that utilize cookies are protected from Cross-Site Request Forgery via the use of at least one or more of the following: double submit cookie pattern, CSRF nonces, or Origin request header checks + +requests: + - method: GET + headers: + Referer: "localhost" + path: + - "{{BaseURL}}" + matchers: + - type: status + status: + - 200 + + - method: GET + headers: + Referer: "127.0.0.1" + path: + - "{{BaseURL}}" + matchers: + - type: status + status: + - 200 + + - method: GET + headers: + Referer: "https://owasp.org" + path: + - "{{BaseURL}}" + matchers: + - type: status + status: + - 200 \ No newline at end of file From dd3a9a754e12dfd8d79a620b606b2aaba58c0605 Mon Sep 17 00:00:00 2001 From: Signing Bot Date: Sun, 23 Mar 2025 12:04:47 +0000 Subject: [PATCH 043/107] Update README table --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index edd2a1b..545d8f4 100644 --- a/README.md +++ b/README.md @@ -35,12 +35,12 @@ The project current core team are:

Available Templates

- - - - - - + + + + + +
3.1.114.4.414.5.15.1.513.3.1
3.4.113.2.19.1.314.4.314.5.3
13.2.214.4.514.4.712.6.112.1.1
8.2.114.5.214.4.13.4.29.1.2
14.4.614.4.212.1.1.22.1.1113.1.3
5.3.3.114.2.314.3.212.3.35.5.2
5.2.5.15.2.65.3.3.25.3.9
3.4.113.2.113.2.39.1.314.4.3
14.5.313.2.214.4.514.4.712.6.1
12.1.18.2.114.5.214.4.13.4.2
9.1.214.4.614.4.212.1.1.22.1.11
13.1.35.3.3.114.2.314.3.212.3.3
5.5.25.2.5.15.2.65.3.3.25.3.9
From 105092cba6c58c44aa3cc11da9bae4f5fd669152 Mon Sep 17 00:00:00 2001 From: ghost Date: Sun, 23 Mar 2025 12:04:52 +0000 Subject: [PATCH 044/107] =?UTF-8?q?chore:=20sign=20templates=20?= =?UTF-8?q?=F0=9F=A4=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/13.2.3.yaml | 3 ++- templates/9.1.3.yaml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/templates/13.2.3.yaml b/templates/13.2.3.yaml index 3a87897..0bb424c 100644 --- a/templates/13.2.3.yaml +++ b/templates/13.2.3.yaml @@ -41,4 +41,5 @@ requests: matchers: - type: status status: - - 200 \ No newline at end of file + - 200 +# digest: 490a00463044022070f4561c2092bdad81e89a15d849d699ebb2741ed1ff5bcf25bebf1ed4f0539a0220295e7f521a22950d8f10a94868c80600e89c0471148dac2fa64e23e79e7092ec:236a7c23afe836fbe231d6e037cff444 \ No newline at end of file diff --git a/templates/9.1.3.yaml b/templates/9.1.3.yaml index 836c69f..b264ec8 100644 --- a/templates/9.1.3.yaml +++ b/templates/9.1.3.yaml @@ -45,4 +45,4 @@ ssl: - type: json json: - " .tls_version" -# digest: 4b0a00483046022100b16d29dff6b6b5382df80710590e2ce3988681aa2e01cb91084a926a13aa5528022100beafa992376b70d654a266b8023ed084f56e33d39782654601e2764d2f77ab2a:236a7c23afe836fbe231d6e037cff444 \ No newline at end of file +# digest: 490a0046304402200cdc44e3581b23bd93c6089fdc1d7b6355fe78fba29c3a2436c8b23a00a510d102207af40d9bdd2f3a829e9e9c3d9029a406e5b3bdc65615b5a5704dd1c1c4bfe88f:236a7c23afe836fbe231d6e037cff444 \ No newline at end of file From a2e91f3b98a423e473f99f3140a1e8391f86a659 Mon Sep 17 00:00:00 2001 From: Masoud Abdaal Date: Tue, 25 Mar 2025 17:57:43 +0330 Subject: [PATCH 045/107] Added V5.1.2 Template And It's Assets --- templates/dast/5.1.2.yaml | 48 ++++++++++++++++++++++++++++ templates/dast/assets/keysList.txt | 19 +++++++++++ templates/dast/assets/valuesList.txt | 41 ++++++++++++++++++++++++ 3 files changed, 108 insertions(+) create mode 100644 templates/dast/5.1.2.yaml create mode 100644 templates/dast/assets/keysList.txt create mode 100644 templates/dast/assets/valuesList.txt diff --git a/templates/dast/5.1.2.yaml b/templates/dast/5.1.2.yaml new file mode 100644 index 0000000..1c4534d --- /dev/null +++ b/templates/dast/5.1.2.yaml @@ -0,0 +1,48 @@ +id: ASVS-4-0-3-V5-1-2 + +info: + name: ASVS 5.1.2 Check + author: Masoud Abdaal + severity: high + classification: + cwe-id: CWE-915 + reference: + - https://github.com/OWASP/ASVS/blob/master/4.0/en/0x13-V5-Validation-Sanitization-Encoding.md#v51-input-validation + - https://owasp.org/www-project-web-security-testing-guide/latest/4-Web_Application_Security_Testing/07-Input_Validation_Testing/20-Testing_for_Mass_Assignment + tags: asvs,5.1.2 + description: | + Verify that frameworks protect against mass parameter assignment attacks, or that the application has countermeasures to protect against unsafe parameter assignment, such as marking fields private or similar. + Require Switch: -lfa (Load File Wordlist) + +http: + - raw: + - | + POST {{Path}} HTTP/1.1 + Host: {{Host}} + Content-Type: application/json + User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36 Edg/134.0.0.0 + + { "{{key}}": {{value}}} + + attack: clusterbomb + payloads: + key: "assets/keysList.txt" + value: "assets/valuesList.txt" + + matchers-condition: or + matchers: + - type: word + part: body + words: + - "{{key}}" + + - type: word + part: body + words: + - "{{value}}" + + extractors: + - type: regex + part: body + regex: + - 'key="(?P[^"]+)",value="(?:\\")?(?P[^"\\]+)(?:\\")?"' \ No newline at end of file diff --git a/templates/dast/assets/keysList.txt b/templates/dast/assets/keysList.txt new file mode 100644 index 0000000..59b08b9 --- /dev/null +++ b/templates/dast/assets/keysList.txt @@ -0,0 +1,19 @@ +is_admin +role +approved +balance +status +email_verified +created_at +updated_at +IsAdmin +Confirmed +uid +uuid +guid +is_verified +user_id +administrator +admin +isAdministrator +isAdministrator \ No newline at end of file diff --git a/templates/dast/assets/valuesList.txt b/templates/dast/assets/valuesList.txt new file mode 100644 index 0000000..4ebf301 --- /dev/null +++ b/templates/dast/assets/valuesList.txt @@ -0,0 +1,41 @@ +true +false +"true" +"false" +0 +1 +42 +-7 +100 +-250 +1000.50 +-250.75 +3.14 +-0.001 +"yes" +"no" +"active" +"inactive" +"pending" +"verified" +"unverified" +"confirmed" +"unconfirmed" +"2023-01-01T12:00:00Z" +"2024-12-31T23:59:59Z" +"01/01/2023 12:00 PM" +1672531200 +"550e8400-e29b-41d4-a716-446655440000" +"123e4567-e89b-12d3-a456-426614174000" +"user_12345" +"john_doe" +"admin" +"user" +"moderator" +"guest" +"superuser" +{"admin": 1} +{"isActive": true, "user": "admin"} +{"balance": 99999.50, "currency": "USD"} +{"role": "moderator", "approved": false} +{"created_at": "2023-01-01T12:00:00Z", "updated_at": 1672531200} \ No newline at end of file From 83c301b4f20800a3816b61dacfb695d65c503669 Mon Sep 17 00:00:00 2001 From: Signing Bot Date: Tue, 25 Mar 2025 14:28:03 +0000 Subject: [PATCH 046/107] Update README table --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 545d8f4..fa81d7b 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,7 @@ The project current core team are: 9.1.214.4.614.4.212.1.1.22.1.11 13.1.35.3.3.114.2.314.3.212.3.3 5.5.25.2.5.15.2.65.3.3.25.3.9 +5.1.2 From 9420d5bdbb8ec5d3959b121ab2824c2c05223338 Mon Sep 17 00:00:00 2001 From: ghost Date: Tue, 25 Mar 2025 14:28:06 +0000 Subject: [PATCH 047/107] =?UTF-8?q?chore:=20sign=20templates=20?= =?UTF-8?q?=F0=9F=A4=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/9.1.3.yaml | 2 +- templates/dast/5.1.2.yaml | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/templates/9.1.3.yaml b/templates/9.1.3.yaml index b264ec8..455e095 100644 --- a/templates/9.1.3.yaml +++ b/templates/9.1.3.yaml @@ -45,4 +45,4 @@ ssl: - type: json json: - " .tls_version" -# digest: 490a0046304402200cdc44e3581b23bd93c6089fdc1d7b6355fe78fba29c3a2436c8b23a00a510d102207af40d9bdd2f3a829e9e9c3d9029a406e5b3bdc65615b5a5704dd1c1c4bfe88f:236a7c23afe836fbe231d6e037cff444 \ No newline at end of file +# digest: 4a0a00473045022047abadda76eb5f3039aa1d40ff579d8d3198d910d2bac0003dda7c6eb01d5605022100b575031490bc1af035e672ae62068633e407d893c9e7158606cf03b8fb35dc23:236a7c23afe836fbe231d6e037cff444 \ No newline at end of file diff --git a/templates/dast/5.1.2.yaml b/templates/dast/5.1.2.yaml index 1c4534d..1a1f43e 100644 --- a/templates/dast/5.1.2.yaml +++ b/templates/dast/5.1.2.yaml @@ -45,4 +45,5 @@ http: - type: regex part: body regex: - - 'key="(?P[^"]+)",value="(?:\\")?(?P[^"\\]+)(?:\\")?"' \ No newline at end of file + - 'key="(?P[^"]+)",value="(?:\\")?(?P[^"\\]+)(?:\\")?"' +# digest: 4a0a004730450221008053e69857fcd9a70a7738216d0d538fbb6738c2baf81cd6e4b93a9efe99f29502205093abdf5d3ffe964272ef93e62f84b4ff496904e6f24c27a24186761a532b98:236a7c23afe836fbe231d6e037cff444 \ No newline at end of file From 2ef67dc4e55b7a22ee2be6d2e970ef82bbbd74c0 Mon Sep 17 00:00:00 2001 From: Masoud Abdaal Date: Wed, 26 Mar 2025 18:43:12 +0330 Subject: [PATCH 048/107] Fixed Hostname variable --- templates/dast/5.1.2.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/dast/5.1.2.yaml b/templates/dast/5.1.2.yaml index 1a1f43e..496fdf0 100644 --- a/templates/dast/5.1.2.yaml +++ b/templates/dast/5.1.2.yaml @@ -18,7 +18,7 @@ http: - raw: - | POST {{Path}} HTTP/1.1 - Host: {{Host}} + Host: {{Hostname}} Content-Type: application/json User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36 Edg/134.0.0.0 From 2368593c09fad17acd22fc378ef2ba3f492db4e1 Mon Sep 17 00:00:00 2001 From: ghost Date: Wed, 26 Mar 2025 15:13:41 +0000 Subject: [PATCH 049/107] =?UTF-8?q?chore:=20sign=20templates=20?= =?UTF-8?q?=F0=9F=A4=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/9.1.3.yaml | 2 +- templates/dast/5.1.2.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/9.1.3.yaml b/templates/9.1.3.yaml index 455e095..b0910ac 100644 --- a/templates/9.1.3.yaml +++ b/templates/9.1.3.yaml @@ -45,4 +45,4 @@ ssl: - type: json json: - " .tls_version" -# digest: 4a0a00473045022047abadda76eb5f3039aa1d40ff579d8d3198d910d2bac0003dda7c6eb01d5605022100b575031490bc1af035e672ae62068633e407d893c9e7158606cf03b8fb35dc23:236a7c23afe836fbe231d6e037cff444 \ No newline at end of file +# digest: 4a0a0047304502200812af05602cf94522219329ee3a83cd7c4190ec6ba6cdbb7f4e559d645fa8c3022100b2a6152f1a295dcf0e3d8b39154c0f2433c4eff4db43c639711f7d544343a10b:236a7c23afe836fbe231d6e037cff444 \ No newline at end of file diff --git a/templates/dast/5.1.2.yaml b/templates/dast/5.1.2.yaml index 496fdf0..642657e 100644 --- a/templates/dast/5.1.2.yaml +++ b/templates/dast/5.1.2.yaml @@ -46,4 +46,4 @@ http: part: body regex: - 'key="(?P[^"]+)",value="(?:\\")?(?P[^"\\]+)(?:\\")?"' -# digest: 4a0a004730450221008053e69857fcd9a70a7738216d0d538fbb6738c2baf81cd6e4b93a9efe99f29502205093abdf5d3ffe964272ef93e62f84b4ff496904e6f24c27a24186761a532b98:236a7c23afe836fbe231d6e037cff444 \ No newline at end of file +# digest: 4b0a00483046022100fd41c66225894a7314506755d97be437ec01ea8e1c7952a0904186e4d70662490221008f5c63b5a84a58290322e733da2420f0bb9ab10265516b2fcdf20a5535727b47:236a7c23afe836fbe231d6e037cff444 \ No newline at end of file From a402971d121dcde649b1ae7f10bc8511a5687532 Mon Sep 17 00:00:00 2001 From: Masoud Abdaal Date: Sat, 29 Mar 2025 08:57:45 +0330 Subject: [PATCH 050/107] Added V5.2.1 --- templates/5.2.1.yaml | 89 + templates/dast/assets/5.2.1Payloads.txt | 9823 +++++++++++++++++++++++ 2 files changed, 9912 insertions(+) create mode 100644 templates/5.2.1.yaml create mode 100644 templates/dast/assets/5.2.1Payloads.txt diff --git a/templates/5.2.1.yaml b/templates/5.2.1.yaml new file mode 100644 index 0000000..c5abd8b --- /dev/null +++ b/templates/5.2.1.yaml @@ -0,0 +1,89 @@ +id: ASVS-4-0-3-V5-2-1 + +info: + name: ASVS 5.2.1 Check + author: Masoud Abdaal + severity: high + classification: + cwe-id: CWE-116 + reference: + - https://owasp.org/www-project-web-security-testing-guide/latest/4-Web_Application_Security_Testing/11-Client-side_Testing/03-Testing_for_HTML_Injection + - https://github.com/OWASP/ASVS/blob/master/4.0/en/0x13-V5-Validation-Sanitization-Encoding.md#v52-sanitization-and-sandboxing + tags: asvs,5.2.1 + description: | + Verify that all untrusted HTML input from WYSIWYG editors or similar is properly sanitized with an HTML sanitizer library or framework feature. + +requests: + - name: EditorJS Payloads + method: POST + path: + - "{{BaseURL}}" + headers: + Content-Type: application/json + User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36 Edg/134.0.0.0 + + attack: clusterbomb + payloads: + payload: "templates/dast/assets/5.2.1Payloads.txt" + matchers: + - type: word + part: body + words: + - "{{payload}}" + body: | + { + "time": "{{payload}}", + "blocks": [ + { + "type": "{{payload}}", + "data": { + "text": "{{payload}}", + "level": "{{payload}}" + } + }, + { + "type": "{{payload}}", + "data": { + "text": "{{payload}}" + } + }, + { + "type": "{{payload}}", + "data": { + "style": "{{payload}}", + "items": [ + "{{payload}}", + "{{payload}}", + "{{payload}}" + ] + } + } + ], + "version": "{{payload}}" + } + + - name: QuillJS Payload + method: POST + path: + - "{{BaseURL}}" + headers: + Content-Type: application/json + User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36 Edg/134.0.0.0 + + attack: clusterbomb + payloads: + payload: "templates/dast/assets/5.2.1Payloads.txt" + matchers: + - type: word + part: body + words: + - "{{payload}}" + body: | + { + "ops": [ + { "insert": "{{payload}}" }, + { "insert": "{{payload}}", "attributes": { "bold": "{{payload}}" } }, + { "insert": "{{payload}}", "attributes": { "italic": "{{payload}}" } }, + { "insert": "{{payload}}", "attributes": { "link": "{{payload}}" } } + ] + } diff --git a/templates/dast/assets/5.2.1Payloads.txt b/templates/dast/assets/5.2.1Payloads.txt new file mode 100644 index 0000000..02fdbf4 --- /dev/null +++ b/templates/dast/assets/5.2.1Payloads.txt @@ -0,0 +1,9823 @@ + + +test +test +test +test +test +test +test + + + + +test +test + +test +test + +test +test +test +test + +test +test +test +test +test +test +test +test +test +test +test +requires scrolling +test +XSS +XSS +XSS +XSS +XSS +XSS +XSS +XSS +XSS +

































test
+XSS +XSS +XSS +XSS +XSS +test +test +test +test +test +test +test + + + +test +test + +test +test +test +test + +test +test +test +test +test +test +test +test +test +test +test +requires scrolling +XSS +XSS +XSS +XSS +XSS +XSS +XSS +XSS +XSS +

































test
+XSS +XSS +XSS +XSS +XSS +test +test +test +test +test +test +test + + + + +test +test + +test +test + +test +test +test +test + +test +test +test +test +test +test +test +test +test +test +test +requires scrolling +test +XSS +XSS +XSS +XSS +XSS +XSS +XSS +XSS +XSS +

































test
+XSS +XSS +XSS +XSS +XSS +test +test +test +test +test +test +test + + + + +test +test + +test +test + +test +test +test +test + +test +test +test +test +test +test +test +test +test +test +test +requires scrolling +test +XSS +XSS +XSS +XSS +XSS +XSS +XSS +XSS +XSS +

































test
+XSS +XSS +XSS +XSS +XSS +
test +
test
+
test
+
test
+
test
+
test
+
test
+
+
+
+
+
test
+
test
+
+
test
+
test
+
+
test
+
test +
test +
test
+
+
test
+
test
+
test
+
test
+
test
+
test
+
test
+
test
+
test
+
test
+
test
+
requires scrolling +
test
+
XSS
+
XSS
+
XSS
+
XSS
+
XSS
+
XSS
+
XSS
+
XSS
+
XSS
+


































test
+
XSS
+
XSS
+
XSS
+
XSS
+
XSS
+test +test +test +test +test +test +test + + + +test +test + +test +test +test +test + +test +test +test +test +test +test +test +test +test +test +test +requires scrolling +XSS +XSS +XSS +XSS +XSS +XSS +XSS +XSS +XSS +

































test
+XSS +XSS +XSS +XSS +XSS +test +test +test +test +test +test +test + + + +test +test + +test +test +test +test + +test +test +test +test +test +test +test +test +test +test +test +requires scrolling +XSS +XSS +XSS +XSS +XSS +XSS +XSS +XSS +XSS +

































test
+XSS +XSS +XSS +XSS +XSS +test +test +test +test +test +test +test + + + +test +test + +test +test +test +test + +test +test +test +test +test +test +test +test +test +test +test +requires scrolling +XSS +XSS +XSS +XSS +XSS +XSS +XSS +XSS +XSS +

































test
+XSS +XSS +XSS +XSS +XSS +test +test +test +test +test +test +test + + + + +test +test + +test +test + +test +test +test +test + +test +test +test +test +test +test +test +test +test +test +test +requires scrolling +test +XSS +XSS +XSS +XSS +XSS +XSS +XSS +XSS +XSS +

































test
+XSS +XSS +XSS +XSS +XSS +test +test +test +test +test +test +test + + +test +test + +test +test + +test +test +test +test + +test +test +test +test +test +test +test +test +test +test +test +requires scrolling +test +XSS +XSS +XSS +XSS +XSS +XSS +XSS +XSS +XSS +

































test +XSS +XSS +XSS +XSS +XSS +
test +
test
+
test
+
test
+
test
+
test
+
test
+
+
+
+
+
test
+
test
+
+
test
+
test
+
+
test
+
test +
test +
test
+
+
test
+
test
+
test
+
test
+
test
+
test
+
test
+
test
+
test
+
test
+
test
+
requires scrolling +
test
+
XSS
+
XSS
+
XSS
+
XSS
+
XSS
+
XSS
+
XSS
+
XSS
+
XSS
+


































test
+
XSS
+
XSS
+
XSS
+
XSS
+
XSS
+