T03 · Remote Payload Retrieval and Execution
- Location
SKILL.md:10- Finding
Unpinned Remote Code Retrieval and Installation
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 10–14
Vulnerability Type: Remote payload retrieval and execution
Risk Level: MediumVulnerable Code
text All commands run as `ibkr <command>`. If `ibkr` is not on PATH, install it (requires Python 3.11+ and [uv](https://github.com/astral-sh/uv)): git clone https://github.com/baileywickham/ibkr cd ibkr && uv tool install --editable .Technical Analysis
The installation instructions clone executable source code from a remote Git repository and install it from the repository's mutable default branch. No immutable commit hash, signed release, checksum, or other integrity verification is specified.
Consequently, the code installed by a user or Agent may differ from the code that was originally reviewed. The editable installation also directly links the installed tool to the cloned working tree. Python package installation can invoke package build and installation logic, while subsequent use of the resulting
ibkrcommand executes code obtained from the remote repository.Although this resembles an insecure dependency practice, the principal risk is best classified as remote payload retrieval and execution because the effective executable payload can change after the Skill itself has been audited.
Attack Path
- An attacker compromises the referenced repository, a maintainer account, or the repository's default branch.
- The attacker adds malicious Python source code or package build/install logic.
- A user or Agent follows the instructions and runs
git clonewithout selecting a reviewed immutable revision. - The user runs
uv tool install --editable ., causing the unverified package to be installed and potentially invoking attacker-controlled installation logic. - Installation or later invocation of
ibkrexecutes the malicious code with the privileges of the local user. - In a brokerage workstat ...[truncated 1072 chars]
- Remediation
View remediation
Remediation Suggestions
-
Replace the mutable default-branch installation with an immutable, reviewed commit or release tag. A commit hash is preferable because tags may be moved.
-
Check out and verify the pinned revision before installation, for example:
bash git clone https://github.com/baileywickham/ibkr cd ibkr git checkout --detach <reviewed-full-commit-hash> test "$(git rev-parse HEAD)" = "<reviewed-full-commit-hash>" uv tool install . -
Prefer a signed release artifact from a controlled distribution channel. Publish and verify a cryptographic checksum or signature before installation.
-
Avoid
--editablefor end-user installation. Install a fixed artifact so later modifications to the working tree cannot silently alter executable behavior. -
Pin and integrity-check transitive Python dependencies using a lockfile with hashes.
-
Review the pinned package source, build configuration, installation hooks, and dependency graph before recommending it.
-
Execute the CLI with least privilege and isolate it from unrelated secrets and files. Restrict local brokerage API permissions and use paper trading by default.
-
Document a controlled update process requiring review and integrity verification before advancing the pinned revision.
-
