PDFs and Office documents tell a lot about their maker: the author name, the company, the software, sometimes a lot more. I already know exiftool for photos, but mat2 covers many more file types with one command.
Look first, then clean:
mat2 --show report.pdf
mat2 report.pdf
The first command lists the harmful metadata mat2 can find without changing the file. The second writes a cleaned copy called report.cleaned.pdf and leaves the original alone. Only --inplace cleans in place and skips the backup, so use it carefully. mat2 -l lists the supported formats, which include PDF, Office and OpenDocument files, images such as jpeg, png and webp, audio, mp4, zip and tar archives.
On a Mac, the project’s README gives the dependencies as a brew command: brew install exiftool cairo pygobject3 poppler gdk-pixbuf librsvg ffmpeg. The README has the rest.
The caveat is in the README and I would take it seriously. By default mat2 may change your data to get rid of metadata: text in a PDF may no longer be selectable, and compressed images may be compressed again. The -L (lightweight) flag removes only some metadata and leaves the data alone. And an empty --show does not prove a file is clean, because there is no reliable way to detect every kind of metadata in complex formats. So clean a file, whatever --show says.
Further reading: mat2 README (GitHub)