shell-scripting

2 posts

gitlab

How to detect and prevent Contagious Interview IDE attacks (opens in new tab)

Contagious Interview attacks abuse VS Code’s automated tasks to execute malware when victims open a malicious repository and trust its workspace. GitLab developed low-level EDR detections around `node-pty`’s `spawn-helper`, allowing it to identify hidden background process execution while avoiding normal interactive developer activity. The article recommends combining runtime detection with IDE configuration hardening. ## The Contagious Interview Attack Path - North Korean threat actors use fake job interviews to persuade targets to download and review malicious code repositories. - Repositories can include a `.vscode/tasks.json` file configured to run automatically when the folder opens. - After the victim grants workspace trust, the task executes without obvious interaction. - Example payloads: - Detect the operating system. - Download a platform-specific second-stage payload. - Pipe it directly into `bash`, `sh`, or `cmd` using patterns such as `curl | bash`. - Resulting malware may steal passwords and cryptocurrency, deploy infostealers, and establish persistence for abuse of corporate access. ## Low-Level Detection with `spawn-helper` - GitLab looked below the VS Code layer because similar attacks can affect VS Code forks and other Node- or Electron-based IDEs. - VS Code uses the popular `node-pty` library to launch subprocesses. - `node-pty.spawn()` invokes a `spawn-helper` binary, which becomes a child process of the Node application. - This makes `spawn-helper` a useful operating-system-level signal for background task execution. ## Reducing False Positives - GitLab used Purple Team exercises to reproduce the attack and reviewed EDR telemetry. - Background VS Code tasks use `spawn-helper`, while foreground interactive processes such as the integrated terminal use a Code Helper binary. - Detections can therefore focus on processes launched invisibly, without user interaction. - GitLab further tuned alerts to identify suspicious commands such as background `curl | <shell>` execution rather than flagging every automated task. - The resulting detection produced no false positives despite widespread VS Code usage internally. ## Additional Prevention Measures - Runtime EDR monitoring is only one layer of defense. - Organizations can proactively harden their fleets by deploying global VS Code configuration that disables automatic task execution. - Combining IDE restrictions with process telemetry and behavioral detection provides broader protection against malicious repository-based attacks. Organizations should disable automatic task runs where practical and monitor low-level subprocess behavior, especially invisible `spawn-helper` executions that download or pipe remote content into a shell.

github

How AI is reshaping developer choice (and Octoverse data proves it) (opens in new tab)

AI is reshaping software development not only by increasing coding speed, but also by changing which languages and tools developers choose. Octoverse 2025 shows this shift clearly: TypeScript became GitHub’s most-used language in August 2025, overtaking Python and JavaScript. The article argues that AI reduces the friction of complex technologies, while teams must establish strong architectural and testing practices to prevent faster development from producing faster degradation. ## The Convenience Loop Changes Developer Behavior - Developers form associations between convenience and particular technologies, much like sensory cues can trigger strong memories. - Eighty percent of new GitHub developers use Copilot within their first week, establishing AI-assisted development as their baseline experience. - When AI handles boilerplate and difficult syntax, developers become more willing to use powerful but traditionally costly tools. - Recent adoption figures reflect this change: - TypeScript grew 66% year over year. - JavaScript grew 24%. - Shell scripting in AI-generated projects increased 206%. - The rise in shell usage suggests developers are choosing tools based on suitability rather than avoiding them because of friction. ## Why Strong Typing Helps AI-Generated Code - Strongly typed languages provide clearer constraints for AI models. - A TypeScript declaration such as `x: string` rules out invalid operations that would remain possible in JavaScript. - These constraints help AI produce more reliable and contextually appropriate code. - More than 1.1 million public repositories now use LLM SDKs, showing that AI integration has become mainstream. - Adoption is concentrating around languages and frameworks that work effectively with AI-assisted workflows. ## Moving Faster Without Damaging Architecture ### Guidance for Developers and Teams - Establish coding patterns before generating large amounts of code; AI follows clear existing structures better than it invents them. - Use type systems as guardrails, not as proof that business logic is correct. - Test AI-generated code rigorously, even when it appears correct or passes initial checks. ### Guidance for Engineering Leaders - AI-assisted development can increase throughput by roughly 20–30%, but architectural drift can accumulate just as quickly. - Standardize practices before scaling AI adoption through documentation, template repositories, and explicit architectural decisions. - Monitor the nature and quality of generated code, not only productivity or acceptance rates. - GitHub’s Copilot usage metrics dashboard tracks active users, agent adoption, lines added and deleted, language and model usage, and other organizational patterns. - Teams can use these metrics to identify defect-prone languages, models, or workflows and target training or stricter review processes. - Greater developer productivity increases the importance of senior engineering capacity for architectural review. AI makes more technologies accessible and is actively influencing the future popularity of languages and frameworks. Organizations should embrace the productivity gains while pairing them with standardized patterns, strong type systems, rigorous testing, and continuous architectural oversight.