Automattic/wordpress-atmosphere / .agents/skills/review
review
UnverifiedShared base for reviewing a diff, a branch or a PR in this plugin. How to read the diff, which repo guidelines to load for the changed paths, and the shape of a finding. Used by the code-review and security-audit agents.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 7.1 KB |
| guidelines/accessibility.md | markdown | 781 B |
| guidelines/authorization.md | markdown | 2.8 KB |
| guidelines/content-exposure.md | markdown | 6.8 KB |
| guidelines/cron.md | markdown | 1.9 KB |
| guidelines/hooks.md | markdown | 2.3 KB |
| guidelines/oauth.md | markdown | 3.6 KB |
| guidelines/output.md | markdown | 610 B |
| guidelines/records.md | markdown | 2.1 KB |
| guidelines/remote-fetch.md | markdown | 5.3 KB |
| guidelines/supply-chain.md | markdown | 582 B |
| guidelines/uninstall.md | markdown | 2.0 KB |
| guidelines/well-known.md | markdown | 1.4 KB |
| judge.md | markdown | 1.2 KB |
guidelines/authorization.md
View on GitHub# Authorization
Who may call a route, change a setting, see a post's projected data or delete a record, and how often.
Applies to: `includes/rest/**`, `includes/wp-admin/**`, `includes/oauth/**`, `includes/class-atmosphere.php`, `includes/transformer/class-preview.php`
## Past issues
- **Generic capability on a per-object surface** (#170 review): the `?atproto` preview gated on blanket `edit_posts`, so any author could read another author's projected records, including saved custom Bluesky text that role cannot otherwise see.
## Capabilities and nonces
- Admin pages check `manage_options` or the fitting capability.
- Every form submission (settings, OAuth connect and disconnect) has a nonce check. Each `phpcs:ignore WordPress.Security.NonceVerification` explains why it is safe.
- Unauthorized users cannot trigger the OAuth callback.
- Per-post controls in the editor check `edit_post`.
- AJAX and REST handlers check capabilities before processing.
- Settings API registrations have proper sanitize callbacks.
## Object-level capabilities
A handler that serves data derived from one post (the REST pre-publish projection, the front-end preview, editor panel data) gates on the meta capability for that post, `current_user_can( 'edit_post', $post->ID )`, not on a blanket capability like `edit_posts`. Mirror whatever the equivalent REST controller gates on. The blanket form lets any author read every author's per-post data.
## Who may delete a record
Files: delete paths in `includes/class-publisher.php` and `includes/class-reaction-sync.php`.
Before deleting on the PDS, the AT-URI's repo DID matches the connected account. A request from one user never deletes records owned by another.
## Rate limiting
Files: `includes/oauth/`, `includes/wp-admin/`, REST handlers.
- Every endpoint that mints, validates or accepts a token has per-IP rate limiting, or relies on a documented WordPress core or hosting-layer protection.
- OAuth start, callback and any retry endpoint are rate-limited. Repeated `state` mismatches or PKCE failures are an abuse signal, not an error to ignore.
- Per-IP buckets trust only the TCP peer by default. Keying on `$_SERVER['HTTP_X_FORWARDED_FOR']` is spoofable on directly exposed sites; default to `$_SERVER['REMOTE_ADDR']`, and honor proxy headers only through an explicit opt-in filter (for example `atmosphere_client_ip_sources`). Sites behind Cloudflare, Akamai or nginx need the filter; sites without a reverse proxy must not have it on.
- Fail closed when the client IP is unknown. An empty `REMOTE_ADDR` or a malformed `X-Forwarded-For` does not share one bucket with every other unidentified request; reject, or give it a conservatively limited bucket of its own.
- The OAuth token and refresh endpoints answer with `429 Too Many Requests` plus `Retry-After`, not a silent 401.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |