Skip to content

Link commands are now unencoded by default #2698

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

Merged
merged 4 commits into from
Dec 20, 2022
Merged

Conversation

argaudreau
Copy link
Contributor

Description

Link commands are typically stored encoded in base64, even when no obfuscation is used during an operation. While the UI and other plugins have been design to accommodate this, it causes some confusion when reading reports or links from the operations API. This PR makes changes to the Link object, specifically its display property, so that whenever a link is retrieved for display purposes, the command and plaintext_command fields are unencoded. The UI, tests, and relevant classes have been modified accordingly.

This is sort of a patch for a larger issue, since we really don't need link commands to be stored encoded at all. However, given the amount of refactoring needed within core, plugins, and deployable agents, this should be a stop-gap solution for the time being.

Type of change

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

How Has This Been Tested?

All operation API endpoints that return links now return command and plaintext_command unencoded, though command will be encoded if any obfuscation was used during an operation. The tests have also been updated and pass with these changes.

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

@argaudreau argaudreau requested review from clenk, JamieScottC, deacon-mp and a team December 1, 2022 16:53
@argaudreau argaudreau requested a review from a team as a code owner December 1, 2022 16:53
@argaudreau argaudreau self-assigned this Dec 1, 2022
@sonarqubecloud
Copy link

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

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@elegantmoose elegantmoose merged commit adc5958 into master Dec 20, 2022
@elegantmoose elegantmoose deleted the link-command-display branch December 20, 2022 01:45
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