Back to skill

Security audit

hal-vault

Security checks for vulnerabilities and agentic risk

Overview

This is a coherent local secret-vault skill, but it needs review because its instructions may expose real credentials in command transcripts and install an unpinned credential-handling binary.

Before installing, use only a trusted, pinned hal-vault release and verify the artifact if possible. Do not paste real secrets into visible shell command text; prefer the CLI's hidden prompt or a protected stdin mechanism that does not serialize the value into agent logs or command history. Use a dedicated vault-only SSH key and a per-project vault excluded from version control.

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 (2)

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:117
Finding
Plaintext secrets may be exposed through shell command text## Vulnerability Details **File Location**: `SKILL.md:117-119` and `SKILL.md:143` **Vulnerability Type**: Plaintext credential exposure in command text **Risk Level**: Medium ### Vulnerable Code At `SKILL.md:117-119`: ```sh printf '%s' 'sk-proj-abcdef1234567890' | \ hal-vault add openai -t api_key --tags openai,llm,prod -n "OpenAI production key" ``` At `SKILL.md:143`: ```sh printf '%s' 'sk-proj-newvalue9876543210' | hal-vault update openai --value ``` ### Technical Analysis Although `hal-vault` receives the credential through standard input rather than as one of its arguments, the examples first embed the complete plaintext value in the shell command. If an Agent follows this pattern with a user-provided credential, the value can be captured before it reaches the vault. Agent tool transcripts, execution telemetry, shell tracing, process auditing, command-history mechanisms, and orchestration logs may retain the submitted command text. Consequently, this pattern contradicts the Skill's stated requirement that raw secret values must never be printed into logs or other files. The affected operation does not grant additional operating-system privileges. However, it can disclose every credential stored or rotated through this command pattern to parties capable of reading execution records. ### Attack Path 1. A user supplies an API key, password, token, or other secret for storage. 2. The Agent substitutes that plaintext value into the documented `printf` command. 3. The command is submitted to a shell or execution tool. 4. The execution platform records the complete command in a transcript, telemetry stream, audit record, or shell history. 5. A user, service, or attacker with access to those records retrieves the plaintext credential. 6. The exposed credential is used against the service and privileges associated with that credential. ### Impact Assessment Exposure is limited to secrets processed usi ...[truncated 378 chars]
Remediation
## Remediation Suggestions - Do not interpolate a user-provided secret into shell command text, including quoted `printf` commands. - Prefer the CLI's hidden interactive input prompt when the execution environment supports secure terminal input. - When automation is required, use a secret-aware execution interface that supplies protected standard input without serializing the value into the visible command or transcript. - Replace realistic literal values in examples with explicit placeholders and warn implementers not to substitute secrets directly into command strings. - Disable shell tracing around secret operations and ensure execution telemetry redacts protected standard input. - Review and purge existing command transcripts or logs if real credentials may previously have been handled using this pattern.

T08 · Insecure Dependencies

Warning
Location
SKILL.md:48
Finding
Credential-handling binary is installed from mutable or unverified sources## Vulnerability Details **File Location**: `SKILL.md:48-51` **Vulnerability Type**: Unpinned and unverified third-party dependency installation **Risk Level**: Medium ### Vulnerable Code ```text If not installed: `brew install ofoxai/tap/hal-vault` (macOS/Linux, recommended), or download a release binary from https://github.com/ofoxai/hal-vault/releases, or `go install github.com/ofoxai/hal-vault/cmd/hal-vault@latest`. ``` ### Technical Analysis The Skill delegates plaintext credential processing, vault encryption, and SSH private-key use to an external `hal-vault` executable that is not included in the audited project. The installation guidance permits a third-party Homebrew tap, an unspecified release binary, or the mutable Go version selector `@latest`. No exact audited version, artifact checksum, or cryptographic signature verification is required. The behavior of the installed dependency can therefore differ from the behavior represented by the reviewed Skill documentation. This is particularly sensitive because normal operation gives the binary access to plaintext credentials through standard input and decrypted output. It also permits access to the private SSH key bound to the vault. A malicious replacement would not need to exploit an additional vulnerability to read this information. ### Attack Path 1. An attacker compromises the upstream repository, release account, Homebrew tap, publication pipeline, or maintainer credentials. 2. The attacker publishes a malicious version under the legitimate package or release name. 3. An Agent follows the Skill's installation instructions and retrieves the mutable or unverified artifact. 4. The malicious binary is invoked for normal `add`, `update`, `get --reveal`, or vault decryption operations. 5. It captures plaintext credentials or reads accessible vault key material. 6. The binary transmits the captured data or abuses the credentials using the process's network ...[truncated 716 chars]
Remediation
## Remediation Suggestions - Pin installation instructions to a specific reviewed release rather than `@latest`. - Publish official SHA-256 or stronger checksums and require verification before executing downloaded binaries. - Prefer cryptographically signed release artifacts and document signature and trusted-key verification. - Pin the Homebrew formula to a reviewed version or document the package manager's applicable integrity guarantees. - Record the expected binary version and verify it with `hal-vault version` before allowing secret operations. - Recommend dedicated vault-only SSH keys and discourage binding existing authentication keys. - Re-audit dependency updates before changing the pinned version.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep

Static analysis

No suspicious patterns detected.