ruflo 3.6.27 → 3.6.29

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.
Files changed (31) hide show
  1. package/package.json +1 -1
  2. package/src/ruvocal/.claude-flow/daemon-state.json +135 -0
  3. package/src/ruvocal/.claude-flow/data/pending-insights.jsonl +0 -25
  4. package/src/ruvocal/.claude-flow/data/ranked-context.json +5 -0
  5. package/src/ruvocal/.claude-flow/logs/daemon.log +31 -0
  6. package/src/ruvocal/.claude-flow/logs/headless/audit_1777949411822_juxau0_prompt.log +989 -0
  7. package/src/ruvocal/.claude-flow/logs/headless/audit_1777949411822_juxau0_result.log +67 -0
  8. package/src/ruvocal/.claude-flow/logs/headless/audit_1777950042278_jvj5xq_prompt.log +989 -0
  9. package/src/ruvocal/.claude-flow/logs/headless/audit_1777950042278_jvj5xq_result.log +93 -0
  10. package/src/ruvocal/.claude-flow/logs/headless/optimize_1777949531823_yt5yc2_prompt.log +1498 -0
  11. package/src/ruvocal/.claude-flow/logs/headless/optimize_1777949531823_yt5yc2_result.log +93 -0
  12. package/src/ruvocal/.claude-flow/logs/headless/testgaps_1777949771821_elw1j4_prompt.log +1498 -0
  13. package/src/ruvocal/.claude-flow/logs/headless/testgaps_1777949771821_elw1j4_result.log +100 -0
  14. package/src/ruvocal/.claude-flow/metrics/codebase-map.json +11 -0
  15. package/src/ruvocal/.claude-flow/metrics/consolidation.json +6 -0
  16. package/src/ruvocal/.claude-flow/sessions/current.json +13 -0
  17. package/src/ruvocal/.swarm/attestation.db +0 -0
  18. package/src/ruvocal/.swarm/hnsw.index +0 -0
  19. package/src/ruvocal/.swarm/hnsw.metadata.json +1 -0
  20. package/src/ruvocal/.swarm/memory.db +0 -0
  21. package/src/ruvocal/.swarm/schema.sql +305 -0
  22. package/src/ruvocal/src/lib/components/chat/ChatWindow.svelte +8 -8
  23. package/src/ruvocal/src/lib/server/mcp/clientPool.spec.ts +175 -0
  24. package/src/ruvocal/src/lib/server/mcp/clientPool.ts +0 -0
  25. package/src/ruvocal/src/lib/server/textGeneration/index.ts +1 -0
  26. package/src/ruvocal/src/lib/server/textGeneration/mcp/runMcpFlow.ts +10 -1
  27. package/src/ruvocal/src/lib/server/textGeneration/types.ts +3 -1
  28. package/src/ruvocal/src/routes/api/v2/user/settings/+server.ts +7 -0
  29. package/src/ruvocal/src/routes/conversation/[id]/+page.svelte +4 -0
  30. package/src/ruvocal/src/routes/conversation/[id]/+server.ts +4 -0
  31. package/src/ruvocal/src/routes/settings/(nav)/+server.ts +6 -0
@@ -0,0 +1,67 @@
1
+ [2026-05-05T02:50:42.274Z] RESULT
2
+ ============================================================
3
+ {
4
+ "success": true,
5
+ "output": "```json\n{\n \"vulnerabilities\": [\n {\n \"severity\": \"medium\",\n \"file\": \".svelte-kit/adapter-node/chunks/adminToken.js\",\n \"line\": 33,\n \"description\": \"Admin token exposed in console logs. The token is printed to stdout via logger.info() when displayToken() is called, making it visible in server logs and potentially exposed to log aggregation services or anyone with access to server logs.\"\n },\n {\n \"severity\": \"medium\",\n \"file\": \".svelte-kit/adapter-node/chunks/adminToken.js\",\n \"line\": 23,\n \"description\": \"Timing attack vulnerability in token comparison. Uses simple === string comparison instead of constant-time comparison. An attacker could measure response times to guess the token byte-by-byte.\"\n },\n {\n \"severity\": \"medium\",\n \"file\": \".svelte-kit/adapter-node/chunks/auth.js\",\n \"line\": 26,\n \"description\": \"Unsafe JSON5 parsing of OIDC configuration. Uses JSON5.parse() which allows comments, trailing commas, and other non-standard JSON. If OPENID_CONFIG comes from user input or untrusted sources, could lead to unexpected behavior.\"\n },\n {\n \"severity\": \"low\",\n \"file\": \".svelte-kit/adapter-node/chunks/APIClient.js\",\n \"line\": 7,\n \"description\": \"No URL validation before URL construction. The url parameter is passed directly to 'new URL()' without validation. Malformed URLs could throw uncaught exceptions. Consider validating URLs before use.\"\n },\n {\n \"severity\": \"low\",\n \"file\": \".svelte-kit/adapter-node/chunks/auth.js\",\n \"line\": 50,\n \"description\": \"CLIENT_SECRET may be logged during configuration parsing. If Zod validation errors occur, the CLIENT_SECRET could potentially be included in error messages.\"\n },\n {\n \"severity\": \"low\",\n \"file\": \".svelte-kit/adapter-node/chunks/auth.js\",\n \"line\": 61,\n \"description\": \"Session cookie secure flag depends on ALLOW_INSECURE_COOKIES config. While there's a default to true, if config is misconfigured, cookies could be transmitted over HTTP.\"\n }\n ],\n \"riskScore\": 42,\n \"recommendations\": [\n \"Use crypto.timingSafeEqual() for token comparison in adminTokenManager.js to prevent timing attacks\",\n \"Remove token logging from console output. If needed for debugging, ensure logs don't persist or are properly rotated/secured\",\n \"Validate URLs in APIClient.js before passing to new URL() constructor. Use URL.canParse() (available in Node 18.17+) or wrap in try-catch\",\n \"Use standard JSON.parse() instead of JSON5.parse() for OIDC config, or validate the parsed config against a strict schema\",\n \"Ensure OPENID_CONFIG is loaded from secure sources (environment variables or secure config files) and never from user input\",\n \"Add sensitive field redaction in logging to prevent CLIENT_SECRET exposure in error logs\",\n \"Audit and enforce that ALLOW_INSECURE_COOKIES is never 'true' in production. Consider removing this option entirely\",\n \"Implement rate limiting on token validation endpoints to prevent brute force attacks on admin tokens\",\n \"Add security headers (CSP, X-Frame-Options) to prevent XSS and clickjacking\",\n \"Review OIDC token validation logic (file truncated) - ensure ID tokens are properly validated including signature verification\",\n \"Use secure random generation for all tokens (already using uuid v4, which is good)\",\n \"Ensure MongoDB queries use parameterized queries/object notation (appears to be done correctly, but audit NoSQL injection prevention)\"\n ]\n}\n```\n\n## Summary\n\nThe codebase has a **moderate security risk score of 42/100**. The primary concerns are:\n\n1. **Admin Token Security** — Token is logged in plaintext and uses non-constant-time comparison\n2. **Configuration Parsing** — OIDC config uses JSON5 which could allow injection if misconfigured \n3. **Input Handling** — URLs and API inputs lack explicit validation\n\nThe code generally follows security best practices (secure cookies, env-based secrets, Zod validation) but has gaps in token handling and input validation. Most issues can be fixed with targeted improvements to the token management and validation logic.\n",
6
+ "parsedOutput": {
7
+ "vulnerabilities": [
8
+ {
9
+ "severity": "medium",
10
+ "file": ".svelte-kit/adapter-node/chunks/adminToken.js",
11
+ "line": 33,
12
+ "description": "Admin token exposed in console logs. The token is printed to stdout via logger.info() when displayToken() is called, making it visible in server logs and potentially exposed to log aggregation services or anyone with access to server logs."
13
+ },
14
+ {
15
+ "severity": "medium",
16
+ "file": ".svelte-kit/adapter-node/chunks/adminToken.js",
17
+ "line": 23,
18
+ "description": "Timing attack vulnerability in token comparison. Uses simple === string comparison instead of constant-time comparison. An attacker could measure response times to guess the token byte-by-byte."
19
+ },
20
+ {
21
+ "severity": "medium",
22
+ "file": ".svelte-kit/adapter-node/chunks/auth.js",
23
+ "line": 26,
24
+ "description": "Unsafe JSON5 parsing of OIDC configuration. Uses JSON5.parse() which allows comments, trailing commas, and other non-standard JSON. If OPENID_CONFIG comes from user input or untrusted sources, could lead to unexpected behavior."
25
+ },
26
+ {
27
+ "severity": "low",
28
+ "file": ".svelte-kit/adapter-node/chunks/APIClient.js",
29
+ "line": 7,
30
+ "description": "No URL validation before URL construction. The url parameter is passed directly to 'new URL()' without validation. Malformed URLs could throw uncaught exceptions. Consider validating URLs before use."
31
+ },
32
+ {
33
+ "severity": "low",
34
+ "file": ".svelte-kit/adapter-node/chunks/auth.js",
35
+ "line": 50,
36
+ "description": "CLIENT_SECRET may be logged during configuration parsing. If Zod validation errors occur, the CLIENT_SECRET could potentially be included in error messages."
37
+ },
38
+ {
39
+ "severity": "low",
40
+ "file": ".svelte-kit/adapter-node/chunks/auth.js",
41
+ "line": 61,
42
+ "description": "Session cookie secure flag depends on ALLOW_INSECURE_COOKIES config. While there's a default to true, if config is misconfigured, cookies could be transmitted over HTTP."
43
+ }
44
+ ],
45
+ "riskScore": 42,
46
+ "recommendations": [
47
+ "Use crypto.timingSafeEqual() for token comparison in adminTokenManager.js to prevent timing attacks",
48
+ "Remove token logging from console output. If needed for debugging, ensure logs don't persist or are properly rotated/secured",
49
+ "Validate URLs in APIClient.js before passing to new URL() constructor. Use URL.canParse() (available in Node 18.17+) or wrap in try-catch",
50
+ "Use standard JSON.parse() instead of JSON5.parse() for OIDC config, or validate the parsed config against a strict schema",
51
+ "Ensure OPENID_CONFIG is loaded from secure sources (environment variables or secure config files) and never from user input",
52
+ "Add sensitive field redaction in logging to prevent CLIENT_SECRET exposure in error logs",
53
+ "Audit and enforce that ALLOW_INSECURE_COOKIES is never 'true' in production. Consider removing this option entirely",
54
+ "Implement rate limiting on token validation endpoints to prevent brute force attacks on admin tokens",
55
+ "Add security headers (CSP, X-Frame-Options) to prevent XSS and clickjacking",
56
+ "Review OIDC token validation logic (file truncated) - ensure ID tokens are properly validated including signature verification",
57
+ "Use secure random generation for all tokens (already using uuid v4, which is good)",
58
+ "Ensure MongoDB queries use parameterized queries/object notation (appears to be done correctly, but audit NoSQL injection prevention)"
59
+ ]
60
+ },
61
+ "durationMs": 30452,
62
+ "model": "haiku",
63
+ "sandboxMode": "strict",
64
+ "workerType": "audit",
65
+ "timestamp": "2026-05-05T02:50:42.274Z",
66
+ "executionId": "audit_1777949411822_juxau0"
67
+ }