AI Security Review
scanned 3h ago · by lpm-firewall-aiLPM treats this as warn-only first-party agent extension lifecycle risk. The package is an AI-agent hook manager with explicit commands and MCP tools that can register hooks into agent settings. This is a guarded lifecycle/control-surface risk, but source inspection did not show unconsented install-time hijack or exfiltration.
Decision evidence
public snapshot- package.json defines postinstall, but it only creates $HOME/.hasna/hooks/profiles.
- bin/index.js install commands can register hooks into ~/.claude/settings.json, ~/.gemini/settings.json, or project settings.
- bin/index.js exposes MCP tools such as hooks_install/hooks_setup that call installHook.
- hooks/hook-autoformat/src/hook.ts runs formatters via execSync including bunx prettier/biome on edited files.
- hooks/hook-knowledge-context/src/hook.ts spawns a configurable knowledge command on agent events.
- No install-time mutation of Claude/Gemini/Codewith settings found; broad agent config writes require explicit CLI/MCP action.
- Codewith writes are fragment-only by default and direct writes require --apply-codewith plus --codewith-config.
- No credential harvesting or hardcoded exfiltration endpoint found in inspected files.
- Network uses appear package-aligned or user-configured: npm registry checks, ntfy/Slack notifications, local MCP HTTP, optional Postgres storage.
- Suspicious child_process use is hook functionality triggered by installed hooks, not import-time or postinstall execution.
Source & flagged code
7 flagged · loading sourcePackage defines install-time lifecycle scripts.
package.jsonView on unpkgInstall-time lifecycle script is not statically allowlisted and needs review.
package.jsonView on unpkgManifest entrypoint contains risky behavior absent from dist/build output.
bin/index.jsView on unpkg · L52Package source invokes a package manager install command at runtime.
hooks/hook-autoformat/src/hook.tsView on unpkg · L8This package version adds a dangerous source file absent from the previous stored version; route for source-aware review.
hooks/hook-knowledge-context/src/hook.tsView on unpkg