Critical bug fixes and recall improvements (#68)

This commit is contained in:
Eli Peter 2026-05-11 12:42:39 -04:00 committed by GitHub
parent 7d0e7320e2
commit 55247b7fcd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
352 changed files with 60069 additions and 900 deletions

View file

@ -0,0 +1,17 @@
// Phase 14 fixture (Java negative) `"https://api.example.com/" + path`
// produces a StringFact whose prefix is the literal scheme/host. The
// `RestTemplate.getForObject(url, ...)` SSRF sink reads the URL at
// arg 0; `is_abstract_safe_for_sink` honours the prefix-lock and
// suppresses the finding even though the path component is
// attacker-controlled.
import org.springframework.web.client.RestTemplate;
import javax.servlet.http.HttpServletRequest;
public class SsrfJavaOriginLocked {
public void proxy(HttpServletRequest req) {
String path = req.getParameter("path");
String url = "https://api.example.com/" + path;
RestTemplate rt = new RestTemplate();
String body = rt.getForObject(url, String.class);
}
}