Validation Rules/Tuning & CICD Output

Open
#364 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
python
Domain
ci-cd, cli

Research direction

Start at the contentctl validate command and review how validation rules and command output are currently defined. Clarify the configuration scope for optional warnings and the JSON schema needed for CI/CD annotations; done means both behaviors have agreed requirements and are covered by tests.

Written by the indexing model from the issue text.

Description

enhancement

Couple of things relating to contentctl validate that would be good to get your thoughts on.

Validation using contentctl is very strict, with no OOTB support for tweaking what can be considered a warning or optional

We have a handful of detections and other knowledge objects that for one reason or another we either can't, or don't want to commit as code. The issue I frequently run in to is where we have a detection using a macro or lookup that's defined elsewhere (either defined in a separate app, or created in Splunk web).

I don't know what's planned for validation beyond 5.0, but it would be neat if we could 'tune' the validation for specific content, or as a blanket rule for things that just aren't strictly required. Macros and lookups are the two main things that come to mind, though I can imagine that arbitrary limits such as the need to have 2 drilldowns (or any at all for that matter) may also not be desirable for other users/orgs and could therefore be configured as optional.

CICD formatted output

Not even necessarily limited to just the validate command output. It would be nice if it were possible to produce output in json format for ease of machine reading as part of a CICD pipeline, the use case that comes to mind is for a validation action that produces error/warning annotations.

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.