ndr_support 5.11.1 → 5.12.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/CHANGELOG.md +8 -0
- data/SECURITY.md +35 -0
- data/lib/ndr_support/concerns/working_days.rb +17 -8
- data/lib/ndr_support/safe_path.rb +6 -1
- data/lib/ndr_support/version.rb +1 -1
- data/ndr_support.gemspec +4 -4
- metadata +7 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2995cd91b2234a5f84f847d3048d5d2f0f0b1090a5f43bad49c4542433d011a1
|
|
4
|
+
data.tar.gz: eaf809d6d2ca4142b742e4f1a935b46d3e1264434aa73e1a707b4b7a86d5c249
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d1e9f8bae88dd56fb79336cd410f73469d8ff1881b71c87b7755c28774583e4fcd0ea86ee4beb71488b3200ded59b480132cf2c60c7e5c37f9a28024d6609336
|
|
7
|
+
data.tar.gz: 864bc5d157f26f707f8db654c20eb8945f3d9bbae9e897031dd5f52ee780325e23d7fd34625e5ff64553b063ee22148e76bed14cce2f0310a375c3d8822813db
|
data/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
## [Unreleased]
|
|
2
2
|
* no unreleased changes
|
|
3
3
|
|
|
4
|
+
## 5.12.0 / 2026-12-02
|
|
5
|
+
### Fixed
|
|
6
|
+
* Fix SafePath#verify accepting sibling directories of the root
|
|
7
|
+
|
|
8
|
+
## Changed
|
|
9
|
+
* Drop support for Rails 7.1, 7.2, Ruby 3.2
|
|
10
|
+
* Add 2029 bank holidays
|
|
11
|
+
|
|
4
12
|
## 5.11.1 / 2026-04-20
|
|
5
13
|
### Fixed
|
|
6
14
|
* Support Rails 8.1, Ruby 4.0
|
data/SECURITY.md
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Security
|
|
2
|
+
|
|
3
|
+
NHS England takes security and the protection of private data extremely seriously. If you believe you have found a vulnerability or other issue which has compromised or could compromise the security of any of our systems and/or private data managed by our systems, please do not hesitate to contact us using the methods outlined below.
|
|
4
|
+
|
|
5
|
+
## Table of Contents
|
|
6
|
+
|
|
7
|
+
- [Security](#security)
|
|
8
|
+
- [Table of Contents](#table-of-contents)
|
|
9
|
+
- [Reporting a vulnerability](#reporting-a-vulnerability)
|
|
10
|
+
- [Email](#email)
|
|
11
|
+
- [NCSC](#ncsc)
|
|
12
|
+
- [General Security Enquiries](#general-security-enquiries)
|
|
13
|
+
|
|
14
|
+
## Reporting a vulnerability
|
|
15
|
+
|
|
16
|
+
Please note, email is our preferred method of receiving reports.
|
|
17
|
+
|
|
18
|
+
### Email
|
|
19
|
+
|
|
20
|
+
If you wish to notify us of a vulnerability via email, please include detailed information on the nature of the vulnerability and any steps required to reproduce it.
|
|
21
|
+
|
|
22
|
+
You can reach us at:
|
|
23
|
+
|
|
24
|
+
- [Brian.Shand@nhs.net](mailto:Brian.Shand@nhs.net)
|
|
25
|
+
- [cybersecurity@nhs.net](mailto:cybersecurity@nhs.net)
|
|
26
|
+
|
|
27
|
+
### NCSC
|
|
28
|
+
|
|
29
|
+
You can send your report to the National Cyber Security Centre, who will assess your report and pass it on to NHS England if necessary.
|
|
30
|
+
|
|
31
|
+
You can report vulnerabilities here: [https://www.ncsc.gov.uk/information/vulnerability-reporting](https://www.ncsc.gov.uk/information/vulnerability-reporting)
|
|
32
|
+
|
|
33
|
+
## General Security Enquiries
|
|
34
|
+
|
|
35
|
+
If you have general enquiries regarding our cybersecurity, please reach out to us at [cybersecurity@nhs.net](mailto:cybersecurity@nhs.net)
|
|
@@ -156,14 +156,23 @@ module WorkingDays # rubocop:disable Metrics/ModuleLength
|
|
|
156
156
|
'2027-12-27', # Monday - Christmas Day
|
|
157
157
|
'2027-12-28', # Tuesday - Boxing Day
|
|
158
158
|
# 2028
|
|
159
|
-
'2028-01-03', # Monday
|
|
160
|
-
'2028-04-14', # Friday
|
|
161
|
-
'2028-04-17', # Monday
|
|
162
|
-
'2028-05-01', # Monday
|
|
163
|
-
'2028-05-29', # Monday
|
|
164
|
-
'2028-08-28', # Monday
|
|
165
|
-
'2028-12-25', # Monday
|
|
166
|
-
'2028-12-26'
|
|
159
|
+
'2028-01-03', # Monday - New Year’s Day (Substitute day)
|
|
160
|
+
'2028-04-14', # Friday - Good Friday
|
|
161
|
+
'2028-04-17', # Monday - Easter Monday
|
|
162
|
+
'2028-05-01', # Monday - Early May bank holiday
|
|
163
|
+
'2028-05-29', # Monday - Spring bank holiday
|
|
164
|
+
'2028-08-28', # Monday - Summer bank holiday
|
|
165
|
+
'2028-12-25', # Monday - Christmas Day
|
|
166
|
+
'2028-12-26', # Tuesday - Boxing Day
|
|
167
|
+
# 2029
|
|
168
|
+
'2029-01-01', # Monday - New Year’s Day
|
|
169
|
+
'2029-03-30', # Friday - Good Friday
|
|
170
|
+
'2029-04-02', # Monday - Easter Monday
|
|
171
|
+
'2029-05-07', # Monday - Early May bank holiday
|
|
172
|
+
'2029-05-28', # Monday - Spring bank holiday
|
|
173
|
+
'2029-08-27', # Monday - Summer bank holiday
|
|
174
|
+
'2029-12-25', # Tuesday - Christmas Day
|
|
175
|
+
'2029-12-26' # Wednesday - Boxing Day
|
|
167
176
|
].map { |str| Date.parse(str) }
|
|
168
177
|
# rubocop:enable Style/TrailingCommaInArrayLiteral
|
|
169
178
|
|
|
@@ -264,7 +264,12 @@ class SafePath
|
|
|
264
264
|
# Verifies whether the path is safe.
|
|
265
265
|
def verify(path)
|
|
266
266
|
epath = File.expand_path(path)
|
|
267
|
-
|
|
267
|
+
root_prefix = @root.end_with?(File::SEPARATOR) ? @root : @root + File::SEPARATOR
|
|
268
|
+
|
|
269
|
+
unless epath == @root || epath.start_with?(root_prefix)
|
|
270
|
+
raise SecurityError, "The given path is insecure. The path should point at #{@root}, but it points at #{epath}"
|
|
271
|
+
end
|
|
272
|
+
|
|
268
273
|
epath
|
|
269
274
|
end
|
|
270
275
|
end
|
data/lib/ndr_support/version.rb
CHANGED
data/ndr_support.gemspec
CHANGED
|
@@ -13,20 +13,20 @@ Gem::Specification.new do |spec|
|
|
|
13
13
|
spec.license = 'MIT'
|
|
14
14
|
|
|
15
15
|
gem_files = %w[CHANGELOG.md CODE_OF_CONDUCT.md LICENSE.txt README.md
|
|
16
|
-
lib ndr_support.gemspec]
|
|
16
|
+
SECURITY.md lib ndr_support.gemspec]
|
|
17
17
|
spec.files = `git ls-files -z`.split("\x0").
|
|
18
18
|
select { |f| gem_files.include?(f.split('/')[0]) }
|
|
19
19
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
|
20
20
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
|
21
21
|
spec.require_paths = ['lib']
|
|
22
22
|
|
|
23
|
-
spec.add_dependency 'activerecord', '>=
|
|
24
|
-
spec.add_dependency 'activesupport', '>=
|
|
23
|
+
spec.add_dependency 'activerecord', '>= 8.0', '< 8.2'
|
|
24
|
+
spec.add_dependency 'activesupport', '>= 8.0', '< 8.2'
|
|
25
25
|
|
|
26
26
|
spec.add_development_dependency 'bundler'
|
|
27
27
|
spec.add_development_dependency 'rake', '>= 12.3.3'
|
|
28
28
|
|
|
29
|
-
spec.required_ruby_version = '>= 3.
|
|
29
|
+
spec.required_ruby_version = '>= 3.3'
|
|
30
30
|
|
|
31
31
|
# Avoid std-lib minitest (which has different namespace)
|
|
32
32
|
spec.add_development_dependency 'minitest', '>= 5.0.0'
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ndr_support
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 5.
|
|
4
|
+
version: 5.12.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- NCRS Development Team
|
|
@@ -15,7 +15,7 @@ dependencies:
|
|
|
15
15
|
requirements:
|
|
16
16
|
- - ">="
|
|
17
17
|
- !ruby/object:Gem::Version
|
|
18
|
-
version: '
|
|
18
|
+
version: '8.0'
|
|
19
19
|
- - "<"
|
|
20
20
|
- !ruby/object:Gem::Version
|
|
21
21
|
version: '8.2'
|
|
@@ -25,7 +25,7 @@ dependencies:
|
|
|
25
25
|
requirements:
|
|
26
26
|
- - ">="
|
|
27
27
|
- !ruby/object:Gem::Version
|
|
28
|
-
version: '
|
|
28
|
+
version: '8.0'
|
|
29
29
|
- - "<"
|
|
30
30
|
- !ruby/object:Gem::Version
|
|
31
31
|
version: '8.2'
|
|
@@ -35,7 +35,7 @@ dependencies:
|
|
|
35
35
|
requirements:
|
|
36
36
|
- - ">="
|
|
37
37
|
- !ruby/object:Gem::Version
|
|
38
|
-
version: '
|
|
38
|
+
version: '8.0'
|
|
39
39
|
- - "<"
|
|
40
40
|
- !ruby/object:Gem::Version
|
|
41
41
|
version: '8.2'
|
|
@@ -45,7 +45,7 @@ dependencies:
|
|
|
45
45
|
requirements:
|
|
46
46
|
- - ">="
|
|
47
47
|
- !ruby/object:Gem::Version
|
|
48
|
-
version: '
|
|
48
|
+
version: '8.0'
|
|
49
49
|
- - "<"
|
|
50
50
|
- !ruby/object:Gem::Version
|
|
51
51
|
version: '8.2'
|
|
@@ -213,6 +213,7 @@ files:
|
|
|
213
213
|
- CODE_OF_CONDUCT.md
|
|
214
214
|
- LICENSE.txt
|
|
215
215
|
- README.md
|
|
216
|
+
- SECURITY.md
|
|
216
217
|
- lib/ndr_support.rb
|
|
217
218
|
- lib/ndr_support/array.rb
|
|
218
219
|
- lib/ndr_support/concerns/working_days.rb
|
|
@@ -256,7 +257,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
256
257
|
requirements:
|
|
257
258
|
- - ">="
|
|
258
259
|
- !ruby/object:Gem::Version
|
|
259
|
-
version: '3.
|
|
260
|
+
version: '3.3'
|
|
260
261
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
261
262
|
requirements:
|
|
262
263
|
- - ">="
|