Back to skill

Security audit

horus

Security checks for vulnerabilities and agentic risk

Overview

This is a documentation-only protocol/reference implementation package with real implementation-quality cautions but no hidden execution, persistence, credential use, or exfiltration behavior in the artifact.

Installing this skill is reasonable if you treat it as experimental documentation. Do not copy the reference Python into production without replacing assert-based validation, recording predicate evaluation failures, adding privacy controls for exports, and reconciling the checksum/determinism claims with the actual export behavior.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (2)

T09 · Insecure Skill Coding Practices

Warning
Location
skills.md:237
Finding

Security-Relevant Input Validation Uses Removable Python Assertions

Content
View full analysis
0, "Coordinates cannot be empty" assert 0 <= confidence <= 1, f"Confidence must be in [0,1], got {confidence}" assert observer_id, "Observer ID required" ``` Additional security-relevant checks use the same unsafe pattern: ```python # skills.md:338-340 assert state_hash in self.state_ledger, f"State {state_hash} not found" assert constraint_id in self.constraint_registry, f"Constraint {constraint_id} not found" assert 0 <= severity <= 1, f"Severity must be in [0,1], got {severity}" ``` ```python # skills.md:389-405 assert state_hash in self.state_ledger, f"State {state_hash} not found" state = self.state_ledger[state_hash] coords = state.coordinates assert all(0 <= d < len(coords) for d in target_dims), \ f"Invalid target dimensions {target_dims} for {len(coords)}D state" if projection_type == "orthogonal": projected = [coords[i] for i in target_dims] else: raise ValueError(f"Unknown projection type: {projection_type}") assert self._estimate_entropy(projected) <= self._estimate_entropy(coords), \ "Entropy increased during projection!" ``` ### Technical Analysis Python assertions are debugging constructs, not reliable runtime validation. Running the interpreter with optimization enabled, such as `python -O`, removes all `assert` statements. Consequently, the documented implementation may accept empty coordinate arrays, invalid confidence or severity values, and empty observer identifiers. Checks that references exist and projection dimensions are valid are also removed. This conflicts with the document's characterization of the implementation as production-ready. The same design is duplicated in the whitepap ...[truncated 1255 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
skills.md:482
Finding

Constraint Predicate Exceptions Cause Silent Fail-Open Validation

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (10)

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The specification promises integrity protection and complete export, but the implementation only serializes JSON bytes and omits both a checksum and the actual executable predicates for constraints. Consumers may falsely trust exported traces as complete and tamper-evident, enabling audit bypass, integrity confusion, and unsafe reliance on incomplete forensic data in distributed or multi-node settings.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
85% confidence
Finding

The canonical data structures define ORTHOGONAL, STEREOGRAPHIC, and PROBABILISTIC projection types, but the implementation accepts only orthogonal and raises an error otherwise. Because the file presents this as a reference implementation for the spec and later defines completeness as implementing all operations, the documentation overstates implementation parity with the formal protocol.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The specification states as a postcondition for REGISTER_STATE that there is 'No global state mutation', but the reference implementation stores the observation in self.state_ledger and then calls _check_violations, which can append to self.violation_log. This is an active contradiction between the documented operation semantics and the implemented behavior, not merely omitted detail.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The document says declared constraints are added to a registry and 'do NOT enforce globally' with 'No enforcement cascade', implying constraints are passive data until explicitly validated. In the implementation, register_state immediately invokes _check_violations, which iterates all registered constraints and evaluates them against each new observation, creating violation records automatically.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

EXPORT_TRACE is defined to serialize the complete system state, including observations, constraints, violations, observer IDs, and metadata, but the operation description does not prominently warn that invoking it may expose sensitive data. In the context of a distributed AI coordination protocol, this increases the risk of accidental data exfiltration, privacy leakage, and overbroad sharing of audit artifacts across nodes or operators.

Content

No source excerpt is available for this finding.

Ae4

Medium
Category
analysis-evasion
Confidence
80% confidence
Finding

Suspicious Unicode normalization or mixed-script content

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The export_trace docstring states the output is deterministic, but the implementation injects datetime.utcnow().isoformat() into the serialized data. That means two calls over identical internal state will produce different bytes, directly contradicting the documented intent.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The export_trace routine serializes the complete ledger, constraints, violations, observer identifiers, timestamps, and arbitrary metadata, but the documentation does not warn that this may contain sensitive or identifying data. In a real deployment, users may export and share audit traces assuming they are harmless, leading to confidentiality leakage of operational telemetry or embedded secrets in metadata.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

The register_state docstring lists a postcondition of No global state mutation, yet the method writes to self.state_ledger and increments self.stats['total_observations']. For this object, those are state mutations, so the documentation contradicts the actual behavior.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

The documented automated tool invocation specifies both an input directory and an output directory for generated code, implying file-system writes as part of the migration process. The markdown presents this as a ready-to-run command without a caution about reviewing the destination path or the effects on existing files.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.