本文へスキップ
Skillpedia
セキュリティ75k · #2977

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がスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/permissions-policy/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

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-Policy to 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.

repo: thedaviddias/Front-End-Checklist

人気

GitHubのスター
75k
ランキング
#2977
ライセンス
MIT
更新日
2026/10/31

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル