Skip to content

Commit f1005f4

Browse files
authored
Merge pull request #205 from bricecain/fix-audit-findings
fix: remediate npm audit findings in agent dependencies
2 parents 853fcb0 + 9de7e3b commit f1005f4

2 files changed

Lines changed: 84 additions & 1 deletion

File tree

agent/SECURITY_AUDIT.md

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
# Security Audit Findings - Agent Dependencies
2+
3+
This document outlines the npm security audit findings identified in the Smasage agent dependencies and the remediation steps taken.
4+
5+
## Audit Findings Summary
6+
7+
The following npm audit findings were identified and remediated:
8+
9+
### 1. ws (Issue #189)
10+
- **Package**: ws (WebSocket library)
11+
- **Severity**: Moderate
12+
- **Status**: Fixed
13+
- **Previous version**: ^8.14.2
14+
- **Current version**: ^8.19.0
15+
- **Remediation**: Updated to version 8.19.0 which includes security patches for known vulnerabilities
16+
17+
### 2. protobufjs (Issue #186)
18+
- **Package**: protobufjs (Protocol Buffer serialization)
19+
- **Severity**: Critical (transitive dependency via openclaw)
20+
- **Status**: Pinned to secure version
21+
- **Current version**: ^7.5.4
22+
- **Remediation**: Pinned via package.json overrides to ensure stable, patched version
23+
24+
### 3. axios (Issue #187)
25+
- **Package**: axios (HTTP client library)
26+
- **Severity**: Moderate (transitive dependency via openclaw)
27+
- **Status**: Pinned to secure version
28+
- **Current version**: ^1.13.6
29+
- **Remediation**: Pinned via package.json overrides to maintain secure version
30+
31+
### 4. hono (Issue #188)
32+
- **Package**: hono (Web framework)
33+
- **Severity**: Low (transitive dependency via openclaw)
34+
- **Status**: Pinned to secure version
35+
- **Current version**: ^4.12.7
36+
- **Remediation**: Pinned via package.json overrides to prevent downgrade to vulnerable versions
37+
38+
## Remediation Details
39+
40+
### Direct Dependencies
41+
- **ws**: Updated from ^8.14.2 to ^8.19.0 in package.json
42+
43+
### Transitive Dependencies (via openclaw)
44+
Protobufjs, axios, and hono are transitive dependencies introduced through the openclaw package. To ensure these remain at secure versions despite potential changes in openclaw's dependencies, we've added npm package.json overrides:
45+
46+
```json
47+
"overrides": {
48+
"protobufjs": "^7.5.4",
49+
"axios": "^1.13.6",
50+
"hono": "^4.12.7"
51+
}
52+
```
53+
54+
This ensures that npm will enforce these minimum versions and prevent installation of vulnerable versions even if openclaw or other packages specify older versions.
55+
56+
## Verification
57+
58+
Run the following command to verify that npm audit shows no vulnerabilities:
59+
60+
```bash
61+
cd agent
62+
npm audit
63+
```
64+
65+
Expected output: "up to date, audit ok" or similar with 0 vulnerabilities.
66+
67+
## Future Maintenance
68+
69+
1. Run `npm audit` regularly to identify new vulnerabilities
70+
2. Update pinned versions in overrides section when security patches are released
71+
3. Monitor npm security advisories for these packages
72+
4. Consider upgrading openclaw periodically to benefit from upstream security improvements
73+
74+
## Notes
75+
76+
- The acceptance criteria for all related issues have been met: audit findings are documented and versions are pinned to patched releases
77+
- CI/DevOps configuration continues to prevent masking of failures
78+
- Documentation clearly outlines the remediation approach for future maintainers

agent/package.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,18 @@
1414
"dependencies": {
1515
"openclaw": "^2026.3.13",
1616
"dotenv": "^16.4.5",
17-
"ws": "^8.14.2"
17+
"ws": "^8.19.0"
1818
},
1919
"devDependencies": {
2020
"@stellar/stellar-sdk": "^11.2.0",
2121
"@types/ws": "^8.5.8",
2222
"@types/node": "^20.0.0",
2323
"typescript": "^5.0.0",
2424
"ts-node": "^10.9.0"
25+
},
26+
"overrides": {
27+
"protobufjs": "^7.5.4",
28+
"axios": "^1.13.6",
29+
"hono": "^4.12.7"
2530
}
2631
}

0 commit comments

Comments
 (0)