{"data":{"slug":"github-thedaviddias-front-end-checklist-skills-permissions-policy-ee54be44e7b5","title":"Set a Permissions-Policy Header for Security Hardening","summary":"Configure the Permissions-Policy header to restrict access to browser features like camera, microphone, and geolocation, reducing the risk of XSS attacks and limiting attacker capabilities.","url":"https:\/\/skillshunter.net\/skills\/github-thedaviddias-front-end-checklist-skills-permissions-policy-ee54be44e7b5","json_url":"https:\/\/skillshunter.net\/api\/public\/v1\/skills\/github-thedaviddias-front-end-checklist-skills-permissions-policy-ee54be44e7b5","markdown_url":"https:\/\/skillshunter.net\/skills\/github-thedaviddias-front-end-checklist-skills-permissions-policy-ee54be44e7b5.md","download_url":"https:\/\/skillshunter.net\/skills\/github-thedaviddias-front-end-checklist-skills-permissions-policy-ee54be44e7b5\/download","category":{"slug":"software-development","name":"Software & Development"},"editor_note":"Ensure the server is configured to send the Permissions-Policy header. Identify which browser features are required by the application and disable any that are not necessary.","instructions":"---\nname: permissions-policy\ndescription: \"Use when reviewing HTTP response headers for defense-in-depth security hardening on any web application.\"\nmetadata:\n  category: security\n  priority: medium\n  difficulty: intermediate\n  estimatedTime: \"15\"\n  source: frontendchecklist.io\n  url: https:\/\/frontendchecklist.io\/rules\/security\/permissions-policy\n---\n\n# Set a Permissions-Policy header\n\nA site compromised by XSS that has unrestricted camera and microphone access can silently record the user. Permissions-Policy limits which browser APIs are available, reducing attacker capabilities even after a successful injection.\n\n## Quick Reference\n\n- Use `Permissions-Policy` to disable browser features your site does not use (camera, microphone, geolocation, payment)\n- Syntax: `Permissions-Policy: camera=(), microphone=(), geolocation=()` \u2014 empty `()` means denied to all\n- Previously called `Feature-Policy` \u2014 the old syntax is deprecated and only supported in older browsers\n- Restricting unused features limits the blast radius if your site is compromised by XSS\n- Third-party iframes inherit page restrictions unless you explicitly grant them permissions\n\n## Check\n\nCheck whether the server sends a Permissions-Policy header and review which browser features are allowed or denied. Identify any powerful features (camera, microphone, geolocation, payment, USB) that are enabled but not required by the application.\n\n## Fix\n\nAdd a Permissions-Policy header that disables all browser features your site does not use. Start with camera=(), microphone=(), geolocation=() and expand the list based on what the application actually needs.\n\n## Explain\n\nExplain what the Permissions-Policy header does, how it restricts browser APIs like camera and geolocation, and why disabling unused features improves security.\n\n## Code Review\n\nReview server config, headers, forms, and integration points related to Set a Permissions-Policy header. Flag exact responses, cookies, or browser behaviors that violate the rule, and verify them against the effective production-like response.\n\n---\n\nFor full implementation details, code examples, and framework-specific guidance,\nsee `references\/rule.md`.\n\nRule page: https:\/\/frontendchecklist.io\/rules\/security\/permissions-policy\n","use_cases":["Prevent unauthorized access to camera and microphone on a public-facing website.","Limit geolocation access for a location-based app that doesn't require it.","Reduce the blast radius of XSS vulnerabilities by disabling unused browser features."],"limitations":[],"compatibility":[],"setup_tip":null,"sample_input":null,"sample_output":null,"source_url":"https:\/\/github.com\/thedaviddias\/Front-End-Checklist\/blob\/e8d14d049010e2ce25afcd5e8609dfcbbe63e47e\/skills\/permissions-policy\/SKILL.md","source_commit":"e8d14d049010e2ce25afcd5e8609dfcbbe63e47e","license":null,"version":null,"listing_approved_at":"2026-11-24","created_at":"2026-11-23T05:13:18.000000Z","updated_at":"2026-11-24T07:12:05.000000Z","seo_title":"Set Permissions-Policy Header for Security","seo_description":"Secure your web application by restricting browser APIs with the Permissions-Policy header. Reduce XSS attack surface and improve security.","seo_keywords":["Permissions-Policy header","Browser security hardening","XSS attack prevention","Feature policy restrictions","Security header configuration"]}}