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

Add import command #84

Closed
wants to merge 6 commits into from
Closed

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
@pyth0n1c
Copy link
Contributor

Unfortunately, we have sat on this PR for a long time and there are a number of other changes we'd like to make to support it. There have been huge changes to the contentctl codebase in that time.
As such, I am going to close this PR, but have opened an issue to track this as a requested feature and linked back to this PR for visibility (and so that we have a clear record of the implementation work that's already been done).

Linked issue for tracking: #275

@pyth0n1c pyth0n1c closed this Aug 30, 2024
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