CLI & SDK

Run security scans from your terminal. No installation required.

INSTALLATION

No global install needed. Run directly with npx:

npx wardek scan https://example.com

Or install globally for repeated use:

npm install -g wardek

API KEY CONFIGURATION

Set your API key as an environment variable. The CLI reads from WARDEK_API_KEY automatically.

# Set for current session
export WARDEK_API_KEY="ssk_live_your_api_key_here"

# Or pass inline
WARDEK_API_KEY="ssk_live_..." npx wardek scan https://example.com

# Or add to .env
echo 'WARDEK_API_KEY=ssk_live_...' >> .env
Without an API key, scans run in anonymous mode with reduced capabilities (no history, no export).

USAGE

Basic scan

npx wardek scan https://example.com

# Output:
# WARDEK SECURITY SCAN
# Target: https://example.com
# Score:  87/100 [B+]
# ─────────────────────
# Headers     ██████████░░  82%
# SSL         ████████████  100%
# Cookies     ████████░░░░  67%
# CORS        ████████████  100%
# ...

View scan history

npx wardek scans --limit 10

Fail on threshold (CI/CD)

# Exit code 1 if score < 75
npx wardek scan https://example.com --min-score 75

# Fail on any critical finding
npx wardek scan https://example.com --fail-on-critical

CLI OPTIONS

FlagDescriptionDefault
--min-score <n>Fail if scan score is below nnone
--fail-on-criticalExit 1 on critical findingsfalse
--format <fmt>Output format: text, json, yamltext
--timeout <ms>Scan timeout in milliseconds60000
--depth <n>Crawl depth2
--no-colorDisable colored outputfalse
--quietMinimal output (score only)false

TYPESCRIPT SDK

A typed client library for Node.js and TypeScript: launch a scan, list your scans, read a scan back.

Example

import { WarDek } from 'wardek-sdk';

const client = new WarDek({
  apiKey: process.env.WARDEK_API_KEY!,
});

// Launch a scan
const scan = await client.scan('https://myapp.com');
logger.info(scan.score);  // 87
logger.info(scan.grade);  // "B+"

// List recent scans
const { scans } = await client.listScans({ limit: 5 });

// Read a scan back
const again = await client.getScan(scan.id);

// CI/CD gate computed by the API
process.exit(scan.ci.passed ? 0 : 1);
The SDK is published on npm as wardek-sdk, TypeScript types included.