github / github/secure_headers
Set default `frame-ancestors` on default Content-Security-Policy
- 主要语言
- Ruby
- 星标
- 3.2k
- 派生
- 253
- 平均合并
- 19 小时 11 分钟
- 30 天内合并 PR
- 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.
贡献指南
调研方向
Start with lib/secure_headers/headers/content_security_policy_config.rb around the linked default policy. Review how the existing sameorigin X-Frame-Options default is configured and consider the stated interaction with frame-ancestors. Done means resolving whether the default should include frame-ancestors self and implementing the decision without leaving the two framing controls misleadingly inconsistent.
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- ruby
- 领域
- security
- Issue 类型
- 功能
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 38/100