Back to skill

Security audit

Bohrium Sandbox (`lbg sdbx`)

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent Bohrium sandbox guide, but its unpinned prerelease install and insecure proxy/TLS instructions create review-worthy risk.

Install only if you trust the Bohrium lbg prerelease source and are comfortable with cloud sandbox operations that may incur cost. Prefer a pinned reviewed lbg version, avoid mounting user storage unless needed, avoid ssl_verify: false, and verify proxy cleanup before running package installs or downloading outputs.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
Findings (2)

T08 · Insecure Dependencies

Warning
Location
SKILL.md:37
Finding
Unpinned Prerelease Dependency Installation<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, line 37 **Vulnerability Type**: Unpinned and automatically upgraded prerelease dependency **Risk Level**: Medium ### Vulnerable Code ```bash # Must install the prerelease, otherwise lbg sdbx is missing pip install --pre --upgrade lbg ``` The same unsafe installation recommendation is repeated in the troubleshooting guidance at line 338: ```text pip install --pre --upgrade lbg ``` ### Technical Analysis The Skill directs users or Agents to install the latest available prerelease of `lbg` without pinning an audited version or validating a package hash. The `--upgrade` option can also replace an existing installation with whichever accepted prerelease is current when the command runs. Consequently, the dependency executed at runtime may differ from the version considered during this audit. A compromised package publisher account, package-index compromise, or malicious future prerelease could introduce arbitrary installation-time or runtime behavior. Python packages can execute code during package installation and subsequently whenever their command-line entry points are invoked. This is classified as `T08: Insecure Dependencies` because the risk originates from an unpinned third-party prerelease obtained dynamically from a package index. ### Attack Path 1. An attacker compromises the relevant package publisher account or package-distribution channel, or otherwise causes a malicious prerelease to become the version selected by pip. 2. A user or Agent follows the Skill and runs `pip install --pre --upgrade lbg`. 3. Pip resolves and downloads the new, unaudited prerelease. 4. Attacker-controlled package installation logic executes, or malicious code is installed in the `lbg` command-line entry point. 5. The user or Agent invokes `lbg`, allowing the malicious dependency to access resources available to that local process. ### Impact Assessment Malicious package code would execute with the p ...[truncated 726 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin `lbg` to an exact prerelease version that has been reviewed, rather than accepting every available prerelease: ```bash python -m pip install 'lbg==4.0.0bNN' ``` 2. Publish a lock file or requirements file containing a verified SHA-256 hash, and install with hash enforcement: ```bash python -m pip install --require-hashes -r requirements.txt ``` 3. Replace the placeholder version with a specific reviewed release and document the expected package hash. 4. Avoid `--upgrade` in the standard installation workflow. Treat upgrades as a separate, explicit operation requiring review. 5. Use a trusted package index configured over verified TLS and, where practical, maintain an internal mirror containing only approved artifacts. 6. Verify the installed version before use: ```bash python -m pip show lbg ``` 7. Re-audit and update the pinned version deliberately when a newer release is required. ]]>

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:234
Finding
Disabled TLS Verification and Broad Global Proxy Configuration<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 234–251 **Vulnerability Type**: Insecure transport configuration and globally scoped proxy modification **Risk Level**: High ### Vulnerable Code ```bash lbg sdbx exec <id> -- bash -c ' mkdir -p ~/.pip && cat > ~/.pip/pip.conf <<EOF [global] proxy=http://ga.dp.tech:8118 EOF cat > ~/.condarc <<EOF proxy_servers: http: http://ga.dp.tech:8118 https: http://ga.dp.tech:8118 ssl_verify: false EOF cat > ~/.curlrc <<EOF proxy = http://ga.dp.tech:8118 EOF git config --global http.proxy http://ga.dp.tech:8118 git config --global https.proxy http://ga.dp.tech:8118 ' ``` ### Technical Analysis The configuration explicitly sets `ssl_verify: false` for Conda. This disables certificate validation and prevents Conda from reliably authenticating HTTPS package repositories. An active network attacker or compromised proxy can therefore present an untrusted certificate without the connection being rejected. The Skill also routes pip, Conda, curl, and Git traffic through `http://ga.dp.tech:8118`. An HTTP proxy can be legitimate for HTTPS tunneling, but it requires the client to retain strict end-to-end certificate verification. The explicit disabling of Conda certificate verification removes that protection for Conda traffic. In addition, `.curlrc` and global Git configuration apply proxy behavior broadly to subsequent commands in the sandbox rather than to a single operation. Although the Skill includes cleanup instructions, those instructions are not guaranteed to run if a command fails, the Agent stops, or the workflow is interrupted. This can leave later operations unexpectedly routed through the proxy. The affected configuration is created inside the remote sandbox through `lbg sdbx exec`; the evidence does not show modification of the caller's host Git configuration. ### Attack Path 1. A user or Agent follows the documented “Proxy on” procedure in a sandbox. 2. The procedure configures Conda ...[truncated 1651 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove `ssl_verify: false` and retain certificate validation: ```yaml ssl_verify: true ``` 2. If the proxy performs TLS inspection, install a narrowly scoped, administrator-approved CA certificate and configure Conda to use that CA bundle instead of disabling verification: ```yaml ssl_verify: /path/to/approved-ca-bundle.pem ``` 3. Use an authenticated, trusted proxy endpoint and document its ownership and certificate-validation requirements. 4. Prefer per-command proxy environment variables over persistent `.curlrc`, `.condarc`, and global Git changes: ```bash HTTPS_PROXY=http://trusted-proxy.example:8118 command ``` 5. For Git, scope proxy configuration to an individual invocation: ```bash git -c http.proxy=http://trusted-proxy.example:8118 \ -c https.proxy=http://trusted-proxy.example:8118 clone <url> ``` 6. Ensure cleanup runs through a shell trap even if an intermediate operation fails: ```bash trap 'remove_proxy_configuration' EXIT ``` 7. Verify package hashes, lock dependency versions, and use signed release artifacts where available. 8. Do not expose Bohrium credentials or mount personal/shared storage in a sandbox while executing packages retrieved through a transport path with disabled certificate verification. ]]>
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Rogue AgentSelf-Modification, Session Persistence
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (4)

Tool Parameter Abuse

High
Category
Tool Misuse
Content
```bash
lbg sdbx exec <id> -- bash -c '
rm -f ~/.pip/pip.conf ~/.condarc ~/.wgetrc ~/.curlrc
git config --global --unset http.proxy 2>/dev/null || true
git config --global --unset https.proxy 2>/dev/null || true
'
Confidence
85% confidence
Finding
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Session Persistence

Medium
Category
Rogue Agent
Content
```bash
# 1) Output goes to a known path (convention: /workspace/out/)
lbg sdbx exec --background <id> 'mkdir -p /workspace/out && python train.py > /workspace/out/run.log 2>&1'

# 2) Poll until done
lbg sdbx ps <id> --json
Confidence
60% confidence
Finding
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Unbounded Resource Access

Medium
Category
Excessive Agency
Content
Only when you genuinely need a TTY: REPLs, TUIs (`htop` / `vim`), sending Ctrl-C to a stuck process. **For "run a command, get its output", use `exec`.**

```bash
lbg sdbx terminal create <sandbox_id> --json              # default timeout=0
lbg sdbx terminal create <sandbox_id> --cwd /workspace --user root --json
lbg sdbx terminal send   <sandbox_id> <pid> 'echo hi\n'   # add \n yourself
lbg sdbx terminal send   <sandbox_id> <pid> $'\x03'       # Ctrl-C
Confidence
75% confidence
Finding
Skill allows unbounded resource consumption (API calls, storage, compute). Without rate limits or quotas, a compromised or misbehaving agent can cause denial-of-service or cost overruns.

Missing User Warnings

Medium
Confidence
96% confidence
Finding
The proxy-on snippet writes a ~/.condarc configuration with 'ssl_verify: false', which disables TLS certificate validation for package retrieval over the proxy. That enables man-in-the-middle tampering of downloaded packages or metadata, especially risky in a code-execution sandbox where users may install Python dependencies and run them immediately.

Static analysis

No suspicious patterns detected.