2021-06-30 10:17:58 +00:00
|
|
|
id: javascript-env
|
|
|
|
|
|
|
|
info:
|
2021-06-30 12:23:27 +00:00
|
|
|
name: JavaScript Environment Config
|
2021-06-30 10:17:58 +00:00
|
|
|
author: pdp
|
|
|
|
severity: low
|
2021-06-30 10:37:25 +00:00
|
|
|
description: Detects common JavaScript environment configuration files.
|
2021-06-30 10:17:58 +00:00
|
|
|
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"
|
2021-06-30 12:23:27 +00:00
|
|
|
|
2021-06-30 10:17:58 +00:00
|
|
|
matchers-condition: and
|
|
|
|
matchers:
|
2021-06-30 10:37:25 +00:00
|
|
|
|
2021-06-30 10:17:58 +00:00
|
|
|
- type: status
|
|
|
|
status:
|
|
|
|
- 200
|
2021-06-30 12:23:27 +00:00
|
|
|
|
2021-06-30 13:59:26 +00:00
|
|
|
- type: dsl
|
2021-06-30 10:17:58 +00:00
|
|
|
part: header
|
2021-06-30 13:59:26 +00:00
|
|
|
dsl:
|
|
|
|
- "contains(tolower(all_headers), 'content-type: application/javascript')"
|
2021-06-30 12:23:27 +00:00
|
|
|
|
|
|
|
- type: word
|
|
|
|
part: body
|
|
|
|
words:
|
|
|
|
- "module.exports"
|
|
|
|
- "const audience"
|
|
|
|
- "const domain"
|
2021-06-30 12:55:21 +00:00
|
|
|
- "NODE_ENV"
|
|
|
|
- "LOG_LEVEL"
|
|
|
|
- "TOKEN"
|
|
|
|
- "KEY"
|
|
|
|
- "PASSWORD"
|
|
|
|
- "VERSION"
|
2021-06-30 13:59:26 +00:00
|
|
|
condition: or
|