What to do
- Send all outbound requests through an egress proxy or firewall that blocks private, loopback, link-local and cloud metadata addresses. Check the address after DNS resolution, pin it for the connection, and refuse redirects to blocked addresses.
Evidence
Proxy or firewall rules, and a test log showing blocked requests to the metadata service and private ranges, including through a redirect and through DNS rebinding.
- Allow only listed destinations where the service's needs are known, such as its model providers. Deny everything else.
Evidence
Per-service allowlist.
- Resolve every supplied path to its canonical form and refuse it unless it is under the service's base directory. Do not follow symlinks when scanning, restoring or extracting. Reject archive entries with `..` or absolute paths.
Evidence
Code and tests with traversal and symlink cases.
- Run the service as a user that cannot read secrets or system files outside its own directory, on a read-only root filesystem. Require metadata service tokens (IMDSv2, hop limit 1).
Evidence
Deployment manifest.
