Skip to content

[business-logic] critical_file.go 'dockerfile.' prefix accepts any extension - dockerfile.py triggers docker-build advice #828

Description

@topcheer

File: internal/tool/critical_file.go L94.

Executed proof: criticalFileWarning('/tmp/dockerfile.py') returns a 'verify with docker build' warning. HasPrefix(lower, 'dockerfile.') does not constrain the extension, so dockerfile.py/.md/.js source or doc files all masquerade as Dockerfiles.

Impact: Low - advisory noise.
Fix: restrict to known suffixes (none, .dockerfile variants, .linux/.windows context suffixes).
Verified by independent re-review with executed repro.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions