Skip to content

contentctl new command to accept more parameters or load from a template #407

@getkub

Description

@getkub

Is your feature request related to a problem? Please describe.
contentctl new command currently accepts basic parameters like app.appid, path etc.
But it does NOT accept parameters like name, search etc, which is still prompted which makes handsfree automation hard

Describe the solution you'd like

Currently the contentctl new option accepts basic options

contentctl new --path content --type detection --app.title TEST --app.appid DA-ESS-TEST-detections --app.prefix TEST --app.label TESTLABEL

But it doesnt accept options below in its parameters

  • detection_name
  • detection_type
  • detection_author
  • security_domain
  • mitre_attack_ids
  • data_sources

Describe alternatives you've considered
Alternatively is to use prompt automation and then manipulate the file produced which is more hardwork

Additional context
The code below makes it prompt like
https://github.com/splunk/contentctl/blob/main/contentctl/actions/new_content.py#L133

Instead of this, provide ANOTHER option to ensure it can accept the skeleton from a file or parameter. Ideally an option to load a yaml/json file with those options would be ideal and then have something like

contentctl new --load user_inputs.yaml

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions