Json output format returns an array
ArisBee opened this issue · comments
That's minor, but when I execute something like:
detect-secrets audit .secrets.baseline --json --report
It will typically returns json objects within an array, for instance if there is no finding it will simply output []
. Couldn't it instead return a json object in between curly brackets {}
?
Hello @ArisBee. Is there a reason you want this enhancement? The functionality of the audit report is to display a list of secret values which is why it returns an empty list.
That makes it easier for automated parsing. Now I have to define an exception when nothing is found.
As I mentioned internally, I fully support this enhancement 😄
@ArisBee Do you want it only in the nothing found case Ex. {}
. Or just in general?
I would add it in general for consistency. Something like
{
results: [ ... ]
}