use crate::languages::spec::{
DEFAULT_TOOL_TIMEOUT_SECS, DiagnosticsStream, LanguageSupport, OutputFormat, ToolSpec,
};
pub static HADOLINT: ToolSpec = ToolSpec {
name: "hadolint",
command: &["hadolint", "--format", "sarif"],
local_paths: &[],
config_files: &[".hadolint.yaml", ".hadolint.yml"],
config_flag: None,
output_format: OutputFormat::Sarif,
diagnostics_stream: DiagnosticsStream::Stdout,
timeout_secs: DEFAULT_TOOL_TIMEOUT_SECS,
timeout_context: None,
establishes_compilation: false,
serial_in_repository: false,
accepts_files: true,
};
pub static DOCKER: LanguageSupport = LanguageSupport {
name: "docker",
display_name: "Docker",
extensions: &[".dockerfile"],
filenames: &["Dockerfile", "Containerfile"],
filename_prefixes: &["Dockerfile", "Containerfile"],
tools: &[&HADOLINT],
conventions: &[
"Unpinned base image tags and package versions",
"Secrets baked into layers via ENV or COPY",
"Processes running as root",
"ADD where COPY was meant",
"Entrypoints that ignore SIGTERM",
],
vendored_dirs: &[],
};
pub(crate) static FAMILY: &[&LanguageSupport] = &[&DOCKER];