Skip to content

Commit b170a6d

Browse files
noelsaw1claude
andcommitted
fix: code review audit fixes — security, error handling, and repo hygiene
Addresses 12 of 20 items from @mrtwebdesign code review (P1-AUDIT-MATT.md): Security & repo hygiene: - Remove committed npx/playwright symlinks, add to .gitignore - Remove stale BACKLOG-DEPRECATED.md and ROADMAP-DEPRECATED.md - Add plaintext password warning to AGENTS.md sensitive data section - Add 1MB Content-Length limit on MCP HTTP transport (413 response) Error handling: - Preserve error cause chain in withResourceError() (index.ts) - Return structured error for missing WPCC binary instead of crash (wpcc.ts) - Guard against undefined site name with actionable message (local-wp.ts) Code quality: - Add JSDoc to regex patterns in allowlist.ts, tmux.ts, wpcc.ts - Fix POSIX compliance: &> to >/dev/null 2>&1 (wp-ajax-test/install.sh) - Add timeout 10 wrap on WP-CLI call (theme-crash-loop.sh) - Add file-existence guard for curl timeout (theme-crash-loop.sh) - Bump MCP server README version 0.6.2 → 0.6.3 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 7f75be8 commit b170a6d

15 files changed

Lines changed: 169 additions & 559 deletions

File tree

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,3 +70,7 @@ coverage/
7070

7171
/.claude
7272
/.mcp.local.json
73+
74+
# Machine-specific symlinks (never commit these)
75+
/npx
76+
/playwright

AGENTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ Reference: `recipes/phpstan-wordpress-setup.md`
461461
462462
### Sensitive data handling
463463
464-
Never commit credentials, PII, auth state, or local config.
464+
Never commit credentials, PII, auth state, or local config. **Never store passwords in plaintext** — not in JSON files, config files, scripts, or anywhere in the repository. Use environment variables, OS keychains, or one-time auth tokens (like `pw-auth`'s WP-CLI login URLs) instead.
465465
466466
Use `./temp` for:
467467
- API keys, passwords, tokens, auth JSON

BACKLOG-DEPRECATED.md

Lines changed: 0 additions & 374 deletions
This file was deleted.

0 commit comments

Comments
 (0)