Scan Report
20 /100
context-monitor
Hook that monitors context usage and auto-compresses old session memories when usage exceeds threshold
A legitimate context management hook that compresses old session memories, with minor documentation gaps around shell execution disclosure.
Safe to install
Add explicit declaration of git subprocess usage in SKILL.md frontmatter and ensure skill name consistency across files.
Findings 3 items
| Severity | Finding | Location |
|---|---|---|
| Medium | Undeclared shell execution via execSync Doc Mismatch | handler.ts:130 |
| Low | Inconsistent skill naming across files Doc Mismatch | SKILL.md:2 |
| Low | Hardcoded remote model reference Doc Mismatch | handler.ts:25 |
| Resource | Declared | Inferred | Status | Evidence |
|---|---|---|---|---|
| Filesystem | NONE | WRITE | ✓ Aligned | handler.ts:119 - fs.writeFileSync |
| Filesystem | NONE | READ | ✓ Aligned | handler.ts:98 - fs.readFileSync |
| Shell | NONE | WRITE | ✓ Aligned | handler.ts:130-132 - execSync git commands |
| Environment | NONE | READ | ✓ Aligned | handler.ts:43 - process.env.HOME |
| Network | NONE | NONE | — | N/A - no network access |
| Clipboard | NONE | NONE | — | N/A |
| Browser | NONE | NONE | — | N/A |
| Database | NONE | NONE | — | N/A |
| Skill Invoke | NONE | NONE | — | N/A |
File Tree
4 files · 11.3 KB · 362 lines TypeScript 1f · 188L
Markdown 2f · 155L
JSON 1f · 19L
├─
handler.ts
TypeScript
├─
HOOK.md
Markdown
├─
package.json
JSON
└─
SKILL.md
Markdown
Dependencies 2 items
| Package | Version | Source | Known Vulns | Notes |
|---|---|---|---|---|
node (system) | N/A | system binary | No | Required runtime, declared in _meta.json |
git (system) | N/A | system binary | No | Required for commit operations, declared in _meta.json |
Security Positives
✓ No credential theft - does not iterate os.environ or access ~/.ssh, ~/.aws, .env files
✓ No network exfiltration - makes no outbound HTTP requests or data POSTs
✓ No obfuscation - code is readable TypeScript with clear logic flow
✓ Git operations are scoped to workspaceDir only, limiting blast radius
✓ execSync uses stdio:'pipe' to prevent command injection via user-controlled paths
✓ Filesystem writes are limited to MEMORY.md in the workspace, not system paths
✓ No reverse shell, C2, or reverse engineering indicators detected
✓ Legitimate use case: context management is a valid hook functionality