devcontainer-setup
Audited by Socket on Sep 17, 2026
2 alerts found:
MalwareAnomalyThe visible code is strongly suspicious for supply-chain tampering: it intentionally modifies a local tool’s onboarding/auth state (hasCompletedOnboarding=true) and forces permission behavior (defaultMode='bypassPermissions'), triggered by the presence of an OAuth-token environment variable, and it performs high-impact privileged filesystem operations (sudo chown -R), including a hardcoded absolute path (/commandhistory). No explicit exfiltration is shown, but the intent to bypass guardrails and the privileged ownership manipulation make this a high security risk. Confidence is reduced because the snippet appears incomplete/corrupted, so full behavior coverage is uncertain.
No direct malicious code is visible in this configuration snippet, but it creates meaningful supply-chain and secret-handling risk: it injects API credentials into the container environment and executes an unspecified post-create Python script (`/opt/post_install.py`) during setup. It also adds NET_ADMIN/NET_RAW capabilities and pulls in external components (a devcontainer feature and a VS Code extension) whose behaviors are not verifiable from this fragment. Review and verify `/opt/post_install.py` and the external feature/extension behavior, and minimize secret exposure inside the container.