Skip to content

[VIRTS-4705] Add Manually Skipped Abilities to Operation Report#2822

Merged
mkultraWasHere merged 7 commits into
masterfrom
bleepbop/VIRTS-4705/discarded-abilities-in-steps
Oct 16, 2023
Merged

[VIRTS-4705] Add Manually Skipped Abilities to Operation Report#2822
mkultraWasHere merged 7 commits into
masterfrom
bleepbop/VIRTS-4705/discarded-abilities-in-steps

Conversation

@bleepbop
Copy link
Copy Markdown
Contributor

@bleepbop bleepbop commented Sep 23, 2023

Description

When generating PDF operation reports, manually discarded abilities would appear in operation steps but not skipped_abilities. This was due to several factors:

  • skipped_abilities was only considering abilities associated with an adversary profile. This has been updated to consider the operation chain as well, as not all operations will have adversary profiles.
  • The operations API could update a link status to discarded, but the discarded link was never added to operation.ignored_links. The Operations API has been updated to check if the newly updated link can be ignored, and if so, it will add it to that tracking data structure.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Reran operations in manual mode with and without adversary profiles to ensure that manually discarded abilities ended up in skipped_abilities.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works

@bleepbop bleepbop changed the title add helper method for updating ignored links; use chain data to provi… [VIRTS-4705] Add Manually Skipped Abilities to Operation Report Sep 23, 2023
@bleepbop bleepbop marked this pull request as ready for review September 25, 2023 13:43
@bleepbop bleepbop requested a review from clenk September 25, 2023 13:43
@mkultraWasHere mkultraWasHere self-requested a review September 25, 2023 17:07
mkultraWasHere
mkultraWasHere previously approved these changes Sep 26, 2023
Copy link
Copy Markdown
Contributor

@clenk clenk left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Copy Markdown
Contributor

@clenk clenk left a comment

Choose a reason for hiding this comment

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

Fix failing test:

tests/objects/test_operation.py:595: in test_add_ignored_link
    op.add_ignored_link(test_link)
app/objects/c_operation.py:260: in add_ignored_link
    self.ignored_links.add(link_id)
E   TypeError: unhashable type: 'Link'

@sonarqubecloud
Copy link
Copy Markdown

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 0 Code Smells

83.3% 83.3% Coverage
0.0% 0.0% Duplication

warning The version of Java (11.0.20) you have used to run this analysis is deprecated and we will stop accepting it soon. Please update to at least Java 17.
Read more here

Copy link
Copy Markdown
Contributor

@clenk clenk left a comment

Choose a reason for hiding this comment

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

Nice!

Copy link
Copy Markdown
Contributor

@mkultraWasHere mkultraWasHere left a comment

Choose a reason for hiding this comment

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

@bleepbop Nice work.

@mkultraWasHere mkultraWasHere merged commit cdb3d58 into master Oct 16, 2023
@mkultraWasHere mkultraWasHere deleted the bleepbop/VIRTS-4705/discarded-abilities-in-steps branch October 16, 2023 19:44
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.

3 participants