1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
/// Output format for cfg command (Sprint 5)
#[derive(Clone, Debug, Default, ValueEnum)]
pub enum CfgOutputFormat {
#[default]
Human,
Json,
}
/// Output format for playbook command
#[derive(Clone, Debug, Default, ValueEnum)]
pub enum PlaybookFormat {
/// Human-readable output
#[default]
Human,
/// JSON output
Json,
/// JUnit XML for CI integration
Junit,
}
/// Output format for mutate command
#[derive(Clone, Debug, Default, ValueEnum)]
pub enum MutateFormat {
/// Human-readable output
#[default]
Human,
/// JSON output
Json,
/// CSV for analysis
Csv,
}
/// Output format for simulate command
#[derive(Clone, Debug, Default, ValueEnum)]
pub enum SimulateFormat {
/// Human-readable output
#[default]
Human,
/// JSON output
Json,
/// Detailed trace format
Trace,
}
/// Output format for explain-error command
#[derive(Clone, Debug, Default, ValueEnum)]
pub enum ExplainErrorFormat {
/// Human-readable output
#[default]
Human,
/// JSON output
Json,
}
/// Script format for classify command (SSC-022)
#[derive(Clone, Debug, ValueEnum)]
pub enum ClassifyFormat {
/// Bash / shell script
Bash,
/// Makefile (GNU Make)
Makefile,
/// Dockerfile
Dockerfile,
}
/// Runtime options for compilation
#[derive(Clone, Debug, ValueEnum)]
pub enum CompileRuntime {
/// Dash shell (180KB)
Dash,
/// Busybox (900KB)
Busybox,
/// Minimal interpreter (50KB)
Minimal,
}
/// Container format options
#[derive(Clone, Debug, ValueEnum)]
pub enum ContainerFormatArg {
/// OCI format
Oci,
/// Docker format
Docker,
}
/// Output format for inspection reports
#[derive(Clone, Debug, ValueEnum)]
pub enum InspectionFormat {
/// Markdown report
Markdown,
/// JSON report
Json,
/// HTML report
Html,
}
/// Output format for lint results
#[derive(Clone, Copy, Debug, ValueEnum)]
pub enum LintFormat {
/// Human-readable format
Human,
/// JSON format
Json,
/// SARIF format
Sarif,
}
/// Output format for Makefile parse results
#[derive(Clone, Debug, ValueEnum)]
pub enum MakeOutputFormat {
/// Human-readable text
Text,
/// JSON AST
Json,
/// Debug format
Debug,
}
/// Output format for purification reports
#[derive(Clone, Debug, ValueEnum)]
pub enum ReportFormat {
/// Human-readable report
Human,
/// JSON format
Json,
/// Markdown format
Markdown,
}
/// Output format for test results
#[derive(Clone, Debug, ValueEnum)]
pub enum TestOutputFormat {
/// Human-readable format
Human,
/// JSON format
Json,
/// JUnit XML format
Junit,
}
/// Output format for score results
#[derive(Clone, Debug, ValueEnum)]
pub enum ScoreOutputFormat {
/// Human-readable format
Human,
/// JSON format
Json,
/// Markdown report
Markdown,
}
/// Output format for audit results
#[derive(Clone, Debug, ValueEnum)]
pub enum AuditOutputFormat {
/// Human-readable format
Human,
/// JSON format
Json,
/// SARIF format (for GitHub Code Scanning)
Sarif,
}
/// Output format for coverage results
#[derive(Clone, Debug, ValueEnum)]
pub enum CoverageOutputFormat {
/// Terminal output with colors
Terminal,
/// JSON format
Json,
/// HTML report
Html,
/// LCOV format
Lcov,
}
/// Minimum severity level for lint output (Issue #75)
#[derive(Clone, Copy, Debug, Default, ValueEnum, PartialEq, Eq, PartialOrd, Ord)]
pub enum LintLevel {
/// Show info, warning, and error messages
#[default]
Info,
/// Show only warning and error messages
Warning,
/// Show only error messages
Error,
}
/// Lint profile for specialized validation rules
#[derive(Clone, Copy, Debug, Default, ValueEnum, PartialEq, Eq)]
pub enum LintProfileArg {
/// Standard Dockerfile linting (default)
#[default]
Standard,
/// Coursera Labs image validation (single port, 10GB limit, HEALTHCHECK required)
Coursera,
/// Dev Container validation (devcontainer.json + Dockerfile compatibility)
DevContainer,
}
impl ValueEnum for VerificationLevel {
fn value_variants<'a>() -> &'a [Self] {
&[
VerificationLevel::None,
VerificationLevel::Basic,
VerificationLevel::Strict,
VerificationLevel::Paranoid,
]
}
fn to_possible_value(&self) -> Option<clap::builder::PossibleValue> {
Some(match self {
VerificationLevel::None => clap::builder::PossibleValue::new("none"),
VerificationLevel::Basic => clap::builder::PossibleValue::new("basic"),
VerificationLevel::Strict => clap::builder::PossibleValue::new("strict"),
VerificationLevel::Paranoid => clap::builder::PossibleValue::new("paranoid"),
})
}
}
impl ValueEnum for ShellDialect {
fn value_variants<'a>() -> &'a [Self] {
&[
ShellDialect::Posix,
ShellDialect::Bash,
ShellDialect::Dash,
ShellDialect::Ash,
]
}
fn to_possible_value(&self) -> Option<clap::builder::PossibleValue> {
Some(match self {
ShellDialect::Posix => clap::builder::PossibleValue::new("posix"),
ShellDialect::Bash => clap::builder::PossibleValue::new("bash"),
ShellDialect::Dash => clap::builder::PossibleValue::new("dash"),
ShellDialect::Ash => clap::builder::PossibleValue::new("ash"),
})
}
}
impl ValueEnum for ValidationLevel {
fn value_variants<'a>() -> &'a [Self] {
&[
ValidationLevel::None,
ValidationLevel::Minimal,
ValidationLevel::Strict,
ValidationLevel::Paranoid,
]
}
fn to_possible_value(&self) -> Option<clap::builder::PossibleValue> {
Some(match self {
ValidationLevel::None => clap::builder::PossibleValue::new("none"),
ValidationLevel::Minimal => clap::builder::PossibleValue::new("minimal"),
ValidationLevel::Strict => clap::builder::PossibleValue::new("strict"),
ValidationLevel::Paranoid => clap::builder::PossibleValue::new("paranoid"),
})
}
}