Skip to content
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

AF-122 Start Refs #83

Merged
merged 2 commits into from
Jul 20, 2023
Merged

AF-122 Start Refs #83

merged 2 commits into from
Jul 20, 2023

Conversation

mehaase
Copy link
Contributor

@mehaase mehaase commented Jul 18, 2023

Update the logic for start refs:

  1. impute the graph containing only action and condition nodes
  2. any node in the imputed graph with in-degree equal to zero is a start ref

Note that cycles in the graph are undefined behavior -- it throws an exception right now to prevent creating an invalid Attack Flow -- but we may need to revisit this in the future depending on how common this is in practice.

Update the logic for start refs:
  1. impute the graph containing only action and condition nodes
  2. any node with in-degree equal to zero is a start ref

Note that cycles in the graph are undefined behavior -- it throws an
exception right now to prevent creating an invalid Attack Flow -- but we
may need to revisit this in the future depending on how common this is
in practice.
@mehaase mehaase requested a review from mikecarenzo July 18, 2023 20:33
Copy link
Contributor

@mikecarenzo mikecarenzo left a comment

Choose a reason for hiding this comment

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

Code looks great, the impute logic checks out, it just needs to use strict equality in two places.

@sonarcloud
Copy link

sonarcloud bot commented Jul 20, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 3 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@mikecarenzo mikecarenzo merged commit 2e83980 into main Jul 20, 2023
4 of 6 checks passed
@mikecarenzo mikecarenzo deleted the af11-start-refs branch July 20, 2023 16:15
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