fixed-formatting

patch-1
Dhiyaneshwaran 2023-03-14 00:28:46 +05:30 committed by GitHub
parent 1d4c16d4d2
commit 73b8635875
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 12 additions and 12 deletions

View File

@ -1,34 +1,34 @@
id: js-analyse
info:
name: js-analyse
name: JS Analyse
author: ayadim
severity: info
description: |
This process involves extracting tokens, endpoints, URIs, and variable names from the JS file and analyzing them for any potential weaknesses that could be exploited. By extracting and analyzing these elements, potential security threats can be identified, allowing for proactive measures to be taken to mitigate any risks associated with the application. This process can be used as part of a comprehensive bug-hunting strategy to ensure the security of an application.
tags: file,js-analyse,js
metadata:
verified: "true"
tags: file,js-analyse,js,javascript
file:
- extensions:
- js
extractors:
- type: regex
name: Extracted-Token
name: extracted-token
regex:
- "(?i)(([a-z0-9]+)[-|_])?(key|password|passwd|pass|pwd|private|credential|auth|cred|creds|secret|access|token)([-|_][a-z]+)?(\\s)*(:|=)+"
- type: regex
name: Extracted-Varaibles-Name
name: extracted-endpoints
regex:
- "(?i)(var|const|let)\\s+([a-z_$][0-9a-z_$]*)\\s*="
- type: regex
name: Extracted-Endpoints
regex:
# Case : './path/file' or "/path/file"
- "(?i)('|\")((\\.{0,2})|([a-z0-9-_]*))/([a-z0-9-_/=:&?\\.]+)('|\")"
# Case "`${ this.hostServer }/rest/basket/${ e }"
- "(?i)}\\s*/[a-z0-9-_?=&/]+"
# Case "path: 'login'," or "path='admin'"
- "(?i)path\\s*(:|=)\\s*('|\")[a-z0-9-_?=&:\\./]+('|\")"
condition: or
- type: regex
name: Extracted-URI
name: extracted-uri
regex:
- "(?i)([a-z]{0,10}):(//|/)[a-z0-9\\./?&-_=:]+"