Back to skill

Security audit

Decision Gate

Security checks for vulnerabilities and agentic risk

Overview

This skill is a local decision-log helper with disclosed limitations and no hidden network behavior, but users should not treat its local hash chain as independently tamper-proof.

Install this skill only if you want a lightweight local pre-action decision log. Do not rely on the local hash chain as an immutable audit record against someone who can edit the log file; use independent signing, timestamping, or carefully reviewed third-party verification for high-stakes compliance or financial workflows. Review the separate verifier package before installing it.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
Findings (3)

T09 · Insecure Skill Coding Practices

Error
Location
decision_gate.py:75
Finding

Hash Chain Can Be Rewritten Without Detection

Content
View full analysis
dict: prev_hash = _last_hash(path) fields = {**fields, "prev_hash": prev_hash} entry_hash = hashlib.sha256(_canonical_bytes(fields)).hexdigest() record = {**fields, "entry_hash": entry_hash} path.parent.mkdir(parents=True, exist_ok=True) with path.open("a", encoding="utf-8") as f: f.write(json.dumps(record, sort_keys=True) + "\n") return record ``` The corresponding verification logic only recalculates the same unkeyed hashes: ```python def verify_chain(log_path: Optional[str] = None) -> tuple[bool, str]: path = _log_path(log_path) if not path.exists(): return True, "empty log — nothing to verify" expected_prev = GENESIS_HASH with path.open("r", encoding="utf-8") as f: for lineno, line in enumerate(f, start=1): line = line.strip() if not line: continue record = json.loads(line) entry_hash = record.pop("entry_hash", None) if record.get("prev_hash") != expected_prev: return False, f"line {lineno}: prev_hash mismatch — chain broken or reordered" recomputed = hashlib.sha256(_canonical_bytes(record)).hexdigest() if recomputed != entry_hash: return False, f"line {lineno}: entry_hash mismatch — entry was edited after being written" expected_prev = entry_hash return True, "chain intact" ``` ### Technical Analysis Each entry is protected only by an unkeyed SHA-256 digest. The digest provides integrity against accidental modification when an attacker cannot update the hash, but it does not authenticate the record or establish an immutable historical checkpoint. Anyone with write access to t ...[truncated 1526 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
decision_gate.py:58
Finding

Non-Atomic Concurrent Appends Can Break the Audit Chain

Content
View full analysis
str: if not path.exists() or path.stat().st_size == 0: return GENESIS_HASH with path.open("rb") as f: f.seek(0, os.SEEK_END) pos = f.tell() chunk = b"" while pos > 0: pos -= 1 f.seek(pos) byte = f.read(1) if byte == b"\n" and chunk: break chunk = byte + chunk last_line = chunk.decode("utf-8").strip() if not last_line: return GENESIS_HASH return json.loads(last_line)["entry_hash"] def _append(path: Path, fields: dict) -> dict: prev_hash = _last_hash(path) fields = {**fields, "prev_hash": prev_hash} entry_hash = hashlib.sha256(_canonical_bytes(fields)).hexdigest() record = {**fields, "entry_hash": entry_hash} path.parent.mkdir(parents=True, exist_ok=True) with path.open("a", encoding="utf-8") as f: f.write(json.dumps(record, sort_keys=True) + "\n") return record ``` ### Technical Analysis Reading the current chain head and appending the next record are separate operations with no thread lock, process-safe file lock, or transactional compare-and-swap check. Two processes can call `_last_hash()` before either process appends. Both then construct entries referencing the same previous hash. Although append mode may keep individual writes from overwriting existing data on some systems, it does not make the complete read-compute-append sequence atomic. The resulting records form sibling branches rather than one linear chain. When `verify_chain()` reaches the second sibling, its `prev_hash` does not equal the first sibling's `entry_hash`, so verification fails. Concurrent outcome and decision records are affected by the same `_append()` implementation. ### Att ...[truncated 1016 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Note
Location
SKILL.md:90
Finding

Documentation Recommends Installing an Unpinned External Verifier

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (2)

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill declares a very large set of generic trigger phrases such as 'audit trail', 'compliance record', and 'why did my agent do that', which can cause it to be invoked in situations far beyond high-stakes irreversible actions. In this context, unintended invocation could route ordinary conversations or workflows into logging/pre-commitment behavior, create noisy or misleading records, and increase the chance that downstream agents rely on the skill in inappropriate contexts.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The summarize docstring explicitly states the skill is local-only and that nothing about decisions leaves the machine. However, the code path used by the summarization CLI prints instructions advertising an external paid verifier and a remote URL, which contradicts the documented local-only framing of the skill's behavior and user-facing intent.

Content

No source excerpt is available for this finding.