setup-devcontainer
Pass
Audited by Gen Agent Trust Hub on Oct 15, 2026
Risk Level: SAFECOMMAND_EXECUTIONREMOTE_CODE_EXECUTIONPRIVILEGE_ESCALATIONPERSISTENCEINDIRECT_PROMPT_INJECTIONDYNAMIC_EXECUTIONEXTERNAL_DOWNLOADS
Full Analysis
- [COMMAND_EXECUTION]: The skill utilizes
sudo,iptables, andipsetto implement a default-deny network firewall within the devcontainer. It also employsgitfor workspace initialization anddockercommands to detect and remove stale containers from previous setups. - [REMOTE_CODE_EXECUTION]: The skill automates the installation of AI CLI tools by executing vendor-provided shell scripts (
curl | sh). Additionally, it supports a "skill-sync" feature that usesnpx -y skills addto fetch and install agent skills from user-specified remote sources during container startup. - [PRIVILEGE_ESCALATION]: Container runtime security is enforced via
runArgsindevcontainer.json, which drops all capabilities by default and selectively grants only those required for the devcontainer's operation (e.g.,CHOWN,DAC_OVERRIDE,NET_ADMIN). It also configures specifically scopedsudorules for the firewall management scripts. - [PERSISTENCE]: The skill ensures consistent environment settings by modifying
~/.bashrcto load project environment variables and utilizing thepostStartCommandto re-apply the network firewall and background refresh loop on every container session start. - [INDIRECT_PROMPT_INJECTION]: The skill possesses an attack surface for indirect injection through its ingestion of external data.
- Ingestion points: Data is ingested from
network-manifest.json,allowed-domains.local.txt, and external skill sources via thenpx skills addcommand. - Boundary markers: The "Own-Block Contract" employs specific marker comments (e.g.,
# --- Claude Code ---) to delimit and protect tool-specific configurations within shared lifecycle scripts. - Capability inventory: The skill has capabilities for executing
sudocommands, modifying the file system, and making outbound network requests. - Sanitization: External content is handled using structured JSON processing via
jqand string-escaping logic within the rendering library. - [DYNAMIC_EXECUTION]: Utility scripts such as
render-devcontainer.shandpatch-json-array-if-absent.share used to dynamically assemble shell scripts and modify JSON configuration files at runtime to tailor the devcontainer environment to the user's selections. - [EXTERNAL_DOWNLOADS]: The firewall system dynamically fetches current IP ranges from well-known services, including
api.github.comandgstatic.com, to maintain a reliable and secure network allowlist for the agent environment.
Audit Metadata