github / github/secure_headers

Set `default-src` CSP Attribute to `none` by default

未关闭
#482 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Ruby
星标
3.2k
派生
253
平均合并
19 小时 11 分钟
30 天内合并 PR
1

描述

At GitHub, we set the `default-src` CSP attribute to `none`. This provides the strictest possible CSP as it'll thus only allow CSP directives that the user explicitly has allowlisted.

It would be desirable to set this default in `secure_headers` as well:

https://github.com/github/secure_headers/blob/7f89df2dafb22f1833702eef4a01d4794b2066f0/lib/secure_headers/headers/content_security_policy_config.rb#L133

This would be a breaking change, so if this is desirable, this would fit well in with https://github.com/github/secure_headers/issues/480

贡献指南

打开贡献指南

调研方向

Start in lib/secure_headers/headers/content_security_policy_config.rb at the referenced line and inspect how the current default-src value is assembled. Read issue #480 to understand the proposed breaking-change context. Done means the default is set to none without overriding directives explicitly configured by users.

由索引模型根据 Issue 内容生成。

评估

技术栈
ruby
领域
security
Issue 类型
功能
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
48/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。