Merge pull request #1829 from pdparchitect/javascript-env

Detect javascript environment configs.
patch-1
Sandeep Singh 2021-06-30 19:31:16 +05:30 committed by GitHub
commit 8316471072
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 44 additions and 0 deletions

View File

@ -0,0 +1,44 @@
id: javascript-env
info:
name: JavaScript Environment Config
author: pdp
severity: low
description: Detects common JavaScript environment configuration files.
tags: javascript,config,exposure
requests:
- method: GET
path:
- "{{BaseURL}}/env.js"
- "{{BaseURL}}/env.development.js"
- "{{BaseURL}}/env.production.js"
- "{{BaseURL}}/env.test.js"
- "{{BaseURL}}/env.dev.js"
- "{{BaseURL}}/env.prod.js"
matchers-condition: and
matchers:
- type: status
status:
- 200
- type: dsl
part: header
dsl:
- "contains(tolower(all_headers), 'content-type: application/javascript')"
- type: word
part: body
words:
- "module.exports"
- "const audience"
- "const domain"
- "NODE_ENV"
- "LOG_LEVEL"
- "TOKEN"
- "KEY"
- "PASSWORD"
- "VERSION"
condition: or