brexhq / substation

Substation is a toolkit for routing, normalizing, and enriching security event and audit logs.
https://substation.readme.io
MIT License
330 stars 21 forks source link

feat(cmd): Add vet Command to CLI Tool #253

Closed jshlbrd closed 1 month ago

jshlbrd commented 1 month ago

Description

Motivation and Context

This adds the features of the AWS Lambda validate application to the CLI tool, and follows the conventions of other CLI tool commands (mimicking the go tool). It provides more info on Substation errors than validate by printing the line with the error below the error message, like this:

vet.jsonnet:3 transform 324f1035-10a51b9a: object_target_key: missing required option

    {"type":"hash_sha256","settings":{"id":"324f1035-10a51b9a","object":{"source_key":"foo"}}}

The additional output can be ported to validate using the addition of the stringer on config.go.

How Has This Been Tested?

substation vet was integration tested for a variety of use cases:

Types of changes

Checklist: