Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add curl on subshell to curl-pipe-bash rule #3011

Merged
Merged
Show file tree
Hide file tree
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
3 changes: 3 additions & 0 deletions bash/curl/security/curl-pipe-bash.bash
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ curl http://10.110.1.200/deployment/scripts/SLAVE00-flight-setup.bash | sudo /bi
# ruleid: curl-pipe-bash
sudo bash <(curl -Ls "https://raw.githubusercontent.com/pusox/pusox/main/script/_A.sh")

# ruleid: curl-pipe-bash
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

# ok: curl-pipe-bash
curl http://10.110.1.200/deployment/scripts/SLAVE00-flight-setup.bash | tee -a /tmp/mainscript-default-output

4 changes: 3 additions & 1 deletion bash/curl/security/curl-pipe-bash.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ rules:
impact: LOW
patterns:
JacobBrackett marked this conversation as resolved.
Show resolved Hide resolved
- pattern-either:
- pattern: curl ... | ... bash ...
- pattern: curl ... | ... bash ...
- pattern: curl ... | ... /bin/bash ...
- pattern: ... bash <(curl ...)
- pattern: ... /bin/bash <(curl ...)
- pattern: ... bash -c "$(curl ...)"
- pattern: ... /bin/bash -c "$(curl ...)"
Loading