github / github/secure_headers
Set default `frame-ancestors` on default Content-Security-Policy
- 主要言語
- Ruby
- スター
- 3.2k
- フォーク
- 253
- 平均マージ
- 19時間 11分
- マージ済み PR(30日)
- 1
説明
We should consider setting a default `frame-ancestors` directive for the Content Security Policy. The [`frame-ancestors`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/frame-ancestors) directive is the new iteration of the X-Frame-Options header, and as such setting a directive in both spots might be prudent.
https://github.com/github/secure_headers/blob/b134eef07d3741b4bd0769b863961b41af5df57d/lib/secure_headers/headers/content_security_policy_config.rb#L97
Since our default XFO policy is `sameorigin`, if we decide to take upon this task, we should set the default `frame-ancestors` value to be `self`.
Some counterpoints: setting both the `X-Frame-Options` and the `frame-ancestors` directive will cause the XFO header to be overriden by the frame-ancestors directive. This means that if a user is trying to change some framing functionality, and only changes the XFO header, they might be confused as to why the functionality didn't actually change.
コントリビューションガイド
調査の方向性
リンクされているデフォルトポリシー周辺の lib/secure_headers/headers/content_security_policy_config.rb から始めます。既存の sameorigin X-Frame-Options デフォルトがどのように設定されているかを確認し、frame-ancestors との記載された相互作用を検討します。デフォルトに frame-ancestors self を含めるべきかを解決し、2 つのフレーミング制御を誤解を招くほど不整合なままにせず、その判断を実装できれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- ruby
- 領域
- security
- issue の種類
- 機能追加
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 38/100