T03 · Remote Payload Retrieval and Execution
Error
- Location
- SKILL.md:71
- Finding
- Unpinned Remote Repository Code Is Retrieved and Executed## Vulnerability Details **File Location**: `SKILL.md`, lines 71–73, 80–91, and 102–108 **Vulnerability Type**: Unverified remote payload retrieval and execution **Risk Level**: High ### Vulnerable Code ```markdown The full project lives in the GitHub repository: `https://github.com/qweadzchn/DiagForge` ``` ```markdown ## Recommended workflow 1. Clone the GitHub repository locally. 2. Read the cold-start entry documents. 3. Run the canonical smoke test before doing open-ended drawing work. 4. Only then move on to real jobs or system improvements. ## Clone the repository ```bash git clone git@github.com:qweadzchn/DiagForge.git cd DiagForge ``` ``` ```markdown ## Canonical smoke test From the repo root: ```powershell python Setup\prepare_smoke_test.py --config Setup\examples\smoke-test-inputpng-1.json python Setup\run_draw_job.py --config Setup\examples\smoke-test-inputpng-1.json python Setup\execute_drawdsl.py --config Setup\examples\smoke-test-inputpng-1.json --round 1 --save-final ``` ``` ### Technical Analysis The skill directs an agent to clone an external Git repository and execute Python scripts from it. The clone operation does not pin an immutable commit hash, and the instructions do not require signature, checksum, or provenance verification before execution. Consequently, the effective executable payload is the repository's default-branch content at the time the instructions are followed, rather than code contained in and reviewed with this skill package. The repository owner—or an attacker who compromises the repository or its account—could modify the referenced scripts after the skill has been audited. The skill metadata also declares `VISIO_BRIDGE_TOKEN` as a required environment variable at `SKILL.md:13`. The audited package does not read or transmit this token itself, but remotely sourced scripts may inherit it if it is exposed in their execution environment. ### Attack Path 1. An agent loads the bootstrap skill and follows its rec ...[truncated 1219 chars]
- Remediation
- ## Remediation Suggestions 1. Pin the repository checkout to a reviewed, immutable full commit hash. 2. Use cryptographically signed tags or releases and verify their signatures before execution. 3. If release archives are used, publish trusted SHA-256 checksums and require checksum verification. 4. Vendor the required smoke-test scripts into the reviewed skill package when licensing and maintenance constraints permit. 5. Require source review of the resolved revision before running any script. 6. Execute the scripts in a sandbox or isolated virtual machine with minimal filesystem and network access. 7. Remove unrelated credentials and secrets from the subprocess environment. 8. Provide `VISIO_BRIDGE_TOKEN` only to the verified operation that requires it, and constrain the token to the minimum necessary permissions. 9. Document the expected repository owner, immutable revision, verification procedure, and failure behavior. 10. Abort execution if commit, signature, or checksum verification fails.
