dentsusoken/Build and Scan Image

Build and scan Dockerfile and container image by hadolint, dockle, trivy, docker scan

View on GitHub

Trust Signals

Scorecard Score
not yet scored
Maintenance Recency
Activelast commit Mar 5, 2026
License
MIT

Pinned Snippet

workflow.ymlSHA-pinned
uses: dentsusoken/build-and-scan-image@95053b1578413da2701399eada6b0abbe9834565 # v0.6.3

tags can be moved; commit SHAs can't. why a SHA?

namedescriptionrequireddefault
tagImage name and optionally tag in "name:tag" formatyes
pathPath to base directory to run `docker build` command (default ".")no.
dockerfilePath to Dockerfile, which is relative path from "path" parameter (default "Dockerfile")noDockerfile
hadolint-enableEnable scanning Dockerfile by hadolint (default "true")notrue
hadolint-versionHadolint version.no2.12.0
hadolint-severityFail step if rules with a severity above this level are violated. Acceptable value is one of (error|warning|info|style|ignore|none). (default "info")noinfo
dockle-enableEnable scanning image by dockle (default "true")notrue
dockle-versionDockle version.no0.4.15
dockle-severityFail step if checkpoints with a severity above this level are violated. Acceptable value is one of (INFO|WARN|FATAL). (default "WARN")noWARN
trivy-enableEnable scanning image by trivy (default "true")notrue
trivy-versionTrivy version.no0.69.3
trivy-severityFail step if image has vulnerabilities with a severity same as this level. Acceptable value is comma-separated list of (UNKNOWN|LOW|MEDIUM|HIGH|CRITICAL). (default "UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL")noUNKNOWN,LOW,MEDIUM,HIGH,CRITICAL
trivy-vuln-typeVulnerability types which trivy detect to. Acceptable value is comma-separated list of (os|library). (default "os,library")noos,library
trivy-ignore-unfixedIgnore unfixed vulnerabilities (default "false")nofalse
snyk-enableEnable scanning image by snyk. If enabled, "snyk-token" must be also set. (default "false")nofalse
snyk-versionSnyk CLI version.no1.1298.3
snyk-tokenSnyk API Token. This is necessary if "snyk-enable" is "true". (default "")no""
snyk-severityFail step if image has vulnerabilities with a severity above this level. Acceptable value is one of (low|medium|high|critical). (default "low")nolow
snyk-exclude-base-image-vulnsExclude base image vulnerabilities (default "false")nofalse

no outputs