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

Allow incomplete fact selection #66

Merged
merged 1 commit into from
Dec 16, 2024
Merged

Allow incomplete fact selection #66

merged 1 commit into from
Dec 16, 2024

Conversation

d3vco
Copy link
Contributor

@d3vco d3vco commented Dec 8, 2024

Description

This change to the cartesian function allows a user to create a potential link without supplying values for every fact template.

If a fact template does not have a selected value, it is not replaced in the command. This is useful if the user has edited the command to remove a fact template. The change also allows for appropriate substitution of global facts (i.e. #{server}) when mixed with plugin facts.

fixes mitre/caldera#3030

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Unit test added.

Integration tested by adding to a local instance of Caldera and replicating some representative use cases.

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

@elegantmoose elegantmoose self-requested a review December 9, 2024 21:52
@elegantmoose elegantmoose self-assigned this Dec 9, 2024
@elegantmoose elegantmoose added the enhancement New feature or request label Dec 9, 2024
@elegantmoose
Copy link
Collaborator

Tested.

@elegantmoose elegantmoose merged commit 14322ec into mitre:master Dec 16, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

User-defined variables are not replaced when Global Variables are used
2 participants