feat: don't propagate viability to compromised nodes#339
Open
mrkickling wants to merge 1 commit intomainfrom
Open
feat: don't propagate viability to compromised nodes#339mrkickling wants to merge 1 commit intomainfrom
mrkickling wants to merge 1 commit intomainfrom
Conversation
b155ef2 to
5e75711
Compare
kasanari
reviewed
Mar 20, 2026
|
|
||
| viability_per_node = calculate_viability( | ||
| graph, enabled_defenses, impossible_attack_steps | ||
| graph, enabled_defenses, impossible_attack_steps, set() |
Collaborator
There was a problem hiding this comment.
Should this not be based on the entrypoint set?
Contributor
Author
There was a problem hiding this comment.
Good question, should it? If there is an entry point that is blocked by a pre-enabled defense, should the entry point 'children' be blocked? I guess it should according to the logic we want to implement.
kasanari
reviewed
Mar 20, 2026
| ) | ||
| if is_viable != viability_per_node[child]: | ||
| if is_viable != viability_per_node[child] and child not in compromised_nodes: | ||
| viability_per_node[child] = is_viable |
Collaborator
There was a problem hiding this comment.
Would it be possible to also remove this mutable reference while we are changing this function?
Contributor
Author
There was a problem hiding this comment.
Do you mean we should not change the value of viability_per_node in there?
Collaborator
There was a problem hiding this comment.
Yes. Such that viability_per_node can be declared as Mapping[AttackGraphNode, bool].
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.