T03 · Remote Payload Retrieval and Execution
- Location
SKILL.md:35- Finding
Unpinned Third-Party Code Retrieval and Execution
- Content
View full analysis
- Remediation
View remediation
``` 2. Verify the selected revision before running any Python code. Prefer a signed commit or signed tag and enforce signature verification against an explicitly trusted maintainer key. 3. Where feasible, vendor the minimal required scripts into the skill package after security review. This keeps the executable payload within the audited artifact. 4. Record and validate a cryptographic checksum for every externally retrieved executable script or release artifact. 5. Replace unconstrained package installation with a reviewed lock file containing exact versions and hashes, for example: ```bash python -m pip install --require-hashes -r requirements.lock ``` 6. Explicitly configure trusted package indexes and prevent fallback to unexpected indexes or untrusted mirrors. 7. Before running the update script, fetch the expected revision, verify its commit identity and signature, inspect that the working tree is clean, and only then execute the script. 8. Run repository-provided scripts in a restricted environment with minimal filesystem access, no unnecessary credentials, and constrained network access. Do not run them as root. 9. Fail closed if repository, signature, commit, checksum, or dependency verification does not succeed. ]]>
