@rigour-labs/mcp 5.0.0 → 5.0.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.
@@ -27,7 +27,7 @@ export async function handleHooksCheck(cwd, files, timeout, text, agent) {
27
27
  block_on_detection: true,
28
28
  audit_log: true,
29
29
  });
30
- // Log to audit trail
30
+ // Log to audit trail (with rotation to prevent unbounded growth)
31
31
  if (result.status !== 'clean') {
32
32
  try {
33
33
  const rigourDir = path.join(cwd, '.rigour');
@@ -37,6 +37,15 @@ export async function handleHooksCheck(cwd, files, timeout, text, agent) {
37
37
  agent: agent ?? 'mcp',
38
38
  });
39
39
  await fs.appendFile(eventsPath, JSON.stringify(auditEntry) + '\n');
40
+ // Rotate: only check when file exceeds ~500KB
41
+ const stat = await fs.stat(eventsPath);
42
+ if (stat.size >= 512 * 1024) {
43
+ const content = await fs.readFile(eventsPath, 'utf-8');
44
+ const lines = content.trim().split('\n');
45
+ if (lines.length > 2000) {
46
+ await fs.writeFile(eventsPath, lines.slice(-2000).join('\n') + '\n');
47
+ }
48
+ }
40
49
  }
41
50
  catch {
42
51
  // Silent
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rigour-labs/mcp",
3
- "version": "5.0.0",
3
+ "version": "5.0.1",
4
4
  "description": "MCP server for AI code governance — OWASP LLM Top 10 (10/10), real-time hooks, 25+ security patterns, hallucinated import detection, multi-agent governance. Works with Claude, Cursor, Cline, Windsurf, Gemini. Industry presets for HIPAA, SOC2, FedRAMP.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://rigour.run",
@@ -48,7 +48,7 @@
48
48
  "execa": "^8.0.1",
49
49
  "fs-extra": "^11.2.0",
50
50
  "yaml": "^2.8.2",
51
- "@rigour-labs/core": "5.0.0"
51
+ "@rigour-labs/core": "5.0.1"
52
52
  },
53
53
  "devDependencies": {
54
54
  "@types/node": "^25.0.3",