secufusion-mcp 2.2.4 → 2.2.5
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.
- package/.claude-plugin/plugin.json +1 -1
- package/README.md +4 -4
- package/commands/sfn-review.md +15 -7
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "secufusion-mcp",
|
|
3
3
|
"description": "SecuFusion MSSP platform dev agent — project-level spec driven, tenant-isolation enforced, zero-trust guardrails. 5 Core Slash Commands: /sfn-init (dynamic DNA + architecture diagram + watcher), /sfn-plan (philosophy check + intent WHY + classify + plan), /sfn-code (spec-driven implementation), /sfn-review (zero-tolerance 3-tier PR gate), /sfn-explore (on-demand service graph or blast-radius analysis).",
|
|
4
|
-
"version": "2.2.
|
|
4
|
+
"version": "2.2.5",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Motivity Labs"
|
|
7
7
|
},
|
package/README.md
CHANGED
|
@@ -134,7 +134,7 @@ The AI is now **proactively context-aware** — it knows your entire architectur
|
|
|
134
134
|
|
|
135
135
|
---
|
|
136
136
|
|
|
137
|
-
## 🤖 The Autonomous AI Reviewer Engine (v2.2.
|
|
137
|
+
## 🤖 The Autonomous AI Reviewer Engine (v2.2.5)
|
|
138
138
|
|
|
139
139
|
Version 2.2.0 removes the legacy, rigid TypeScript tools (`run_pre_pr_checks`) and replaces them with a fully standalone, AI-driven markdown execution contract (`/sfn:review`).
|
|
140
140
|
|
|
@@ -159,13 +159,13 @@ npx secufusion-mcp
|
|
|
159
159
|
### Option 2 — Global install
|
|
160
160
|
|
|
161
161
|
```bash
|
|
162
|
-
npm install -g secufusion-mcp@2.2.
|
|
162
|
+
npm install -g secufusion-mcp@2.2.5
|
|
163
163
|
```
|
|
164
164
|
|
|
165
165
|
### Option 3 — Local project install
|
|
166
166
|
|
|
167
167
|
```bash
|
|
168
|
-
npm install --save-dev secufusion-mcp@2.2.
|
|
168
|
+
npm install --save-dev secufusion-mcp@2.2.5
|
|
169
169
|
```
|
|
170
170
|
|
|
171
171
|
---
|
|
@@ -731,7 +731,7 @@ Phase 4: /sfn:review → APPROVED / DISCUSS
|
|
|
731
731
|
|
|
732
732
|
As of version **1.0.13+**, `secufusion-mcp` globally bundles both `.secufusion-project-spec.json` and `AGENTS.md`. You **no longer need to copy these files** into every single repository!
|
|
733
733
|
|
|
734
|
-
When you install globally (`npm install -g secufusion-mcp@2.2.
|
|
734
|
+
When you install globally (`npm install -g secufusion-mcp@2.2.5`), the AI can automatically read your rules and project spec on the fly from the global installation.
|
|
735
735
|
|
|
736
736
|
**How to load the Rules in a new project:**
|
|
737
737
|
Depending on your AI client's capabilities, you can load the rules instantly by telling the AI:
|
package/commands/sfn-review.md
CHANGED
|
@@ -244,23 +244,31 @@ PASS 0E — MIGRATION: {filename} — conventions correct
|
|
|
244
244
|
|
|
245
245
|
**Trigger: any Java `*Repository.java` file in scope, OR any TypeScript file with DB access**
|
|
246
246
|
|
|
247
|
-
Every query method in a multi-tenant Repository MUST
|
|
248
|
-
|
|
247
|
+
Every query method in a multi-tenant Repository MUST strictly enforce query-level tenant scoping.
|
|
248
|
+
The tenant predicate MUST sit in the query, not just the method name.
|
|
249
249
|
|
|
250
|
-
|
|
250
|
+
**Compliance Rules:**
|
|
251
|
+
1. **@Query Methods:** MUST have a tenantId parameter (`@Param("tenantId")`) AND the query body MUST use it (e.g. `fk_tenant_id = :tenantId` for native, or `x.tenantId = :tenantId` for JPQL). Do not trust the method name! A method called `findByTenantId` with a `@Query` lacking the predicate is NON-COMPLIANT.
|
|
252
|
+
2. **Derived Methods:** The name MUST contain `TenantId` (e.g. `findByPkDeviceUserIdAndTenantId`).
|
|
253
|
+
3. **No Tenant Column:** If the table lacks a tenant column, the query MUST scope through the parent (e.g. `g.tenantId`).
|
|
254
|
+
4. **AI Repositories:** The shared base class takes `tenantId` in every signature.
|
|
255
|
+
5. **Controllers/Services:** The tenant MUST come from the token (`tenantContext.getActingTenantId()`), NEVER the request body or URL.
|
|
256
|
+
6. **Cross-Tenant Lookups:** MUST return `ResourceNotFoundException` (404), NEVER 403, to avoid revealing existence.
|
|
257
|
+
|
|
258
|
+
Read every repository file completely. For each query method that violates the above:
|
|
251
259
|
|
|
252
260
|
```
|
|
253
|
-
FINDING 1A — TENANT: Missing tenant scope
|
|
261
|
+
FINDING 1A — TENANT: Missing query-level tenant scope
|
|
254
262
|
File: {file}:{line}
|
|
255
263
|
Method: {methodName}
|
|
256
264
|
Found: {what it queries on}
|
|
257
|
-
Missing: tenantId / tenant_id filter
|
|
258
|
-
Fix: Add `AND t.tenantId = :tenantId` (JPQL) or
|
|
265
|
+
Missing: tenantId / tenant_id filter in the actual query body
|
|
266
|
+
Fix: Add `AND t.tenantId = :tenantId` (JPQL) or similar, and pass tenantId from token.
|
|
259
267
|
Severity: BLOCKER
|
|
260
268
|
```
|
|
261
269
|
|
|
262
270
|
Also check: is `tenantId` passed as a parameter, or taken from a ThreadLocal/SecurityContext?
|
|
263
|
-
If from ThreadLocal — verify the ThreadLocal is populated before this method is called.
|
|
271
|
+
If from ThreadLocal — verify the ThreadLocal is populated from the JWT token before this method is called.
|
|
264
272
|
|
|
265
273
|
**Suppression handling:**
|
|
266
274
|
If a method has `@TenantScopeException("reason")` in the 5 lines above it, the missing
|
package/package.json
CHANGED