Skip to content

feat: don't propagate viability to compromised nodes#339

Open
mrkickling wants to merge 1 commit intomainfrom
stop-viability-propagation-if-compromised-node
Open

feat: don't propagate viability to compromised nodes#339
mrkickling wants to merge 1 commit intomainfrom
stop-viability-propagation-if-compromised-node

Conversation

@mrkickling
Copy link
Copy Markdown
Contributor

No description provided.

@mrkickling mrkickling force-pushed the stop-viability-propagation-if-compromised-node branch from b155ef2 to 5e75711 Compare March 20, 2026 13:09

viability_per_node = calculate_viability(
graph, enabled_defenses, impossible_attack_steps
graph, enabled_defenses, impossible_attack_steps, set()
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this not be based on the entrypoint set?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me.

)
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
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be possible to also remove this mutable reference while we are changing this function?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean we should not change the value of viability_per_node in there?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. Such that viability_per_node can be declared as Mapping[AttackGraphNode, bool].

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants