Skip to content

fix(mcp): stop exposing slop rule weights - #4380

Merged
JSONbored merged 1 commit into
mainfrom
codex/propose-fix-for-mcp-slop-rules-vulnerability
Jul 9, 2026
Merged

fix(mcp): stop exposing slop rule weights#4380
JSONbored merged 1 commit into
mainfrom
codex/propose-fix-for-mcp-slop-rules-vulnerability

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Motivation

  • A newly added MCP resource published deterministic slop rule weights and exact band thresholds, which enables MCP-authenticated actors to reverse-engineer anti-abuse scoring and tune evasion; this change removes that information exposure.

Description

  • Remove the gittensory://slop-rules MCP resource registration from src/mcp/server.ts so the server no longer advertises or returns the slop rules payload.
  • Delete the sensitive taxonomy helper src/review/slop-rules-taxonomy.ts that serialized SLOP_WEIGHTS/ISSUE_SLOP_WEIGHTS and fixed numeric bands.
  • Remove the resource-specific unit tests that asserted the now-removed disclosure and add a discovery regression assertion to test/unit/mcp-discovery.test.ts to ensure gittensory://slop-rules is not advertised.
  • Preserve existing slop scoring tooling behavior that still returns bands/findings (but not numeric weights) and retains rate-limiting protections elsewhere.

Testing

  • Built the engine with npm --workspace @jsonbored/gittensory-engine run build, which completed successfully.
  • Ran unit tests with npx vitest run for the MCP-related suites (test/unit/mcp-discovery.test.ts, test/unit/mcp-check-slop-risk.test.ts, test/unit/mcp-issue-slop.test.ts, test/unit/mcp-finding-taxonomy.test.ts, test/unit/mcp-enrichment-analyzers.test.ts) and the affected tests passed after the engine build succeeded.
  • Type checking with npm run typecheck completed successfully.
  • Full local gate npm run test:ci failed due to external/tooling issues (network/DNS for actionlint, stale generated types detected by cf-typegen:check, and an npm audit endpoint 403), not due to the code change itself.

Codex Task

@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

@codecov

codecov Bot commented Jul 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.95%. Comparing base (c823f9c) to head (1287577).
⚠️ Report is 5 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4380      +/-   ##
==========================================
- Coverage   93.95%   93.95%   -0.01%     
==========================================
  Files         400      399       -1     
  Lines       36817    36810       -7     
  Branches    13451    13451              
==========================================
- Hits        34592    34585       -7     
  Misses       1569     1569              
  Partials      656      656              
Files with missing lines Coverage Δ
src/mcp/server.ts 95.39% <ø> (-0.02%) ⬇️
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@JSONbored JSONbored self-assigned this Jul 9, 2026
@JSONbored JSONbored added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jul 9, 2026
@JSONbored
JSONbored merged commit 6d52437 into main Jul 9, 2026
10 checks passed
@JSONbored
JSONbored deleted the codex/propose-fix-for-mcp-slop-rules-vulnerability branch July 9, 2026 06:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier.

Development

Successfully merging this pull request may close these issues.

1 participant