Skip to content

Dockerfile detector warns on valid Dockerfile.dockerignore files #1907

Description

Component Governance emits a false-positive warning for ecc-api/Dockerfile.dockerignore, a valid Dockerfile-specific ignore file—not a Dockerfile. Please skip these files without a warning while preserving genuine Dockerfile detection.

⚠️ Actual behavior
A valid Docker build configuration file produces a warning and parser stack trace. Real Dockerfiles are discovered separately), and the build succeeds. The task timeline reports zero warnings despite the warning in the raw log.

Ignoring file that doesn't appear to be a Dockerfile: …/Dockerfile.dockerignore

Bug caused by broad matching pattern in

public override IList<string> SearchPatterns { get; } = ["dockerfile", "dockerfile.*", "*.dockerfile"];

🛠️ Requested change
Recognize Dockerfile-specific .dockerignore files and skip them without a warning. Continue detecting genuine Dockerfiles, including Dockerfile and Dockerfile.runtime. Please correct the filename matching rather than requiring repositories to rename valid files or exclude scan paths.

Metadata

Metadata

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions