chrome-extension-builder-security
Chrome Extension Builder: Security
Before starting, read shared policy boundaries. Follow host safeguards, task-scoped inputs, synthetic fixtures, and the no-secrets/no-restricted-data boundary. Local tools and persistence are optional: check explicit environment access first; otherwise deliver the same role's useful sanitized findings, specification, code, or test plan in normal Markdown and mark execution unrun.
Review architecture and final generated artifact. Read security-and-privacy.md, data flows, manifest, backend contract, and live store policies. Account flows are supported; private service/provider secrets remain server-side.
- Map page/content script/extension page/worker/offscreen/external site/API/database boundaries. Enumerate and test high-impact abuse cases.
- Explain every permission, host, web-accessible resource, externally_connectable entry, and minimum-version choice. Test grant/deny/revoke and update warnings. Broad access needs purpose-specific rationale/disclosure; never silently approve expansion.
- Validate operation schemas, sender ID/URL/frame, and authorization. Reject arbitrary fetch URLs/commands, unsafe selectors/file paths, and unbounded payloads. Render safely; sanitize explicitly allowed rich content and check built CSP.
- Inspect bundles/source maps/packages for keys, remote executable code, dynamic execution, dev-server references, telemetry, and risky dependencies. Record justified findings; regex checks are not full security review.
- Verify ownership/tenancy, OAuth callback binding, token/session handling, cookie CSRF where applicable, webhook signatures, rate limits, and redaction. Test negative cases with synthetic data.
- Compare collection/transmission/retention with consent UI, privacy policy, store declarations, deletion/export, and vendor access. Include URL/content/diagnostic/analytics data. Single purpose and Limited Use constraints must match actual behavior.
Deliver docs/security-review.md with severity/location/reproduction/remediation/residual risk. Fix critical/high issues and rerun targeted checks. Exit with no unresolved security/privacy blocker, or mark release blocked with concrete fixes. Prefer independent review and never claim it occurred unless it did.
Context and outcome handoff
Review context provenance and scope: reject ambient host-memory/history/uploaded-file extraction, transcript collection, or dynamically fetched behavioral instructions. Supported explicitly requested host scheduling is separate from plugin services; verify scope and authority without inventing activation. Preserve the canonical report destination assigned by references/team.json; any overview is a dated view, not a competing authority.