saf
saf copied to clipboard
Utils passthrough target
Resolves #581
Should be good to go for the most part. Let me know if it's ok to have split the options so that you either pass in an option to specify the filename OR an option to specify the raw data - let's me avoid having to do some annoying stuff where someone can pass in a string (which is valid JSON) which I'd then need to see if it were a valid path or not (if so, treat it as a path to find the file, otherwise treat it as json).
The other question is what restrictions does the target
type have? Right now I have it matching the passthrough
type which is basically anything goes territory as any valid json is allowed to be parsed according to how InSpec's implemented passthrough on their side.
@ejaronne @aaronlippold please also provide comments
We seem to be missing docs and unit tests.
The docs would help us review current user exprince, example of input and output etc.
I haven't circled back to this since I first created #581 Had I known it would diverge from the attest subcommand I'd have weighed in sooner, sorry "utils" is too generic a "verb" (and it's not a verb), so it is confusing what this sub-command is really for.
I strongly recommend either "supplement" or "augment":
"supplement": {
"description": "[Supplement] Supplement (read or modify) contextual elements in the Heimdall Data Format results json file, such as `passthrough` or 'target`"
},
"supplement:passthrough": {
"description": "Supplement (read or modify) contextual element `passthrough` in the Heimdall Data Format results json file"
},
"supplement:target": {
"description": "Supplement (read or modify) contextual element `target` in the Heimdall Data Format results json file"