rails-ai-bridge 3.6.0 → 3.6.1
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 +15 -0
- data/README.md +2 -1
- data/SECURITY.md +6 -4
- data/UPGRADING.md +18 -0
- data/docs/mcp-security.md +13 -0
- data/lib/generators/rails_ai_bridge/install/install_generator.rb +1 -0
- data/lib/rails_ai_bridge/path_resolver.rb +1 -1
- data/lib/rails_ai_bridge/registry/skill_source_resolver.rb +13 -2
- data/lib/rails_ai_bridge/version.rb +1 -1
- data/rails-ai-bridge.gemspec +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ecc139c0066902b92342f732a9e9344b5aa5468153f6193708fa95815bbe0535
|
|
4
|
+
data.tar.gz: 05fe2c9d0ada4aa7a836b1dea1ec70f60ad75a94f87c4b4ff5b29e6c4fe9ca81
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 73de5c66876b8b4ca8e7a50e3bdaaf8700984f23f884f492d7ebc880aee3fd3345efd847c4d4252012ac920c8e5450877767e79e48ecdc141f74b0d0d5dc5dd8
|
|
7
|
+
data.tar.gz: '08b0c68f5f5af762af8c87e937ba5360f5fa6732f07b3543d24bb000e118f5dad55ca4228984f7f88dc471ea70b8f3a75f8ae4b3a3dbd4eacbef205be1683cfa'
|
data/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,21 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
## [3.6.1] - 2026-08-07
|
|
11
|
+
|
|
12
|
+
### Security
|
|
13
|
+
|
|
14
|
+
- **Skill-pack git URL scheme allowlist** (#105/#110) — `DefaultGitRunner#clone_repo` accepts only `https://`, SCP-style `git@host:path`, and `ssh://`. Rejects `file://`, plain `http://`, and empty URLs. Validation `ArgumentError`s do not interpolate the raw URL, so credentials in userinfo cannot leak via exception messages.
|
|
15
|
+
- **SECURITY.md supported-versions table** (#106/#112) — documents 3.6.x / 3.5.x as supported, best-effort for older 3.x, and end-of-life for 1.x / 2.x.
|
|
16
|
+
- **Residual MCP HTTP risk checklist** (#107/#113) — operator checklist in `docs/mcp-security.md` (open HTTP default, CORS `*`, in-memory rate limit) with an install-generator pointer.
|
|
17
|
+
|
|
18
|
+
### Changed
|
|
19
|
+
|
|
20
|
+
- **`rubydex` bumped to `~> 0.3.0`** (#103/#111) — was `~> 0.2.9`. Run `bundle update rubydex` in host apps.
|
|
21
|
+
- **Dependency audit (2026-08)** (#99) — `bundle-audit` clean; official `mcp` remains on **0.25.x** (`< 1.0`). Migration to `mcp` 1.x remains open in #104.
|
|
22
|
+
|
|
8
23
|
## [3.6.0]
|
|
9
24
|
|
|
10
25
|
### Changed
|
data/README.md
CHANGED
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
[](https://github.com/igmarin/rails-ai-bridge/actions)
|
|
11
11
|
[](LICENSE)
|
|
12
12
|

|
|
13
|
+
[](https://deepwiki.com/igmarin/rails-ai-bridge)
|
|
13
14
|
|
|
14
15
|
---
|
|
15
16
|
|
|
@@ -780,7 +781,7 @@ Bug reports and pull requests: [github.com/igmarin/rails-ai-bridge/issues](https
|
|
|
780
781
|
|
|
781
782
|
## Acknowledgments & Origins
|
|
782
783
|
|
|
783
|
-
This gem ships as **rails-ai-bridge** (Ruby **`RailsAiBridge`**, version **3.6.
|
|
784
|
+
This gem ships as **rails-ai-bridge** (Ruby **`RailsAiBridge`**, version **3.6.1**). Earlier iterations of the same codebase were distributed as `rails-ai-context`.
|
|
784
785
|
|
|
785
786
|
RailsMCP evolved from
|
|
786
787
|
[crisnahine/rails-ai-context](https://github.com/crisnahine/rails-ai-context),
|
data/SECURITY.md
CHANGED
|
@@ -4,10 +4,12 @@
|
|
|
4
4
|
|
|
5
5
|
| Version | Supported |
|
|
6
6
|
|---------|--------------------|
|
|
7
|
-
| 3.
|
|
8
|
-
|
|
|
9
|
-
|
|
|
10
|
-
|
|
|
7
|
+
| 3.6.x | :white_check_mark: |
|
|
8
|
+
| 3.5.x | :white_check_mark: |
|
|
9
|
+
| 3.0.x–3.4.x | :white_check_mark: (security fixes best-effort) |
|
|
10
|
+
| 2.x | :x: (end of life — upgrade to 3.x) |
|
|
11
|
+
| 1.x | :x: |
|
|
12
|
+
| < 1.0 | :x: |
|
|
11
13
|
|
|
12
14
|
## Reporting a Vulnerability
|
|
13
15
|
|
data/UPGRADING.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# Upgrading rails-ai-bridge
|
|
2
2
|
|
|
3
|
+
## Upgrading from 3.6.0 to 3.6.1
|
|
4
|
+
|
|
5
|
+
**One action required if you are pinned to `rubydex` 0.2.x:**
|
|
6
|
+
|
|
7
|
+
The `rubydex` gem constraint moved from `~> 0.2.9` to `~> 0.3.0`. After upgrading
|
|
8
|
+
rails-ai-bridge:
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
bundle update rubydex
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
No configuration or application code changes are required for the security and
|
|
15
|
+
documentation updates in 3.6.1. Skill-pack git sources must use `https://`,
|
|
16
|
+
SCP-style `git@host:path`, or `ssh://` (plain `http://` and `file://` are rejected).
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
|
|
3
21
|
## Upgrading from 3.5.x to 3.6.0
|
|
4
22
|
|
|
5
23
|
**One action required if you are pinned to an older `rubydex`:**
|
data/docs/mcp-security.md
CHANGED
|
@@ -72,3 +72,16 @@ The stdio MCP server has no Bearer layer; anyone who can run the process can use
|
|
|
72
72
|
|
|
73
73
|
- [SECURITY.md](../SECURITY.md) — reporting vulnerabilities and design summary
|
|
74
74
|
- [docs/GUIDE.md](GUIDE.md) — full configuration and MCP tool reference
|
|
75
|
+
|
|
76
|
+
## Residual risk checklist (operators)
|
|
77
|
+
|
|
78
|
+
Use this before exposing HTTP MCP beyond a single-developer machine:
|
|
79
|
+
|
|
80
|
+
| Risk | Default | Mitigation |
|
|
81
|
+
|------|---------|------------|
|
|
82
|
+
| Unauthenticated HTTP when no token/resolver/JWT is configured | Open access (local DX) | Set `RAILS_AI_BRIDGE_MCP_TOKEN` or `config.http_mcp_token`, and/or `config.require_http_auth = true` |
|
|
83
|
+
| `cors_origins` includes `*` | CORS disabled unless configured | Prefer exact origins; never combine `*` with browsers on untrusted networks |
|
|
84
|
+
| In-memory rate limit | Per-process only | Use `config.mcp.rate_limiter` / reverse proxy / WAF for multi-worker or multi-host |
|
|
85
|
+
| Information disclosure via tools | Read-only tools still reveal schema/routes/code | Prefer stdio; bind HTTP to `127.0.0.1`; use exclusions/presets for regulated data |
|
|
86
|
+
|
|
87
|
+
See also [SECURITY.md](../SECURITY.md) for production `auto_mount` requirements and private vulnerability reporting.
|
|
@@ -189,6 +189,7 @@ module RailsAiBridge
|
|
|
189
189
|
# return 401 unless one of the auth mechanisms above is configured.
|
|
190
190
|
# Default is false for backward compatibility with local development.
|
|
191
191
|
# config.mcp.require_http_auth = true
|
|
192
|
+
# See docs/mcp-security.md — Residual risk checklist (operators).
|
|
192
193
|
#
|
|
193
194
|
# Timing-safe token comparison is built in, but add rate limiting too
|
|
194
195
|
# (e.g. Rack::Attack throttle on config.http_path) to prevent brute-force.
|
|
@@ -9,7 +9,7 @@ module RailsAiBridge
|
|
|
9
9
|
# PathResolver is deliberately used by every introspector that needs to
|
|
10
10
|
# locate files on disk (controller, model, view, stimulus, turbo, auth,
|
|
11
11
|
# api, config, action_text, activeStorage, nonArModels — 11 callers as of
|
|
12
|
-
# v3.6.
|
|
12
|
+
# v3.6.1). It is NOT a god class despite high betweenness centrality in
|
|
13
13
|
# graph analyses: a foundational path-resolution utility is expected to
|
|
14
14
|
# sit at the centre of the introspector graph. Splitting it would spread
|
|
15
15
|
# path-safety logic (traversal guards, safe joins) across multiple files
|
|
@@ -69,11 +69,22 @@ module RailsAiBridge
|
|
|
69
69
|
#
|
|
70
70
|
# @param url [String] git repository URL
|
|
71
71
|
# @param dest [String] destination directory path
|
|
72
|
+
# @raise [ArgumentError] if the URL or destination is unsafe or not allowlisted
|
|
72
73
|
# @raise [RuntimeError] if git clone command fails, returns non-zero, or times out
|
|
73
74
|
# @return [void]
|
|
75
|
+
# @note Skill-pack clones accept only +https://+, SCP-style
|
|
76
|
+
# +git@host:path+, and +ssh://+ remote URLs.
|
|
77
|
+
ALLOWED_GIT_URL_PATTERN = %r{\A(?:https://|ssh://|git@[A-Za-z0-9._-]+:)}
|
|
78
|
+
|
|
74
79
|
def clone_repo(url, dest)
|
|
75
|
-
|
|
76
|
-
|
|
80
|
+
url = url.to_s
|
|
81
|
+
# Avoid interpolating +url+ into errors: userinfo may contain credentials.
|
|
82
|
+
raise ArgumentError, "Invalid git URL: URLs must not start with '-'" if url.start_with?('-')
|
|
83
|
+
raise ArgumentError, "Invalid destination: paths must not start with '-'" if dest.to_s.start_with?('-')
|
|
84
|
+
unless url.match?(ALLOWED_GIT_URL_PATTERN)
|
|
85
|
+
raise ArgumentError,
|
|
86
|
+
'Invalid git URL: scheme is not allowlisted (use https://, git@host:path, or ssh://)'
|
|
87
|
+
end
|
|
77
88
|
|
|
78
89
|
with_timeout('git clone') do
|
|
79
90
|
_stdout, stderr, status = Open3.capture3('git', 'clone', '--', url, dest)
|
data/rails-ai-bridge.gemspec
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rails-ai-bridge
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.6.
|
|
4
|
+
version: 3.6.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ismael Marin
|
|
@@ -89,14 +89,14 @@ dependencies:
|
|
|
89
89
|
requirements:
|
|
90
90
|
- - "~>"
|
|
91
91
|
- !ruby/object:Gem::Version
|
|
92
|
-
version: 0.
|
|
92
|
+
version: 0.3.0
|
|
93
93
|
type: :runtime
|
|
94
94
|
prerelease: false
|
|
95
95
|
version_requirements: !ruby/object:Gem::Requirement
|
|
96
96
|
requirements:
|
|
97
97
|
- - "~>"
|
|
98
98
|
- !ruby/object:Gem::Version
|
|
99
|
-
version: 0.
|
|
99
|
+
version: 0.3.0
|
|
100
100
|
description: Rails-AI-Bridge introspects your Rails application and exposes structure
|
|
101
101
|
to AI assistants via static context files and a live Model Context Protocol (MCP)
|
|
102
102
|
server. It classifies Active Record models semantically (Core, Join, Supporting),
|