@harness-engineering/cli 1.6.0 → 1.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agents/personas/code-reviewer.yaml +2 -0
- package/dist/agents/personas/codebase-health-analyst.yaml +5 -0
- package/dist/agents/personas/performance-guardian.yaml +26 -0
- package/dist/agents/personas/security-reviewer.yaml +35 -0
- package/dist/agents/skills/claude-code/harness-autopilot/SKILL.md +494 -0
- package/dist/agents/skills/claude-code/harness-autopilot/skill.yaml +52 -0
- package/dist/agents/skills/claude-code/harness-code-review/SKILL.md +15 -0
- package/dist/agents/skills/claude-code/harness-integrity/SKILL.md +20 -6
- package/dist/agents/skills/claude-code/harness-perf/SKILL.md +231 -0
- package/dist/agents/skills/claude-code/harness-perf/skill.yaml +47 -0
- package/dist/agents/skills/claude-code/harness-perf-tdd/SKILL.md +236 -0
- package/dist/agents/skills/claude-code/harness-perf-tdd/skill.yaml +47 -0
- package/dist/agents/skills/claude-code/harness-pre-commit-review/SKILL.md +27 -2
- package/dist/agents/skills/claude-code/harness-release-readiness/SKILL.md +657 -0
- package/dist/agents/skills/claude-code/harness-release-readiness/skill.yaml +57 -0
- package/dist/agents/skills/claude-code/harness-security-review/SKILL.md +206 -0
- package/dist/agents/skills/claude-code/harness-security-review/skill.yaml +50 -0
- package/dist/agents/skills/claude-code/harness-security-scan/SKILL.md +102 -0
- package/dist/agents/skills/claude-code/harness-security-scan/skill.yaml +41 -0
- package/dist/agents/skills/claude-code/harness-state-management/SKILL.md +22 -8
- package/dist/agents/skills/gemini-cli/harness-autopilot/SKILL.md +494 -0
- package/dist/agents/skills/gemini-cli/harness-autopilot/skill.yaml +52 -0
- package/dist/agents/skills/gemini-cli/harness-perf/SKILL.md +231 -0
- package/dist/agents/skills/gemini-cli/harness-perf/skill.yaml +47 -0
- package/dist/agents/skills/gemini-cli/harness-perf-tdd/SKILL.md +236 -0
- package/dist/agents/skills/gemini-cli/harness-perf-tdd/skill.yaml +47 -0
- package/dist/agents/skills/gemini-cli/harness-release-readiness/SKILL.md +657 -0
- package/dist/agents/skills/gemini-cli/harness-release-readiness/skill.yaml +57 -0
- package/dist/agents/skills/gemini-cli/harness-security-review/skill.yaml +50 -0
- package/dist/agents/skills/gemini-cli/harness-security-scan/SKILL.md +102 -0
- package/dist/agents/skills/gemini-cli/harness-security-scan/skill.yaml +41 -0
- package/dist/bin/harness.js +3 -2
- package/dist/{chunk-VS4OTOKZ.js → chunk-IUFFBBYV.js} +1271 -461
- package/dist/{chunk-3U5VZYR7.js → chunk-UDWGSL3T.js} +4 -1
- package/dist/chunk-USEYPS7F.js +6150 -0
- package/dist/dist-4MYPT3OE.js +2528 -0
- package/dist/dist-RBZXXJHG.js +242 -0
- package/dist/index.js +3 -2
- package/dist/validate-cross-check-CPEPNLOD.js +7 -0
- package/package.json +12 -8
- package/dist/validate-cross-check-LNIZ7KGZ.js +0 -6
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
name: harness-release-readiness
|
|
2
|
+
version: "1.0.0"
|
|
3
|
+
description: Audit npm release readiness, run maintenance checks, offer auto-fixes, track progress across sessions
|
|
4
|
+
cognitive_mode: meticulous-verifier
|
|
5
|
+
triggers:
|
|
6
|
+
- manual
|
|
7
|
+
- on_milestone
|
|
8
|
+
platforms:
|
|
9
|
+
- claude-code
|
|
10
|
+
- gemini-cli
|
|
11
|
+
tools:
|
|
12
|
+
- Bash
|
|
13
|
+
- Read
|
|
14
|
+
- Write
|
|
15
|
+
- Edit
|
|
16
|
+
- Glob
|
|
17
|
+
- Grep
|
|
18
|
+
cli:
|
|
19
|
+
command: harness skill run harness-release-readiness
|
|
20
|
+
args:
|
|
21
|
+
- name: path
|
|
22
|
+
description: Project root path
|
|
23
|
+
required: false
|
|
24
|
+
- name: comprehensive
|
|
25
|
+
description: Run comprehensive checks (API docs, examples, dep health, git hygiene)
|
|
26
|
+
type: boolean
|
|
27
|
+
required: false
|
|
28
|
+
mcp:
|
|
29
|
+
tool: run_skill
|
|
30
|
+
input:
|
|
31
|
+
skill: harness-release-readiness
|
|
32
|
+
path: string
|
|
33
|
+
type: rigid
|
|
34
|
+
phases:
|
|
35
|
+
- name: audit
|
|
36
|
+
description: Run release-specific checks (packaging, docs, repo hygiene, CI/CD)
|
|
37
|
+
required: true
|
|
38
|
+
- name: maintain
|
|
39
|
+
description: Dispatch maintenance skills in parallel and collect results
|
|
40
|
+
required: true
|
|
41
|
+
- name: fix
|
|
42
|
+
description: Offer auto-remediation for fixable findings
|
|
43
|
+
required: true
|
|
44
|
+
- name: report
|
|
45
|
+
description: Generate report and persist state for session resumption
|
|
46
|
+
required: true
|
|
47
|
+
state:
|
|
48
|
+
persistent: true
|
|
49
|
+
files:
|
|
50
|
+
- .harness/release-readiness.json
|
|
51
|
+
depends_on:
|
|
52
|
+
- detect-doc-drift
|
|
53
|
+
- cleanup-dead-code
|
|
54
|
+
- align-documentation
|
|
55
|
+
- enforce-architecture
|
|
56
|
+
- harness-diagnostics
|
|
57
|
+
- harness-parallel-agents
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
name: harness-security-review
|
|
2
|
+
version: "1.0.0"
|
|
3
|
+
description: Deep security audit with OWASP baseline and stack-adaptive analysis
|
|
4
|
+
cognitive_mode: meticulous-implementer
|
|
5
|
+
triggers:
|
|
6
|
+
- manual
|
|
7
|
+
- on_pr
|
|
8
|
+
platforms:
|
|
9
|
+
- claude-code
|
|
10
|
+
- gemini-cli
|
|
11
|
+
tools:
|
|
12
|
+
- Bash
|
|
13
|
+
- Read
|
|
14
|
+
- Write
|
|
15
|
+
- Edit
|
|
16
|
+
- Glob
|
|
17
|
+
- Grep
|
|
18
|
+
cli:
|
|
19
|
+
command: harness skill run harness-security-review
|
|
20
|
+
args:
|
|
21
|
+
- name: path
|
|
22
|
+
description: Project root path
|
|
23
|
+
required: false
|
|
24
|
+
- name: deep
|
|
25
|
+
description: Enable threat modeling phase
|
|
26
|
+
required: false
|
|
27
|
+
mcp:
|
|
28
|
+
tool: run_skill
|
|
29
|
+
input:
|
|
30
|
+
skill: harness-security-review
|
|
31
|
+
path: string
|
|
32
|
+
type: rigid
|
|
33
|
+
phases:
|
|
34
|
+
- name: scan
|
|
35
|
+
description: Run mechanical security scanner
|
|
36
|
+
required: true
|
|
37
|
+
- name: review
|
|
38
|
+
description: AI-powered security review (OWASP + stack-adaptive)
|
|
39
|
+
required: true
|
|
40
|
+
- name: threat-model
|
|
41
|
+
description: Lightweight threat model from codebase graph
|
|
42
|
+
required: false
|
|
43
|
+
- name: report
|
|
44
|
+
description: Generate findings report with remediation guidance
|
|
45
|
+
required: true
|
|
46
|
+
state:
|
|
47
|
+
persistent: false
|
|
48
|
+
files: []
|
|
49
|
+
depends_on:
|
|
50
|
+
- harness-code-review
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
# Harness Security Scan
|
|
2
|
+
|
|
3
|
+
> Lightweight mechanical security scan. Fast triage, not deep review.
|
|
4
|
+
|
|
5
|
+
## When to Use
|
|
6
|
+
|
|
7
|
+
- As part of the codebase-health-analyst sweep
|
|
8
|
+
- For quick security triage on a project or changed files
|
|
9
|
+
- On scheduled cron runs for continuous security coverage
|
|
10
|
+
- NOT for deep security review (use harness-security-review)
|
|
11
|
+
- NOT for threat modeling (use harness-security-review --deep)
|
|
12
|
+
|
|
13
|
+
## Process
|
|
14
|
+
|
|
15
|
+
### Phase 1: SCAN — Run Mechanical Scanner
|
|
16
|
+
|
|
17
|
+
1. **Resolve project root.** Use provided path or cwd.
|
|
18
|
+
|
|
19
|
+
2. **Load security config.** Read `harness.config.json` and extract `security`
|
|
20
|
+
section. Fall back to defaults if absent.
|
|
21
|
+
|
|
22
|
+
3. **Determine file scope.**
|
|
23
|
+
- If `--changed-only` or triggered by PR: run `git diff --name-only HEAD~1`
|
|
24
|
+
to get changed files. Filter to source files only (exclude node_modules,
|
|
25
|
+
dist, test files per config).
|
|
26
|
+
- Otherwise: scan all source files in the project.
|
|
27
|
+
|
|
28
|
+
4. **Run SecurityScanner.** Call `SecurityScanner.scanFiles()` from
|
|
29
|
+
`@harness-engineering/core`.
|
|
30
|
+
|
|
31
|
+
5. **Filter by severity threshold.** Remove findings below the configured
|
|
32
|
+
threshold:
|
|
33
|
+
- `error`: only errors
|
|
34
|
+
- `warning`: errors and warnings (default)
|
|
35
|
+
- `info`: all findings
|
|
36
|
+
|
|
37
|
+
6. **Output report.** Present findings grouped by severity:
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
Security Scan: [PASS/FAIL]
|
|
41
|
+
Scanned: N files, M rules applied
|
|
42
|
+
Errors: N | Warnings: N | Info: N
|
|
43
|
+
|
|
44
|
+
[List findings with rule ID, file:line, severity, message, remediation]
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Gates
|
|
48
|
+
|
|
49
|
+
- **Error-severity findings are blocking.** Report is FAIL if any error-severity
|
|
50
|
+
finding exists after filtering.
|
|
51
|
+
- **No AI review.** This skill is mechanical only. Do not perform OWASP analysis
|
|
52
|
+
or threat modeling.
|
|
53
|
+
|
|
54
|
+
## Harness Integration
|
|
55
|
+
|
|
56
|
+
- **`harness check-security`** — CLI command that invokes this skill's scanner.
|
|
57
|
+
- **`SecurityScanner`** — Core class from `@harness-engineering/core` that executes the rule engine.
|
|
58
|
+
- **`harness.config.json`** — Security section configures severity threshold and file exclusions.
|
|
59
|
+
- **codebase-health-analyst persona** — Invokes this skill as part of its sweep.
|
|
60
|
+
|
|
61
|
+
## Escalation
|
|
62
|
+
|
|
63
|
+
- **When error-severity findings are disputed:** The scanner is mechanical — it may flag false positives. If a finding is a false positive, add a `// harness-ignore SEC-XXX` comment on the line and document the rationale. Do not suppress without explanation.
|
|
64
|
+
- **When the scanner misses a known vulnerability:** This skill runs pattern-based rules only. For semantic analysis (taint tracking, control flow), use `/harness:security-review` instead.
|
|
65
|
+
- **When scan is too slow on large codebases:** Use `--changed-only` to scope to recently changed files. Full scans can run on a scheduled cron instead.
|
|
66
|
+
|
|
67
|
+
## Success Criteria
|
|
68
|
+
|
|
69
|
+
- Scanner ran and produced findings (or confirmed clean)
|
|
70
|
+
- Findings are filtered by the configured severity threshold
|
|
71
|
+
- Report follows the structured format
|
|
72
|
+
- Exit code reflects pass/fail status
|
|
73
|
+
|
|
74
|
+
## Examples
|
|
75
|
+
|
|
76
|
+
### Example: Clean Scan
|
|
77
|
+
|
|
78
|
+
```
|
|
79
|
+
Security Scan: PASS
|
|
80
|
+
Scanned: 42 files, 12 rules applied
|
|
81
|
+
Errors: 0 | Warnings: 0 | Info: 0
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### Example: Findings Detected
|
|
85
|
+
|
|
86
|
+
```
|
|
87
|
+
Security Scan: FAIL
|
|
88
|
+
Scanned: 42 files, 12 rules applied
|
|
89
|
+
Errors: 1 | Warnings: 2 | Info: 0
|
|
90
|
+
|
|
91
|
+
[SEC-SECRET-001] src/config.ts:15 (error)
|
|
92
|
+
Hardcoded API key detected: `const API_KEY = "sk-..."`
|
|
93
|
+
Remediation: Move to environment variable, use dotenv or secrets manager.
|
|
94
|
+
|
|
95
|
+
[SEC-NET-001] src/cors.ts:5 (warning)
|
|
96
|
+
CORS wildcard origin: `origin: "*"`
|
|
97
|
+
Remediation: Restrict to specific allowed origins.
|
|
98
|
+
|
|
99
|
+
[SEC-CRYPTO-001] src/auth.ts:22 (warning)
|
|
100
|
+
Weak hash algorithm: `crypto.createHash("md5")`
|
|
101
|
+
Remediation: Use SHA-256 or stronger.
|
|
102
|
+
```
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
name: harness-security-scan
|
|
2
|
+
version: "1.0.0"
|
|
3
|
+
description: Lightweight mechanical security scan for health checks
|
|
4
|
+
cognitive_mode: meticulous-implementer
|
|
5
|
+
triggers:
|
|
6
|
+
- manual
|
|
7
|
+
- scheduled
|
|
8
|
+
platforms:
|
|
9
|
+
- claude-code
|
|
10
|
+
- gemini-cli
|
|
11
|
+
tools:
|
|
12
|
+
- Bash
|
|
13
|
+
- Read
|
|
14
|
+
- Glob
|
|
15
|
+
- Grep
|
|
16
|
+
cli:
|
|
17
|
+
command: harness skill run harness-security-scan
|
|
18
|
+
args:
|
|
19
|
+
- name: path
|
|
20
|
+
description: Project root path
|
|
21
|
+
required: false
|
|
22
|
+
- name: severity
|
|
23
|
+
description: Minimum severity threshold (error, warning, info)
|
|
24
|
+
required: false
|
|
25
|
+
- name: changed-only
|
|
26
|
+
description: Only scan git-changed files
|
|
27
|
+
required: false
|
|
28
|
+
mcp:
|
|
29
|
+
tool: run_skill
|
|
30
|
+
input:
|
|
31
|
+
skill: harness-security-scan
|
|
32
|
+
path: string
|
|
33
|
+
type: rigid
|
|
34
|
+
phases:
|
|
35
|
+
- name: scan
|
|
36
|
+
description: Run SecurityScanner and filter by severity threshold
|
|
37
|
+
required: true
|
|
38
|
+
state:
|
|
39
|
+
persistent: false
|
|
40
|
+
files: []
|
|
41
|
+
depends_on: []
|
package/dist/bin/harness.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
createProgram
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-IUFFBBYV.js";
|
|
5
|
+
import "../chunk-UDWGSL3T.js";
|
|
6
|
+
import "../chunk-USEYPS7F.js";
|
|
6
7
|
import {
|
|
7
8
|
handleError
|
|
8
9
|
} from "../chunk-ACMDUQJG.js";
|