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?
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 namedthis..is..a..file.I'm running into this now, where it seems like a
node_modulesdirectory somewhere in our repo contains a file called..dand is causing buf to complain.My case should be solvable with excludes, but in general a more robust check should maybe be used here?