CVE vulnerability reference
| 4 | * CVE vulnerability reference |
| 5 | */ |
| 6 | public class CVE implements Vulnerability { |
| 7 | private static final String URLBASE = "http://www.cvedetails.com/cve/"; |
| 8 | |
| 9 | private final String id; |
| 10 | private String summary; |
| 11 | private String description; |
| 12 | private short severity; |
| 13 | |
| 14 | public CVE(String id, String summary, String description) { |
| 15 | this.id = id; |
| 16 | this.summary = summary; |
| 17 | this.description = description; |
| 18 | } |
| 19 | |
| 20 | public CVE(String id, String summary) { |
| 21 | this(id, summary, null); |
| 22 | } |
| 23 | |
| 24 | public CVE(String id) { |
| 25 | this(id, null, null); |
| 26 | } |
| 27 | |
| 28 | public String getId() { |
| 29 | return id; |
| 30 | } |
| 31 | |
| 32 | public void setSummary(String summary) { |
| 33 | this.summary = summary; |
| 34 | } |
| 35 | |
| 36 | public void setDescription(String description) { |
| 37 | this.description = description; |
| 38 | } |
| 39 | |
| 40 | public void setSeverity(short severity) { |
| 41 | this.severity = severity; |
| 42 | } |
| 43 | |
| 44 | @Override |
| 45 | public String getName() { |
| 46 | return "CVE-" + id; |
| 47 | } |
| 48 | |
| 49 | @Override |
| 50 | public String getSummary() { |
| 51 | return summary; |
| 52 | } |
| 53 | |
| 54 | @Override |
| 55 | public String getDescription() { |
| 56 | return description; |
| 57 | } |
| 58 | |
| 59 | @Override |
| 60 | public String getUrl() { |
| 61 | return URLBASE + id; |
| 62 | } |
| 63 |
nothing calls this directly
no outgoing calls
no test coverage detected