Example config stanzas and YML templates

Open
#262 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
python, yaml

Research direction

Start with the contentctl init entry point, then inspect how build, validate, and test discover YML files. The issue proposes example definitions, reusable underscore-prefixed templates, and documented required or optional fields; done means the intended commands handle these examples without treating templates as active content.

Written by the indexing model from the issue text.

Description

Issue #258 has got me thinking about how best to document the various different YML config stanzas, required/optional fields and expected values, as, particularly for detections, defining a rule definition from scratch (i.e. without contentctl new) is somewhat of a trial and error process.

I appreciate there are still a lot of planned enhancements and updating the documentation is probably (understandably) quite low in the list of priorities, however there is probably a good middle ground to help others begin to adopt contentctl, and hopefully feed back/provide contributions on further enhancements.

Couple of ideas that go hand-in-hand that I'd love to get your thoughts on @pyth0n1c :

  1. Have contentctl init provide example YML definitions covering the various different stanzas, required/optional fields and expected values. For example it's not immediately apparent that the tags.message field is the risk message, or that enabled_by_default is a supported field. I've started this effort within a forked branch, primarily for my own benefit but I'd be happy to contribute back once it's got a bit more substance.
  2. Enable the use of templated YML files for ease of use - It would be neat if build|validate|test ignored YML files beginning with an underscore so that we could provide some cookie cutter templates that can be copied and used to produce new detections, stories, etc...
Dominant language
Python
Stars
139
Forks
52
Avg merge
1h 16m
Merged PRs (30d)
3

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from splunk/contentctl

All issues in splunk/contentctl

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.