unpwned
v1.3.0
Published
Website security scanner in your terminal. Zero config. One command.
Maintainers
Readme
npx unpwned scan yoursite.comWhy?
Every website has security blind spots. Most developers don't check until it's too late.
unpwned runs 8 security checks in under a second, right from your terminal. No accounts, no API keys, no setup. Just paste a domain and get a score.
What It Checks
Headers ███░░░░░░░ 25/100 [5 issues]
SSL/TLS ██████████ 100/100 [PASS]
DNS Security ██░░░░░░░░ 20/100 [3 issues]
Cookies ██████████ 100/100 [PASS]
CORS ███████░░░ 70/100 [1 issue]
Sensitive Files ██████████ 100/100 [PASS]
Tech Stack Next.js, Vercel
Breaches 1 breach found!| Check | What It Finds |
|:------|:-------------|
| Security Headers | Missing CSP, HSTS, X-Frame-Options, X-Content-Type-Options, Referrer-Policy, Permissions-Policy |
| SSL/TLS | Expired, self-signed, mismatched or untrusted certificates, incomplete chains, weak protocols, expiry warnings |
| DNS Security | Missing SPF, DMARC, DKIM, DNSSEC |
| Cookie Security | Missing Secure, HttpOnly, SameSite flags |
| CORS Policy | Wildcard origins, credential leaks, origin reflection attacks |
| Sensitive Files | Exposed .env, .git/config, package.json, wp-config.php, and more |
| Tech Stack | Detects Next.js, React, Angular, WordPress, nginx, Cloudflare, and others |
| Data Breaches | Known breaches from Have I Been Pwned database |
Install
# Run directly (no install needed)
npx unpwned scan example.com
# Or install globally
npm install -g unpwned
unpwned scan example.comRequirements: Node.js 18+
Usage
# Basic scan
unpwned scan example.com
# A full URL works too
unpwned scan https://example.com/blog
# JSON output (for CI/CD pipelines)
unpwned scan example.com --json
# Multiple sites
for site in site1.com site2.com site3.com; do
npx unpwned scan $site
doneExit Codes
| Code | Meaning |
|:-----|:--------|
| 0 | Score >= 50 (passing) |
| 1 | Score < 50 (failing) |
| 2 | The target blocked the scan, so the result is partial |
| 3 | The target is not a valid domain or URL, does not resolve, or cannot be reached |
Use this in CI to fail builds when security drops below threshold.
Unreachable Targets
If the site cannot be loaded, unpwned stops with a one-line error and exit code 3 instead of scoring a site it never saw:
$ unpwned scan https://expired.badssl.com
unpwned: Could not connect to https://expired.badssl.com: the certificate has expired.This covers a refused or timed out connection, a certificate that the client rejects, and a site that stops responding partway through the scan. No report is written in --json mode either, so check the exit code before parsing the output.
When the target URL has a path, Sensitive Files are checked at the site root and under that path. The query string is ignored.
Blocked Scans
If a WAF or rate limiter answers with a block or challenge page, unpwned says so instead of scoring that page as your site. This is detected on the first request and again during the scan, so a block that starts halfway through is caught too.
- Checks whose requests were blocked (Headers, Cookies, CORS, Sensitive Files, Tech Stack) are marked as not checked.
- The score covers only the checks that ran and is shown as a partial score.
- The exit code is
2, so a blocked scan never passes a CI gate by accident.
In --json output, a blocked scan adds an interference object (status, provider, reason) and marks each unchecked scanner with "skipped": true and "skipReason": "blocked". A one-line explanation is also written to stderr.
To get a full scan, allow requests from the network you scan from (for example your CI runners) in your WAF.
CI/CD Integration
GitHub Actions
The recommended way is the official unpwned-action which wraps the CLI with better output, PR comments, and fail thresholds:
name: Security Scan
on: [push, pull_request]
permissions:
contents: read
pull-requests: write # needed for comment-on-pr
jobs:
scan:
runs-on: ubuntu-latest
steps:
- uses: razazu/unpwned-action@v1
with:
domain: yoursite.com
fail-on: high # or critical, medium, low, none
comment-on-pr: true # posts results as a PR commentOr call the CLI directly:
name: Security Audit
on:
schedule:
- cron: '0 9 * * 1' # Every Monday at 9am
push:
branches: [main]
jobs:
security:
runs-on: ubuntu-latest
steps:
- run: npx unpwned scan yoursite.comGitLab CI
security_scan:
image: node:22
script:
- npx unpwned scan yoursite.com
allow_failure: falsePre-commit Hook
# .husky/pre-push
npx unpwned scan yoursite.com --json | jq -e '.overallScore >= 70' > /dev/null || exit 1Scoring
Weighted average across all checks:
| Check | Weight | Why | |:------|:-------|:----| | Security Headers | 25% | First line of defense against XSS, clickjacking, MIME sniffing | | SSL/TLS | 20% | Encryption in transit is non-negotiable | | DNS Security | 15% | Email spoofing protection (SPF/DMARC/DKIM) | | Cookie Security | 10% | Session hijacking prevention | | CORS Policy | 10% | Cross-origin data theft protection | | Sensitive Files | 10% | Exposed configs and credentials | | Data Breaches | 10% | Known breaches tied to the domain | | Tech Stack | 0% | Informational, not scored |
Checks that do not apply are left out of the average and marked not applicable. DNS Security is skipped for IP addresses and for subdomains of hosting platforms such as *.vercel.app or *.netlify.app, because that DNS is not yours to configure. For a subdomain of your own domain, SPF and DMARC records on a parent domain count.
A certificate that browsers refuse (expired, self-signed, issued for another hostname, or from an untrusted authority) scores 0 for SSL/TLS. When the target itself is served with such a certificate, the page cannot be loaded, so the scan stops with exit code 3 and names the problem.
Grades
| Grade | Score | Meaning | |:------|:------|:--------| | A+ | 95-100 | Excellent security posture | | A | 85-94 | Strong, minor improvements possible | | B | 70-84 | Good, some gaps to address | | C | 50-69 | Fair, significant improvements needed | | D | 30-49 | Poor, critical issues present | | F | 0-29 | Failing, immediate action required |
How It Compares
| Tool | Headers | SSL | DNS | Cookies | CORS | Files | Breaches | Score | npx | Speed | |:-----|:--------|:----|:----|:--------|:-----|:------|:---------|:------|:----|:------| | unpwned | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | <1s | | is-website-vulnerable | - | - | - | - | - | - | - | - | Yes | ~10s | | Mozilla Observatory | Yes | - | - | - | - | - | - | Yes | Dead | - | | Lighthouse | Partial | - | - | - | - | - | - | Yes | Yes | ~30s | | Nuclei | - | Yes | - | - | - | Yes | - | - | - | ~5s |
Want the Full Picture?
unpwned checks 8 categories from the terminal.
UNPWNED runs 36 security scanners with:
- AI-powered fix instructions
- PDF security reports
- Continuous monitoring
- GitHub integration
- OWASP/SOC2/GDPR compliance checks
Related
- UNPWNED GitHub Action - Run this scan on every push or pull request
- UNPWNED Web - Full platform with 700+ checks, AI fix prompts, and continuous monitoring
- slopsquat-guard - Pre-tool-use hook for Claude Code that blocks AI-hallucinated npm/pip packages before they install. Separate project, same author.
Contributing
Contributions are welcome! See CONTRIBUTING.md.
git clone https://github.com/razazu/unpwned-cli.git
cd unpwned-cli
npm install
npm test # 51 tests
npm run build