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

lgc import #1

Open
c-x opened this issue Jun 3, 2024 · 0 comments
Open

lgc import #1

c-x opened this issue Jun 3, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@c-x
Copy link
Contributor

c-x commented Jun 3, 2024

Problem

When deploying lgc for the first time, we might not have our detections written as YAML files so we need to create custom scripts to convert existing detections rules which is time consuming.

Solution

We would need a lgc import command that will connect to a service and create YAML files from scratch and from what's live in the target system.

Examples:
lgc import prod --service splk-prod

Maybe a templating system would solve the below pitfalls, for example:

lgc import prod --service splk-prod --template my-template.yaml

With the desired fields described in my-template.yaml

Pitfall

  • Each plugin would require a unique set of parameters. For example, the Splunk API returns every parameters regardless of having their default values. This would create crazy big yaml files. Consider something like lgc import --service splk-prod --filter cron_schedule --filter disabled --filter description --filter search
  • Splunk also uses namespace (app/user) to access knowledge objects, so we could need something like lgc import --service splk-prod --kv app=MyApp

Alternatives

  • For Splunk, all savedsearches are contained within a single file savedsearches.conf. An alternative would be to parse that file. The benefit is that we would get only user-defined parameters. Something like lgc import --from-file savedsearches.conf --service splk-prod
@c-x c-x added the enhancement New feature or request label Jun 3, 2024
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

No branches or pull requests

1 participant