
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
@gitguard/cli
Advanced tools
🛡️ Security scanning for developers - Find vulnerabilities in your code before they reach production.
# Install globally
npm install -g @gitguard/cli
# Login to GitGuard
gitguard login
# Scan your code
gitguard scan
npm install -g @gitguard/cli
pnpm add -g @gitguard/cli
Clone gitguard-cli and use pnpm for installs and scripts (see CONTRIBUTING.md):
pnpm install
pnpm run build
pnpm test
Before scanning, authenticate with your GitGuard account:
gitguard login
If you don't have an account, sign up at gitguard.net.
The CLI automatically uses your web app preferences! If you have AI scanning enabled in your GitGuard account, the CLI will use it by default.
Scan the current directory (uses your default settings):
gitguard scan
Scan a specific directory:
gitguard scan --dir ./src
Scan a single file:
gitguard scan --file ./src/api/auth.ts
Override your default settings:
Force enable AI analysis (even if disabled in your account):
gitguard scan --ai
Disable AI analysis (even if enabled in your account):
gitguard scan --no-ai
Enable/disable specific features:
gitguard scan --dependencies --no-ai # Dependencies: yes, AI: no
gitguard scan --secrets --no-dependencies # Secrets: yes, Dependencies: no
Output JSON for CI/CD:
gitguard scan --json
View your subscription and usage limits:
gitguard whoami
gitguard logout
| Command | Description |
|---|---|
gitguard login | Authenticate with GitGuard |
gitguard logout | Log out of your account |
gitguard scan | Scan code for vulnerabilities |
gitguard whoami | Show current user and subscription info |
gitguard --help | Show help |
| Option | Description |
|---|---|
-d, --dir <path> | Directory to scan (default: current directory) |
-f, --file <path> | Scan a specific file |
--ai / --no-ai | Force enable or disable AI-powered analysis |
--dependencies / --no-dependencies | Dependency scanning |
--secrets / --no-secrets | Secret detection |
--cvss / --no-cvss | CVSS 3.1 scoring (Pro/Premier) |
--api-security / --no-api-security | API security scanning (Premier) |
--validate / --no-validate | Vulnerability validation (Pro/Premier) |
--compliance <framework> | Compliance report: owasp, pci-dss, soc2, hipaa, cis, all (Premier) |
--json | Output results as JSON |
--fix | Generate fix prompts and open findings in your editor |
By default the CLI uses your web app preferences. Use gitguard scan --help for the full list.
name: Security Scan
on: [push, pull_request]
jobs:
security:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install GitGuard CLI
run: npm install -g @gitguard/cli
- name: Run security scan
env:
GITGUARD_API_TOKEN: ${{ secrets.GITGUARD_API_TOKEN }}
run: |
echo "$GITGUARD_API_TOKEN" | gitguard login --token
gitguard scan --json > scan-results.json
- name: Upload scan results
uses: actions/upload-artifact@v4
with:
name: security-scan
path: scan-results.json
Add to .git/hooks/pre-commit:
#!/bin/sh
# Run GitGuard scan on staged files
gitguard scan --dir .
if [ $? -ne 0 ]; then
echo "Security issues found! Fix them or use --no-verify to bypass."
exit 1
fi
Make it executable:
chmod +x .git/hooks/pre-commit
0 - No critical or high severity vulnerabilities found1 - Critical or high severity vulnerabilities found, or scan errorPerfect for failing CI/CD pipelines on security issues!
The CLI automatically scans these file types:
.ts, .tsx, .js, .jsx, .mjs, .cjs).py), Ruby (.rb), PHP (.php), Go (.go).swift), Kotlin (.kt).rs), C/C++ (.c, .cpp), C# (.cs).java), Scala (.scala)Smart exclusions:
.gitignore file when presentnode_modules, dist, build, .git, .next, coverage, __pycache__, vendorGitGuard detects 50+ vulnerability patterns including:
... and many more!
$ gitguard scan
✓ Collecting files...
ℹ Found 47 file(s), sending to GitGuard...
Scan Results
Files scanned: 47
Duration: 2.3s
Found 3 issue(s):
HIGH: 2
MEDIUM: 1
HIGH SQL Injection
src/api/users.ts:45
Unsanitized user input in SQL query
HIGH XSS Vulnerability
components/Form.tsx:23
Unescaped user input in HTML
MEDIUM Weak Cryptography
lib/crypto.ts:12
Using MD5 for hashing (use bcrypt instead)
$ gitguard scan --json
{
"scanId": "scan_abc123",
"status": "completed",
"filesScanned": 47,
"duration": 2300,
"summary": {
"total": 3,
"critical": 0,
"high": 2,
"medium": 1,
"low": 0,
"info": 0
},
"vulnerabilities": [...]
}
If you see "Authentication expired", log in again:
gitguard logout
gitguard login
Free tier includes 5 scans per day. If you hit the limit:
gitguard whoami)Make sure you're in a directory with code files. The CLI only scans supported file types (see "What Gets Scanned?" above).
If the CLI reports a connection error (e.g. read ECONNRESET) while "Waiting for results...", the scan may still be running on the server. The CLI retries polling automatically. If it still fails, check the dashboard—the scan often completes and results are available there.
For local development against a local backend, use GITGUARD_API_URL=http://localhost:3100 gitguard scan. See CONTRIBUTING.md for full local testing setup.
~/.gitguard/config.json (chmod 600)To point the CLI at a local GitGuard backend (e.g. during development):
export GITGUARD_API_URL=http://localhost:3100
gitguard login # Opens browser to local app
gitguard scan
See CONTRIBUTING.md for building and linking the CLI from source.
We welcome contributions! Please see CONTRIBUTING.md for details.
MIT © GitGuard
Made with ❤️ by the Creative Lid LLC - GitGuard team
FAQs
GitGuard CLI - Security scanning for developers
We found that @gitguard/cli demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.