drep/languages/definitions/
docker.rs1use crate::languages::spec::{
4 DEFAULT_TOOL_TIMEOUT_SECS, DiagnosticsStream, LanguageSupport, OutputFormat, ToolSpec,
5};
6
7pub static HADOLINT: ToolSpec = ToolSpec {
11 name: "hadolint",
12 command: &["hadolint", "--format", "sarif"],
13 local_paths: &[],
14 config_files: &[".hadolint.yaml", ".hadolint.yml"],
15 config_flag: None,
16 output_format: OutputFormat::Sarif,
17 diagnostics_stream: DiagnosticsStream::Stdout,
18 timeout_secs: DEFAULT_TOOL_TIMEOUT_SECS,
19 timeout_context: None,
20 establishes_compilation: false,
21 serial_in_repository: false,
22 accepts_files: true,
23};
24
25pub static DOCKER: LanguageSupport = LanguageSupport {
33 name: "docker",
34 display_name: "Docker",
35 extensions: &[".dockerfile"],
36 filenames: &["Dockerfile", "Containerfile"],
37 filename_prefixes: &["Dockerfile", "Containerfile"],
38 tools: &[&HADOLINT],
39 conventions: &[
40 "Unpinned base image tags and package versions",
41 "Secrets baked into layers via ENV or COPY",
42 "Processes running as root",
43 "ADD where COPY was meant",
44 "Entrypoints that ignore SIGTERM",
45 ],
46 vendored_dirs: &[],
47};
48
49pub(crate) static FAMILY: &[&LanguageSupport] = &[&DOCKER];