permissions-policy
できること
このスキルは、サイトが送るセキュリティヘッダーを確認し、強力なブラウザー機能を制限するPermissions-Policyヘッダーを追加します。Webアプリに保護の追加層を求める開発者向けです。
使う場面
- ✓ウェブサイトのセキュリティヘッダーを確認するようエージェントに頼むとき。
- ✓サイトがカメラや位置情報などの機能を使わず、既定で禁止したいとき。
- ✓Webアプリを強化していて、攻撃が成功した後に攻撃者がアクセスできるものを減らしたいとき。
スキルのリンク
https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/permissions-policy/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“私のサイトのセキュリティヘッダーを確認し、使っていない機能を無効にするPermissions-Policyを追加してください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
エージェントは、Permissions-Policyヘッダーがすでに送られているか、どの強力な機能が許可されているかを確認します。カメラ、マイク、位置情報など、使われていない機能を拒否するヘッダーを追加し、アプリに必要なものだけ一覧を広げます。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Set a Permissions-Policy header
A 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.
Quick Reference
- Use
Permissions-Policyto disable browser features your site does not use (camera, microphone, geolocation, payment) - Syntax:
Permissions-Policy: camera=(), microphone=(), geolocation=()— empty()means denied to all - Previously called
Feature-Policy— the old syntax is deprecated and only supported in older browsers - Restricting unused features limits the blast radius if your site is compromised by XSS
- Third-party iframes inherit page restrictions unless you explicitly grant them permissions
Check
Check 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.
Fix
Add 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.
Explain
Explain what the Permissions-Policy header does, how it restricts browser APIs like camera and geolocation, and why disabling unused features improves security.
Code Review
Review 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.
For full implementation details, code examples, and framework-specific guidance,
see references/rule.md.
Rule page: https://frontendchecklist.io/rules/security/permissions-policy
よくある質問
空の括弧の組、例えばcamera=()は何を意味しますか?
このスキルによると、camera=()のような空の組は、すべてのサイトにその機能を拒否することを意味します。
Feature-Policyはまだ使われていますか?
このスキルによると、古く非推奨になった名前で、古いブラウザーでのみ対応しています。
サードパーティのiframeにもこの権限は与えられますか?
サイトが明示的に権限を与えない限り、ページの制限を引き継ぎます。
詳細
作者による元の説明
Use when reviewing HTTP response headers for defense-in-depth security hardening on any web application.
人気
- GitHubのスター
- 75k
- ランキング
- #2977
- ライセンス
- MIT
- 更新日
- 2026/10/31
コメント
- …
このリポジトリの他のスキル
frontendchecklist
75kコマンドラインツールを使って、フロントエンドのコードとライブページを、アクセシビリティ、速度、SEO、セキュリティに関する380以上のルールと照らし合わせて確認します。
frontend-checklist-global
75kフロントエンドのプロジェクトを、386のFront-End Checklistのルールすべてと照らし合わせて監査し、見つかった問題ごとに具体的な修正方法を示します。
404-page
75k見つからないページの画面に役立つリンクがあり、本物の404ステータスを返すかを確認し、迷った訪問者が目的のページを見つけられるようにします。
about-page
75kサイトの運営者が誰かを説明する、分かりやすいAboutページがあるかを確認し、訪問者と検索エンジンからの信頼を高めます。
似ているスキル
reverse-engineer-anything
422kREAツールを使って、出荷済みのアプリやパッケージの中身を調べ、機能の説明、版の比較、再構築の手順をエージェントが支援します。
1password
394k1Password CLIをセットアップし、サインインして、秘密情報の値を会話に表示せずに読み取ったり注入したりするようエージェントを支援します。
healthcheck
394kOpenClawを動かすコンピューターやサーバーを、SSH、ファイアウォール、更新、バックアップなどのセキュリティリスクについて監査し、安全な修正案を提案するようエージェントを支援します。