Commit 19738b3
Trim trailing dot and normalize case for trusted IMDS hostnames
DNS resolvers may return hostnames with a trailing dot (FQDN form),
e.g. `metadata.google.internal.`. The previous equality check failed
to match these, risking false-positive stored-SSRF blocks for GCP IMDS.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent dcde26d commit 19738b3
2 files changed
Lines changed: 14 additions & 1 deletion
File tree
- agent_api/src
- main/java/dev/aikido/agent_api/vulnerabilities/ssrf/imds
- test/java/vulnerabilities/ssrf
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
17 | 21 | | |
18 | 22 | | |
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
88 | 97 | | |
0 commit comments