As shown with bugs like this: <https://github.com/kbarber/puppetdb/commit/a1c73530009c876300f3d6c5c474ea99d68ade2d> relying on the parseability of hostnames (and other metadata) from report export files is not reliable.
There are perhaps two issues here:
- The report file name uses hyphens as delimiters, but it is valid for the content to also contains hyphens. Thus the delimiter is ineffective.
- The anonymizer tool should probably not rely on the file name inside an export tarball as canonical, but instead should look inside the content?
Right now we've sold our immediate issues with a regex, but I anticipate the regex won't catch all situations.