mcpField
F
flagrix

flagrix

Local
github.com/flagrix-ioSecurity2Updated 1w ago

About flagrix

flagrix is a local scanner for developers and AI agents that checks GitHub repositories and profiles for malware before cloning. Its verdict is pinned to the scanned commit, and it can also check dependencies against a locally matched OSV malicious-package feed.

Key features

  1. 01Scan repositories before cloning
  2. 02Score GitHub profiles for scam signals
  3. 03Pin verdicts to commit SHA
  4. 04Check dependencies against OSV feed
  5. 05JSON output and risk exit codes

Use cases

  1. 01Review a coding assignment repository before cloning
  2. 02Check a GitHub profile for scam indicators
  3. 03Gate git clone operations in a Claude Code hook

MCP support

Its stdio MCP server exposes `scan_github_repo` and `scan_github_user` tools for AI agents.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"flagrix-io-flagrix": {
"command": "npx",
"args": [
"-y",
"flagrix"
],
"env": {
"GITHUB_TOKEN": "<GITHUB_TOKEN>"
}
}
}
}
Run commandnpx -y flagrix
Environment variables to set
GITHUB_TOKENSecretOptional GitHub token — raises API rate limits and enables private-repo scans

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npmflagrix0.1.0

Tools

2

Saved tool list · updated 2w ago

ParameterTypeRequiredDescription
refstringNoBranch, tag, or commit to scan (default: default branch)
targetstringYesGitHub repository URL or owner/repo slug, e.g. https://github.com/acme/repo

Details

From the project README

flagrix

Scan GitHub repositories and profiles for malware before you clone — from the terminal, CI, or an AI agent. The same commit-pinned verdict as the Flagrix browser extension, made callable.

npx flagrix scan https://github.com/some-org/coding-assignment
  some-org/coding-assignment @ 3f9c2a1
  HIGH RISK — Do not clone  security score 12/100
  3 files scanned · 10 dependencies · 2 issues

  CRITICAL Data exfiltration patterns detected: Keylogger Pattern
    assignment.js:14
      14  document.addEventListener("keydown", (e) => send(e.key))

Built after real fake-recruiter campaigns ("coding assignment" repos that steal wallets, SSH keys, and browser sessions) started targeting developers.

Commands

flagrix scan <url | owner/repo>   # scan a repository (--ref <branch|sha>)
flagrix scan-user <username>      # score a GitHub profile for scam signals
flagrix mcp                       # MCP server (stdio) for AI agents

Exit codes

codemeaning
0low risk
1scan failed
2medium risk — review before proceeding
3high risk — do not clone

--json (automatic when stdout is piped) emits the full result. The verdict is pinned to the scanned commit (commitSha in the JSON): every file is read at that SHA, so a push mid-scan or after the verdict can't silently invalidate it.

AI agents

claude mcp add flagrix -- npx -y flagrix mcp

Tools: scan_github_repo, scan_github_user. A Claude Code hook that gates every git clone on a scan ships in hooks/ — see docs/agent-gating.md.

Tokens & rate limits

Unauthenticated scans use GitHub's 60 req/h budget (a scan issues one request per scanned file, up to ~50). Set GITHUB_TOKEN (or FLAGRIX_GITHUB_TOKEN, or --token) to raise it to 5,000/h and to scan private repositories.

Privacy

Fully local. No telemetry, no accounts, no Flagrix backend — the only network calls go to the GitHub/npm APIs and the public detection-rules repository (signature refresh, cached 6 h, with a bundled offline snapshot).

Dependencies are also checked against the OSV malicious-package feed (osv-malicious.json from the same repository: every npm/PyPI package the OpenSSF malicious-packages project has confirmed malicious). The feed is downloaded and matched locally, so dependency names never leave your machine. It is cached 6 h and revalidated with its ETag. Set FLAGRIX_OSV_FEED=0 to skip it (the curated list in the signatures still applies).

How it works

Scanning logic lives in @flagrix/scanner-core (MIT), signatures in flagrix-detection-rules (MIT) — the same engine and rules the browser extension uses. Verdicts are risk assessments, not definitive fraud determinations; always verify through official channels.

AI Disclosure

This project leverages Claude AI for boilerplate generation, test-suite expansion, and optimization. All AI-generated code is strictly reviewed, refactored, and verified by human maintainers before merging.

License

MIT — see LICENSE.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.