Skip to content

Commit 320f12b

Browse files
Security: bump actionview, activesupport, mcp, uri
Resolves security vulnerabilities in dependencies: - actionview: 8.0.2 -> 8.1.3 (GHSA-v55j-83pf-r9cq) - activesupport: 8.0.2 -> 8.1.3 (GHSA-2j26-frm8-cmj9, GHSA-89vf-4333-qx8v, GHSA-cg4j-q9v8-6v38) - mcp: 0.1.0 -> 0.9.2 (GHSA-qvqr-5cv7-wh35) - uri: 1.0.3 -> 1.1.1 (GHSA-j4pr-3wm6-xx2r) mcp 0.9.2 introduces stricter JSON Schema validation (draft-04): - required arrays must have at least 1 item; removed empty required: [] from PrintEnvTool and PackagesTool - InputSchema no longer exposes .properties/.required accessors; updated specs to use schema.to_h[:properties] / schema.to_h[:required] All 58 examples pass. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 9dcc5d5 commit 320f12b

4 files changed

Lines changed: 28 additions & 26 deletions

File tree

Gemfile.lock

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,28 +11,29 @@ PATH
1111
GEM
1212
remote: https://rubygems.org/
1313
specs:
14-
actionview (8.0.2)
15-
activesupport (= 8.0.2)
14+
actionview (8.1.3)
15+
activesupport (= 8.1.3)
1616
builder (~> 3.1)
1717
erubi (~> 1.11)
1818
rails-dom-testing (~> 2.2)
1919
rails-html-sanitizer (~> 1.6)
20-
activesupport (8.0.2)
20+
activesupport (8.1.3)
2121
base64
22-
benchmark (>= 0.3)
2322
bigdecimal
2423
concurrent-ruby (~> 1.0, >= 1.3.1)
2524
connection_pool (>= 2.2.5)
2625
drb
2726
i18n (>= 1.6, < 2)
27+
json
2828
logger (>= 1.4.2)
2929
minitest (>= 5.1)
3030
securerandom (>= 0.3)
3131
tzinfo (~> 2.0, >= 2.0.5)
3232
uri (>= 0.13.1)
33+
addressable (2.9.0)
34+
public_suffix (>= 2.0.2, < 8.0)
3335
ast (2.4.3)
3436
base64 (0.2.0)
35-
benchmark (0.4.0)
3637
better_html (2.1.1)
3738
actionview (>= 6.0)
3839
activesupport (>= 6.0)
@@ -59,15 +60,17 @@ GEM
5960
rdoc (>= 4.0.0)
6061
reline (>= 0.4.2)
6162
json (2.10.2)
62-
json_rpc_handler (0.1.1)
63+
json-schema (6.2.0)
64+
addressable (~> 2.8)
65+
bigdecimal (>= 3.1, < 5)
6366
language_server-protocol (3.17.0.4)
6467
lint_roller (1.1.0)
6568
logger (1.7.0)
6669
loofah (2.24.0)
6770
crass (~> 1.0.2)
6871
nokogiri (>= 1.12.0)
69-
mcp (0.1.0)
70-
json_rpc_handler (~> 0.1)
72+
mcp (0.9.2)
73+
json-schema (>= 4.1)
7174
minitest (5.25.5)
7275
nokogiri (1.19.3-aarch64-linux-gnu)
7376
racc (~> 1.4)
@@ -106,6 +109,7 @@ GEM
106109
psych (5.2.3)
107110
date
108111
stringio
112+
public_suffix (7.0.5)
109113
query_packwerk (0.1.0)
110114
coderay
111115
packwerk
@@ -177,7 +181,7 @@ GEM
177181
unicode-display_width (3.1.4)
178182
unicode-emoji (~> 4.0, >= 4.0.4)
179183
unicode-emoji (4.0.4)
180-
uri (1.0.3)
184+
uri (1.1.1)
181185
zeitwerk (2.7.2)
182186

183187
PLATFORMS

lib/chatwerk/tools/packages_tool.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ class PackagesTool < MCP::Tool
1717
type: 'string',
1818
description: "A partial package path name to constrain the results (e.g. 'packs/product_services/payments/banks' or 'payments/banks')."
1919
}
20-
},
21-
required: []
20+
}
2221
)
2322

2423
class << self

lib/chatwerk/tools/print_env_tool.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ class PrintEnvTool < MCP::Tool
1010
description 'Get the current working directory and environment path of the MCP server, ensuring correct directory context'
1111

1212
input_schema(
13-
properties: {},
14-
required: []
13+
properties: {}
1514
)
1615

1716
class << self

spec/chatwerk/mcp_tools_spec.rb

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737

3838
it 'has no required arguments' do
3939
schema = described_class.input_schema
40-
expect(schema.required).to be_empty
40+
expect(schema.to_h[:required]).to be_nil.or(be_empty)
4141
end
4242
end
4343

@@ -65,8 +65,8 @@
6565

6666
it 'has package_path as optional argument' do
6767
schema = described_class.input_schema
68-
expect(schema.properties).to have_key(:package_path)
69-
expect(schema.required).not_to include(:package_path)
68+
expect(schema.to_h[:properties]).to have_key(:package_path)
69+
expect(schema.to_h[:required]).to satisfy { |r| r.nil? || !r.include?('package_path') }
7070
end
7171
end
7272

@@ -86,8 +86,8 @@
8686

8787
it 'has package_path as required argument' do
8888
schema = described_class.input_schema
89-
expect(schema.properties).to have_key(:package_path)
90-
expect(schema.required).to include(:package_path)
89+
expect(schema.to_h[:properties]).to have_key(:package_path)
90+
expect(schema.to_h[:required]).to include('package_path')
9191
end
9292
end
9393

@@ -123,10 +123,10 @@
123123

124124
it 'has correct argument requirements' do
125125
schema = described_class.input_schema
126-
expect(schema.properties).to have_key(:package_path)
127-
expect(schema.properties).to have_key(:constant_name)
128-
expect(schema.required).to include(:package_path)
129-
expect(schema.required).not_to include(:constant_name)
126+
expect(schema.to_h[:properties]).to have_key(:package_path)
127+
expect(schema.to_h[:properties]).to have_key(:constant_name)
128+
expect(schema.to_h[:required]).to include('package_path')
129+
expect(schema.to_h[:required]).not_to include('constant_name')
130130
end
131131
end
132132

@@ -162,10 +162,10 @@
162162

163163
it 'has correct argument requirements' do
164164
schema = described_class.input_schema
165-
expect(schema.properties).to have_key(:package_path)
166-
expect(schema.properties).to have_key(:constant_name)
167-
expect(schema.required).to include(:package_path)
168-
expect(schema.required).not_to include(:constant_name)
165+
expect(schema.to_h[:properties]).to have_key(:package_path)
166+
expect(schema.to_h[:properties]).to have_key(:constant_name)
167+
expect(schema.to_h[:required]).to include('package_path')
168+
expect(schema.to_h[:required]).not_to include('constant_name')
169169
end
170170
end
171171
end

0 commit comments

Comments
 (0)