Conversation
Co-authored-by: himattm <6266621+himattm@users.noreply.github.com>
|
π Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a π emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
π¨ Severity: HIGH
π‘ Vulnerability: Server-Side Request Forgery (SSRF). The
addFromDirectURLfunction usedhttp.Get()with user-provided URLs without validating the resolved IP address.π― Impact: An attacker could provide a URL that resolves to the cloud metadata endpoint (
169.254.169.254), potentially exposing sensitive cloud credentials or instance metadata.π§ Fix: Replaced
http.Get()with a customhttp.Clientandnet.Dialer. The dialer uses aControlhook to check the resolved IP after DNS resolution but before the connection is made, explicitly blocking the cloud metadata IP. Also added a 10s timeout to prevent DoS.β Verification: Verified by attempting to download a plugin from
http://169.254.169.254/latest/meta-data/with the updated code, which correctly returned an "access to cloud metadata IP is forbidden" error. Also rango test ./...to ensure no regressions were introduced.PR created automatically by Jules for task 3167999634774808332 started by @himattm