Skip to content

Commit 811a9b5

Browse files
fruechel-canvamschwager
authored andcommitted
Add exclusion patterns for curl-unecrypted-url
curl-unecrypted-url produces a lot of false positives on repositories with lots of cloud infrastructure code for AWS or GCP. These providers use link local URLs via HTTP without TLS. This is equivalent to localhost patterns.
1 parent 6b4738c commit 811a9b5

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

generic/curl-unencrypted-url.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,10 @@ curl https://google.com > /dev/null
1313
curl http://localhost > /dev/null
1414

1515
# ok: curl-unencrypted-url
16-
curl http://127.0.0.1 > /dev/null
16+
curl http://127.0.0.1 > /dev/null
17+
18+
# ok: curl-unencrypted-url
19+
curl http://169.254.169.254 > /dev/null
20+
21+
# ok: curl-unencrypted-url
22+
curl http://metadata.google.internal > /dev/null

generic/curl-unencrypted-url.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,5 @@ rules:
1919
- pattern: curl ... ftp://
2020
- pattern-not-inside: curl ... http://127.0.0.1
2121
- pattern-not-inside: curl ... http://localhost
22+
- pattern-not-inside: curl ... http://169.254.169.254
23+
- pattern-not-inside: curl ... http://metadata.google.internal

0 commit comments

Comments
 (0)