Add vuln-scan: Dependency-Check 13.0.0 vs Trivy 0.76.2 vs OSV-Scanner 2.7.1
Same Maven project scanned three ways (pom.xml, SBOM, jars): captured output, false-positive evidence, suppression files with expiry, CI gate, -Pfixed profile. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017ic4b7h4ZNF4BDUpJk3Zou
This commit is contained in:
co-authored by
Claude Sonnet 5.5
parent
f32c088174
commit
7c677a39d2
@@ -0,0 +1,26 @@
|
||||
package com.ankurm.vulnscan;
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import org.apache.commons.text.StringSubstitutor;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* A tiny application whose only job is to give the scanners real dependencies to look at.
|
||||
* It uses log4j-core, commons-text and jackson-databind. It never touches snakeyaml.
|
||||
*/
|
||||
public final class OrderApp {
|
||||
|
||||
private static final Logger LOG = LogManager.getLogger(OrderApp.class);
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
// Plain substitution with an explicit map: NOT the interpolator that CVE-2022-42889 abuses.
|
||||
var greeting = new StringSubstitutor(Map.of("customer", "Asha"))
|
||||
.replace("Order confirmed for ${customer}");
|
||||
var json = new ObjectMapper().writeValueAsString(Map.of("message", greeting));
|
||||
LOG.info("order json: {}", json);
|
||||
System.out.println(json);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user