T08 · Insecure Dependencies
- Location
references/proof_playbook.md:14- Finding
Untrusted Workspace Dependency Installation and Build Execution
- Content
View full analysis
Vulnerability Details
File Location:
references/proof_playbook.md:14-24; also present inSKILL.md:23-40,54
Vulnerability Type: Unsafe installation and execution of dependencies and build rules from an untrusted theorem workspace
Risk Level: HighVulnerable Code Snippet:
bash if the project has an `opam` file, install missing dependencies before proving: opam install . --deps-only Then confirm the workspace builds in its initial state: dune buildRelated commands in
SKILL.mdinclude:bash dune buildbash opam install . --deps-onlyTechnical Analysis
The skill directs the agent to install dependencies and execute a build from a downloaded OpenMath theorem workspace. It does not first require validation of the workspace's
opam,dune,dune-project,_CoqProject, package pins, dependency sources, or executable build actions.An attacker-controlled workspace can influence OPAM dependency resolution through local package metadata. OPAM packages can execute build and installation commands, while Dune configurations can define actions that execute local programs or shell commands during
dune build. Consequently, these instructions cross a trust boundary: data and configuration supplied by a downloaded project are treated as executable build input.This is primarily an insecure dependency and supply-chain issue, with an additional insecure workflow configuration component. The package itself does not contain a malicious script, but its documented workflow can cause code from an untrusted workspace or dependency source to execute without sufficient review or isolation.
Attack Path
- An attacker distributes or modifies an OpenMath theorem workspace.
- The workspace contains a crafted
opamfile, malicious package pin, unsafe dependency source, or Dune build rule. - A user invokes this skill to prove the downloaded theorem.
- Following the doc ...[truncated 1031 chars]
- Remediation
View remediation
Remediation Suggestions
- Require explicit review of
opam,dune,dune-project,_CoqProject, package pins, source URLs, and custom build actions before executing installation or build commands. - Use only approved OPAM repositories and cryptographically verified or otherwise trusted package sources.
- Pin dependencies to reviewed versions and immutable source revisions. Avoid floating branches, mutable URLs, and unreviewed local pins.
- Run dependency installation and project builds inside a disposable, least-privileged container or virtual machine.
- Disable or strictly limit outbound network access during builds after approved dependencies have been obtained.
- Do not mount SSH keys, cloud credentials, package publishing tokens, browser profiles, home directories, or other sensitive host resources into the build environment.
- Mount source files read-only where feasible and provide a dedicated output directory for generated artifacts.
- Add a mandatory trust-boundary warning before
opam installanddune build, making clear that downloaded project metadata may execute commands. - Prefer a two-stage workflow: inspect and resolve dependency metadata first, then execute the reviewed build in a fresh isolated environment.
- Require explicit review of
