Skip to content

Commit 53cf586

Browse files
author
William Tsai
committed
Patch 1.2.0
1 parent bbf3d8a commit 53cf586

13 files changed

Lines changed: 220 additions & 54 deletions

.gitlab-ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ stages:
1111

1212
rspec:
1313
stage: rspec
14-
image: ruby:3.4.5
14+
image: ruby:3.4.8
1515
tags:
1616
- arm64
1717
script:
@@ -22,7 +22,7 @@ rspec:
2222

2323
to_gem:
2424
stage: publish
25-
image: ruby:3.4.5
25+
image: ruby:3.4.8
2626
tags:
2727
- arm64
2828
script:
@@ -34,5 +34,5 @@ to_gem:
3434
- GEM_NAME=error_response-$RELEASE_VERSION.gem
3535
- gem build error_response.gemspec
3636
- gem push $GEM_NAME
37-
only:
38-
- /release-\d+\.\d+\.\d+(\.\d+)?/
37+
rules:
38+
- if: '$CI_COMMIT_TAG =~ /^release-\d+\.\d+\.\d+(\.\d+)?$/'

.rubocop.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
plugins:
2+
- rubocop-performance
3+
4+
AllCops:
5+
NewCops: enable
6+
TargetRubyVersion: 3.0
7+
Exclude:
8+
- 'bin/**/*'
9+
- 'pkg/**/*'
10+
- 'vendor/**/*'
11+
12+
Layout/LineLength:
13+
Max: 200
14+
15+
Style/Documentation:
16+
Enabled: false
17+
18+
Metrics/MethodLength:
19+
Max: 25
20+
21+
Metrics/AbcSize:
22+
Max: 25
23+
24+
Metrics/CyclomaticComplexity:
25+
Max: 10
26+
27+
Metrics/PerceivedComplexity:
28+
Max: 10
29+
30+
Metrics/BlockLength:
31+
Exclude:
32+
- 'spec/**/*'
33+
34+
Metrics/ParameterLists:
35+
Max: 10
36+
37+
Naming/VariableNumber:
38+
Enabled: false

.ruby-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.4.5
1+
3.4.8

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
## [1.2.0] - 2026-03-24
2+
- Patch activesupport to 7.2.3.1.
3+
- Fix possible ReDoS vulnerability in `number_to_delimited`.
4+
- Fix possible XSS vulnerability in `ActiveSupport::SafeBuffer#%`.
5+
- Add SECURITY.md.
6+
- Add README.md link to the security policy.
7+
- Add RSpec coverage for loading remote error definitions.
8+
- Add RuboCop configuration and clean up lint issues.
9+
- Improve remote YAML loading safety.
110
## [1.1.6] - 2025-07-18
211
- Fix readme typo.
312
## [1.1.5] - 2025-07-16

Gemfile

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
1+
# frozen_string_literal: true
2+
13
source 'https://rubygems.org'
24

35
gemspec
46

5-
gem 'irb', '~> 1.15.2'
6-
gem 'rspec', '~> 3.13.1'
7+
group :development, :test do
8+
gem 'irb', '~> 1.17.0'
9+
gem 'rspec', '~> 3.13.2'
10+
gem 'rubocop', '~> 1.85.1'
11+
gem 'rubocop-performance', '~> 1.26.1'
12+
end

Gemfile.lock

Lines changed: 57 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,27 @@
11
PATH
22
remote: .
33
specs:
4-
error_response (1.1.6)
4+
error_response (1.2.0)
5+
activesupport (~> 7.2.3.1)
56

67
GEM
78
remote: https://rubygems.org/
89
specs:
9-
activesupport (7.1.5.1)
10+
activesupport (7.2.3.1)
1011
base64
1112
benchmark (>= 0.3)
1213
bigdecimal
13-
concurrent-ruby (~> 1.0, >= 1.0.2)
14+
concurrent-ruby (~> 1.0, >= 1.3.1)
1415
connection_pool (>= 2.2.5)
1516
drb
1617
i18n (>= 1.6, < 2)
1718
logger (>= 1.4.2)
18-
minitest (>= 5.1)
19-
mutex_m
19+
minitest (>= 5.1, < 6)
2020
securerandom (>= 0.3)
21-
tzinfo (~> 2.0)
21+
tzinfo (~> 2.0, >= 2.0.5)
22+
addressable (2.8.9)
23+
public_suffix (>= 2.0.2, < 8.0)
24+
ast (2.4.3)
2225
base64 (0.3.0)
2326
benchmark (0.4.1)
2427
bigdecimal (3.2.2)
@@ -29,20 +32,37 @@ GEM
2932
i18n (1.14.7)
3033
concurrent-ruby (~> 1.0)
3134
io-console (0.8.1)
32-
irb (1.15.2)
35+
irb (1.17.0)
3336
pp (>= 0.6.0)
37+
prism (>= 1.3.0)
3438
rdoc (>= 4.0.0)
3539
reline (>= 0.4.2)
40+
json (2.19.2)
41+
json-schema (6.2.0)
42+
addressable (~> 2.8)
43+
bigdecimal (>= 3.1, < 5)
44+
language_server-protocol (3.17.0.5)
45+
lint_roller (1.1.0)
3646
logger (1.7.0)
47+
mcp (0.9.1)
48+
json-schema (>= 4.1)
3749
minitest (5.25.5)
38-
mutex_m (0.3.0)
50+
parallel (1.27.0)
51+
parser (3.3.10.2)
52+
ast (~> 2.4.1)
53+
racc
3954
pp (0.6.2)
4055
prettyprint
4156
prettyprint (0.2.0)
57+
prism (1.9.0)
58+
public_suffix (7.0.5)
59+
racc (1.8.1)
60+
rainbow (3.1.1)
4261
rdoc (6.3.4.1)
62+
regexp_parser (2.11.3)
4363
reline (0.6.1)
4464
io-console (~> 0.5)
45-
rspec (3.13.1)
65+
rspec (3.13.2)
4666
rspec-core (~> 3.13.0)
4767
rspec-expectations (~> 3.13.0)
4868
rspec-mocks (~> 3.13.0)
@@ -55,18 +75,42 @@ GEM
5575
diff-lcs (>= 1.2.0, < 2.0)
5676
rspec-support (~> 3.13.0)
5777
rspec-support (3.13.4)
78+
rubocop (1.85.1)
79+
json (~> 2.3)
80+
language_server-protocol (~> 3.17.0.2)
81+
lint_roller (~> 1.1.0)
82+
mcp (~> 0.6)
83+
parallel (~> 1.10)
84+
parser (>= 3.3.0.2)
85+
rainbow (>= 2.2.2, < 4.0)
86+
regexp_parser (>= 2.9.3, < 3.0)
87+
rubocop-ast (>= 1.49.0, < 2.0)
88+
ruby-progressbar (~> 1.7)
89+
unicode-display_width (>= 2.4.0, < 4.0)
90+
rubocop-ast (1.49.1)
91+
parser (>= 3.3.7.2)
92+
prism (~> 1.7)
93+
rubocop-performance (1.26.1)
94+
lint_roller (~> 1.1)
95+
rubocop (>= 1.75.0, < 2.0)
96+
rubocop-ast (>= 1.47.1, < 2.0)
97+
ruby-progressbar (1.13.0)
5898
securerandom (0.4.1)
5999
tzinfo (2.0.6)
60100
concurrent-ruby (~> 1.0)
101+
unicode-display_width (3.2.0)
102+
unicode-emoji (~> 4.1)
103+
unicode-emoji (4.2.0)
61104

62105
PLATFORMS
63106
ruby
64107

65108
DEPENDENCIES
66-
activesupport (~> 7.1.5.1)
67109
error_response!
68-
irb (~> 1.15.2)
69-
rspec (~> 3.13.1, ~> 3.0)
110+
irb (~> 1.17.0)
111+
rspec (~> 3.13.2)
112+
rubocop (~> 1.85.1)
113+
rubocop-performance (~> 1.26.1)
70114

71115
BUNDLED WITH
72-
2.7.0
116+
2.7.2

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,10 @@ gives you
158158
}
159159
```
160160

161+
## Security
162+
163+
If you would like to report a security issue, please review the [Security Policy](SECURITY.md).
164+
161165
## License
162166

163167
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).

SECURITY.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Security Policy
2+
3+
## Supported Versions
4+
5+
Security fixes are provided for the latest released version of `error_response`.
6+
7+
If you report a vulnerability, please verify whether it can still be reproduced on the latest release before submitting the report.
8+
9+
## Reporting a Vulnerability
10+
11+
Please report security issues privately by email:
12+
13+
- `dev@kdanmobile.com`
14+
15+
To help us investigate quickly, please include:
16+
17+
- A clear description of the issue
18+
- The affected `error_response` version
19+
- Your Ruby and Rails versions, if applicable
20+
- Steps to reproduce the issue
21+
- A proof of concept or sample payload, if available
22+
- The expected impact and any known workarounds
23+
24+
Please do not open public issues for suspected security vulnerabilities.
25+
26+
## Response Process
27+
28+
After receiving a report, we will:
29+
30+
- Confirm whether the issue can be reproduced
31+
- Assess the impact and affected versions
32+
- Prepare and release a fix when necessary
33+
- Publish the relevant update through the normal project release process
34+
35+
Response time may vary depending on severity and reproduction complexity.
36+
37+
## Disclosure Policy
38+
39+
Please allow time for investigation and remediation before making any public disclosure.
40+
41+
We appreciate responsible disclosure and coordinated reporting.

VERSION.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.1.6
1+
1.2.0

error_response.gemspec

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,22 @@
1+
# frozen_string_literal: true
2+
13
Gem::Specification.new do |s|
24
s.name = 'error_response'
3-
s.version = File.read("./VERSION.md")
4-
s.date = Time.now.strftime('%F')
5-
s.summary = "A tool for API error response"
6-
s.description = "use for error_response"
7-
s.authors = ["Kdan Mobile Software Developer"]
5+
s.version = File.read('./VERSION.md')
6+
s.summary = 'A tool for API error response'
7+
s.description = 'use for error_response'
8+
s.authors = ['Kdan Mobile Software Developer']
89
s.email = 'dev@kdanmobile.com'
910
s.homepage = 'https://github.com/kdan-mobile-software-ltd/error_response'
1011
s.license = 'MIT'
11-
s.files = Dir["lib/**/*"]
12-
s.require_path = ["lib"]
13-
s.required_ruby_version = '>= 2.7'
12+
s.files = Dir['lib/**/*']
13+
s.require_path = ['lib']
14+
s.required_ruby_version = '>= 3.0'
1415
s.metadata = {
15-
"source_code_uri" => "https://github.com/kdan-mobile-software-ltd/error_response",
16-
"changelog_uri" => "https://github.com/kdan-mobile-software-ltd/error_response/blob/master/CHANGELOG.md"
16+
'source_code_uri' => 'https://github.com/kdan-mobile-software-ltd/error_response',
17+
'changelog_uri' => 'https://github.com/kdan-mobile-software-ltd/error_response/blob/master/CHANGELOG.md',
18+
'rubygems_mfa_required' => 'true'
1719
}
1820

19-
s.add_development_dependency 'activesupport', '~> 7.1.5.1'
20-
s.add_development_dependency 'rspec', '~> 3.0'
21+
s.add_dependency 'activesupport', '~> 7.2.3.1'
2122
end

0 commit comments

Comments
 (0)