Skip to content

Commit

Permalink
Limits system CSG effectiveness level to be at most the coverage level (
Browse files Browse the repository at this point in the history
  • Loading branch information
scp93ch committed Nov 5, 2024
1 parent 9ed4e8a commit 22f43ee
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1358,13 +1358,12 @@ else if(cs.getMinOf() != null) {
if(csg.isEnabled() && csg.getOptionalCS().isEmpty()){
ControlStrategyDB domainCSG = dcsgs.get(csg.getParent());
Integer domainCsgLevel = twLevels.get(domainCSG.getBlockingEffect()).getLevelValue();
Integer csgCoverageLevel = twLevels.get(csg.getCoverageLevel()).getLevelValue();
if (domainCsgLevel > maxCsgLevel) {
maxCsgLevel = domainCsgLevel;
}
Integer csgCoverageLevel = twLevels.get(csg.getCoverageLevel()).getLevelValue(); // coverage level of mandatory controls
Integer systemCsgLevel = Math.min(domainCsgLevel, csgCoverageLevel); // system CSG TW is limited by the coverage level
maxCsgLevel = Math.max(maxCsgLevel, systemCsgLevel); // keep track of the most TW CSG
}
}
maxLevel = maxLevel > maxCsgLevel ? maxLevel : maxCsgLevel;
maxLevel = Math.max(maxLevel, maxCsgLevel);

// Convert to likelihood, and impose threat frequency limit if still above that limit
LevelDB likelihood = invertToLikelihood(trustworthinessLevels.get(maxLevel));
Expand Down

0 comments on commit 22f43ee

Please sign in to comment.