Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 13 additions & 14 deletions wildcard-in-manifest.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
id: wildcards-in-manifest

info:
name: Wildcards in Manifest
description: Check for wildcards in the manifest file, which could lead to overexposure of permissions and security risks.
name: Validate Wildcards in Manifest
description: Wildcards should be restricted only to required paths to prevent overprivilege.
author: nullenc0de
severity: low

Expand All @@ -13,22 +13,21 @@ file:
matchers:
- type: regex
regex:
- "\\*\\/\\/\\*"
- "\\*:\\/\\/*"
- "\\\"\\*\\/"
- "\\/\\*\\\""
- "\\*:\\/\\/\\*\\/*"
- "\\*\\/\\*\\/*"
- '"matches":\\s*\\["'

- type: regex
regex:
- '\\*\\/everything\\/\\*'
negative: true

extractors:
- type: regex
part: body
name: wildcard_matches
regex:
- "\\*\\/\\/\\*"
- "\\*:\\/\\/*"
- "\\\"\\*\\/"
- "\\/\\*\\\""
- "\\*:\\/\\/\\*\\/*"
- "\\*\\/\\*\\/*"
- '"matches":\\s*\\[(.+?)\\]'

- type: regex
part: wildcard_matches
name: match
regex: '\\s+"(.+?)"'