Skip to content

Commit 32f5081

Browse files
jpinzCopilot
andcommitted
Update the dockerfile.md docs
Co-authored-by: Copilot <copilot@github.com>
1 parent 5fa9cb1 commit 32f5081

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

docs/detectors/dockerfile.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,15 @@ The detector extracts image references from `COPY --from=<image>` instructions t
2424
### Variable Resolution
2525
The detector attempts to resolve Dockerfile variables using the `ResolveVariables()` method from the parser library. Images with unresolved variables (containing `$`, `{`, or `}` characters) are skipped to avoid reporting incomplete or incorrect references.
2626

27+
### Tag and Digest Support
28+
The detector supports the full Docker reference grammar via `DockerReferenceUtility.ParseFamiliarName()`. Image references are parsed and reported with their tag, digest, or both:
29+
- Tagged references (e.g., `FROM nginx:1.21`) populate the `Tag` field
30+
- Canonical references with a SHA256 digest (e.g., `FROM nginx@sha256:abc...`) populate the `Digest` field
31+
- Dual references with both a tag and a digest (e.g., `FROM nginx:1.21@sha256:abc...`) populate both fields
32+
2733
## Known limitations
2834

2935
- **Experimental Status**: This detector runs automatically but its output is not included in scan results by default. To opt in, pass `--DetectorArgs DockerReference=Enable`
3036
- **Variable Resolution**: Image references containing unresolved Dockerfile `ARG` or `ENV` variables are not reported, which may lead to under-reporting in Dockerfiles that heavily use build-time variables
3137
- **No Version Pinning Validation**: The detector does not warn about unpinned image versions (e.g., `latest` tags), which are generally discouraged in production Dockerfiles
32-
- **No Digest Support**: While Docker supports content-addressable image references using SHA256 digests (e.g., `ubuntu@sha256:abc...`), the parsing and reporting of these references depends on the underlying `DockerReferenceUtility.ParseFamiliarName()` implementation
38+
- **Untagged Images Skipped**: Image references with neither a tag nor a digest (e.g. `FROM nginx`) are skipped because they cannot be uniquely identified

0 commit comments

Comments
 (0)