What it looks for (heuristics)
The rule triggers only when the Dockerfile has exactly oneFROM stage and the stage contains at least one of:
- A package-manager install likely related to building (e.g.
apt-get install build-essential,apk add gcc) - A build step (e.g.
go build,cargo build,npm run build,dotnet publish) - A download+install pattern (e.g.
curl ... | tar ...,wget ... | sh)
Auto-fix
When triggered, the rule emits an unsafe, asyncSuggestedFix that requires:
--fix --fix-unsafe- A configured ACP-capable agent in the config file (see the top-level
[ai]section)
Configuration
min-score(default:4): minimum heuristic score required to trigger.fix = "explicit"is recommended to avoid accidentally running AI fixes when using--fix-unsafebroadly.