To publish an example safely, copy the shape of the problem rather than its sensitive contents. Replace real people, organizations, credentials, addresses, and document text with invented values. Keep data types, formatting, and cross-references intact if they influence the behavior. A realistic fake account ID is better than leaving a live one visible.
Check the entire artifact: filenames, screenshots, metadata, logs, and URL parameters can leak private information. If the issue only reproduces with a sensitive value, describe its length, character set, or validation rule without revealing the value. Test the sanitized example once to confirm it still illustrates the problem, then state what was changed for publication.