Skip to content

Correct the security policy and cover two untested paths - #8

Merged
ibuilder merged 1 commit into
mainfrom
fix/security-doc-and-coverage
Aug 8, 2026
Merged

Correct the security policy and cover two untested paths#8
ibuilder merged 1 commit into
mainfrom
fix/security-doc-and-coverage

Conversation

@ibuilder

@ibuilder ibuilder commented Aug 8, 2026

Copy link
Copy Markdown
Owner

Found by auditing the repo for stale references and coverage gaps rather than by adding features.

1. SECURITY.md recommended a version that destroys credentials

It listed all of 2.0.x as supported and told readers to "upgrade to 2.0.0" — but 2.0.0 and 2.0.1 are precisely the releases that over-encrypt the stored client secret until it can't be read. A security document pointing people at a version with a known credential-destroying fault is a real problem, not a typo.

Both are now marked unsupported with the fault, its blast radius and the remedy stated plainly. The 1.x plaintext-storage warning is separated out so its "rotate your credentials" instruction isn't buried under the newer issue.

Stated honestly: this is a data-integrity fault, not a disclosure. The value was over-encrypted, never exposed.

2. Two untested paths that matter

Path Why it matters Was
Support\Logger redaction The only place the plugin deliberately writes API context to disk. If redaction breaks, a client secret lands in debug.log. 0 tests
Frontend\Renderer override chain Copying a template into a theme is a documented headline feature — how users are told to customise markup safely instead of editing the plugin. 0 tests

Logger now covers redaction of secrets and bearer tokens including nested arrays, truncation, and the bounded ring buffer. Renderer covers child → parent → plugin precedence, that an override actually renders and receives its data, directory-traversal refusal, and notice escaping.

86 → 101 tests, 350 → 384 assertions. PHPCS clean.

The WP_Filesystem sniff is scoped away from tests/ — those tests build real fixture files on disk, and WP_Filesystem is a runtime abstraction that doesn't exist in the shimmed harness.

Also

Refreshed a stale version placeholder in the bug-report template. No functional change to the plugin.

🤖 Generated with Claude Code

SECURITY.md recommended a version that destroys credentials. It listed all
of 2.0.x as supported and told readers to "upgrade to 2.0.0", but 2.0.0 and
2.0.1 are precisely the releases that over-encrypt the stored client secret
until it cannot be read. Both are now marked unsupported, with the fault,
its blast radius and the remedy stated plainly, and the 1.x plaintext
warning separated out so its instruction to rotate credentials is not lost
among the newer issue.

Also covers two paths that had no tests at all.

Logger redaction is what stands between a debug session and a client secret
in debug.log. It now has tests for redaction of secrets and bearer tokens,
including nested arrays, plus truncation and the bounded ring buffer.

Renderer's override chain is a documented headline feature — copying a
template into a theme is how users are told to customise markup safely. It
now has tests for child-theme precedence over parent over plugin, that an
override renders and receives its data, that directory traversal cannot
escape the template directories, and that notices escape their message.

Tests build real fixture files, so the WP_Filesystem sniff is scoped away
from tests/ where that runtime abstraction does not exist.

86 -> 101 tests, 350 -> 384 assertions. PHPCS clean.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@ibuilder
ibuilder merged commit 242190c into main Aug 8, 2026
13 checks passed
@ibuilder
ibuilder deleted the fix/security-doc-and-coverage branch August 8, 2026 20:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant