Open source · 2026
devsweep
Scans your dev setup and repos for the supply-chain and credential risks that infostealers exploit.
01 The problem
Attackers often skip a project's code and go after something it trusts: a GitHub Action it uses, its release workflow, or a maintainer's access token. That's a supply-chain attack, and one common way tokens get stolen is infostealers: malware that copies saved passwords and tokens off developers' computers. How much damage a stolen token or a hijacked action can do comes down to settings: actions that could be swapped for different code, workflows that run strangers' pull request code with secrets, tokens with more access than they need, and branches and tags that can be force-pushed. Some attacks plant the malware in a repository directly: the PolinRider campaign hides code off-screen in real files and in fake font files, and adds a VS Code task that runs it as soon as a developer opens the folder, often a take-home assignment from a fake recruiter.
02 What I built
A command-line tool you run with npx @frank1738/devsweep in a repository. It checks the GitHub Actions workflows, the repository's settings on GitHub and the code itself for signs of PolinRider, then lists every finding by file: its severity, the line, what's wrong and what it's about. Add --details to see why each one is a risk, the lines of code involved and how to fix it.
It runs on your own machine or in CI as a GitHub Action, which prints the readable report in the job log and writes SARIF, the format GitHub's Security tab reads, so findings show up in code scanning and on pull requests. Findings you've reviewed and decided to keep are recorded in devsweep.config.json, each with a reason.
With --all it searches a whole drive for projects (folders with .git, .github/workflows or .vscode/tasks.json) and scans each one, offline. On my laptop that's 8,759 folders and 15 projects in under five seconds.
03 Architecture
- Folder to scanone repo, or a drive with --all
- Read inputsworkflows, code files, GitHub API
- 13 rules6 workflow, 5 code, 2 repository
- Configdevsweep.config.json, optional
- Report + exit code0 pass, 1 findings, 2 error
- JSON or SARIFscripts, GitHub's Security tab
04 Key decisions
- 01
No dependencies to install
The npm package has no dependencies. devsweep and the three libraries it uses (commander, picocolors and yaml) are bundled into plain JavaScript files. They aren't minified, so you can read exactly what runs.
- 02
No --token flag
The repository checks read a token only from the GITHUB_TOKEN or GH_TOKEN environment variable. There's deliberately no flag for it, because command lines end up in shell history and process lists. The token is never printed.
- 03
A release needs a signed tag and 2FA
Releases come only from a signed, annotated tag. The release workflow checks it, runs the tests and stages the version on npm through trusted publishing, with provenance, so no npm token is stored anywhere. A maintainer then approves it with two-factor authentication: a compromised workflow can stage a release, but it can't publish one.
- 04
Every exception needs a reason
Reviewed findings are accepted in devsweep.config.json, matched on rule, file and subject, never on line numbers, which move. Each acceptance needs a reason, and one that stops matching anything shows up as a warning, so stale exceptions get cleaned up.
- 05
Reads malware, never runs or prints it
The code rules read every file as text and never execute anything. Reports point at the line but never print it, even in --details, so a scan can't replay a payload into a terminal or a CI log. The known PolinRider markers are stored as hex, so devsweep's own files don't look infected to other scanners.
- 06
Fast enough for a whole drive
Each file is opened once, with at most 8 reads at a time across every project. Folders are listed once and reused by each project's scan, and one combined search rules out clean files before any per-marker work. Links and junctions are never followed, so a scan can't loop.
05 Results
13
rules: 6 for workflows, 5 for planted code, 2 for repository settings
0
dependencies in the npm package
3
report formats: readable, JSON and SARIF
06 Stack
- TypeScript
- Node.js
- commander
- picocolors
- yaml
- Rolldown
- Vitest
- Biome
- GitHub Actions