Skip to content

"is outside context directory" false positive #51

@alecbz

Description

@alecbz

The check as-implemented just checks to see if the string .. exists anywhere in the full relative filepath, which does not necessarily mean the path is outside of the context. E.g., a directory or file could be named this..is..a..file.

I'm running into this now, where it seems like a node_modules directory somewhere in our repo contains a file called ..d and is causing buf to complain.

My case should be solvable with excludes, but in general a more robust check should maybe be used here?

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions