-
Notifications
You must be signed in to change notification settings - Fork 140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JSON output feature (status badges for dockle maybe?) #24
Labels
enhancement
New feature or request
Comments
Merged
@KEINOS |
@tomoyamachi Wow, isn't it wonderful? 🎉 $ brew upgrade dockle
...
$ dockle --version
dockle version 0.1.8
$
$ dockle --help
NAME:
dockle - A Simple Security Checker for Container Image, Suitable for CI
USAGE:
dockle [options] image_name
VERSION:
0.1.8
OPTIONS:
--input value, -i value input file path instead of image name
--format value, -f value format (json)
--output value, -o value output file name
--exit-code value Exit code when alert were found (default: 0)
--clear-cache, -c clear image caches
--debug, -d debug mode
--cache-dir value cache directory
--help, -h show help
--version, -v print the version
$
$ dockle --format json test_image:test_tag
{
"summary": {
"fatal": 0,
"warn": 2,
"info": 1,
"pass": 14
},
"details": [
{
"code": "CIS-DI-0001",
"title": "Create a user for the container",
"level": "WARN",
"alerts": [
"Last user should not be root"
]
},
{
"code": "CIS-DI-0005",
"title": "Enable Content trust for Docker",
"level": "INFO",
"alerts": [
"export DOCKER_CONTENT_TRUST=1 before docker pull/build"
]
},
{
"code": "CIS-DI-0006",
"title": "Add HEALTHCHECK instruction to the container image",
"level": "WARN",
"alerts": [
"not found HEALTHCHECK statement"
]
}
]
} Closing #24 |
tomoyamachi
pushed a commit
that referenced
this issue
Mar 8, 2020
- Adds a new analyzer error for "no packages detected" - Package analyzers now return the common "no packages detected" error - Returned errors from the package analyzers are checked against the common "no packages detected" errors and filters those out. Other errors will now be passed back to the user for debugging.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I would like to have an option to get the results in JSON format.
Since there's a workaround like scraping the results, it's not a strong request but useful in many ways.
If I can get the results like so, it would be handy to use the results in other languages.
Sample Usage
So far, my main purpose for this is to generate a status badge of Dockle something like below.
For example, If I can generate a JSON string like below, I can use the Dynamic Badges of shields.IO.
Sample Image
Ref
The text was updated successfully, but these errors were encountered: