Commit 4a74096
feat(hadolint): add native Rust Dockerfile linter with GPL-3.0 license
This commit introduces hadolint-rs, a complete Rust translation of the
Hadolint Dockerfile linter, along with agent integration and proper
GPL-3.0 licensing/attribution.
## Hadolint-RS (src/analyzer/hadolint/)
Native Dockerfile linting without external binary dependency:
- Complete Dockerfile parser with AST representation
- 70+ lint rules (DL3xxx, DL4xxx series)
- Pragma support for inline rule ignoring (# hadolint ignore=DL3008)
- Configurable severity thresholds and rule ignoring
- Shell command analysis for RUN instructions
### Formatters (src/analyzer/hadolint/formatter/)
- JSON: Machine-readable for CI/CD pipelines
- SARIF: GitHub Actions Code Scanning integration
- TTY: Colored terminal output for humans
- Checkstyle: XML format for Jenkins
- CodeClimate: NDJSON for GitLab CI
- GNU: Compiler-style output for editors
## Agent Integration (src/agent/tools/hadolint.rs)
AI-optimized tool output with:
- Priority rankings (critical/high/medium/low)
- Category classification (security/best-practice/maintainability/performance)
- Actionable fix recommendations for each rule
- Quick fixes summary for most important issues
- Decision context for rapid assessment
- Documentation links to rule wikis
## Agent Display (src/agent/ui/)
Docker-themed visual output:
- Docker blue color scheme (#39 ANSI)
- Priority-colored indicators (red/orange/yellow/green)
- Category badges ([SEC], [BP], [DEP], [PERF])
- Collapsible issue preview with quick fix hints
- New icons for Docker, lint priorities
## License & Attribution
Changed license to GPL-3.0 due to Hadolint derivative work:
- Updated LICENSE file to GPL-3.0 full text
- Created THIRD_PARTY_NOTICES.md with full attribution
- Added attribution header to hadolint/mod.rs
- Updated README.md with GPL-3.0 badge and attribution section
- Updated Cargo.toml license field
## Other Changes
- Shell tool: Added async streaming output with tokio::process
- Agent: Improved tool call handling and context management
- Removed stray screenshot from analyzer directory
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent 5c3e2e0 commit 4a74096
104 files changed
Lines changed: 12795 additions & 61 deletions
File tree
- src
- agent
- prompts
- tools
- ui
- analyzer
- hadolint
- formatter
- parser
- rules
- shell
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
| 51 | + | |
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
80 | 83 | | |
81 | 84 | | |
82 | 85 | | |
| |||
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
241 | 241 | | |
242 | 242 | | |
243 | 243 | | |
244 | | - | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
245 | 254 | | |
246 | 255 | | |
247 | 256 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 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 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
102 | | - | |
103 | 102 | | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
104 | 108 | | |
105 | 109 | | |
106 | 110 | | |
| |||
264 | 268 | | |
265 | 269 | | |
266 | 270 | | |
| 271 | + | |
267 | 272 | | |
268 | 273 | | |
269 | 274 | | |
| |||
312 | 317 | | |
313 | 318 | | |
314 | 319 | | |
| 320 | + | |
315 | 321 | | |
316 | 322 | | |
317 | 323 | | |
| |||
777 | 783 | | |
778 | 784 | | |
779 | 785 | | |
| 786 | + | |
780 | 787 | | |
781 | 788 | | |
782 | 789 | | |
| |||
811 | 818 | | |
812 | 819 | | |
813 | 820 | | |
| 821 | + | |
814 | 822 | | |
815 | 823 | | |
816 | 824 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
27 | | - | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| |||
35 | 36 | | |
36 | 37 | | |
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 | + | |
38 | 110 | | |
39 | 111 | | |
40 | 112 | | |
| |||
50 | 122 | | |
51 | 123 | | |
52 | 124 | | |
53 | | - | |
54 | | - | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
55 | 128 | | |
56 | 129 | | |
57 | | - | |
58 | | - | |
| 130 | + | |
| 131 | + | |
59 | 132 | | |
60 | 133 | | |
61 | | - | |
| 134 | + | |
62 | 135 | | |
63 | 136 | | |
64 | 137 | | |
| |||
97 | 170 | | |
98 | 171 | | |
99 | 172 | | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
104 | 177 | | |
105 | 178 | | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
106 | 187 | | |
107 | 188 | | |
108 | 189 | | |
| |||
179 | 260 | | |
180 | 261 | | |
181 | 262 | | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
182 | 266 | | |
183 | 267 | | |
184 | 268 | | |
185 | 269 | | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
0 commit comments