diff --git a/generic/curl-unencrypted-url.sh b/generic/curl-unencrypted-url.sh index eedd396..39b5006 100644 --- a/generic/curl-unencrypted-url.sh +++ b/generic/curl-unencrypted-url.sh @@ -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 \ No newline at end of file diff --git a/generic/curl-unencrypted-url.yaml b/generic/curl-unencrypted-url.yaml index 1019cc8..ea29409 100644 --- a/generic/curl-unencrypted-url.yaml +++ b/generic/curl-unencrypted-url.yaml @@ -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