A take-home repo stole my files. This is my Mac checklist for coding agents now

Created by Qiwei on 11/15/2026

Redacted documents slip out of a torn folder labeled TAKE-HOME

About two years ago, someone on LinkedIn approached me about a job that looked like a great fit. The interview and take-home process seemed normal. One night I ran npm install in the assignment repo, and a malicious script uploaded files from my Mac.

I cleaned up the machine and changed how my tools are set up. Now that I use coding agents, those settings matter every time an agent installs a package or starts a tool for me.

This checklist covers the settings I use and the checks to make before running unfamiliar code:

  1. Package managers: install scripts and release age
  2. Python: prebuilt packages in a virtual environment
  3. Editors
  4. Repo files that tell agents what to run
  5. MCP servers
  6. Where agents start

1. Package managers: install scripts and release age

I block install scripts and set a one-day minimum release age in npm, pnpm and Bun. Here are the three global configs, followed by what they do. Use the ones for the package managers you have installed.

npm: ~/.npmrc

registry=https://registry.npmjs.org/
ignore-scripts=true
min-release-age=1
allow-git=none

pnpm on macOS: ~/Library/Preferences/pnpm/config.yaml. If you set XDG_CONFIG_HOME, use $XDG_CONFIG_HOME/pnpm/config.yaml.

blockExoticSubdeps: true
ignoreScripts: true
minimumReleaseAge: 1440
strictDepBuilds: true
trustPolicy: no-downgrade

Bun: ~/.bunfig.toml. If you set XDG_CONFIG_HOME, use $XDG_CONFIG_HOME/.bunfig.toml.

[install]
minimumReleaseAgeExcludes = []
minimumReleaseAge = 86400
ignoreScripts = true
auto = "disable"

What these settings change

Install scripts: ignore-scripts in npm and ignoreScripts in pnpm and Bun stop scripts such as preinstall, install and postinstall from running during installation. These scripts can execute shell commands, which is how an ordinary dependency install can expose your files.

You can still deliberately run code. For example, npm run, npm test and npm start execute the requested script with this setting, while skipping its pre and post scripts. pnpm also still executes .pnpmfile.mjs, a JavaScript file that can change how dependencies are installed. Check for it before installing from an unfamiliar repo.

Release age: all three configs require a version to be at least one day old. The units differ: npm uses days (1), pnpm minutes (1440), and Bun seconds (86400). This gives a newly published version some time to be reported if something is wrong; passing the age check says nothing about whether it is safe.

npm fails if no version in the requested range is old enough. pnpm's current default is already one day, but setting it explicitly also prevents fallback to a newer version when nothing qualifies.

Other guards: npm's allow-git=none blocks git dependencies. In pnpm, blockExoticSubdeps requires indirect dependencies to come from the registry, strictDepBuilds rejects unapproved dependency builds, and trustPolicy: no-downgrade rejects versions with weaker publishing proof than earlier releases. These pnpm guards are currently on by default; I keep them explicit.

Bun's auto = "disable" stops it from installing missing packages while running code. Put that setting under [install] in the project's bunfig.toml too: Bun reads the global file only for package-manager commands.

When a package needs a build

Some packages need an install script to compile native code or download a binary. Check the package and its script before making an exception. An approval entry alone won't bypass Bun's ignoreScripts, and npm's allowScripts is also overridden by ignore-scripts.

For npm, you can run a reviewed package's install scripts after installation:

npm rebuild sharp --ignore-scripts=false

Replace sharp with the package you reviewed. This runs that package's install scripts with scripts enabled for this command. Keep the global block in place.

2. Python: prebuilt packages in a virtual environment

For Python, avoid building packages from source during installation, and keep each project's dependencies in a virtual environment. A virtual environment separates Python packages; it does not restrict their access to your files.

For pip, put this in its user pip.conf:

[install]
only-binary = :all:
require-virtualenv = true

[global]
disable-pip-version-check = true

only-binary = :all: requires prebuilt packages, avoiding the build hooks that run when installing from source. Packages without a prebuilt release will fail to install. require-virtualenv = true refuses installs outside a virtual environment.

On a Mac, the config is usually ~/.config/pip/pip.conf, but pip uses ~/Library/Application Support/pip/pip.conf instead if that directory exists. Run pip config debug to check which paths your installation uses.

I use uv for Python. It doesn't read pip.conf, so the install command needs its own flag:

uv pip install --only-binary :all: -r requirements.txt

uv pip install requires a virtual environment by default; keep that protection by leaving out --system. For tools launched through uvx, add --no-build to prevent source builds.

When updating an environment, I audit it, delete and rebuild .venv, then audit it again:

env -u VIRTUAL_ENV uvx --no-build pip-audit==2.10.1 --skip-editable --path .venv/lib/python*/site-packages

--path points the audit at the project's installed packages. --skip-editable leaves out editable installs, such as your own project installed with -e. pip-audit checks for known vulnerabilities; it cannot establish that a package is free of malicious code.

3. Editors

I use both VS Code and Zed. In either editor, keep unfamiliar repos untrusted and block automatic tasks until you've inspected what they run. Disable built-in AI features if you don't use them, and remove integrations you don't need.

VS Code

Add this to your user settings:

{
  "task.allowAutomaticTasks": "off"
}

A repo can define tasks in .vscode/tasks.json with "runOn": "folderOpen". Fake-interview attacks have used this to run commands when a folder opens.

Automatic tasks are off by default, but VS Code normally prompts once per workspace to allow them. Setting off explicitly suppresses that prompt. If you previously allowed them for a workspace, use Tasks: Manage Automatic Tasks to disallow them there too.

Keep unfamiliar folders in Restricted Mode. VS Code never runs automatic tasks in an untrusted workspace.

Zed

Keep unfamiliar folders in Restricted Mode, which is the default until you grant trust. It blocks project settings, tasks and the installation or startup of project-defined language servers and MCP servers. Leave session.trust_all_worktrees disabled so new folders still require a trust decision.

Zed's documented automatic task hook is create_worktree, which runs after Zed creates a linked Git worktree. Review those hooks in global and project task files before trusting the repo.

Global language servers and MCP servers still start regardless of a folder's trust state. Check those in your user settings as well.

4. Repo files that tell agents what to run

Before trusting a folder or starting an agent in it, inspect the configuration and instruction files. Several can start programs or grant permissions:

  • .claude/settings.json: Claude Code permissions, environment variables and hooks, which are shell commands triggered by agent events. Allow rules and environment variables wait for folder trust.
  • .mcp.json: project MCP servers for Claude Code. Interactive sessions ask before using them.
  • .codex/config.toml: project settings for Codex, loaded only after you trust the project.
  • .vscode/tasks.json: VS Code tasks, including folder-open tasks.
  • .zed/settings.json, .zed/tasks.json: Zed project settings, servers and tasks.
  • AGENTS.md, CLAUDE.md: instructions that agents read.
  • package.json: scripts and dependencies used during setup and development.
  • .pnpmfile.mjs: pnpm code that runs even with ignoreScripts enabled.

Claude Code behaves differently without an interactive session: claude -p and Agent SDK sessions load project MCP servers without asking. Inspect .mcp.json before pointing an automated run at a repo.

Look for shell hooks, broad permission grants, disabled approval prompts, runOn, unfamiliar MCP commands, and commands that download a script and pipe it into a shell. Treat instructions in these files as material to inspect before deciding what to run.

Check global configuration too. Tools can add hooks to ~/.claude/settings.json or ~/.codex/hooks.json. Review those files after installing agent integrations and remove entries you no longer need.

5. MCP servers

MCP servers connect agents to tools and services. A local server runs a program on your machine; a remote connection grants access through the credentials and permissions you provide.

For each connection, check:

  1. Publisher: does the package, repo or endpoint belong to the service you intended to connect?
  2. Startup command: for a local server, inspect the exact command. Pin a reviewed version instead of leaving an npx package unversioned.
  3. Credentials: which tokens and environment variables does the server receive?
  4. Permissions: use read-only access or a single-project scope when that is enough for the task.

Remove unused servers and revoke credentials they no longer need.

6. Where agents start

Start agents in a specific project you trust. Avoid broad folders such as ~/Downloads, where unrelated files can become context, and inspect a new repo before starting an agent inside it.

Choosing a project folder doesn't confine the agent to it. File access depends on the agent's sandbox and permissions, so check those before giving it access to secrets or personal files.

For recruiter take-homes, Microsoft recommends an isolated, non-persistent virtual machine. Keep your usual credentials out of that environment, and discard it after the task.

Conclusion

You can give this checklist to your coding agent and ask for a read-only review of your own settings. Have it explain what differs and what each proposed change would affect before you approve any changes.