You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .jules/sentinel.md
+5Lines changed: 5 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,3 +2,8 @@
2
2
**Vulnerability:** The code `requests.get` implicitly relies on the default configuration for TLS verification. This can be maliciously or accidentally disabled via the `REQUESTS_CA_BUNDLE` environment variable, leading to Man-In-The-Middle (MITM) attacks when downloading models from untrusted or tampered sources.
3
3
**Learning:** Explicit configuration (such as `verify=True` in HTTP requests) provides defense-in-depth against environment manipulation.
4
4
**Prevention:** Always explicitly set `verify=True` when executing HTTP requests to external or potentially unauthenticated sources using the `requests` library.
5
+
6
+
## 2024-05-20 - [Fix SSRF via Open Redirects in GCS Downloads]
7
+
**Vulnerability:** Server-Side Request Forgery (SSRF) was possible because HTTP requests followed redirects by default. A malicious or compromised server could redirect to internal resources (e.g., metadata endpoints, internal network IPs) circumventing initial URL validation.
8
+
**Learning:** Initial URL validation is insufficient if the HTTP client automatically follows redirects to unvalidated destinations.
9
+
**Prevention:** Always set `allow_redirects=False` in HTTP clients and explicitly validate or reject redirect status codes (301, 302, 303, 307, 308) to prevent SSRF via open redirects.
0 commit comments