T01 · Skill Instruction Hijacking
- Location
GUIDANCE.md:3- Finding
Global Agent Behavior Hijacking Through Mandatory Governance Instructions
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
ClawGuard is a disclosed governance tool, but it claims session-wide control over all write actions and persists action details with under-disclosed Redis network use.
Install only if you intentionally want a skill to gate all write-capable actions in the agent session. Avoid putting secrets or sensitive personal data in justifications, contain or remove Redis unless you explicitly need it, and require tighter scoping, risk-level validation, retention controls, and pinned dependencies before using it for real governance.
GUIDANCE.md:3Global Agent Behavior Hijacking Through Mandatory Governance Instructions
index.ts:123Malformed or Out-of-Range Risk Levels Bypass Governance Blocking
index.ts:27Redis Failures Silently Disable the Velocity Circuit Breaker
The manifest promises that risk_level >= 4 is automatically blocked, but the code handles risk_level >= 5 with a distinct NEEDS_CIVIC path instead of a straight block. This policy mismatch is dangerous because callers may rely on the documented guarantee while the code implements a different control flow that could enable bypasses, confusion, or unsafe escalation handling for the highest-risk actions.
The skill describes governance over sensitive operations like SQL, file-system, and API writes, but it does not declare an explicit tool scope such as permissions or allowed-tools. If the runtime infers broader capabilities than intended, the skill may access environment-backed functionality without clear restriction, undermining least-privilege guarantees and making the governance layer itself harder to trust.
The skill description presents a SQLite-based governance/audit layer, but the implementation also introduces Redis connectivity via environment configuration for throttling. This hidden external dependency expands the skill's capabilities and data flow beyond what users are told, which is dangerous in a governance control because availability and behavior can silently change based on external infrastructure.
Adding Redis gives the skill outbound network capability that is not necessary for a simple SQLite audit ledger and is not justified in the stated purpose. In a pre-action governance layer, undisclosed network access increases attack surface, creates an exfiltration path for action metadata, and introduces external control over authorization behavior.
The code creates a Redis client from REDIS_URL and later sends per-action velocity data derived from action_type over the network. There is logging for Redis errors, but no user-facing notice, comment, or warning that action-related metadata may be sent to Redis.
The tool logs action_type, justification, and risk_level into a local SQLite ledger without any explicit disclosure before collection. Because justifications may contain sensitive operational or user-provided content, silent persistence creates privacy and data-retention risk, especially in a governance component that may be invoked frequently and automatically.
The redis dependency uses a caret range, which permits automatic installation of newer minor/patch releases instead of a single reviewed version. In a security-sensitive governance layer that mediates SQL, file-system, and API writes, this weakens supply-chain control and makes builds less reproducible, increasing the chance of pulling an unintended or vulnerable release.
"test": "node --loader ts-node/esm tests/manual.ts"
},
"dependencies": {
"redis": "^5.11.0",
"sqlite": "^5.1.1",
"sqlite3": "^5.1.7"
},
The manifest does not pin redis to a single version, so it is not possible to verify from this file alone whether the installed release avoids the known advisory for node-redis. This uncertainty is a genuine supply-chain risk because the package could resolve to an affected version in some environments, though the cited issue appears limited in scope and may depend on monitor-mode usage.
The sqlite package is specified with a caret range rather than an exact version, so different installations may resolve to different releases. For a component responsible for authorization and audit behavior, non-reproducible dependency resolution can introduce unreviewed code changes or vulnerable transitive states into a trusted control point.
},
"dependencies": {
"redis": "^5.11.0",
"sqlite": "^5.1.1",
"sqlite3": "^5.1.7"
},
"devDependencies": {
The sqlite3 dependency is unpinned, allowing installs to float across compatible releases. Because this skill relies on SQLite for its audit ledger, an unexpected dependency change in a native database binding increases supply-chain risk and may expose the control layer to stability or security issues in a particularly sensitive path.
"dependencies": {
"redis": "^5.11.0",
"sqlite": "^5.1.1",
"sqlite3": "^5.1.7"
},
"devDependencies": {
"ts-node": "^10.9.2",
The sqlite3 dependency has known advisories, but because the manifest allows version drift, the actual installed version cannot be confirmed as safe. In this skill, sqlite3 underpins the audit ledger for a governance layer, so unresolved uncertainty around a database binding in a trusted logging/authorization path is more concerning than in a non-security-critical utility.
The ts-node devDependency is not pinned, which can make test and development execution non-reproducible. While this is less severe than runtime dependencies, unreviewed tooling changes can still affect build/test integrity and potentially mask or introduce insecure behavior during validation.
"sqlite3": "^5.1.7"
},
"devDependencies": {
"ts-node": "^10.9.2",
"typescript": "^5.4.2"
}
}
The typescript devDependency is version-ranged, allowing automatic drift in compiler behavior between environments. Inconsistent tooling can change emitted code or type-checking outcomes, reducing assurance for a security-relevant package that is expected to enforce governance decisions reliably.
},
"devDependencies": {
"ts-node": "^10.9.2",
"typescript": "^5.4.2"
}
}
No suspicious patterns detected.