Harness security scan

From Intense-Visions/harness-engineering · View interactive version

Harness security scan is an AI agent skill from the GitHub repository Intense-Visions/harness-engineering. > Lightweight mechanical security scan. Fast triage, not deep review.

How to use this skill

Skill file

Harness Security Scan

Lightweight mechanical security scan. Fast triage, not deep review.

When to Use

Process

Phase 1: SCAN — Run Mechanical Scanner

  1. Resolve project root. Use provided path or cwd.
  1. Load security config. Read harness.config.json and extract security

section. Fall back to defaults if absent.

  1. Determine file scope.

to get changed files. Filter to source files only (exclude node_modules,

dist, test files per config).

  1. Run SecurityScanner. Call SecurityScanner.scanFiles() from

@harness-engineering/core.

  1. Filter by severity threshold. Remove findings below the configured

threshold:

  1. Check security trends. Check get_security_trends to compare current scan results against the project's security posture history and identify trajectory changes.
  1. 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]

```

Gates

finding exists after filtering.

or threat modeling.

Harness Integration

Evidence Requirements

When this skill makes claims about existing code, architecture, or behavior,

it MUST cite evidence using one of:

  1. File reference: file:line format (e.g., src/auth.ts:42)
  2. Code pattern reference: file with description (e.g., src/utils/hash.ts —

"existing bcrypt wrapper")

  1. Test/command output: Inline or referenced output from a test run or CLI command
  2. Session evidence: Write to the evidence session section via manage_state

Uncited claims: Technical assertions without citations MUST be prefixed with

[UNVERIFIED]. Example: [UNVERIFIED] The auth middleware supports refresh tokens.

Red Flags

Universal

These apply to ALL skills. If you catch yourself doing any of these, STOP.

reference. Belief is not evidence.

Search the codebase first. The project may already have a convention.

but do not expand scope beyond the stated task.

Domain-Specific

Rationalizations to Reject

Universal

These reasoning patterns sound plausible but lead to bad outcomes. Reject them.

confirm it applies to this codebase.

with a concrete follow-up plan.

Domain-Specific

| 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. |

Escalation

Success Criteria

Examples

Example: Clean Scan

Security Scan: PASS
Scanned: 42 files, 12 rules applied
Errors: 0 | Warnings: 0 | Info: 0

Example: Findings Detected

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.
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.