-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow overriding risk magnitudes #1353
Conversation
2ec3464
to
449115e
Compare
policy/cnspec_policy.proto
Outdated
float magnitude = 71; | ||
bool is_absolute = 72; | ||
float deprecated_v11_magnitude = 71; | ||
bool deprecated_v11_is_absolute = 72; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Could you please add a comment what to use instead?
policy/cnspec_policy.proto
Outdated
@@ -645,7 +653,7 @@ message ScoreDelta { | |||
message ScoredRiskFactor { | |||
string mrn = 1; | |||
float risk = 2; | |||
bool is_absolute = 3; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know, we save a risk factor struct in the backend. Do you know whether it is this one? Would this break the unmarshal of already saved risk factors?
} | ||
|
||
if riskFactor.Action != explorer.Action_UNSPECIFIED { | ||
existing.Action = riskFactor.Action |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps an edge case:
Could the same risk factor be defined in multiple policies?
This line would then mean that the last non-unspecified action wins. Is this as it should be?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ya, i think that problem already exists. But if its defined in the space policy it will win
449115e
to
fe5e731
Compare
Allows overriding the risk magnitude for a risk and completely disabling a risk.
After #1352