T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:11
- Finding
- Downloaded Native Runtime Is Executed Without Integrity Verification<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:11-48`; `bin/sherpa-onnx-tts:143-176` **Vulnerability Type**: Unverified third-party executable dependency **Risk Level**: Medium ### Vulnerable Code The installation metadata downloads and extracts platform-specific native runtime archives and a model archive from GitHub Releases without declaring or verifying cryptographic hashes or signatures: ```json5 "install": [ { "id": "download-runtime-macos", "kind": "download", "os": ["darwin"], "url": "https://github.com/k2-fsa/sherpa-onnx/releases/download/v1.13.2/sherpa-onnx-v1.13.2-osx-universal2-shared.tar.bz2", "archive": "tar.bz2", "extract": true, "stripComponents": 1, "targetDir": "runtime", "label": "Download sherpa-onnx runtime (macOS)", }, { "id": "download-runtime-linux-x64", "kind": "download", "os": ["linux"], "url": "https://github.com/k2-fsa/sherpa-onnx/releases/download/v1.13.2/sherpa-onnx-v1.13.2-linux-x64-shared.tar.bz2", "archive": "tar.bz2", "extract": true, "stripComponents": 1, "targetDir": "runtime", "label": "Download sherpa-onnx runtime (Linux x64)", }, { "id": "download-runtime-win-x64", "kind": "download", "os": ["win32"], "url": "https://github.com/k2-fsa/sherpa-onnx/releases/download/v1.13.2/sherpa-onnx-v1.13.2-win-x64-shared-MD-Release.tar.bz2", "archive": "tar.bz2", "extract": true, "stripComponents": 1, "targetDir": "runtime", "label": "Download sherpa-onnx runtime (Windows x64)", }, { "id": "download-model-lessac", "kind": "download", "url": "https://github.com/k2-fsa/sherpa-onnx/releases/download/tts-models/vits-piper-en_US-lessac-high.tar.bz2", "archive": "tar.bz2", "extract": true, "targetDir": "models", "label": "Download Piper en_US lessac (high)", }, ], ``` The wrapper subseq ...[truncated 4477 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Publish and pin a SHA-256 or stronger digest for every supported runtime archive and for the model archive. 2. Verify the digest before extraction and fail closed if verification fails. Do not execute or retain an artifact whose digest does not match. 3. Prefer cryptographically signed release manifests. Verify signatures against a maintainer public key whose fingerprint is pinned through a separate trusted channel. 4. Keep runtime versions immutable and update the pinned URL, digest, and signature information together through reviewed changes. 5. Extract archives into a fresh, dedicated directory and reject unsafe archive entries, including absolute paths, `..` traversal, and links escaping the destination. 6. Minimize the environment supplied to the native child process. Construct an allowlist containing only variables required by the runtime rather than copying all of `process.env`. 7. Run the native runtime under a restricted, non-administrative account or sandbox where supported, limiting filesystem and network access to the model directory and requested output location. 8. Apply equivalent integrity controls to voice models because malformed model data may exercise native parser vulnerabilities. 9. Document the exact upstream project, release version, expected hashes, and verification procedure so users can independently validate installed artifacts. ]]>
