hackmyagent-core 0.2.2 → 0.3.0
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 +181 -6
- package/dist/attack/attack.test.d.ts +5 -0
- package/dist/attack/attack.test.d.ts.map +1 -0
- package/dist/attack/attack.test.js +292 -0
- package/dist/attack/attack.test.js.map +1 -0
- package/dist/attack/index.d.ts +8 -0
- package/dist/attack/index.d.ts.map +1 -0
- package/dist/attack/index.js +24 -0
- package/dist/attack/index.js.map +1 -0
- package/dist/attack/payloads/capability-abuse.d.ts +8 -0
- package/dist/attack/payloads/capability-abuse.d.ts.map +1 -0
- package/dist/attack/payloads/capability-abuse.js +199 -0
- package/dist/attack/payloads/capability-abuse.js.map +1 -0
- package/dist/attack/payloads/context-manipulation.d.ts +8 -0
- package/dist/attack/payloads/context-manipulation.d.ts.map +1 -0
- package/dist/attack/payloads/context-manipulation.js +194 -0
- package/dist/attack/payloads/context-manipulation.js.map +1 -0
- package/dist/attack/payloads/data-exfiltration.d.ts +8 -0
- package/dist/attack/payloads/data-exfiltration.d.ts.map +1 -0
- package/dist/attack/payloads/data-exfiltration.js +222 -0
- package/dist/attack/payloads/data-exfiltration.js.map +1 -0
- package/dist/attack/payloads/index.d.ts +27 -0
- package/dist/attack/payloads/index.d.ts.map +1 -0
- package/dist/attack/payloads/index.js +68 -0
- package/dist/attack/payloads/index.js.map +1 -0
- package/dist/attack/payloads/jailbreak.d.ts +8 -0
- package/dist/attack/payloads/jailbreak.d.ts.map +1 -0
- package/dist/attack/payloads/jailbreak.js +236 -0
- package/dist/attack/payloads/jailbreak.js.map +1 -0
- package/dist/attack/payloads/prompt-injection.d.ts +8 -0
- package/dist/attack/payloads/prompt-injection.d.ts.map +1 -0
- package/dist/attack/payloads/prompt-injection.js +235 -0
- package/dist/attack/payloads/prompt-injection.js.map +1 -0
- package/dist/attack/scanner.d.ts +59 -0
- package/dist/attack/scanner.d.ts.map +1 -0
- package/dist/attack/scanner.js +312 -0
- package/dist/attack/scanner.js.map +1 -0
- package/dist/attack/types.d.ts +128 -0
- package/dist/attack/types.d.ts.map +1 -0
- package/dist/attack/types.js +36 -0
- package/dist/attack/types.js.map +1 -0
- package/dist/benchmarks/index.d.ts +16 -0
- package/dist/benchmarks/index.d.ts.map +1 -0
- package/dist/benchmarks/index.js +27 -0
- package/dist/benchmarks/index.js.map +1 -0
- package/dist/benchmarks/oasb-1.d.ts +95 -0
- package/dist/benchmarks/oasb-1.d.ts.map +1 -0
- package/dist/benchmarks/oasb-1.js +623 -0
- package/dist/benchmarks/oasb-1.js.map +1 -0
- package/dist/index.d.ts +6 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +24 -2
- package/dist/index.js.map +1 -1
- package/package.json +5 -3
package/dist/index.js
CHANGED
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
* Core library for HackMyAgent security scanning
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.Scanner = exports.ExternalScanner = exports.HardeningScanner = exports.analyzePermissions = exports.parseSkillIdentifier = exports.checkSkill = exports.VERSION = void 0;
|
|
7
|
+
exports.Scanner = exports.isValidBenchmark = exports.AVAILABLE_BENCHMARKS = exports.calculateRating = exports.getCheckIdsForLevel = exports.getControlsForCategory = exports.getControlsForLevel = exports.OASB_1_NAME = exports.OASB_1_VERSION = exports.OASB_1_CATEGORIES = exports.getPayloadsByIntensity = exports.getPayloadsByCategory = exports.getPayloadById = exports.getPayloads = exports.PAYLOAD_STATS = exports.ALL_PAYLOADS = exports.ATTACK_CATEGORIES = exports.AttackScanner = exports.ExternalScanner = exports.HardeningScanner = exports.analyzePermissions = exports.parseSkillIdentifier = exports.checkSkill = exports.VERSION = void 0;
|
|
8
8
|
exports.createScanner = createScanner;
|
|
9
|
-
exports.VERSION = '0.
|
|
9
|
+
exports.VERSION = '0.3.0';
|
|
10
10
|
// Checker module
|
|
11
11
|
var checker_1 = require("./checker");
|
|
12
12
|
Object.defineProperty(exports, "checkSkill", { enumerable: true, get: function () { return checker_1.checkSkill; } });
|
|
@@ -18,6 +18,28 @@ Object.defineProperty(exports, "HardeningScanner", { enumerable: true, get: func
|
|
|
18
18
|
// External scanner module
|
|
19
19
|
var scanner_1 = require("./scanner");
|
|
20
20
|
Object.defineProperty(exports, "ExternalScanner", { enumerable: true, get: function () { return scanner_1.ExternalScanner; } });
|
|
21
|
+
// Attack module
|
|
22
|
+
var attack_1 = require("./attack");
|
|
23
|
+
Object.defineProperty(exports, "AttackScanner", { enumerable: true, get: function () { return attack_1.AttackScanner; } });
|
|
24
|
+
var attack_2 = require("./attack");
|
|
25
|
+
Object.defineProperty(exports, "ATTACK_CATEGORIES", { enumerable: true, get: function () { return attack_2.ATTACK_CATEGORIES; } });
|
|
26
|
+
Object.defineProperty(exports, "ALL_PAYLOADS", { enumerable: true, get: function () { return attack_2.ALL_PAYLOADS; } });
|
|
27
|
+
Object.defineProperty(exports, "PAYLOAD_STATS", { enumerable: true, get: function () { return attack_2.PAYLOAD_STATS; } });
|
|
28
|
+
Object.defineProperty(exports, "getPayloads", { enumerable: true, get: function () { return attack_2.getPayloads; } });
|
|
29
|
+
Object.defineProperty(exports, "getPayloadById", { enumerable: true, get: function () { return attack_2.getPayloadById; } });
|
|
30
|
+
Object.defineProperty(exports, "getPayloadsByCategory", { enumerable: true, get: function () { return attack_2.getPayloadsByCategory; } });
|
|
31
|
+
Object.defineProperty(exports, "getPayloadsByIntensity", { enumerable: true, get: function () { return attack_2.getPayloadsByIntensity; } });
|
|
32
|
+
// Benchmarks module
|
|
33
|
+
var benchmarks_1 = require("./benchmarks");
|
|
34
|
+
Object.defineProperty(exports, "OASB_1_CATEGORIES", { enumerable: true, get: function () { return benchmarks_1.OASB_1_CATEGORIES; } });
|
|
35
|
+
Object.defineProperty(exports, "OASB_1_VERSION", { enumerable: true, get: function () { return benchmarks_1.OASB_1_VERSION; } });
|
|
36
|
+
Object.defineProperty(exports, "OASB_1_NAME", { enumerable: true, get: function () { return benchmarks_1.OASB_1_NAME; } });
|
|
37
|
+
Object.defineProperty(exports, "getControlsForLevel", { enumerable: true, get: function () { return benchmarks_1.getControlsForLevel; } });
|
|
38
|
+
Object.defineProperty(exports, "getControlsForCategory", { enumerable: true, get: function () { return benchmarks_1.getControlsForCategory; } });
|
|
39
|
+
Object.defineProperty(exports, "getCheckIdsForLevel", { enumerable: true, get: function () { return benchmarks_1.getCheckIdsForLevel; } });
|
|
40
|
+
Object.defineProperty(exports, "calculateRating", { enumerable: true, get: function () { return benchmarks_1.calculateRating; } });
|
|
41
|
+
Object.defineProperty(exports, "AVAILABLE_BENCHMARKS", { enumerable: true, get: function () { return benchmarks_1.AVAILABLE_BENCHMARKS; } });
|
|
42
|
+
Object.defineProperty(exports, "isValidBenchmark", { enumerable: true, get: function () { return benchmarks_1.isValidBenchmark; } });
|
|
21
43
|
function createScanner() {
|
|
22
44
|
return new Scanner();
|
|
23
45
|
}
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAgGH,sCAEC;AAhGY,QAAA,OAAO,GAAG,OAAO,CAAC;AAE/B,iBAAiB;AACjB,qCAImB;AAHjB,qGAAA,UAAU,OAAA;AACV,+GAAA,oBAAoB,OAAA;AACpB,6GAAA,kBAAkB,OAAA;AAcpB,mBAAmB;AACnB,yCAA+C;AAAtC,6GAAA,gBAAgB,OAAA;AAGzB,0BAA0B;AAC1B,qCAA4C;AAAnC,0GAAA,eAAe,OAAA;AAQxB,gBAAgB;AAChB,mCAAyC;AAAhC,uGAAA,aAAa,OAAA;AAEtB,mCAQkB;AAPhB,2GAAA,iBAAiB,OAAA;AACjB,sGAAA,YAAY,OAAA;AACZ,uGAAA,aAAa,OAAA;AACb,qGAAA,WAAW,OAAA;AACX,wGAAA,cAAc,OAAA;AACd,+GAAA,qBAAqB,OAAA;AACrB,gHAAA,sBAAsB,OAAA;AAcxB,oBAAoB;AACpB,2CAUsB;AATpB,+GAAA,iBAAiB,OAAA;AACjB,4GAAA,cAAc,OAAA;AACd,yGAAA,WAAW,OAAA;AACX,iHAAA,mBAAmB,OAAA;AACnB,oHAAA,sBAAsB,OAAA;AACtB,iHAAA,mBAAmB,OAAA;AACnB,6GAAA,eAAe,OAAA;AACf,kHAAA,oBAAoB,OAAA;AACpB,8GAAA,gBAAgB,OAAA;AA2BlB,SAAgB,aAAa;IAC3B,OAAO,IAAI,OAAO,EAAE,CAAC;AACvB,CAAC;AAED,MAAa,OAAO;IAClB,KAAK,CAAC,IAAI,CAAC,MAAc;QACvB,6BAA6B;QAC7B,OAAO;YACL,MAAM;YACN,QAAQ,EAAE,EAAE;YACZ,SAAS,EAAE,IAAI,IAAI,EAAE;SACtB,CAAC;IACJ,CAAC;CACF;AATD,0BASC"}
|
package/package.json
CHANGED
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hackmyagent-core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Core security scanning library for AI agents",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"files": [
|
|
8
|
-
"dist"
|
|
8
|
+
"dist",
|
|
9
|
+
"README.md"
|
|
9
10
|
],
|
|
10
11
|
"scripts": {
|
|
11
12
|
"build": "tsc",
|
|
12
13
|
"test": "vitest run",
|
|
13
14
|
"test:watch": "vitest",
|
|
14
|
-
"lint": "eslint src --ext .ts"
|
|
15
|
+
"lint": "eslint src --ext .ts",
|
|
16
|
+
"prepublishOnly": "cp ../../README.md ./README.md"
|
|
15
17
|
},
|
|
16
18
|
"devDependencies": {
|
|
17
19
|
"@types/node": "^20.0.0",
|