Skip to content

Commit

Permalink
Rule update to only fire for in-scope assets
Browse files Browse the repository at this point in the history
  • Loading branch information
cschneider4711 committed Nov 14, 2020
1 parent 514b312 commit cec241a
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions risks/built-in/incomplete-model/incomplete-model-rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,14 @@ func GenerateRisks() []model.Risk {
risks := make([]model.Risk, 0)
for _, id := range model.SortedTechnicalAssetIDs() {
technicalAsset := model.ParsedModelRoot.TechnicalAssets[id]
if technicalAsset.Technology == model.UnknownTechnology {
risks = append(risks, createRiskTechAsset(technicalAsset))
}
for _, commLink := range technicalAsset.CommunicationLinks {
if commLink.Protocol == model.UnknownProtocol {
risks = append(risks, createRiskCommLink(technicalAsset, commLink))
if !technicalAsset.OutOfScope {
if technicalAsset.Technology == model.UnknownTechnology {
risks = append(risks, createRiskTechAsset(technicalAsset))
}
for _, commLink := range technicalAsset.CommunicationLinks {
if commLink.Protocol == model.UnknownProtocol {
risks = append(risks, createRiskCommLink(technicalAsset, commLink))
}
}
}
}
Expand Down

0 comments on commit cec241a

Please sign in to comment.