-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9c261bb
commit 6706d5c
Showing
3 changed files
with
20 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,26 @@ | ||
package edu.rit.se.nvip.model; | ||
|
||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
||
@JsonIgnoreProperties(ignoreUnknown=true) | ||
public class SSVC { | ||
private enum EXPLOIT_STATUS { | ||
NONE, POC, ACTIVE | ||
} | ||
private final boolean automatable; | ||
private final EXPLOIT_STATUS exploitStatus; | ||
private final boolean technicalImpact; | ||
@JsonProperty("automatable") | ||
private boolean automatable; | ||
@JsonProperty("exploitStatus") | ||
private EXPLOIT_STATUS exploitStatus; | ||
|
||
public SSVC(boolean automatable, EXPLOIT_STATUS exploitStatus, boolean technicalImpact) { | ||
this.automatable = automatable; | ||
this.exploitStatus = exploitStatus; | ||
this.technicalImpact = technicalImpact; | ||
} | ||
private boolean technicalImpact; | ||
|
||
public boolean isAutomatable() { return automatable; } | ||
public String getExploitStatus() { return exploitStatus.toString(); } | ||
public boolean getTechnicalImpact() { return technicalImpact; } | ||
|
||
@JsonProperty("technicalImpact") | ||
public void setTechnicalImpact(String technicalImpact) { | ||
this.technicalImpact = technicalImpact.equals("TOTAL"); | ||
} | ||
} |