@atbash/cli 0.3.20 → 0.3.22
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/bin/atbash.js +0 -0
- package/dist/commands/held.js +14 -10
- package/dist/commands/held.js.map +1 -1
- package/dist/commands/history.js +11 -1
- package/dist/commands/history.js.map +1 -1
- package/dist/commands/judge.js +23 -45
- package/dist/commands/judge.js.map +1 -1
- package/dist/commands/policy.js +1 -0
- package/dist/commands/policy.js.map +1 -1
- package/dist/commands/stats.js +2 -0
- package/dist/commands/stats.js.map +1 -1
- package/dist/commands/status.js +1 -0
- package/dist/commands/status.js.map +1 -1
- package/dist/commands/tier.js +16 -19
- package/dist/commands/tier.js.map +1 -1
- package/dist/commands/tools.js +15 -3
- package/dist/commands/tools.js.map +1 -1
- package/dist/commands/whoami.js +5 -2
- package/dist/commands/whoami.js.map +1 -1
- package/package.json +3 -4
- package/dist/client.d.ts +0 -118
- package/dist/client.js +0 -217
- package/dist/client.js.map +0 -1
- package/dist/commands/completion.d.ts +0 -7
- package/dist/commands/completion.js +0 -207
- package/dist/commands/completion.js.map +0 -1
- package/dist/commands/jail.d.ts +0 -6
- package/dist/commands/jail.js +0 -44
- package/dist/commands/jail.js.map +0 -1
- package/dist/commands/org.d.ts +0 -2
- package/dist/commands/org.js +0 -72
- package/dist/commands/org.js.map +0 -1
- package/dist/config.d.ts +0 -25
- package/dist/config.js +0 -94
- package/dist/config.js.map +0 -1
- package/dist/presets.d.ts +0 -14
- package/dist/presets.js +0 -73
- package/dist/presets.js.map +0 -1
package/dist/commands/org.js
DELETED
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.registerOrgCommand = registerOrgCommand;
|
|
7
|
-
const chalk_1 = __importDefault(require("chalk"));
|
|
8
|
-
const ora_1 = __importDefault(require("ora"));
|
|
9
|
-
const client_1 = require("../client");
|
|
10
|
-
const config_1 = require("../config");
|
|
11
|
-
function registerOrgCommand(program) {
|
|
12
|
-
const org = program
|
|
13
|
-
.command("org")
|
|
14
|
-
.description("Manage org membership");
|
|
15
|
-
org
|
|
16
|
-
.command("join")
|
|
17
|
-
.description("Add your agent to an org")
|
|
18
|
-
.option("--org <name>", "Org name to join")
|
|
19
|
-
.option("-k, --agent-key <key>", "Agent private key (to derive pubkey)")
|
|
20
|
-
.option("--agent-pubkey <pubkey>", "Agent public key directly (66 hex chars)")
|
|
21
|
-
.option("--endpoint <url>", "API endpoint URL")
|
|
22
|
-
.option("--json", "Output result as JSON")
|
|
23
|
-
.action(async (opts) => {
|
|
24
|
-
const orgName = opts.org || (0, config_1.resolveOrgName)();
|
|
25
|
-
if (!orgName) {
|
|
26
|
-
console.error(chalk_1.default.red("Error: Org name required.\n") +
|
|
27
|
-
"Provide via --org, ATBASH_ORG_NAME env var, or run " +
|
|
28
|
-
chalk_1.default.cyan("atbash set org-name <name>"));
|
|
29
|
-
process.exit(1);
|
|
30
|
-
}
|
|
31
|
-
let pubkey = opts.agentPubkey || "";
|
|
32
|
-
if (!pubkey) {
|
|
33
|
-
const agentKey = (0, config_1.resolveAgentKey)(opts.agentKey);
|
|
34
|
-
if (!agentKey) {
|
|
35
|
-
console.error(chalk_1.default.red("Error: Agent key or --agent-pubkey required.\n") +
|
|
36
|
-
"Provide via --agent-key, --agent-pubkey, or run " +
|
|
37
|
-
chalk_1.default.cyan("atbash set agent-key <key>"));
|
|
38
|
-
process.exit(1);
|
|
39
|
-
return;
|
|
40
|
-
}
|
|
41
|
-
const cleanKey = agentKey.replace(/^0x/, "").trim().toLowerCase();
|
|
42
|
-
if (!(0, client_1.isValidPrivateKey)(cleanKey)) {
|
|
43
|
-
console.error(chalk_1.default.red("Error: Invalid private key."));
|
|
44
|
-
process.exit(1);
|
|
45
|
-
}
|
|
46
|
-
pubkey = (0, client_1.derivePublicKey)(cleanKey);
|
|
47
|
-
}
|
|
48
|
-
const spinner = opts.json
|
|
49
|
-
? null
|
|
50
|
-
: (0, ora_1.default)(`Adding agent to ${orgName}...`).start();
|
|
51
|
-
try {
|
|
52
|
-
await (0, client_1.addAgentToOrg)(pubkey, orgName, {
|
|
53
|
-
endpoint: (0, config_1.resolveEndpoint)(opts.endpoint),
|
|
54
|
-
});
|
|
55
|
-
spinner?.succeed(`Agent added to ${orgName}`);
|
|
56
|
-
if (opts.json) {
|
|
57
|
-
console.log(JSON.stringify({ agentPubkey: pubkey, orgName, status: "added" }, null, 2));
|
|
58
|
-
return;
|
|
59
|
-
}
|
|
60
|
-
console.log();
|
|
61
|
-
console.log(` Agent: ${chalk_1.default.cyan(pubkey)}`);
|
|
62
|
-
console.log(` Org: ${chalk_1.default.white(orgName)}`);
|
|
63
|
-
}
|
|
64
|
-
catch (err) {
|
|
65
|
-
spinner?.fail("Failed to add agent to org");
|
|
66
|
-
const msg = err instanceof Error ? err.message : String(err);
|
|
67
|
-
console.error(chalk_1.default.red(`\nError: ${err}`));
|
|
68
|
-
process.exit(1);
|
|
69
|
-
}
|
|
70
|
-
});
|
|
71
|
-
}
|
|
72
|
-
//# sourceMappingURL=org.js.map
|
package/dist/commands/org.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"org.js","sourceRoot":"","sources":["../../src/commands/org.ts"],"names":[],"mappings":";;;;;AAMA,gDAyEC;AA9ED,kDAA0B;AAC1B,8CAAsB;AACtB,sCAA8E;AAC9E,sCAA6E;AAE7E,SAAgB,kBAAkB,CAAC,OAAgB;IACjD,MAAM,GAAG,GAAG,OAAO;SAChB,OAAO,CAAC,KAAK,CAAC;SACd,WAAW,CAAC,uBAAuB,CAAC,CAAC;IAExC,GAAG;SACA,OAAO,CAAC,MAAM,CAAC;SACf,WAAW,CAAC,0BAA0B,CAAC;SACvC,MAAM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,CAAC,GAAG,CAAC,YAAY,GAAG,EAAE,CAAC,CAAC,CAAC;YAC5C,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
|
package/dist/config.d.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
declare const CONFIG_FILE: string;
|
|
2
|
-
export interface AtbashConfig {
|
|
3
|
-
agentKey?: string;
|
|
4
|
-
adminKey?: string;
|
|
5
|
-
orgName?: string;
|
|
6
|
-
judgeEndpoint?: string;
|
|
7
|
-
blockchainRid?: string;
|
|
8
|
-
provider?: string;
|
|
9
|
-
providerApiKey?: string;
|
|
10
|
-
providerEndpoint?: string;
|
|
11
|
-
providerModel?: string;
|
|
12
|
-
debug?: boolean;
|
|
13
|
-
}
|
|
14
|
-
export declare function loadConfig(): AtbashConfig;
|
|
15
|
-
export declare function saveConfig(config: AtbashConfig): void;
|
|
16
|
-
/** Resolve a config value with priority: flag > env > file */
|
|
17
|
-
export declare function resolveAgentKey(flagValue?: string): string | undefined;
|
|
18
|
-
export declare function resolveOrgName(flagValue?: string): string | undefined;
|
|
19
|
-
export declare function resolveEndpoint(flagValue?: string): string | undefined;
|
|
20
|
-
export declare function resolveProvider(flagValue?: string): string;
|
|
21
|
-
export declare function resolveProviderApiKey(flagValue?: string): string;
|
|
22
|
-
export declare function resolveProviderEndpoint(flagValue?: string): string;
|
|
23
|
-
export declare function resolveProviderModel(flagValue?: string): string;
|
|
24
|
-
export declare function resolveBlockchainRid(flagValue?: string): string;
|
|
25
|
-
export { CONFIG_FILE };
|
package/dist/config.js
DELETED
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.CONFIG_FILE = void 0;
|
|
37
|
-
exports.loadConfig = loadConfig;
|
|
38
|
-
exports.saveConfig = saveConfig;
|
|
39
|
-
exports.resolveAgentKey = resolveAgentKey;
|
|
40
|
-
exports.resolveOrgName = resolveOrgName;
|
|
41
|
-
exports.resolveEndpoint = resolveEndpoint;
|
|
42
|
-
exports.resolveProvider = resolveProvider;
|
|
43
|
-
exports.resolveProviderApiKey = resolveProviderApiKey;
|
|
44
|
-
exports.resolveProviderEndpoint = resolveProviderEndpoint;
|
|
45
|
-
exports.resolveProviderModel = resolveProviderModel;
|
|
46
|
-
exports.resolveBlockchainRid = resolveBlockchainRid;
|
|
47
|
-
const fs = __importStar(require("fs"));
|
|
48
|
-
const path = __importStar(require("path"));
|
|
49
|
-
const os = __importStar(require("os"));
|
|
50
|
-
const CONFIG_FILE = path.join(os.homedir(), ".atbashrc.json");
|
|
51
|
-
exports.CONFIG_FILE = CONFIG_FILE;
|
|
52
|
-
function loadConfig() {
|
|
53
|
-
try {
|
|
54
|
-
if (fs.existsSync(CONFIG_FILE)) {
|
|
55
|
-
const raw = fs.readFileSync(CONFIG_FILE, "utf-8");
|
|
56
|
-
if (!raw.trim())
|
|
57
|
-
return {};
|
|
58
|
-
return JSON.parse(raw);
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
catch (err) {
|
|
62
|
-
console.error("Failed to load config file", err);
|
|
63
|
-
}
|
|
64
|
-
return {};
|
|
65
|
-
}
|
|
66
|
-
function saveConfig(config) {
|
|
67
|
-
fs.writeFileSync(CONFIG_FILE, JSON.stringify(config, null, 2) + "\n", "utf-8");
|
|
68
|
-
}
|
|
69
|
-
/** Resolve a config value with priority: flag > env > file */
|
|
70
|
-
function resolveAgentKey(flagValue) {
|
|
71
|
-
return flagValue || process.env.ATBASH_AGENT_KEY || loadConfig().agentKey;
|
|
72
|
-
}
|
|
73
|
-
function resolveOrgName(flagValue) {
|
|
74
|
-
return flagValue || process.env.ATBASH_ORG_NAME || loadConfig().orgName;
|
|
75
|
-
}
|
|
76
|
-
function resolveEndpoint(flagValue) {
|
|
77
|
-
return flagValue || process.env.ATBASH_ENDPOINT || loadConfig().judgeEndpoint;
|
|
78
|
-
}
|
|
79
|
-
function resolveProvider(flagValue) {
|
|
80
|
-
return flagValue || process.env.ATBASH_PROVIDER || loadConfig().provider || "";
|
|
81
|
-
}
|
|
82
|
-
function resolveProviderApiKey(flagValue) {
|
|
83
|
-
return flagValue || process.env.ATBASH_PROVIDER_API_KEY || loadConfig().providerApiKey || "";
|
|
84
|
-
}
|
|
85
|
-
function resolveProviderEndpoint(flagValue) {
|
|
86
|
-
return flagValue || process.env.ATBASH_PROVIDER_ENDPOINT || loadConfig().providerEndpoint || "";
|
|
87
|
-
}
|
|
88
|
-
function resolveProviderModel(flagValue) {
|
|
89
|
-
return flagValue || process.env.ATBASH_PROVIDER_MODEL || loadConfig().providerModel || "";
|
|
90
|
-
}
|
|
91
|
-
function resolveBlockchainRid(flagValue) {
|
|
92
|
-
return flagValue || process.env.ATBASH_BLOCKCHAIN_RID || loadConfig().blockchainRid || "";
|
|
93
|
-
}
|
|
94
|
-
//# sourceMappingURL=config.js.map
|
package/dist/config.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmBA,gCAWC;AAED,gCAEC;AAGD,0CAEC;AAED,wCAEC;AAED,0CAEC;AAED,0CAEC;AAED,sDAEC;AAED,0DAEC;AAED,oDAEC;AAED,oDAEC;AAnED,uCAAyB;AACzB,2CAA6B;AAC7B,uCAAyB;AAEzB,MAAM,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,gBAAgB,CAAC,CAAC;AAiErD,kCAAW;AAlDpB,SAAgB,UAAU;IACxB,IAAI,CAAC;QACH,IAAI,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC,EAAE,CAAC;YAC/B,MAAM,GAAG,GAAG,EAAE,CAAC,YAAY,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;YAClD,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE;gBAAE,OAAO,EAAE,CAAC;YAC3B,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAiB,CAAC;QACzC,CAAC;IACH,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,OA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G,CAAC,qBAAqB,IAAI,UAAU,EAAE,CAAC,aAAa,IAAI,EAAE,CAAC;AAC5F,CAAC;AAED,SAAgB,oBAAoB,CAAC,SAAkB;IACrD,OAAO,SAAS,IAAI,OAAO,CAAC,GAAG,CAAC,qBAAqB,IAAI,UAAU,EAAE,CAAC,aAAa,IAAI,EAAE,CAAC;AAC5F,CAAC"}
|
package/dist/presets.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Reference policy shapes for the Atbash CLI.
|
|
3
|
-
*
|
|
4
|
-
* These are reference packs — the starting points an operator might author
|
|
5
|
-
* against. They match the format produced by the dashboard's
|
|
6
|
-
* buildCompactPolicyText(). Production policies are authored, versioned, and
|
|
7
|
-
* signed in the dashboard, not loaded from here.
|
|
8
|
-
*/
|
|
9
|
-
export declare const PRESETS: Record<string, {
|
|
10
|
-
name: string;
|
|
11
|
-
description: string;
|
|
12
|
-
policy: string;
|
|
13
|
-
}>;
|
|
14
|
-
export declare function listPresets(): string[];
|
package/dist/presets.js
DELETED
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Reference policy shapes for the Atbash CLI.
|
|
4
|
-
*
|
|
5
|
-
* These are reference packs — the starting points an operator might author
|
|
6
|
-
* against. They match the format produced by the dashboard's
|
|
7
|
-
* buildCompactPolicyText(). Production policies are authored, versioned, and
|
|
8
|
-
* signed in the dashboard, not loaded from here.
|
|
9
|
-
*/
|
|
10
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
-
exports.PRESETS = void 0;
|
|
12
|
-
exports.listPresets = listPresets;
|
|
13
|
-
exports.PRESETS = {
|
|
14
|
-
strict: {
|
|
15
|
-
name: "Strict",
|
|
16
|
-
description: "Reference shape for privileged-ops agents — blocks IAM elevation, credential export, and bulk exfil; holds every cross-border or over-threshold transfer",
|
|
17
|
-
policy: `Agent Policy
|
|
18
|
-
Risk: high
|
|
19
|
-
|
|
20
|
-
Enabled rules:
|
|
21
|
-
- [Financial] CRITICAL -> BLOCK when Transfers exceeding threshold to unwhitelisted addresses (threshold: $1,000) <!--f1-->
|
|
22
|
-
- [Financial] HIGH -> HOLD when Cross-border transactions (threshold: All) <!--f2-->
|
|
23
|
-
- [Financial] CRITICAL -> BLOCK when Cryptocurrency wallet transfers without 2FA confirmation (threshold: Any amount) <!--f3-->
|
|
24
|
-
- [Financial] HIGH -> HOLD when Invoice generation or payment request above threshold (threshold: $5,000) <!--f5-->
|
|
25
|
-
- [Financial] CRITICAL -> BLOCK when Access to payment gateway API keys or merchant credentials (threshold: Any) <!--f6-->
|
|
26
|
-
- [Communication] HIGH -> BLOCK when Mass emails exceeding recipient threshold without approval (threshold: 50 recipients) <!--c2-->
|
|
27
|
-
- [Communication] CRITICAL -> BLOCK when Outbound messages to domains on blocklist (threshold: Custom list) <!--c5-->
|
|
28
|
-
- [Communication] CRITICAL -> BLOCK when Sending messages impersonating another user or agent (threshold: Any) <!--c7-->
|
|
29
|
-
- [File system] CRITICAL -> BLOCK when Read/write to restricted directories (threshold: /etc, /var, ~/.ssh) <!--fs1-->
|
|
30
|
-
- [File system] CRITICAL -> BLOCK when Access to credential or secret files (threshold: .env, config, secrets.*) <!--fs3-->
|
|
31
|
-
- [Code execution] CRITICAL -> BLOCK when Elevated privilege commands (threshold: sudo, chmod, rm -rf) <!--ce1-->
|
|
32
|
-
- [Code execution] CRITICAL -> BLOCK when Spawning reverse shells or outbound listeners (threshold: Any) <!--ce3-->
|
|
33
|
-
- [Network] CRITICAL -> BLOCK when Connections to malicious or blacklisted domains (threshold: Threat intel feed) <!--nw1-->
|
|
34
|
-
- [Network] CRITICAL -> BLOCK when Data exfiltration exceeding size (threshold: 10 MB) <!--nw4-->
|
|
35
|
-
- [Accounts] CRITICAL -> BLOCK when Privilege escalation or admin scope requests (threshold: Any) <!--ai1-->
|
|
36
|
-
- [Accounts] CRITICAL -> BLOCK when Password or credential reset attempts (threshold: Any) <!--ai4-->`,
|
|
37
|
-
},
|
|
38
|
-
moderate: {
|
|
39
|
-
name: "Moderate",
|
|
40
|
-
description: "Reference shape for business-ops agents — blocks clear red lines, holds mid-blast-radius actions for human review",
|
|
41
|
-
policy: `Agent Policy
|
|
42
|
-
Risk: medium
|
|
43
|
-
|
|
44
|
-
Enabled rules:
|
|
45
|
-
- [Financial] CRITICAL -> BLOCK when Transfers exceeding threshold to unwhitelisted addresses (threshold: $5,000) <!--f1-->
|
|
46
|
-
- [Financial] HIGH -> HOLD when Cross-border transactions (threshold: All) <!--f2-->
|
|
47
|
-
- [Financial] CRITICAL -> BLOCK when Cryptocurrency wallet transfers without 2FA (threshold: Any amount) <!--f3-->
|
|
48
|
-
- [Financial] LOW -> PASS when Recurring payments to pre-approved vendors under threshold (threshold: $500) <!--f4-->
|
|
49
|
-
- [Communication] MEDIUM -> HOLD when Emails to external domains with large attachments (threshold: 5 MB) <!--c1-->
|
|
50
|
-
- [Communication] HIGH -> BLOCK when Mass emails exceeding recipient threshold (threshold: 50 recipients) <!--c2-->
|
|
51
|
-
- [Communication] CRITICAL -> BLOCK when Outbound messages to domains on blocklist (threshold: Custom list) <!--c5-->
|
|
52
|
-
- [Code execution] CRITICAL -> BLOCK when Elevated privilege commands (threshold: sudo, chmod, rm -rf) <!--ce1-->
|
|
53
|
-
- [Code execution] CRITICAL -> BLOCK when Spawning reverse shells or outbound listeners (threshold: Any) <!--ce3-->
|
|
54
|
-
- [Network] CRITICAL -> BLOCK when Connections to malicious or blacklisted domains (threshold: Threat intel feed) <!--nw1-->`,
|
|
55
|
-
},
|
|
56
|
-
minimal: {
|
|
57
|
-
name: "Minimal",
|
|
58
|
-
description: "Reference shape for audit-tier rollout — only the categorical red lines, intended for observation before enforcement is turned on",
|
|
59
|
-
policy: `Agent Policy
|
|
60
|
-
Risk: low
|
|
61
|
-
|
|
62
|
-
Enabled rules:
|
|
63
|
-
- [Financial] CRITICAL -> BLOCK when Transfers exceeding threshold to unwhitelisted addresses (threshold: $10,000) <!--f1-->
|
|
64
|
-
- [Financial] CRITICAL -> BLOCK when Cryptocurrency wallet transfers without 2FA (threshold: Any amount) <!--f3-->
|
|
65
|
-
- [Code execution] CRITICAL -> BLOCK when Spawning reverse shells or outbound listeners (threshold: Any) <!--ce3-->
|
|
66
|
-
- [Network] CRITICAL -> BLOCK when Connections to malicious or blacklisted domains (threshold: Threat intel feed) <!--nw1-->
|
|
67
|
-
- [Network] CRITICAL -> BLOCK when Data exfiltration exceeding size (threshold: 10 MB) <!--nw4-->`,
|
|
68
|
-
},
|
|
69
|
-
};
|
|
70
|
-
function listPresets() {
|
|
71
|
-
return Object.keys(exports.PRESETS);
|
|
72
|
-
}
|
|
73
|
-
//# sourceMappingURL=presets.js.map
|
package/dist/presets.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"presets.js","sourceRoot":"","sources":["../src/presets.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;AA8DH,kCAEC;AA9DY,QAAA,OAAO,GAA0E;IAC5F,MAAM,EAAE;QACN,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,0JAA0J;QACvK,MAAM,EAAE;;;;;;;;;;;;;;;;;;;sGAmB0F;KACnG;IAED,QAAQ,EAAE;QACR,IAAI,EAAE,UAAU;QAChB,WAAW,EAAE,mHAAmH;QAChI,MAAM,EAAE;;;;;;;;;;;;;6HAaiH;KAC1H;IAED,OAAO,EAAE;QACP,IAAI,EAAE,SAAS;QACf,WAAW,EAAE,mIAAmI;QAChJ,MAAM,EAAE;;;;;;;;kGAQsF;KAC/F;CACF,CAAC;AAEF,SAAgB,WAAW;IACzB,OAAO,MAAM,CAAC,IAAI,CAAC,eAAO,CAAC,CAAC;AAC9B,CAAC"}
|