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.
- package/package.json +1 -1
- package/src/ruvocal/.claude-flow/daemon-state.json +135 -0
- package/src/ruvocal/.claude-flow/data/pending-insights.jsonl +0 -25
- package/src/ruvocal/.claude-flow/data/ranked-context.json +5 -0
- package/src/ruvocal/.claude-flow/logs/daemon.log +31 -0
- package/src/ruvocal/.claude-flow/logs/headless/audit_1777949411822_juxau0_prompt.log +989 -0
- package/src/ruvocal/.claude-flow/logs/headless/audit_1777949411822_juxau0_result.log +67 -0
- package/src/ruvocal/.claude-flow/logs/headless/audit_1777950042278_jvj5xq_prompt.log +989 -0
- package/src/ruvocal/.claude-flow/logs/headless/audit_1777950042278_jvj5xq_result.log +93 -0
- package/src/ruvocal/.claude-flow/logs/headless/optimize_1777949531823_yt5yc2_prompt.log +1498 -0
- package/src/ruvocal/.claude-flow/logs/headless/optimize_1777949531823_yt5yc2_result.log +93 -0
- package/src/ruvocal/.claude-flow/logs/headless/testgaps_1777949771821_elw1j4_prompt.log +1498 -0
- package/src/ruvocal/.claude-flow/logs/headless/testgaps_1777949771821_elw1j4_result.log +100 -0
- package/src/ruvocal/.claude-flow/metrics/codebase-map.json +11 -0
- package/src/ruvocal/.claude-flow/metrics/consolidation.json +6 -0
- package/src/ruvocal/.claude-flow/sessions/current.json +13 -0
- package/src/ruvocal/.swarm/attestation.db +0 -0
- package/src/ruvocal/.swarm/hnsw.index +0 -0
- package/src/ruvocal/.swarm/hnsw.metadata.json +1 -0
- package/src/ruvocal/.swarm/memory.db +0 -0
- package/src/ruvocal/.swarm/schema.sql +305 -0
- package/src/ruvocal/src/lib/components/chat/ChatWindow.svelte +8 -8
- package/src/ruvocal/src/lib/server/mcp/clientPool.spec.ts +175 -0
- package/src/ruvocal/src/lib/server/mcp/clientPool.ts +0 -0
- package/src/ruvocal/src/lib/server/textGeneration/index.ts +1 -0
- package/src/ruvocal/src/lib/server/textGeneration/mcp/runMcpFlow.ts +10 -1
- package/src/ruvocal/src/lib/server/textGeneration/types.ts +3 -1
- package/src/ruvocal/src/routes/api/v2/user/settings/+server.ts +7 -0
- package/src/ruvocal/src/routes/conversation/[id]/+page.svelte +4 -0
- package/src/ruvocal/src/routes/conversation/[id]/+server.ts +4 -0
- package/src/ruvocal/src/routes/settings/(nav)/+server.ts +6 -0
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
[2026-05-05T03:01:38.241Z] RESULT
|
|
2
|
+
============================================================
|
|
3
|
+
{
|
|
4
|
+
"success": true,
|
|
5
|
+
"output": "# Security Vulnerability Analysis Report\n\n```json\n{\n \"vulnerabilities\": [\n {\n \"severity\": \"high\",\n \"file\": \"adminToken.js\",\n \"line\": 5,\n \"description\": \"Admin token generated as UUID fallback and stored in plaintext. Tokens are auto-generated if not configured, reducing entropy. Token reset after validation creates timing window for race conditions.\"\n },\n {\n \"severity\": \"high\",\n \"file\": \"adminToken.js\",\n \"line\": 17,\n \"description\": \"No rate limiting on token validation attempts. Attackers can brute-force the random UUID token without consequence.\"\n },\n {\n \"severity\": \"high\",\n \"file\": \"apiToken.js\",\n \"line\": 6,\n \"description\": \"API keys (OPENAI_API_KEY, HF_TOKEN) exposed directly in plaintext. If this function's output is logged, cached, or exposed via error messages, credentials are compromised.\"\n },\n {\n \"severity\": \"high\",\n \"file\": \"auth.js\",\n \"line\": 88,\n \"description\": \"OAuth tokens stored in plaintext in MongoDB. If database is compromised, all user tokens are exposed without encryption. No evidence of token encryption at rest.\"\n },\n {\n \"severity\": \"medium\",\n \"file\": \"auth.js\",\n \"line\": 43,\n \"description\": \"OPENID_CLIENT_SECRET and OPENID_CLIENT_ID stored in plaintext configuration. Should use environment-specific secure vaults.\"\n },\n {\n \"severity\": \"medium\",\n \"file\": \"auth.js\",\n \"line\": 48,\n \"description\": \"Insecure cookie configuration allowed via ALLOW_INSECURE_COOKIES flag. Permits SameSite=lax and Secure=false, vulnerable to CSRF and man-in-the-middle attacks.\"\n },\n {\n \"severity\": \"medium\",\n \"file\": \"APIClient.js\",\n \"line\": 25,\n \"description\": \"Error responses returned directly to client without sanitization. Could expose sensitive backend information, database errors, or internal paths.\"\n },\n {\n \"severity\": \"medium\",\n \"file\": \"APIClient.js\",\n \"line\": 17,\n \"description\": \"No request timeout configured. Allows slowloris and resource exhaustion attacks. Missing Content-Type validation for responses.\"\n },\n {\n \"severity\": \"medium\",\n \"file\": \"adminToken.js\",\n \"line\": 27,\n \"description\": \"Admin token displayed in console logs (logger.info). Logs may be persisted, indexed, or exposed in error tracking systems.\"\n },\n {\n \"severity\": \"low\",\n \"file\": \"PublicConfig.svelte.js\",\n \"line\": 22,\n \"description\": \"Public configuration accessible via Proxy without input validation. Ensure no secrets are included in PUBLIC_* environment variables.\"\n }\n ],\n \"riskScore\": 72,\n \"recommendations\": [\n \"CRITICAL: Implement token hashing using bcrypt/argon2. Never store plaintext API keys, OAuth tokens, or admin tokens. Hash admin tokens and store hash in database.\",\n \"CRITICAL: Move OPENID_CLIENT_SECRET and API_KEY access to server-only code. Implement secure key management (HashiCorp Vault, AWS Secrets Manager, or similar).\",\n \"CRITICAL: Enable HTTPS-only cookies: set Secure=true and SameSite=strict always. Remove ALLOW_INSECURE_COOKIES flag or restrict to development only.\",\n \"HIGH: Implement rate limiting on token validation endpoints (adminToken.checkToken). Use exponential backoff and temporary account lockouts after N failed attempts.\",\n \"HIGH: Encrypt sensitive data at rest in MongoDB using field-level encryption. Use AES-256-GCM for tokens and credentials.\",\n \"HIGH: Add CSRF token validation to all state-changing requests (POST, PATCH, DELETE). Validate Origin and Referer headers.\",\n \"MEDIUM: Sanitize error responses before sending to client. Return generic messages (e.g., 'Authentication failed') instead of specific errors ('Invalid token' or 'User not found').\",\n \"MEDIUM: Add request timeout to fetch calls: `signal: AbortSignal.timeout(10000)` in APIClient.js. Prevent resource exhaustion.\",\n \"MEDIUM: Implement Content Security Policy headers to restrict SVG execution and prevent XSS via embedded scripts in SVG icons.\",\n \"MEDIUM: Add audit logging for sensitive operations (admin logins, token refreshes). Log to immutable append-only storage (syslog, CloudWatch, etc.).\",\n \"MEDIUM: Implement automatic session timeout and invalidation for expired tokens. Don't allow indefinite token refresh cycles.\",\n \"LOW: Use HTTP-only cookies for session IDs. Prevent JavaScript access via `httpOnly: true` (already implemented, but verify it's consistent).\",\n \"LOW: Validate all OpenID configuration inputs (CLIENT_ID, PROVIDER_URL). Prevent SSRF and config injection attacks.\",\n \"LOW: Add security headers: X-Content-Type-Options: nosniff, X-Frame-Options: DENY, Strict-Transport-Security, X-XSS-Protection.\"\n ]\n}\n```\n\n## Summary\n\n**Risk Level**: HIGH (72/100)\n\nThe codebase has **critical authentication and token management vulnerabilities**:\n\n1. **Plaintext Token Storage** — Admin tokens, API keys, and OAuth tokens stored without encryption\n2. **No Rate Limiting** — Admin token validation can be brute-forced\n3. **Credentials in Config** — OpenID secrets and API keys in environment variables without secure vaults\n4. **Insecure Cookies** — Allow non-HTTPS, non-strict SameSite mode\n5. **Information Disclosure** — Error messages expose backend details\n\n**Immediate Actions Required**:\n- Hash all tokens (bcrypt/argon2)\n- Implement rate limiting on authentication endpoints\n- Use HTTPS-only, SameSite=strict cookies\n- Move secrets to secure vaults\n- Encrypt tokens in MongoDB\n",
|
|
6
|
+
"parsedOutput": {
|
|
7
|
+
"vulnerabilities": [
|
|
8
|
+
{
|
|
9
|
+
"severity": "high",
|
|
10
|
+
"file": "adminToken.js",
|
|
11
|
+
"line": 5,
|
|
12
|
+
"description": "Admin token generated as UUID fallback and stored in plaintext. Tokens are auto-generated if not configured, reducing entropy. Token reset after validation creates timing window for race conditions."
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"severity": "high",
|
|
16
|
+
"file": "adminToken.js",
|
|
17
|
+
"line": 17,
|
|
18
|
+
"description": "No rate limiting on token validation attempts. Attackers can brute-force the random UUID token without consequence."
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"severity": "high",
|
|
22
|
+
"file": "apiToken.js",
|
|
23
|
+
"line": 6,
|
|
24
|
+
"description": "API keys (OPENAI_API_KEY, HF_TOKEN) exposed directly in plaintext. If this function's output is logged, cached, or exposed via error messages, credentials are compromised."
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"severity": "high",
|
|
28
|
+
"file": "auth.js",
|
|
29
|
+
"line": 88,
|
|
30
|
+
"description": "OAuth tokens stored in plaintext in MongoDB. If database is compromised, all user tokens are exposed without encryption. No evidence of token encryption at rest."
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"severity": "medium",
|
|
34
|
+
"file": "auth.js",
|
|
35
|
+
"line": 43,
|
|
36
|
+
"description": "OPENID_CLIENT_SECRET and OPENID_CLIENT_ID stored in plaintext configuration. Should use environment-specific secure vaults."
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"severity": "medium",
|
|
40
|
+
"file": "auth.js",
|
|
41
|
+
"line": 48,
|
|
42
|
+
"description": "Insecure cookie configuration allowed via ALLOW_INSECURE_COOKIES flag. Permits SameSite=lax and Secure=false, vulnerable to CSRF and man-in-the-middle attacks."
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"severity": "medium",
|
|
46
|
+
"file": "APIClient.js",
|
|
47
|
+
"line": 25,
|
|
48
|
+
"description": "Error responses returned directly to client without sanitization. Could expose sensitive backend information, database errors, or internal paths."
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"severity": "medium",
|
|
52
|
+
"file": "APIClient.js",
|
|
53
|
+
"line": 17,
|
|
54
|
+
"description": "No request timeout configured. Allows slowloris and resource exhaustion attacks. Missing Content-Type validation for responses."
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"severity": "medium",
|
|
58
|
+
"file": "adminToken.js",
|
|
59
|
+
"line": 27,
|
|
60
|
+
"description": "Admin token displayed in console logs (logger.info). Logs may be persisted, indexed, or exposed in error tracking systems."
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"severity": "low",
|
|
64
|
+
"file": "PublicConfig.svelte.js",
|
|
65
|
+
"line": 22,
|
|
66
|
+
"description": "Public configuration accessible via Proxy without input validation. Ensure no secrets are included in PUBLIC_* environment variables."
|
|
67
|
+
}
|
|
68
|
+
],
|
|
69
|
+
"riskScore": 72,
|
|
70
|
+
"recommendations": [
|
|
71
|
+
"CRITICAL: Implement token hashing using bcrypt/argon2. Never store plaintext API keys, OAuth tokens, or admin tokens. Hash admin tokens and store hash in database.",
|
|
72
|
+
"CRITICAL: Move OPENID_CLIENT_SECRET and API_KEY access to server-only code. Implement secure key management (HashiCorp Vault, AWS Secrets Manager, or similar).",
|
|
73
|
+
"CRITICAL: Enable HTTPS-only cookies: set Secure=true and SameSite=strict always. Remove ALLOW_INSECURE_COOKIES flag or restrict to development only.",
|
|
74
|
+
"HIGH: Implement rate limiting on token validation endpoints (adminToken.checkToken). Use exponential backoff and temporary account lockouts after N failed attempts.",
|
|
75
|
+
"HIGH: Encrypt sensitive data at rest in MongoDB using field-level encryption. Use AES-256-GCM for tokens and credentials.",
|
|
76
|
+
"HIGH: Add CSRF token validation to all state-changing requests (POST, PATCH, DELETE). Validate Origin and Referer headers.",
|
|
77
|
+
"MEDIUM: Sanitize error responses before sending to client. Return generic messages (e.g., 'Authentication failed') instead of specific errors ('Invalid token' or 'User not found').",
|
|
78
|
+
"MEDIUM: Add request timeout to fetch calls: `signal: AbortSignal.timeout(10000)` in APIClient.js. Prevent resource exhaustion.",
|
|
79
|
+
"MEDIUM: Implement Content Security Policy headers to restrict SVG execution and prevent XSS via embedded scripts in SVG icons.",
|
|
80
|
+
"MEDIUM: Add audit logging for sensitive operations (admin logins, token refreshes). Log to immutable append-only storage (syslog, CloudWatch, etc.).",
|
|
81
|
+
"MEDIUM: Implement automatic session timeout and invalidation for expired tokens. Don't allow indefinite token refresh cycles.",
|
|
82
|
+
"LOW: Use HTTP-only cookies for session IDs. Prevent JavaScript access via `httpOnly: true` (already implemented, but verify it's consistent).",
|
|
83
|
+
"LOW: Validate all OpenID configuration inputs (CLIENT_ID, PROVIDER_URL). Prevent SSRF and config injection attacks.",
|
|
84
|
+
"LOW: Add security headers: X-Content-Type-Options: nosniff, X-Frame-Options: DENY, Strict-Transport-Security, X-XSS-Protection."
|
|
85
|
+
]
|
|
86
|
+
},
|
|
87
|
+
"durationMs": 55963,
|
|
88
|
+
"model": "haiku",
|
|
89
|
+
"sandboxMode": "strict",
|
|
90
|
+
"workerType": "audit",
|
|
91
|
+
"timestamp": "2026-05-05T03:01:38.241Z",
|
|
92
|
+
"executionId": "audit_1777950042278_jvj5xq"
|
|
93
|
+
}
|