hackmyagent-core 0.3.1 → 0.3.3
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/README.md +19 -14
- package/dist/benchmarks/index.d.ts +1 -1
- package/dist/benchmarks/index.js +1 -1
- package/dist/benchmarks/oasb-1.d.ts +24 -7
- package/dist/benchmarks/oasb-1.d.ts.map +1 -1
- package/dist/benchmarks/oasb-1.js +582 -81
- package/dist/benchmarks/oasb-1.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -17,7 +17,7 @@ npx hackmyagent secure # harden your agent setup (100 check
|
|
|
17
17
|
npx hackmyagent secure --fix # auto-fix security issues
|
|
18
18
|
npx hackmyagent scan example.com # scan for exposed infrastructure
|
|
19
19
|
npx hackmyagent attack --local # red team with 55 attack payloads
|
|
20
|
-
npx hackmyagent
|
|
20
|
+
npx hackmyagent secure --benchmark oasb-1 # run OASB-1 security benchmark
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
## Two Ways to Scan
|
|
@@ -38,7 +38,7 @@ AI agents are powerful but introduce new attack surfaces. Skills can be maliciou
|
|
|
38
38
|
## Installation
|
|
39
39
|
|
|
40
40
|
```bash
|
|
41
|
-
# Use directly with npx
|
|
41
|
+
# Use directly with npx
|
|
42
42
|
npx hackmyagent secure
|
|
43
43
|
|
|
44
44
|
# Or install globally
|
|
@@ -191,25 +191,30 @@ hackmyagent attack --local --verbose
|
|
|
191
191
|
- 50-69: HIGH - Significant vulnerabilities, action required
|
|
192
192
|
- 70-100: CRITICAL - Severe vulnerabilities, immediate action needed
|
|
193
193
|
|
|
194
|
-
### `hackmyagent benchmark`
|
|
194
|
+
### `hackmyagent secure --benchmark`
|
|
195
195
|
|
|
196
|
-
Run the OASB-1 (
|
|
196
|
+
Run the OASB-1 (Open Agent Security Benchmark) against your agent configuration.
|
|
197
197
|
|
|
198
198
|
```bash
|
|
199
|
-
# Run benchmark
|
|
200
|
-
hackmyagent
|
|
199
|
+
# Run benchmark (L1 by default)
|
|
200
|
+
hackmyagent secure --benchmark oasb-1
|
|
201
201
|
|
|
202
202
|
# Target specific directory
|
|
203
|
-
hackmyagent
|
|
203
|
+
hackmyagent secure ./my-project --benchmark oasb-1
|
|
204
|
+
|
|
205
|
+
# Different maturity levels
|
|
206
|
+
hackmyagent secure -b oasb-1 -l L1 # Essential (baseline)
|
|
207
|
+
hackmyagent secure -b oasb-1 -l L2 # Standard
|
|
208
|
+
hackmyagent secure -b oasb-1 -l L3 # Hardened
|
|
204
209
|
|
|
205
210
|
# Output formats
|
|
206
|
-
hackmyagent
|
|
207
|
-
hackmyagent
|
|
208
|
-
hackmyagent
|
|
209
|
-
hackmyagent
|
|
211
|
+
hackmyagent secure -b oasb-1 -f json
|
|
212
|
+
hackmyagent secure -b oasb-1 -f sarif -o results.sarif
|
|
213
|
+
hackmyagent secure -b oasb-1 -f html -o report.html
|
|
214
|
+
hackmyagent secure -b oasb-1 -f asp -o profile.asp.json
|
|
210
215
|
|
|
211
216
|
# CI/CD with fail threshold
|
|
212
|
-
hackmyagent
|
|
217
|
+
hackmyagent secure -b oasb-1 --fail-below 70
|
|
213
218
|
```
|
|
214
219
|
|
|
215
220
|
**Output Formats:**
|
|
@@ -322,7 +327,7 @@ jobs:
|
|
|
322
327
|
with:
|
|
323
328
|
node-version: '20'
|
|
324
329
|
- name: Run OASB-1 benchmark
|
|
325
|
-
run: npx hackmyagent
|
|
330
|
+
run: npx hackmyagent secure -b oasb-1 --fail-below 70
|
|
326
331
|
```
|
|
327
332
|
|
|
328
333
|
### Pre-commit Hook
|
|
@@ -406,7 +411,7 @@ Contributions welcome! See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
|
|
|
406
411
|
|
|
407
412
|
```bash
|
|
408
413
|
# Development setup
|
|
409
|
-
git clone https://github.com/
|
|
414
|
+
git clone https://github.com/opena2a-org/hackmyagent.git
|
|
410
415
|
cd hackmyagent
|
|
411
416
|
npm install
|
|
412
417
|
npm run build
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Benchmarks module
|
|
3
|
-
* OASB (
|
|
3
|
+
* OASB (Open Agent Security Benchmark) implementations
|
|
4
4
|
*/
|
|
5
5
|
export { OASB_1_CATEGORIES, OASB_1_VERSION, OASB_1_NAME, getControlsForLevel, getControlsForCategory, getCheckIdsForLevel, calculateRating, } from './oasb-1';
|
|
6
6
|
export type { BenchmarkLevel, BenchmarkControl, BenchmarkCategory, BenchmarkResult, BenchmarkCategoryResult, BenchmarkControlResult, } from './oasb-1';
|
package/dist/benchmarks/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
3
|
* Benchmarks module
|
|
4
|
-
* OASB (
|
|
4
|
+
* OASB (Open Agent Security Benchmark) implementations
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
7
|
exports.AVAILABLE_BENCHMARKS = exports.calculateRating = exports.getCheckIdsForLevel = exports.getControlsForCategory = exports.getControlsForLevel = exports.OASB_1_NAME = exports.OASB_1_VERSION = exports.OASB_1_CATEGORIES = void 0;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* OASB-1:
|
|
2
|
+
* OASB-1: Open Agent Security Benchmark
|
|
3
3
|
* Version 1.0.0
|
|
4
4
|
*
|
|
5
5
|
* Maps OASB-1 controls to HackMyAgent check IDs
|
|
@@ -11,15 +11,32 @@ export interface BenchmarkControl {
|
|
|
11
11
|
category: string;
|
|
12
12
|
level: BenchmarkLevel;
|
|
13
13
|
scored: boolean;
|
|
14
|
+
/** Detailed description of the control requirement */
|
|
14
15
|
description: string;
|
|
16
|
+
/** Why this control is important - threat context and risk */
|
|
17
|
+
rationale?: string;
|
|
18
|
+
/** Step-by-step instructions to verify compliance */
|
|
19
|
+
audit?: string;
|
|
20
|
+
/** Step-by-step instructions to implement the control */
|
|
21
|
+
remediation?: string;
|
|
22
|
+
/** Potential impact of implementing this control */
|
|
23
|
+
impact?: string;
|
|
24
|
+
/** Default value/state in most deployments */
|
|
25
|
+
defaultValue?: string;
|
|
15
26
|
/** HackMyAgent check IDs that verify this control */
|
|
16
27
|
checkIds: string[];
|
|
17
|
-
/** Control is automated
|
|
28
|
+
/** Control is automated, manual, or forward-looking */
|
|
18
29
|
verification: 'automated' | 'manual' | 'forward';
|
|
19
|
-
/**
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
|
|
30
|
+
/** External references (OWASP, NIST, etc.) */
|
|
31
|
+
references?: string[];
|
|
32
|
+
/** Mapping to compliance frameworks */
|
|
33
|
+
frameworkMappings?: {
|
|
34
|
+
cisControls?: string[];
|
|
35
|
+
nistCsf?: string[];
|
|
36
|
+
owaspTop10?: string[];
|
|
37
|
+
iso27001?: string[];
|
|
38
|
+
soc2?: string[];
|
|
39
|
+
};
|
|
23
40
|
}
|
|
24
41
|
export interface BenchmarkCategory {
|
|
25
42
|
id: number;
|
|
@@ -91,5 +108,5 @@ export declare function getCheckIdsForLevel(level: BenchmarkLevel): string[];
|
|
|
91
108
|
*/
|
|
92
109
|
export declare function calculateRating(l1Compliance: number, l2Compliance: number, l3Compliance: number, level: BenchmarkLevel): BenchmarkResult['rating'];
|
|
93
110
|
export declare const OASB_1_VERSION = "1.0.0";
|
|
94
|
-
export declare const OASB_1_NAME = "OASB-1:
|
|
111
|
+
export declare const OASB_1_NAME = "OASB-1: Open Agent Security Benchmark";
|
|
95
112
|
//# sourceMappingURL=oasb-1.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oasb-1.d.ts","sourceRoot":"","sources":["../../src/benchmarks/oasb-1.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,MAAM,cAAc,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAEhD,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI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