fasten-project / vulnerability-producer

Gathers, enriches and publishes vulnerability information to a Kafka topic.
https://www.fasten-project.eu/
Apache License 2.0
6 stars 3 forks source link

Exception while retrieving CPE versions - many errors in log #86

Closed MagielBruntink closed 2 years ago

MagielBruntink commented 3 years ago

With the latest image 6eb7caae the producer throws many log errors when parsing CPE versions. It proceeds after the error, but it probably a good idea to look idea this.

[2021-06-15 07:13:42,801] [ERROR] [main] [e.f.v.u.m.VersionRanger] - Exception while retrieving CPE versions
org.json.JSONException: A JSONObject text must begin with '{' at 1 [character 2 line 1]
    at org.json.JSONTokener.syntaxError(JSONTokener.java:507)
    at org.json.JSONObject.<init>(JSONObject.java:222)
    at org.json.JSONObject.<init>(JSONObject.java:406)
    at eu.fasten.vulnerabilityproducer.utils.mappers.VersionRanger.getCPEVersions(VersionRanger.java:623)
    at eu.fasten.vulnerabilityproducer.utils.mappers.PurlMapper.cpe2PurlInfer(PurlMapper.java:189)
    at eu.fasten.vulnerabilityproducer.utils.mappers.PurlMapper.inferPurls(PurlMapper.java:160)
    at eu.fasten.vulnerabilityproducer.utils.parsers.ParserManager.getVulnerabilitiesFromParsers(ParserManager.java:118)
    at eu.fasten.vulnerabilityproducer.VulnerabilityProducer.start(VulnerabilityProducer.java:111)
    at eu.fasten.vulnerabilityproducer.Main.run(Main.java:134)
    at picocli.CommandLine.executeUserObject(CommandLine.java:1729)
    at picocli.CommandLine.access$900(CommandLine.java:145)
    at picocli.CommandLine$RunLast.handle(CommandLine.java:2101)
    at picocli.CommandLine$RunLast.handle(CommandLine.java:2068)
    at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:1935)
    at picocli.CommandLine.execute(CommandLine.java:1864)
    at eu.fasten.vulnerabilityproducer.Main.main(Main.java:82)

[2021-06-15 07:13:42,801] [ERROR] [main] [e.f.v.u.p.ParserManager] - Could NOT process CVE-2015-3636
java.lang.NullPointerException
MagielBruntink commented 2 years ago

This was resolved by several improvements to the HTTP client.