Skip to content

Commit

Permalink
Merge pull request #18 from Spyderisk/3-show-a-summary-of-the-attack-…
Browse files Browse the repository at this point in the history
…graph-for-a-consequence-in-the-web-ui

3 show a summary of the attack graph for a consequence in the web UI
  • Loading branch information
kenmeacham authored Jul 5, 2023
2 parents 4ddb9a1 + 5460ce6 commit 6d941fe
Show file tree
Hide file tree
Showing 30 changed files with 3,152 additions and 91 deletions.
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ dependencies {
compile('org.apache.jena:jena-tdb:3.14.0')
annotationProcessor('com.github.therapi:therapi-runtime-javadoc-scribe:0.12.0')
compile("net.lingala.zip4j:zip4j:2.10.0")
compile("com.bpodgursky:jbool_expressions:1.23")

//test dependencies
testCompile('org.springframework.boot:spring-boot-starter-test') {exclude group: "com.vaadin.external.google", module:"android-json"}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,14 @@ public ModelDB () {
protected String label;
@SerializedName("rdfs#comment")
protected String description;

@SerializedName("hasRisk")
private String risk;

private boolean risksValid;

private String riskCalculationMode;

//@SerializedName("http://www.w3.org/2002/07/owl#versionInfo")
private String versionInfo;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,9 @@ public boolean calculateRiskLevels(RiskCalculationMode mode, boolean saveResults
* why the unit test fails, which will run in parallel with the risk calculator developments.
*/

// First, store the risk calc mode (FUTURE/CURRENT), to ensure this is returned in the results
model.setRiskCalculationMode(mode.toString());

// TODO: Remove prints
progress.updateProgress(0.1, "Creating maps");
createMaps();
Expand Down Expand Up @@ -1447,8 +1450,10 @@ private void calculateMisbehaviourRiskLevels() {
querier.store(ms, "system-inf");
}
}

if (worstRiskLevel != null) {
model.setRisk(worstRiskLevel.getUri());
model.setRisksValid(true); //ensure that flag is set for returning in the response
querier.store(model, "system-inf");
}

Expand Down
Loading

0 comments on commit 6d941fe

Please sign in to comment.