secure_headers 6.7.0 → 7.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/build.yml +7 -6
- data/README.md +1 -1
- data/docs/upgrading-to-7-0.md +12 -0
- data/lib/secure_headers/headers/x_xss_protection.rb +1 -1
- data/lib/secure_headers/version.rb +1 -1
- data/secure_headers.gemspec +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: df732bcf03768407849220aa164adc5b05c741d3ffcaea00d80758bd936d4e65
|
4
|
+
data.tar.gz: d979d4a8892a101b2efbeba1fc2fd3fbeffa154d9e429aaf7a5ff73d889bbdac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: be8e613fe594063d0921ee9e971c43522cf4d434ef1ae958a15a20cb9cf07d74180803323c90cafe9ac1cb9c09377110d3757f4b4a0b91774401fe09dff1da40
|
7
|
+
data.tar.gz: 47471941c3192cfff7e3fc1d2442a2c5106334a192cede9e8aa432ce7c7906eeb369ad528989932e33e6fdae02853c37c90609be47ce1b256634af9d6455d379
|
data/.github/workflows/build.yml
CHANGED
@@ -1,6 +1,9 @@
|
|
1
1
|
name: Build + Test
|
2
2
|
on: [pull_request, push]
|
3
3
|
|
4
|
+
permissions:
|
5
|
+
contents: read
|
6
|
+
|
4
7
|
jobs:
|
5
8
|
build:
|
6
9
|
name: Build + Test
|
@@ -10,15 +13,13 @@ jobs:
|
|
10
13
|
ruby: [ '2.6', '2.7', '3.0', '3.1', '3.2' ]
|
11
14
|
|
12
15
|
steps:
|
13
|
-
- uses: actions/checkout@
|
16
|
+
- uses: actions/checkout@v4
|
14
17
|
- name: Set up Ruby ${{ matrix.ruby }}
|
15
|
-
uses: ruby/setup-ruby@v1
|
18
|
+
uses: ruby/setup-ruby@f26937343756480a8cb3ae1f623b9c8d89ed6984 #v1.190.0 tag
|
16
19
|
with:
|
17
20
|
ruby-version: ${{ matrix.ruby }}
|
21
|
+
bundler-cache: true
|
18
22
|
- name: Build and test with Rake
|
19
23
|
run: |
|
20
|
-
gem install bundler
|
21
|
-
bundle install --jobs 4 --retry 3 --without guard
|
22
|
-
bundle exec rspec spec
|
23
24
|
bundle exec rubocop
|
24
|
-
|
25
|
+
bundle exec rspec spec
|
data/README.md
CHANGED
@@ -0,0 +1,12 @@
|
|
1
|
+
## X-Xss-Protection is set to 0 by default
|
2
|
+
|
3
|
+
Version 6 and below of `secure_headers` set the `X-Xss-Protection` to `1; mode=block` by default. This was done to protect against reflected XSS attacks. However, this header is no longer recommended (see https://github.com/github/secure_headers/issues/439 for more information).
|
4
|
+
|
5
|
+
If any functionality in your app depended on this header being set to the previous value, you will need to set it explicitly in your configuration.
|
6
|
+
|
7
|
+
```ruby
|
8
|
+
# config/initializers/secure_headers.rb
|
9
|
+
SecureHeaders::Configuration.default do |config|
|
10
|
+
config.x_xss_protection = "1; mode=block"
|
11
|
+
end
|
12
|
+
```
|
@@ -3,7 +3,7 @@ module SecureHeaders
|
|
3
3
|
class XXssProtectionConfigError < StandardError; end
|
4
4
|
class XXssProtection
|
5
5
|
HEADER_NAME = "X-XSS-Protection".freeze
|
6
|
-
DEFAULT_VALUE = "
|
6
|
+
DEFAULT_VALUE = "0".freeze
|
7
7
|
VALID_X_XSS_HEADER = /\A[01](; mode=block)?(; report=.*)?\z/
|
8
8
|
|
9
9
|
class << self
|
data/secure_headers.gemspec
CHANGED
@@ -13,7 +13,7 @@ Gem::Specification.new do |gem|
|
|
13
13
|
gem.description = 'Add easily configured security headers to responses
|
14
14
|
including content-security-policy, x-frame-options,
|
15
15
|
strict-transport-security, etc.'
|
16
|
-
gem.homepage = "https://github.com/
|
16
|
+
gem.homepage = "https://github.com/github/secure_headers"
|
17
17
|
gem.license = "MIT"
|
18
18
|
gem.files = `git ls-files`.split($INPUT_RECORD_SEPARATOR)
|
19
19
|
gem.executables = gem.files.grep(%r{^bin/}).map { |f| File.basename(f) }
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: secure_headers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 7.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Neil Matatall
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-10-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -61,6 +61,7 @@ files:
|
|
61
61
|
- docs/upgrading-to-4-0.md
|
62
62
|
- docs/upgrading-to-5-0.md
|
63
63
|
- docs/upgrading-to-6-0.md
|
64
|
+
- docs/upgrading-to-7-0.md
|
64
65
|
- lib/secure_headers.rb
|
65
66
|
- lib/secure_headers/configuration.rb
|
66
67
|
- lib/secure_headers/hash_helper.rb
|
@@ -101,7 +102,7 @@ files:
|
|
101
102
|
- spec/lib/secure_headers/view_helpers_spec.rb
|
102
103
|
- spec/lib/secure_headers_spec.rb
|
103
104
|
- spec/spec_helper.rb
|
104
|
-
homepage: https://github.com/
|
105
|
+
homepage: https://github.com/github/secure_headers
|
105
106
|
licenses:
|
106
107
|
- MIT
|
107
108
|
metadata: {}
|