Detections · What MacVigil reads to decide
Source code and build tools: git hooks, build scripts and registry tokens on a Mac
A developer’s Mac holds valuable things: source code, signing keys, and tokens that can publish packages other people install. Malware aimed at developers hides in the places build tools run on their own, such as git hooks and Xcode build phases, and looks for the tokens that publish code.
Updated November 25, 2026 · 13 detections in this category
In short
Names of the tools that build and publish software: repositories and their hooks, build projects, compilers, package registries, test runners. Code editors and build tools carry many.
MacVigil has 13 detections in this category. It reads the file to find them and never runs it.
What it is
Build tools run code as part of their normal work. Git runs hooks on commits and checkouts, Xcode runs build phase scripts, package managers run install and test scripts, and code editors activate extensions when a project opens. Each is a place where a project or a package can carry a command that runs on your Mac without you launching anything.
Developers also keep tokens for code hosts, package registries and cloud services in configuration files and environment variables. In the wrong hands, those tokens push code to a repository or publish a poisoned version of a package, which then reaches everyone who installs it.
How Mac malware does it
- A script in
.git/hooks/, or acore.hooksPathsetting pointing elsewhere, that runs on a git event - An Xcode project with a shell script build phase that runs each time the target builds, the technique the XCSSET family is known for
- Package and test scripts, such as a
preteststep, that run when a project is installed or tested - Reading publishing tokens from
.npmrc,.pypircor variables such asgithub_tokenandnpm_token - A git credential helper setting that hands account passwords to a program of the attacker’s choice
- Publishing requests such as
git pushornpm publish, used to spread through a developer’s own repositories and packages - Editor extensions that activate as soon as a workspace opens
What MacVigil looks for
MacVigil reads the file and never runs it. In scripts and project files it notes the names of build tools: repository hooks, build phase settings, compilers, package registries, publication commands, test runners and the variables that hold build tokens. Each is recorded for information as a lexical indicator: it establishes no execution or use on its own, and none of them makes a file dangerous.
Where a project declares a command a build tool will run, such as an Xcode build phase script, that script is also read as a script in its own right, and what it does is judged under the other categories.
When it is normal
This is the everyday vocabulary of software development. Code editors, Xcode, package managers, continuous integration scripts and countless open source projects contain all of these words. Finding them in a developer tool or a project folder is expected; finding them in a document reader or a game is not.
How to check your Mac
- In a project folder,
ls .git/hooksshows the hooks; files without the.samplesuffix are active. - Run
git config --global --listto see your global settings, includingcore.hooksPathand credential helpers. - In Xcode, open each target’s Build Phases tab and read every Run Script phase of a project you downloaded before you build it.
- Check
~/.npmrcand~/.pypircfor tokens you no longer use, and revoke old tokens on the registry’s website. - Open a downloaded project in your editor’s restricted or untrusted mode first, so its tasks and extensions do not run.
Related categories
- Persistence: How a program arranges to start again on its own: launch agents and daemons, login items, scheduled jobs.
- Propagation to other devices: Copying a program to other devices or media: USB volumes, connected iPhones, network shares.
- Sign-in and session tokens: How the program signs in to its own services: account fields, sign-in routes, OAuth codes, session and refresh tokens. Most connected software has some; other programs' stored secrets are under credential theft.
- Credential theft: What touches the places where passwords, keys and sessions are kept: keychains, browser profiles, wallets, SSH and cloud credentials.
Know what a file does before you open it
MacVigil reads any app, disk image, installer or script without running it, and shows the evidence behind every finding. Nothing leaves your Mac.
Free for 7 days, then $29.95 a year for 2 Macs, a launch price: the regular price will be $59 a year. Requires macOS 15 Sequoia or later on a Mac with Apple silicon.
More: all detection categories · what MacVigil detects · the blog