Java 获取服务器端请求伪造(SSRF)(CWE ID 918)restTemplate.getForEntity
我正在使用Java 获取服务器端请求伪造(SSRF)(CWE ID 918)restTemplate.getForEntity,java,spring-boot,resttemplate,veracode,ssrf,Java,Spring Boot,Resttemplate,Veracode,Ssrf,我正在使用restemplate进行微服务体系结构中的同步服务间通信 当我们完成Veracode扫描时,我们在getForEntity方法中获得服务器端请求伪造(SSRF)(CWE ID 918) restTemplate.getForEntity(URL, Entity.class); 不确定我为什么会收到这个SSRF问题? 对此可能的修复方法是什么?在restTemplate中使用URL之前,我已通过使用UriComponents构建URL解决了此问题 UriComponents uriC
restemplate
进行微服务体系结构中的同步服务间通信
当我们完成Veracode
扫描时,我们在getForEntity
方法中获得服务器端请求伪造(SSRF)(CWE ID 918)
restTemplate.getForEntity(URL, Entity.class);
不确定我为什么会收到这个SSRF
问题?对此可能的修复方法是什么?在restTemplate中使用URL之前,我已通过使用UriComponents构建URL解决了此问题
UriComponents uriComponents = UriComponentsBuilder.newInstance()
.scheme("http").host("www.yourdomain.com").path("/yourPath").build();
请参阅此链接以使用组件