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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add import command #84

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

Conversation

0xC0FFEEEE
Copy link
Contributor

@0xC0FFEEEE 0xC0FFEEEE commented Nov 25, 2023

This PR adds support for importing updated searches from an existing savedsearches.conf.

contentctl -p <path_to_content> import -c <path_to_savedsearches.conf>

For the sake of simplicity I opted to read the detection rules, update the search string and write the updated yml back. Whilst it's not perfect, at the very least it's idempotent and only updates detections with updated searches.

I'd value any feedback or contributions (from Splunk and customers) for the next round of updates to this feature branch 馃檪

@0xC0FFEEEE
Copy link
Contributor Author

Updated to use YmlReader and YmlWriter, do some cleanup of imports and add some useful console output.

@0xC0FFEEEE 0xC0FFEEEE marked this pull request as ready for review November 29, 2023 21:04
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.

None yet

1 participant