Skip to content
| Marketplace
Sign in
Visual Studio Code>Linters>StayAwakeBot (saw)New to Visual Studio Code? Get it now.
StayAwakeBot (saw)

StayAwakeBot (saw)

Ndevu12

|
6 installs
| (1) | Free
Supply-chain worm hunting in your editor: the saw verdict for every folder you open, before you trust it.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

StayAwakeBot (saw)

Catch supply-chain worms before they run. The saw scanner in VS Code, Cursor, Antigravity, Devin Desktop and VSCodium: a verdict for every folder you open, before you trust it.

Visual Studio Marketplace Open VSX saw documentation License: BSD-3-Clause

saw finds a worm in a folder that has not been trusted yet, and offers to fix it

Supply-chain worms hide where a developer never looks: an editor task that runs when a folder opens, an obfuscated loader in an installed package, a poisoned lockfile, a git hook that runs on checkout. saw hunts them, and this extension runs saw for you. It scans each folder, shows the verdict where you work, and, when you ask, cleans the folder up.

Features

A verdict for every folder

Each workspace folder is scanned when the window opens, and again when something that can run code changes: a saved file, a checkout or pull, or a change under .vscode/, package.json, a lockfile, a workflow or a git hook. The verdict appears in the status bar and the saw view, and findings appear in the Problems panel.

Verdict Meaning
infected At least one confirmed finding: the content is malicious. Don't trust, install, build or run anything in the folder.
suspicious Heuristic findings only: something doesn't look right, and a person should decide. Nothing was changed.
residue Traces an infection left behind. Nothing found runs, but it isn't what the project would carry.
could not scan The folder couldn't be fully scanned: unknown, never clean.
clean Nothing found, and the folder was fully scanned.

Read what each verdict means in saw's documentation.

Safe before you trust a folder

Scanning only reads files, so it runs in Restricted Mode. When saw confirms malware in a folder you have not trusted yet, the extension warns you before you trust it.

Chat

The saw sidebar opens on Chat. Each open folder is a card: the verdict, what saw found, and buttons for what you can do. A scan only reads the folder. Fix the checkout removes what saw confirmed and puts the clean-up on a new local branch. It does not rewrite past commits, and it does not push. Amending history is named separately: that act rewrites the commits that still carry the malicious code and force-updates the branches they are on, and the checkout fix does not do it. When a fix is waiting, the card says whether the question is part of the checkout fix or of amending history. The same buttons are used in Decide. This view is part of the extension, so it looks the same in every editor built on VS Code. After saw holds an update, or after several quiet checks, a card under the folders asks for a rating. Share feedback opens it any time.

Reports you can read

Open Report opens a folder's scan as a document in an editor tab: the verdict, what to do, and every finding with its remedy and evidence. Fix, Audit and the hook commands open their own reports, which update live as saw works. Reports are kept in the extension's own storage, never in your project.

Fix an infected folder

Fix… runs saw fix after you confirm. It's available from the alert, from the infected folder in the saw view, or as saw: Fix Folder….

  • What it removes: what saw confirmed as malicious, plus the installed packages, build output and lockfile.
  • Where the clean-up goes: onto a new local branch. Nothing is pushed or published.
  • Your uncommitted work: saw first tries to keep it on a saw/uncommitted-… branch. That needs git to know your name and email, and the confirmation warns you when it doesn't.
  • Restricted Mode: Fix works there too. saw runs git with the repository's own hooks and settings switched off, so nothing from the folder runs.

When it's done, the folder is scanned again. With a saw that names the clean-up branch, Open Changes shows the whole clean-up as one diff.

When saw can ask during a fix, the Decide view offers the choice and a diff opens beside it. Keep is the focused action. Closing the diff does not answer. Stopping the fix does not answer.

The confirmation names what saw will change

Audit this machine

saw: Audit This Machine runs saw audit and tells you, in saw's own words, whether changing your passwords and tokens is safe yet. Changing them while something on the machine still watches them can set off code that deletes your files. See credential hygiene.

Scan-on-clone hooks

The saw view shows whether saw's scan-on-clone hooks are in place, so every clone, pull and branch switch is scanned. It installs or repairs them in one click.

Updates wait for a check

When the installed saw can check an incoming update, a pull, fetch, checkout, merge, rebase, or a GitHub command that lands files waits before it changes an open folder. If that saw includes its git and gh stand-in, the editor places it in front of those commands. The editor's integrated terminal is covered, and so is the Git view, except on Windows. Clean and residue are applied. While the check runs, the status bar, the saw view, and Chat say saw is checking the update, and the step saw names when it names one. The folder is unchanged until the check finishes. Suspicious, infected, and a check that could not finish leave the folder as it was, and the saw view says the update was held. The open folder is scanned again after the check finishes. A git command this window did not run can still change the folder first. When saw can say whether it let that tree in, Chat says the change was not held only when saw did not. A check that runs outside this window shows the same checking, applied, or held. When saw can put a folder back, a commit it did not let in is put back by saw and your unsaved work stays. A change to the files on a commit saw already let in is not put back. An agent that asks saw about a folder hears the same checking, held, or not-held state, and is told to wait while a check is running.

When you have asked saw to cover your terminals, the editor's terminal uses that and does not check the same command again. The Git view still checks. A terminal saw does not cover keeps saw's scan-on-clone check. Turn the editor's check off with saw.governUpdates; the Git view then uses the path it had before.

Guards for AI agents

  • saw_folderVerdict tool: agents in the editor can ask for a folder's verdict before they install dependencies, run scripts or build. Reference it as #sawVerdict in chat.
    • It scans the latest changes first, and tells the agent to stop and ask you unless the folder is clean or only has residue.
    • It only reads, and never passes on the file contents saw quotes as evidence, so a malicious file can't slip instructions to the agent.
  • saw's MCP server: when the installed saw provides saw mcp, the extension offers it to agents.
    • In Cursor, it registers through Cursor's MCP API.
    • In VS Code 1.101 or later, it appears as an MCP server named saw.
    • It's read-only. Turn it off with saw.registerMcpServer.
  • In Cursor, a check before commands: Cursor's agent can't call saw_folderVerdict, so the extension adds a hook that runs before the agent's commands that install or run a folder's code, such as npm install, make, python or ./script.sh.
    • Infected: the command is refused, and the agent is told saw's verdict.
    • Suspicious, could not scan, or not checked yet: Cursor asks you first.
    • Clean or residue: the command runs.
    • Turn it off with saw.guardAgentCommands. Not available on Windows or in remote windows yet.

After Fix, the folder scans clean and the clean-up waits on a local branch

Getting started

  1. Install StayAwakeBot (saw):
    • VS Code: search for stayawakebot in Extensions.
    • Cursor, Antigravity, VSCodium: search for stayawakebot in Extensions.
  2. Open a folder. The extension finds saw, installs it if needed, and scans.
  3. Watch the status bar: saw: clean, or a warning when something needs you.

Requirements

  • Linux, macOS, or Windows with Python 3.11 or later, on the machine where the files are. For Remote - SSH, WSL and dev containers, that's the remote.

How saw is installed

The extension uses the saw it finds on PATH or in ~/.local/bin. When there's none, or it's too old, the extension installs it in the background, without asking:

  1. If pipx is missing, it installs pipx first, from a temporary environment it then deletes.
  2. It installs saw with pipx, as the stayawakebot release this version was tested with.

Both come from PyPI as ready-built packages only, so no build script runs. No administrator rights are needed, and nothing is written into the system Python. The status bar shows saw: installing until saw is ready.

If the install fails, one notification says why and what to run, with Retry, Copy Diagnostics and Show Log. To install saw yourself instead, see saw's first scan tutorial.

Commands

All commands are in the Command Palette under saw:.

Command What it does
Scan Workspace Scan every workspace folder now.
Open Report Open a folder's scan report, or the audit or hooks report.
Fix Folder… Clean an infected folder with saw fix, after you confirm.
Show the Decision Open the diff for a fix that is waiting on you.
Audit This Machine Check whether changing credentials is safe yet.
Install Scan-on-Clone Hooks Scan every clone, pull and branch switch.
Repair Scan-on-Clone Hooks Put saw's hooks back when something changed them.
Install or Repair saw Reinstall saw at the tested release.
Copy Install Diagnostics Copy the last install's details for an issue report.
Show Log Open the extension's log.
Open saw Documentation Open saw-docs.ndevuspace.com.
Share feedback Rate the editor, star the repository, report a problem, or request a feature.

Settings

Setting Default Description
saw.path empty Absolute path to saw. Empty: find it on PATH or in ~/.local/bin, or use the one the extension installs.
saw.autoInstall true Install saw with pipx when it is missing or too old. Turn off where only an administrator installs software.
saw.configPath empty Your own saw config (allowlist), passed as saw scan -c. See configuration.
saw.scanOnStartup true Scan every folder when the window opens.
saw.scanOnChange true Scan again on save, and when a file that can run code changes.
saw.scanTimeoutSeconds 120 How long one folder's scan may take.
saw.registerMcpServer true Offer saw's read-only MCP server to AI agents, when saw provides one.
saw.guardAgentCommands true In Cursor, check saw's verdict before the agent installs or runs a folder's code.
saw.governUpdates true When saw can, check a pull, checkout, or similar update before it changes an open folder.

These are read from your user settings only. A folder's own .vscode/settings.json can't choose which program runs or switch scanning off.

Remote windows

The extension runs on the machine where the files are. A local window is this computer, on Windows, macOS, or Linux. In Remote - SSH, WSL, or a dev container, it finds or installs saw on that remote, scans the remote's files, and Fix… and the hooks act on the remote's git. Audit This Machine audits that machine (the server, the WSL distribution, or the container), not the computer in front of you.

Privacy and safety

  • Nothing is sent anywhere. saw scans offline. The only download is installing saw from PyPI.
  • Nothing changes without you. Only Fix…, after you confirm, changes files. Nothing is ever pushed, and no pull request is opened.
  • Nothing from the folder runs. saw is started without a shell, from settings the folder can't change.
  • Your shell profile is left alone. Terminals opened in the editor get saw on PATH; for other terminals, run pipx ensurepath once.

Read how saw decides what to trust in its trust model and why it fails closed.

Troubleshooting

You see What to do
saw: not available Click it. It installs or repairs saw, or tells you what's missing, such as Python 3.11.
saw: could not scan Open the folder's report: it says why. A large folder may need a higher saw.scanTimeoutSeconds.
The install failed Use Copy Diagnostics from the notification, and paste the result into an issue.
A verdict looks wrong Detection lives in saw. Report it on saw's issue tracker.

Learn more

  • saw documentation: the official site
  • Your first scan
  • Verdicts
  • Harden a repository
  • CLI reference
  • saw on GitHub and on PyPI

Feedback and contributing

saw: Share feedback is on the saw view title and in the Command Palette. Rate opens the review page for the editor you are using. Star opens this repository. Report a problem asks whether it is about the editor or about what saw found, then opens that tracker with the extension version, the saw version, the editor name, and the verdict word filled in. Nothing from the folder is included. Request a feature opens an extension issue the same way. Not now hides the card until the next version, and only after saw has held another update or checked a folder quietly again. A rating or a star means Chat stops asking on its own.

  • Extension issues and ideas: saw_ide_extension issues
  • Detection issues: stayAwakeBot issues
  • Contributing: see CONTRIBUTING.md
  • Release notes: see CHANGELOG.md

License

BSD-3-Clause

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft