Skip to content
TopicTracker
From HackerNewsView original
TranslationTranslation

Clone This Repo and I Own Your Machine

A security researcher demonstrated how cloning a malicious GitHub repository can lead to full system compromise. By exploiting features like git hooks, symbolic links, and hidden files, an attacker can execute arbitrary code on a victim's machine simply when they clone or open the repository. The post highlights growing supply-chain risks in open-source software development.

Background

- The article describes a supply-chain attack targeting developers who use **Oh My Zsh**, a widely-installed open-source framework for managing Zsh shell configurations (themes, plugins, aliases). - A common plugin, **zsh-autosuggestions**, auto-completes commands based on shell history. The attack poisons a GitHub repo with a malicious command hidden in a seemingly innocent file (e.g., a fake `.env`). When a developer clones the repo and accepts an autocomplete suggestion during normal workflow, the hidden payload executes — granting remote access to their machine. - This class of attack — **autocomplete shell injection** — is dangerous because it doesn't require running an obviously malicious script; merely accepting a suggested command (something developers do constantly) is enough. - The broader point: developer tooling like shell plugins, package managers, and CI/CD pipelines increasingly form the attack surface for supply-chain compromises. Oh My Zsh's plugin ecosystem, while powerful, introduces trust assumptions that are easy to overlook.

Related stories