From harness-claude
Runs a lightweight mechanical security scan for fast triage. Invoked via /Harness Security Scan or as part of codebase-health-analyst sweep.
How this skill is triggered — by the user, by Claude, or both
Slash command
/harness-claude:harness-security-scanThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
> Lightweight mechanical security scan. Fast triage, not deep review.
Lightweight mechanical security scan. Fast triage, not deep review.
Resolve project root. Use provided path or cwd.
Load security config. Read harness.config.json and extract security
section. Fall back to defaults if absent.
Determine file scope.
--changed-only or triggered by PR: run git diff --name-only HEAD~1
to get changed files. Filter to source files only (exclude node_modules,
dist, test files per config).Run SecurityScanner. Call SecurityScanner.scanFiles() from
@harness-engineering/core.
Filter by severity threshold. Remove findings below the configured threshold:
error: only errorswarning: errors and warnings (default)info: all findingsCheck security trends. Check get_security_trends to compare current scan results against the project's security posture history and identify trajectory changes.
Output report. Present findings grouped by severity:
Security Scan: [PASS/FAIL]
Scanned: N files, M rules applied
Errors: N | Warnings: N | Info: N
[List findings with rule ID, file:line, severity, message, remediation]
harness check-security — CLI command that invokes this skill's scanner.SecurityScanner — Core class from @harness-engineering/core that executes the rule engine.harness.config.json — Security section configures severity threshold and file exclusions.When this skill makes claims about existing code, architecture, or behavior, it MUST cite evidence using one of:
file:line format (e.g., src/auth.ts:42)file with description (e.g., src/utils/hash.ts —
"existing bcrypt wrapper")evidence session section via manage_stateUncited claims: Technical assertions without citations MUST be prefixed with
[UNVERIFIED]. Example: [UNVERIFIED] The auth middleware supports refresh tokens.
These apply to ALL skills. If you catch yourself doing any of these, STOP.
These reasoning patterns sound plausible but lead to bad outcomes. Reject them.
| Rationalization | Reality |
|---|---|
| "No attacker would find this" | Security by obscurity. If the code is wrong, flag it regardless of discoverability. |
| "We're behind a firewall" | Network boundaries change. Code should be secure at every layer regardless of deployment topology. |
| "The framework handles this for us" | Verify the framework's actual behavior. Misuse of a secure framework is still insecure. |
// harness-ignore SEC-XXX comment on the line and document the rationale. Do not suppress without explanation./harness:security-review instead.--changed-only to scope to recently changed files. Full scans can run on a scheduled cron instead.Security Scan: PASS
Scanned: 42 files, 12 rules applied
Errors: 0 | Warnings: 0 | Info: 0
Security Scan: FAIL
Scanned: 42 files, 12 rules applied
Errors: 1 | Warnings: 2 | Info: 0
[SEC-SECRET-001] src/config.ts:15 (error)
Hardcoded API key detected: `const API_KEY = "sk-..."`
Remediation: Move to environment variable, use dotenv or secrets manager.
[SEC-NET-001] src/cors.ts:5 (warning)
CORS wildcard origin: `origin: "*"`
Remediation: Restrict to specific allowed origins.
[SEC-CRYPTO-001] src/auth.ts:22 (warning)
Weak hash algorithm: `crypto.createHash("md5")`
Remediation: Use SHA-256 or stronger.
npx claudepluginhub intense-visions/harness-engineering --plugin harness-claudeRuns deep security audit combining mechanical scanning with AI vulnerability analysis. Uses OWASP baseline and stack-adaptive rules for pre-release, dependency, and codebase audits.
Scans codebases for leaked secrets (API keys, tokens, passwords, private keys), insecure code patterns, and configuration issues. Returns severity-rated findings with file locations and remediation steps.
Scans code for security vulnerabilities (OWASP Top 10), injection risks, sensitive data leaks, and dangerous patterns. Automatically activated on security-related changes, new modules, or post-refactor.