Explain the base64 in Encryption where a reviewer will look - #12
Merged
Conversation
Every static scanner flags base64 as possible obfuscation, and the WordPress.org submission preflight is no exception — it reports five hits in Support\Encryption and asks for a justification in a comment. The per-line phpcs:ignore annotations already carried one, but they sit at the right-hand end of long lines and are easy to miss. The reason belongs at the top of the class, because a human reviewer reads that flag by hand: AES-256-GCM emits raw bytes — initialisation vector, auth tag and cipher text — which cannot be stored in a wp_option as-is. base64 is the transport encoding, applied after encryption and reversed before decryption. The plugin ships no encoded source, no encoded payloads and no encoded URLs. No behaviour change. Released as 3.0.1 so the artifact submitted to WordPress.org corresponds exactly to a tag rather than to an untagged main. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Running the WordPress.org submission preflight surfaced five base64 hits in
Support\Encryptionwith the note "base64 usage reads as obfuscation to reviewers. Justify it in a comment or remove it."The calls are legitimate — AES-256-GCM emits raw bytes (IV, auth tag, cipher text) that cannot be stored in a
wp_optionas-is — and each line already carried aphpcs:ignoresaying so. But those annotations sit at the right-hand end of long lines and are easy to miss. Since a human reviewer reads this flag by hand, the reason now sits at the top of the class where they will actually look.No behaviour change. Released as 3.0.1 so the ZIP submitted to WordPress.org corresponds to a tag rather than to an untagged
main.Verified: 106 tests pass, PHPCS clean across 52 files, preflight 0 errors, and Plugin Check clean on the exact submission tree across every category with experimental checks at severity 1.
🤖 Generated with Claude Code