secufusion-mcp 2.2.4 → 2.2.6

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.
@@ -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",
4
+ "version": "2.2.6",
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.4)
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.4
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.4
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.4`), the AI can automatically read your rules and project spec on the fly from the global installation.
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:
@@ -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 scope results by `tenantId`.
248
- This includes: derived query methods, `@Query` annotations, native queries, criteria queries.
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
- Read every repository file completely. For each query method:
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 `.tenantId.eq(tenantId)` (Querydsl)
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
@@ -679,7 +679,7 @@ server.tool("spec_create_intent", "Creates a structured Markdown intent file in
679
679
  })).optional().describe("Polyglot service map — lists every service involved regardless of language. This is the polyglot bridge."),
680
680
  notes: z.string().optional().describe("Any additional context, constraints, or dependencies.")
681
681
  }, async ({ work_item_id, title, business_goal, pm_owner, ticket_url, acceptance_criteria, out_of_scope, risk, services_involved, notes }) => {
682
- const inputChars = JSON.stringify(arguments).length;
682
+ const inputChars = JSON.stringify({ work_item_id, title, business_goal, pm_owner, ticket_url, acceptance_criteria, out_of_scope, risk, services_involved, notes }).length;
683
683
  const num = nextIntentNumber();
684
684
  const slug = slugify(title);
685
685
  const filename = `${num}-WI-${work_item_id}-${slug}.md`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "secufusion-mcp",
3
- "version": "2.2.4",
3
+ "version": "2.2.6",
4
4
  "type": "module",
5
5
  "description": "Project-level spec driven AI workflow tooling for SecuFusion, MCP server - developer workflow tooling with guardrails",
6
6
  "main": "mcp/dist/server.js",