Skip to content

Commit

Permalink
Fix curl-unencrypted (#54)
Browse files Browse the repository at this point in the history
* Fix curl-unencrypted

* Apply suggestions from code review

---------

Co-authored-by: Paweł Płatek <e2.8a.95@gmail.com>
  • Loading branch information
LewisArdern and GrosQuildu authored Mar 11, 2024
1 parent f927ddb commit b5f7c2e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
6 changes: 6 additions & 0 deletions generic/curl-unencrypted-url.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,9 @@ curl ftp://google.com > /dev/null

# ok: curl-unencrypted-url
curl https://google.com > /dev/null

# ok: curl-unencrypted-url
curl http://localhost > /dev/null

# ok: curl-unencrypted-url
curl http://127.0.0.1 > /dev/null
9 changes: 6 additions & 3 deletions generic/curl-unencrypted-url.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ rules:
impact: HIGH
references:
- https://curl.se/docs/manpage.html
pattern-either:
- pattern: curl ... http://
- pattern: curl ... ftp://
patterns:
- pattern-either:
- pattern: curl ... http://
- pattern: curl ... ftp://
- pattern-not-inside: curl ... http://127.0.0.1
- pattern-not-inside: curl ... http://localhost

0 comments on commit b5f7c2e

Please sign in to comment.