I have a package on NPM that shows that it contain "Bidirectional unicode control characters" reported by socket.dev.
I've found answer to this question How to update GitHub Actions CI to detect Trojan Code commits (malicious [bidirectional] unicode chars, python).
I've used:
git grep -oP "[^\x00-\x7F]*"
It found some matches in binary files, so I've removed all binary flags from .gitattributes and now I only have files from __tests__
directory that has ANSI files and one image, but those are not published to NPM.
What is a proper way to find those: "Bidirectional unicode control characters"?