T09 · Insecure Skill Coding Practices
Error
- Location
SKILL.md:35- Finding
Unsandboxed Execution of User-Controlled Lean and Coq Source
- Content
View full analysis
/`), runs the prover binary with `cwd` set to that directory, captures stdout/stderr, and applies a 60-second timeout. The exact commands are: - Lean: `lean ` — may read Lean 4 stdlib and elan-managed toolchains from `~/.elan/` - Coq: `coqc ` — may read Coq stdlib and opam-managed packages from the opam switch - Z3: `z3 ` — self-contained, only reads the input file. Accepts declarative SMT-LIB2 format only. **Filesystem access:** The skill itself only writes to the temp directory. However, Lean and Coq read their installed standard libraries and search paths (managed by elan/opam) as part of normal operation. The skill does not explicitly constrain `--include` paths or environment variables. **Network access:** The skill does not make network requests. However, if Lean source contains `import` of unresolved packages, `lake` tooling could theoretically attempt a fetch — this is a Lean runtime behavior, not initiated by the skill. To prevent this, avoid `lakefile.lean` or `lake-manifest.json` in the temp directory (which the skill does not create). ``` The affected tool definitions accept source text directly: ```markdown ### lean_check Type-check Lean 4 code. **Parameters:** - `code` (string, required): Lean 4 source code - `filename` (string, optional): Source filename (default: `check.lean`) ``` ```markdown ### coq_check Check a Coq proof for correctness. **Parameters:** - `code` (string, required): Coq source code - `filename` (string, optional): Source filename (default: `check.v`) ``` ### Technical Analysis The skill documentation states that caller-supplied Lean and Coq source is written to a tem ...[truncated 3278 chars]- Remediation
View remediation
