@emilia-protocol/gate 0.10.0 → 0.13.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/CHANGELOG.md +91 -0
- package/README.md +272 -0
- package/action-control-manifest.js +3 -268
- package/action-escrow-custodian.js +4 -0
- package/action-escrow-evidence.js +4 -0
- package/action-escrow-package.js +4 -0
- package/action-escrow-postgres.js +4 -0
- package/action-escrow-state.js +4 -0
- package/action-escrow-verifiers.js +4 -0
- package/action-escrow.js +4 -0
- package/action-packs.js +3 -140
- package/adapters/_kit.js +3 -104
- package/adapters/aws.js +3 -108
- package/adapters/cloudflare.js +3 -54
- package/adapters/gcp.js +3 -70
- package/adapters/github.js +3 -109
- package/adapters/jira.js +3 -55
- package/adapters/k8s.js +3 -70
- package/adapters/linear.js +3 -55
- package/adapters/salesforce.js +3 -55
- package/adapters/stripe.js +3 -81
- package/adapters/supabase.js +3 -121
- package/adapters/terraform.js +3 -59
- package/adapters/vercel.js +3 -84
- package/aec-execution.js +3 -312
- package/breakglass.js +3 -582
- package/capability-receipt.js +4 -0
- package/cf1-conformance.js +3 -106
- package/challenge-store.js +3 -69
- package/control-plane.js +3 -340
- package/coverage.js +3 -721
- package/demo.mjs +1 -1
- package/deployment-attestation.js +3 -247
- package/dist/action-control-manifest.d.ts +82 -0
- package/dist/action-control-manifest.d.ts.map +1 -0
- package/dist/action-control-manifest.js +422 -0
- package/dist/action-control-manifest.js.map +1 -0
- package/dist/action-escrow-custodian.d.ts +74 -0
- package/dist/action-escrow-custodian.d.ts.map +1 -0
- package/dist/action-escrow-custodian.js +363 -0
- package/dist/action-escrow-custodian.js.map +1 -0
- package/dist/action-escrow-evidence.d.ts +130 -0
- package/dist/action-escrow-evidence.d.ts.map +1 -0
- package/dist/action-escrow-evidence.js +1012 -0
- package/dist/action-escrow-evidence.js.map +1 -0
- package/dist/action-escrow-package.d.ts +10 -0
- package/dist/action-escrow-package.d.ts.map +1 -0
- package/dist/action-escrow-package.js +1583 -0
- package/dist/action-escrow-package.js.map +1 -0
- package/dist/action-escrow-postgres.d.ts +62 -0
- package/dist/action-escrow-postgres.d.ts.map +1 -0
- package/dist/action-escrow-postgres.js +339 -0
- package/dist/action-escrow-postgres.js.map +1 -0
- package/dist/action-escrow-state.d.ts +141 -0
- package/dist/action-escrow-state.d.ts.map +1 -0
- package/dist/action-escrow-state.js +413 -0
- package/dist/action-escrow-state.js.map +1 -0
- package/dist/action-escrow-verifiers.d.ts +65 -0
- package/dist/action-escrow-verifiers.d.ts.map +1 -0
- package/dist/action-escrow-verifiers.js +421 -0
- package/dist/action-escrow-verifiers.js.map +1 -0
- package/dist/action-escrow.d.ts +112 -0
- package/dist/action-escrow.d.ts.map +1 -0
- package/dist/action-escrow.js +2661 -0
- package/dist/action-escrow.js.map +1 -0
- package/dist/action-packs.d.ts +54 -0
- package/dist/action-packs.d.ts.map +1 -0
- package/dist/action-packs.js +143 -0
- package/dist/action-packs.js.map +1 -0
- package/dist/adapters/_kit.d.ts +50 -0
- package/dist/adapters/_kit.d.ts.map +1 -0
- package/dist/adapters/_kit.js +98 -0
- package/dist/adapters/_kit.js.map +1 -0
- package/dist/adapters/aws.d.ts +158 -0
- package/dist/adapters/aws.d.ts.map +1 -0
- package/dist/adapters/aws.js +136 -0
- package/dist/adapters/aws.js.map +1 -0
- package/dist/adapters/cloudflare.d.ts +116 -0
- package/dist/adapters/cloudflare.d.ts.map +1 -0
- package/dist/adapters/cloudflare.js +75 -0
- package/dist/adapters/cloudflare.js.map +1 -0
- package/dist/adapters/gcp.d.ts +139 -0
- package/dist/adapters/gcp.d.ts.map +1 -0
- package/dist/adapters/gcp.js +69 -0
- package/dist/adapters/gcp.js.map +1 -0
- package/dist/adapters/github.d.ts +123 -0
- package/dist/adapters/github.d.ts.map +1 -0
- package/dist/adapters/github.js +105 -0
- package/dist/adapters/github.js.map +1 -0
- package/dist/adapters/jira.d.ts +109 -0
- package/dist/adapters/jira.d.ts.map +1 -0
- package/dist/adapters/jira.js +54 -0
- package/dist/adapters/jira.js.map +1 -0
- package/dist/adapters/k8s.d.ts +139 -0
- package/dist/adapters/k8s.d.ts.map +1 -0
- package/dist/adapters/k8s.js +69 -0
- package/dist/adapters/k8s.js.map +1 -0
- package/dist/adapters/linear.d.ts +109 -0
- package/dist/adapters/linear.d.ts.map +1 -0
- package/dist/adapters/linear.js +54 -0
- package/dist/adapters/linear.js.map +1 -0
- package/dist/adapters/salesforce.d.ts +109 -0
- package/dist/adapters/salesforce.d.ts.map +1 -0
- package/dist/adapters/salesforce.js +54 -0
- package/dist/adapters/salesforce.js.map +1 -0
- package/dist/adapters/stripe.d.ts +116 -0
- package/dist/adapters/stripe.d.ts.map +1 -0
- package/dist/adapters/stripe.js +77 -0
- package/dist/adapters/stripe.js.map +1 -0
- package/dist/adapters/supabase.d.ts +127 -0
- package/dist/adapters/supabase.d.ts.map +1 -0
- package/dist/adapters/supabase.js +112 -0
- package/dist/adapters/supabase.js.map +1 -0
- package/dist/adapters/terraform.d.ts +109 -0
- package/dist/adapters/terraform.d.ts.map +1 -0
- package/dist/adapters/terraform.js +58 -0
- package/dist/adapters/terraform.js.map +1 -0
- package/dist/adapters/vercel.d.ts +114 -0
- package/dist/adapters/vercel.d.ts.map +1 -0
- package/dist/adapters/vercel.js +81 -0
- package/dist/adapters/vercel.js.map +1 -0
- package/dist/aec-execution.d.ts +107 -0
- package/dist/aec-execution.d.ts.map +1 -0
- package/dist/aec-execution.js +334 -0
- package/dist/aec-execution.js.map +1 -0
- package/dist/breakglass.d.ts +205 -0
- package/dist/breakglass.d.ts.map +1 -0
- package/dist/breakglass.js +627 -0
- package/dist/breakglass.js.map +1 -0
- package/dist/capability-receipt.d.ts +601 -0
- package/dist/capability-receipt.d.ts.map +1 -0
- package/dist/capability-receipt.js +1177 -0
- package/dist/capability-receipt.js.map +1 -0
- package/dist/cf1-conformance.d.ts +83 -0
- package/dist/cf1-conformance.d.ts.map +1 -0
- package/dist/cf1-conformance.js +94 -0
- package/dist/cf1-conformance.js.map +1 -0
- package/dist/challenge-store.d.ts +20 -0
- package/dist/challenge-store.d.ts.map +1 -0
- package/dist/challenge-store.js +62 -0
- package/dist/challenge-store.js.map +1 -0
- package/dist/control-plane.d.ts +136 -0
- package/dist/control-plane.d.ts.map +1 -0
- package/dist/control-plane.js +349 -0
- package/dist/control-plane.js.map +1 -0
- package/dist/coverage.d.ts +156 -0
- package/dist/coverage.d.ts.map +1 -0
- package/dist/coverage.js +768 -0
- package/dist/coverage.js.map +1 -0
- package/dist/deployment-attestation.d.ts +93 -0
- package/dist/deployment-attestation.d.ts.map +1 -0
- package/dist/deployment-attestation.js +262 -0
- package/dist/deployment-attestation.js.map +1 -0
- package/dist/eg1-conformance.d.ts +286 -0
- package/dist/eg1-conformance.d.ts.map +1 -0
- package/dist/eg1-conformance.js +379 -0
- package/dist/eg1-conformance.js.map +1 -0
- package/dist/enterprise.d.ts +88 -0
- package/dist/enterprise.d.ts.map +1 -0
- package/dist/enterprise.js +194 -0
- package/dist/enterprise.js.map +1 -0
- package/dist/evidence-postgres.d.ts +123 -0
- package/dist/evidence-postgres.d.ts.map +1 -0
- package/dist/evidence-postgres.js +343 -0
- package/dist/evidence-postgres.js.map +1 -0
- package/dist/evidence.d.ts +113 -0
- package/dist/evidence.d.ts.map +1 -0
- package/dist/evidence.js +369 -0
- package/dist/evidence.js.map +1 -0
- package/dist/execution-binding.d.ts +49 -0
- package/dist/execution-binding.d.ts.map +1 -0
- package/dist/execution-binding.js +243 -0
- package/dist/execution-binding.js.map +1 -0
- package/dist/formal-runtime-map.d.ts +42 -0
- package/dist/formal-runtime-map.d.ts.map +1 -0
- package/dist/formal-runtime-map.js +23 -0
- package/dist/formal-runtime-map.js.map +1 -0
- package/dist/index.d.ts +1002 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1736 -0
- package/dist/index.js.map +1 -0
- package/dist/key-registry.d.ts +60 -0
- package/dist/key-registry.d.ts.map +1 -0
- package/dist/key-registry.js +144 -0
- package/dist/key-registry.js.map +1 -0
- package/dist/mcp.d.ts +53 -0
- package/dist/mcp.d.ts.map +1 -0
- package/dist/mcp.js +112 -0
- package/dist/mcp.js.map +1 -0
- package/dist/metering.d.ts +80 -0
- package/dist/metering.d.ts.map +1 -0
- package/dist/metering.js +227 -0
- package/dist/metering.js.map +1 -0
- package/dist/metrics.d.ts +68 -0
- package/dist/metrics.d.ts.map +1 -0
- package/dist/metrics.js +242 -0
- package/dist/metrics.js.map +1 -0
- package/dist/network-witness.d.ts +167 -0
- package/dist/network-witness.d.ts.map +1 -0
- package/dist/network-witness.js +520 -0
- package/dist/network-witness.js.map +1 -0
- package/dist/protocol-state.d.ts +141 -0
- package/dist/protocol-state.d.ts.map +1 -0
- package/dist/protocol-state.js +106 -0
- package/dist/protocol-state.js.map +1 -0
- package/dist/receipt-program.d.ts +59 -0
- package/dist/receipt-program.d.ts.map +1 -0
- package/dist/receipt-program.js +1053 -0
- package/dist/receipt-program.js.map +1 -0
- package/dist/reliance-kernel.d.ts +66 -0
- package/dist/reliance-kernel.d.ts.map +1 -0
- package/dist/reliance-kernel.js +103 -0
- package/dist/reliance-kernel.js.map +1 -0
- package/dist/reliance-packet.d.ts +67 -0
- package/dist/reliance-packet.d.ts.map +1 -0
- package/dist/reliance-packet.js +176 -0
- package/dist/reliance-packet.js.map +1 -0
- package/dist/remedy-program-postgres.d.ts +37 -0
- package/dist/remedy-program-postgres.d.ts.map +1 -0
- package/dist/remedy-program-postgres.js +291 -0
- package/dist/remedy-program-postgres.js.map +1 -0
- package/dist/remedy-program-receipt.d.ts +97 -0
- package/dist/remedy-program-receipt.d.ts.map +1 -0
- package/dist/remedy-program-receipt.js +817 -0
- package/dist/remedy-program-receipt.js.map +1 -0
- package/dist/remedy-program.d.ts +76 -0
- package/dist/remedy-program.d.ts.map +1 -0
- package/dist/remedy-program.js +1346 -0
- package/dist/remedy-program.js.map +1 -0
- package/dist/reports/art14.d.ts +101 -0
- package/dist/reports/art14.d.ts.map +1 -0
- package/dist/reports/art14.js +340 -0
- package/dist/reports/art14.js.map +1 -0
- package/dist/reports/assurance-package.d.ts +197 -0
- package/dist/reports/assurance-package.d.ts.map +1 -0
- package/dist/reports/assurance-package.js +313 -0
- package/dist/reports/assurance-package.js.map +1 -0
- package/dist/reports/auditor-workpaper.d.ts +194 -0
- package/dist/reports/auditor-workpaper.d.ts.map +1 -0
- package/dist/reports/auditor-workpaper.js +545 -0
- package/dist/reports/auditor-workpaper.js.map +1 -0
- package/dist/reports/external-verification.d.ts +76 -0
- package/dist/reports/external-verification.d.ts.map +1 -0
- package/dist/reports/external-verification.js +209 -0
- package/dist/reports/external-verification.js.map +1 -0
- package/dist/reports/reperform.d.ts +122 -0
- package/dist/reports/reperform.d.ts.map +1 -0
- package/dist/reports/reperform.js +432 -0
- package/dist/reports/reperform.js.map +1 -0
- package/dist/reports/underwriter.d.ts +127 -0
- package/dist/reports/underwriter.d.ts.map +1 -0
- package/dist/reports/underwriter.js +348 -0
- package/dist/reports/underwriter.js.map +1 -0
- package/dist/retention.d.ts +88 -0
- package/dist/retention.d.ts.map +1 -0
- package/dist/retention.js +90 -0
- package/dist/retention.js.map +1 -0
- package/dist/roster.d.ts +113 -0
- package/dist/roster.d.ts.map +1 -0
- package/dist/roster.js +261 -0
- package/dist/roster.js.map +1 -0
- package/dist/runtime-monitor.d.ts +132 -0
- package/dist/runtime-monitor.d.ts.map +1 -0
- package/dist/runtime-monitor.js +197 -0
- package/dist/runtime-monitor.js.map +1 -0
- package/dist/settlement.d.ts +68 -0
- package/dist/settlement.d.ts.map +1 -0
- package/dist/settlement.js +306 -0
- package/dist/settlement.js.map +1 -0
- package/dist/siem.d.ts +261 -0
- package/dist/siem.d.ts.map +1 -0
- package/dist/siem.js +247 -0
- package/dist/siem.js.map +1 -0
- package/dist/store-postgres.d.ts +107 -0
- package/dist/store-postgres.d.ts.map +1 -0
- package/dist/store-postgres.js +152 -0
- package/dist/store-postgres.js.map +1 -0
- package/dist/store.d.ts +95 -0
- package/dist/store.d.ts.map +1 -0
- package/dist/store.js +202 -0
- package/dist/store.js.map +1 -0
- package/dist/strict-json.d.ts +14 -0
- package/dist/strict-json.d.ts.map +1 -0
- package/dist/strict-json.js +132 -0
- package/dist/strict-json.js.map +1 -0
- package/dist/trust-program-adapters.d.ts +122 -0
- package/dist/trust-program-adapters.d.ts.map +1 -0
- package/dist/trust-program-adapters.js +802 -0
- package/dist/trust-program-adapters.js.map +1 -0
- package/dist/trust-program-postgres.d.ts +41 -0
- package/dist/trust-program-postgres.d.ts.map +1 -0
- package/dist/trust-program-postgres.js +346 -0
- package/dist/trust-program-postgres.js.map +1 -0
- package/dist/trust-program-revocation.d.ts +206 -0
- package/dist/trust-program-revocation.d.ts.map +1 -0
- package/dist/trust-program-revocation.js +600 -0
- package/dist/trust-program-revocation.js.map +1 -0
- package/dist/trust-program.d.ts +197 -0
- package/dist/trust-program.d.ts.map +1 -0
- package/dist/trust-program.js +1351 -0
- package/dist/trust-program.js.map +1 -0
- package/dist/witness-postgres.d.ts +43 -0
- package/dist/witness-postgres.d.ts.map +1 -0
- package/dist/witness-postgres.js +92 -0
- package/dist/witness-postgres.js.map +1 -0
- package/dist/zk-range-proof.d.ts +78 -0
- package/dist/zk-range-proof.d.ts.map +1 -0
- package/dist/zk-range-proof.js +228 -0
- package/dist/zk-range-proof.js.map +1 -0
- package/eg1-conformance.js +3 -404
- package/enterprise.js +3 -180
- package/ep-assure.mjs +1 -0
- package/evidence-postgres.js +3 -356
- package/evidence.js +4 -360
- package/execution-binding.js +3 -212
- package/formal-runtime-map.js +4 -0
- package/index.js +4 -1249
- package/key-registry.js +3 -134
- package/mcp.js +3 -109
- package/metering.js +3 -226
- package/metrics.js +3 -231
- package/network-witness.js +3 -499
- package/package.json +47 -4
- package/receipt-program.js +4 -0
- package/reliance-kernel.js +3 -112
- package/reliance-packet.js +3 -175
- package/remedy-program-postgres.js +4 -0
- package/remedy-program-receipt.js +4 -0
- package/remedy-program.js +4 -0
- package/reports/art14.js +0 -0
- package/reports/assurance-package.js +2 -312
- package/reports/auditor-workpaper.js +3 -537
- package/reports/external-verification.js +3 -222
- package/reports/reperform.js +3 -424
- package/reports/underwriter.js +3 -339
- package/retention.js +3 -84
- package/roster.js +3 -264
- package/runtime-monitor.js +4 -0
- package/settlement.js +3 -299
- package/siem.js +3 -235
- package/src/action-control-manifest.ts +424 -0
- package/src/action-escrow-custodian.ts +427 -0
- package/src/action-escrow-evidence.ts +1178 -0
- package/src/action-escrow-package.ts +1821 -0
- package/src/action-escrow-postgres.ts +366 -0
- package/src/action-escrow-state.ts +498 -0
- package/src/action-escrow-verifiers.ts +484 -0
- package/src/action-escrow.ts +3039 -0
- package/src/action-packs.ts +170 -0
- package/src/adapters/_kit.ts +117 -0
- package/src/adapters/aws.ts +142 -0
- package/src/adapters/cloudflare.ts +78 -0
- package/src/adapters/gcp.ts +71 -0
- package/src/adapters/github.ts +110 -0
- package/src/adapters/jira.ts +56 -0
- package/src/adapters/k8s.ts +71 -0
- package/src/adapters/linear.ts +56 -0
- package/src/adapters/salesforce.ts +56 -0
- package/src/adapters/stripe.ts +82 -0
- package/src/adapters/supabase.ts +122 -0
- package/src/adapters/terraform.ts +60 -0
- package/src/adapters/vercel.ts +85 -0
- package/src/aec-execution.ts +354 -0
- package/src/breakglass.ts +647 -0
- package/src/capability-receipt.ts +1258 -0
- package/src/cf1-conformance.ts +120 -0
- package/src/challenge-store.ts +70 -0
- package/src/control-plane.ts +374 -0
- package/src/coverage.ts +832 -0
- package/src/deployment-attestation.ts +259 -0
- package/src/eg1-conformance.ts +471 -0
- package/src/enterprise.ts +195 -0
- package/src/evidence-postgres.ts +374 -0
- package/src/evidence.ts +367 -0
- package/src/execution-binding.ts +236 -0
- package/src/formal-runtime-map.ts +24 -0
- package/src/index.ts +2122 -0
- package/src/key-registry.ts +150 -0
- package/src/mcp.ts +120 -0
- package/src/metering.ts +237 -0
- package/src/metrics.ts +232 -0
- package/src/network-witness.ts +585 -0
- package/src/protocol-state.ts +143 -0
- package/src/protocol-state.typecheck.ts +94 -0
- package/src/receipt-program.ts +1105 -0
- package/src/reliance-kernel.ts +119 -0
- package/src/reliance-packet.ts +206 -0
- package/src/remedy-program-postgres.ts +367 -0
- package/src/remedy-program-receipt.ts +891 -0
- package/src/remedy-program.ts +1388 -0
- package/src/reports/art14.ts +361 -0
- package/src/reports/assurance-package.ts +330 -0
- package/src/reports/auditor-workpaper.ts +558 -0
- package/src/reports/external-verification.ts +232 -0
- package/src/reports/reperform.ts +441 -0
- package/src/reports/underwriter.ts +356 -0
- package/src/retention.ts +100 -0
- package/src/roster.ts +273 -0
- package/src/runtime-monitor.ts +217 -0
- package/src/settlement.ts +313 -0
- package/src/siem.ts +247 -0
- package/src/store-postgres.ts +167 -0
- package/src/store.ts +214 -0
- package/src/strict-json.ts +115 -0
- package/src/trust-program-adapters.ts +847 -0
- package/src/trust-program-postgres.ts +429 -0
- package/src/trust-program-revocation.ts +751 -0
- package/src/trust-program.ts +1460 -0
- package/src/witness-postgres.ts +106 -0
- package/src/zk-range-proof.ts +250 -0
- package/store-postgres.js +3 -161
- package/store.js +4 -198
- package/strict-json.js +3 -85
- package/trust-program-adapters.js +4 -0
- package/trust-program-postgres.js +4 -0
- package/trust-program-revocation.js +4 -0
- package/trust-program.js +4 -0
- package/witness-postgres.js +3 -96
- package/zk-range-proof.js +4 -0
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @typedef {object} AwsIamClient
|
|
3
|
+
* @property {(input: {UserName: string, PolicyArn: string}) => any} attachUserPolicy
|
|
4
|
+
* @property {(input: {UserName: string}) => any} createAccessKey
|
|
5
|
+
* @property {(input: {UserName: string}) => any} deleteUser
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* @typedef {object} AwsEc2Client
|
|
9
|
+
* @property {(input: {GroupId: string, CidrIp: string, FromPort: number, ToPort: number, IpProtocol: string}) => any} authorizeSecurityGroupIngress
|
|
10
|
+
*/
|
|
11
|
+
/** @typedef {{ iam: AwsIamClient, ec2: AwsEc2Client }} AwsClient */
|
|
12
|
+
export declare const AWS_ACTION_PACK: readonly (Readonly<{
|
|
13
|
+
id: "aws.iam.attach_policy";
|
|
14
|
+
label: "IAM attach policy";
|
|
15
|
+
action_type: "aws.iam.attach_policy";
|
|
16
|
+
risk: "critical";
|
|
17
|
+
receipt_required: true;
|
|
18
|
+
assurance_class: "quorum";
|
|
19
|
+
match: {
|
|
20
|
+
protocol: string;
|
|
21
|
+
tool: string;
|
|
22
|
+
};
|
|
23
|
+
why: "Grants permissions. Privilege escalation deserves the two-person rule.";
|
|
24
|
+
execution_binding: {
|
|
25
|
+
required_fields: string[];
|
|
26
|
+
};
|
|
27
|
+
}> | Readonly<{
|
|
28
|
+
id: "aws.iam.create_access_key";
|
|
29
|
+
label: "IAM create access key";
|
|
30
|
+
action_type: "aws.iam.create_access_key";
|
|
31
|
+
risk: "critical";
|
|
32
|
+
receipt_required: true;
|
|
33
|
+
assurance_class: "class_a";
|
|
34
|
+
match: {
|
|
35
|
+
protocol: string;
|
|
36
|
+
tool: string;
|
|
37
|
+
};
|
|
38
|
+
why: "Mints long-lived credentials. Bind the user to a named approval.";
|
|
39
|
+
execution_binding: {
|
|
40
|
+
required_fields: string[];
|
|
41
|
+
};
|
|
42
|
+
}> | Readonly<{
|
|
43
|
+
id: "aws.iam.delete_user";
|
|
44
|
+
label: "IAM delete user";
|
|
45
|
+
action_type: "aws.iam.delete_user";
|
|
46
|
+
risk: "high";
|
|
47
|
+
receipt_required: true;
|
|
48
|
+
assurance_class: "class_a";
|
|
49
|
+
match: {
|
|
50
|
+
protocol: string;
|
|
51
|
+
tool: string;
|
|
52
|
+
};
|
|
53
|
+
why: "Destroys an identity. Bind the target user.";
|
|
54
|
+
execution_binding: {
|
|
55
|
+
required_fields: string[];
|
|
56
|
+
};
|
|
57
|
+
}> | Readonly<{
|
|
58
|
+
id: "aws.ec2.authorize_ingress";
|
|
59
|
+
label: "Open security-group ingress";
|
|
60
|
+
action_type: "aws.ec2.authorize_ingress";
|
|
61
|
+
risk: "critical";
|
|
62
|
+
receipt_required: true;
|
|
63
|
+
assurance_class: "quorum";
|
|
64
|
+
match: {
|
|
65
|
+
protocol: string;
|
|
66
|
+
tool: string;
|
|
67
|
+
};
|
|
68
|
+
why: "Opens the network. Bind group/CIDR/port so 0.0.0.0/0:22 cannot slip through.";
|
|
69
|
+
execution_binding: {
|
|
70
|
+
required_fields: string[];
|
|
71
|
+
};
|
|
72
|
+
}>)[];
|
|
73
|
+
export declare const AWS_OPS: readonly string[];
|
|
74
|
+
/** @param {object[]} extraActions */
|
|
75
|
+
export declare function createAwsManifest(extraActions?: never[]): {
|
|
76
|
+
'@version': string;
|
|
77
|
+
actions: any[];
|
|
78
|
+
};
|
|
79
|
+
/**
|
|
80
|
+
* Guard a high-blast-radius AWS mutation behind the gate.
|
|
81
|
+
* @param {object} gate a gate built with createAwsManifest()
|
|
82
|
+
* @param {AwsClient} client { iam: {attachUserPolicy, createAccessKey, deleteUser}, ec2: {authorizeSecurityGroupIngress} }
|
|
83
|
+
* @param {{ op: string, params?: object, receipt?: any }} args { op, params, receipt }
|
|
84
|
+
* @throws Error{code:'EMILIA_RECEIPT_REQUIRED'} if refused — the call never reaches AWS
|
|
85
|
+
*/
|
|
86
|
+
export declare function guardAwsMutation(gate: any, client: any, args: any): Promise<{
|
|
87
|
+
result: any;
|
|
88
|
+
reliance: any;
|
|
89
|
+
execution: any;
|
|
90
|
+
}>;
|
|
91
|
+
declare const _default: {
|
|
92
|
+
AWS_ACTION_PACK: readonly (Readonly<{
|
|
93
|
+
id: "aws.iam.attach_policy";
|
|
94
|
+
label: "IAM attach policy";
|
|
95
|
+
action_type: "aws.iam.attach_policy";
|
|
96
|
+
risk: "critical";
|
|
97
|
+
receipt_required: true;
|
|
98
|
+
assurance_class: "quorum";
|
|
99
|
+
match: {
|
|
100
|
+
protocol: string;
|
|
101
|
+
tool: string;
|
|
102
|
+
};
|
|
103
|
+
why: "Grants permissions. Privilege escalation deserves the two-person rule.";
|
|
104
|
+
execution_binding: {
|
|
105
|
+
required_fields: string[];
|
|
106
|
+
};
|
|
107
|
+
}> | Readonly<{
|
|
108
|
+
id: "aws.iam.create_access_key";
|
|
109
|
+
label: "IAM create access key";
|
|
110
|
+
action_type: "aws.iam.create_access_key";
|
|
111
|
+
risk: "critical";
|
|
112
|
+
receipt_required: true;
|
|
113
|
+
assurance_class: "class_a";
|
|
114
|
+
match: {
|
|
115
|
+
protocol: string;
|
|
116
|
+
tool: string;
|
|
117
|
+
};
|
|
118
|
+
why: "Mints long-lived credentials. Bind the user to a named approval.";
|
|
119
|
+
execution_binding: {
|
|
120
|
+
required_fields: string[];
|
|
121
|
+
};
|
|
122
|
+
}> | Readonly<{
|
|
123
|
+
id: "aws.iam.delete_user";
|
|
124
|
+
label: "IAM delete user";
|
|
125
|
+
action_type: "aws.iam.delete_user";
|
|
126
|
+
risk: "high";
|
|
127
|
+
receipt_required: true;
|
|
128
|
+
assurance_class: "class_a";
|
|
129
|
+
match: {
|
|
130
|
+
protocol: string;
|
|
131
|
+
tool: string;
|
|
132
|
+
};
|
|
133
|
+
why: "Destroys an identity. Bind the target user.";
|
|
134
|
+
execution_binding: {
|
|
135
|
+
required_fields: string[];
|
|
136
|
+
};
|
|
137
|
+
}> | Readonly<{
|
|
138
|
+
id: "aws.ec2.authorize_ingress";
|
|
139
|
+
label: "Open security-group ingress";
|
|
140
|
+
action_type: "aws.ec2.authorize_ingress";
|
|
141
|
+
risk: "critical";
|
|
142
|
+
receipt_required: true;
|
|
143
|
+
assurance_class: "quorum";
|
|
144
|
+
match: {
|
|
145
|
+
protocol: string;
|
|
146
|
+
tool: string;
|
|
147
|
+
};
|
|
148
|
+
why: "Opens the network. Bind group/CIDR/port so 0.0.0.0/0:22 cannot slip through.";
|
|
149
|
+
execution_binding: {
|
|
150
|
+
required_fields: string[];
|
|
151
|
+
};
|
|
152
|
+
}>)[];
|
|
153
|
+
AWS_OPS: readonly string[];
|
|
154
|
+
createAwsManifest: typeof createAwsManifest;
|
|
155
|
+
guardAwsMutation: typeof guardAwsMutation;
|
|
156
|
+
};
|
|
157
|
+
export default _default;
|
|
158
|
+
//# sourceMappingURL=aws.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aws.d.ts","sourceRoot":"","sources":["../../src/adapters/aws.ts"],"names":[],"mappings":"AAuBA;;;;;GAKG;AACH;;;GAGG;AACH,oEAAoE;AAEpE,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA6B1B,CAAC;AA2DH,eAAO,MAAM,OAAO,mBAAc,CAAC;AAEnC,qCAAqC;AACrC,wBAAgB,iBAAiB,CAAC,YAAY,UAAK;;;EAElD;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,KAAA,EAAE,MAAM,KAAA,EAAE,IAAI,KAAA;;;;GAElD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAED,wBAAiF"}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
/**
|
|
3
|
+
* EMILIA Gate — AWS System-of-Record adapter (IAM + network).
|
|
4
|
+
*
|
|
5
|
+
* "Install this before your agent can change cloud permissions or open the
|
|
6
|
+
* network." Wraps the high-blast-radius AWS operations — attach IAM policy,
|
|
7
|
+
* create access key, delete user, and open a security-group ingress — so they
|
|
8
|
+
* never reach AWS without a valid, sufficiently-assured, non-replayed receipt
|
|
9
|
+
* bound to THIS principal/policy/group. Privilege and network changes default
|
|
10
|
+
* to quorum (the two-person rule).
|
|
11
|
+
*
|
|
12
|
+
* import { IAMClient, EC2Client } from '@aws-sdk/...';
|
|
13
|
+
* import { createGate } from '@emilia-protocol/gate';
|
|
14
|
+
* import { createAwsManifest, guardAwsMutation } from '@emilia-protocol/gate/adapters/aws';
|
|
15
|
+
*
|
|
16
|
+
* const gate = createGate({ manifest: createAwsManifest(), trustedKeys: [ISSUER], store: sharedConsumptionStore });
|
|
17
|
+
* // client: { iam: { attachUserPolicy, createAccessKey, deleteUser }, ec2: { authorizeSecurityGroupIngress } }
|
|
18
|
+
* await guardAwsMutation(gate, client, {
|
|
19
|
+
* op: 'iam.attach_policy', params: { user: 'svc-bot', policy_arn: 'arn:aws:iam::aws:policy/AdministratorAccess' }, receipt,
|
|
20
|
+
* });
|
|
21
|
+
*/
|
|
22
|
+
import { createAdapter, manifestFromPack } from './_kit.js';
|
|
23
|
+
/**
|
|
24
|
+
* @typedef {object} AwsIamClient
|
|
25
|
+
* @property {(input: {UserName: string, PolicyArn: string}) => any} attachUserPolicy
|
|
26
|
+
* @property {(input: {UserName: string}) => any} createAccessKey
|
|
27
|
+
* @property {(input: {UserName: string}) => any} deleteUser
|
|
28
|
+
*/
|
|
29
|
+
/**
|
|
30
|
+
* @typedef {object} AwsEc2Client
|
|
31
|
+
* @property {(input: {GroupId: string, CidrIp: string, FromPort: number, ToPort: number, IpProtocol: string}) => any} authorizeSecurityGroupIngress
|
|
32
|
+
*/
|
|
33
|
+
/** @typedef {{ iam: AwsIamClient, ec2: AwsEc2Client }} AwsClient */
|
|
34
|
+
export const AWS_ACTION_PACK = Object.freeze([
|
|
35
|
+
Object.freeze({
|
|
36
|
+
id: 'aws.iam.attach_policy', label: 'IAM attach policy', action_type: 'aws.iam.attach_policy',
|
|
37
|
+
risk: 'critical', receipt_required: true, assurance_class: 'quorum',
|
|
38
|
+
match: { protocol: 'aws', tool: 'attach_user_policy' },
|
|
39
|
+
why: 'Grants permissions. Privilege escalation deserves the two-person rule.',
|
|
40
|
+
execution_binding: { required_fields: ['action_type', 'user', 'policy_arn'] },
|
|
41
|
+
}),
|
|
42
|
+
Object.freeze({
|
|
43
|
+
id: 'aws.iam.create_access_key', label: 'IAM create access key', action_type: 'aws.iam.create_access_key',
|
|
44
|
+
risk: 'critical', receipt_required: true, assurance_class: 'class_a',
|
|
45
|
+
match: { protocol: 'aws', tool: 'create_access_key' },
|
|
46
|
+
why: 'Mints long-lived credentials. Bind the user to a named approval.',
|
|
47
|
+
execution_binding: { required_fields: ['action_type', 'user'] },
|
|
48
|
+
}),
|
|
49
|
+
Object.freeze({
|
|
50
|
+
id: 'aws.iam.delete_user', label: 'IAM delete user', action_type: 'aws.iam.delete_user',
|
|
51
|
+
risk: 'high', receipt_required: true, assurance_class: 'class_a',
|
|
52
|
+
match: { protocol: 'aws', tool: 'delete_user' },
|
|
53
|
+
why: 'Destroys an identity. Bind the target user.',
|
|
54
|
+
execution_binding: { required_fields: ['action_type', 'user'] },
|
|
55
|
+
}),
|
|
56
|
+
Object.freeze({
|
|
57
|
+
id: 'aws.ec2.authorize_ingress', label: 'Open security-group ingress', action_type: 'aws.ec2.authorize_ingress',
|
|
58
|
+
risk: 'critical', receipt_required: true, assurance_class: 'quorum',
|
|
59
|
+
match: { protocol: 'aws', tool: 'authorize_security_group_ingress' },
|
|
60
|
+
why: 'Opens the network. Bind group/CIDR/port so 0.0.0.0/0:22 cannot slip through.',
|
|
61
|
+
execution_binding: { required_fields: ['action_type', 'group_id', 'cidr', 'protocol', 'from_port', 'to_port'] },
|
|
62
|
+
}),
|
|
63
|
+
]);
|
|
64
|
+
const OPS = {
|
|
65
|
+
'iam.attach_policy': {
|
|
66
|
+
selector: { protocol: 'aws', tool: 'attach_user_policy' },
|
|
67
|
+
/** @param {{user: string, policy_arn: string}} p */
|
|
68
|
+
observed: (p) => ({ action_type: 'aws.iam.attach_policy', user: p.user, policy_arn: p.policy_arn }),
|
|
69
|
+
/**
|
|
70
|
+
* @param {AwsClient} client
|
|
71
|
+
* @param {{user: string, policy_arn: string}} p
|
|
72
|
+
*/
|
|
73
|
+
perform: (client, p) => client.iam.attachUserPolicy({ UserName: p.user, PolicyArn: p.policy_arn }),
|
|
74
|
+
},
|
|
75
|
+
'iam.create_access_key': {
|
|
76
|
+
selector: { protocol: 'aws', tool: 'create_access_key' },
|
|
77
|
+
/** @param {{user: string}} p */
|
|
78
|
+
observed: (p) => ({ action_type: 'aws.iam.create_access_key', user: p.user }),
|
|
79
|
+
/**
|
|
80
|
+
* @param {AwsClient} client
|
|
81
|
+
* @param {{user: string}} p
|
|
82
|
+
*/
|
|
83
|
+
perform: (client, p) => client.iam.createAccessKey({ UserName: p.user }),
|
|
84
|
+
},
|
|
85
|
+
'iam.delete_user': {
|
|
86
|
+
selector: { protocol: 'aws', tool: 'delete_user' },
|
|
87
|
+
/** @param {{user: string}} p */
|
|
88
|
+
observed: (p) => ({ action_type: 'aws.iam.delete_user', user: p.user }),
|
|
89
|
+
/**
|
|
90
|
+
* @param {AwsClient} client
|
|
91
|
+
* @param {{user: string}} p
|
|
92
|
+
*/
|
|
93
|
+
perform: (client, p) => client.iam.deleteUser({ UserName: p.user }),
|
|
94
|
+
},
|
|
95
|
+
'ec2.authorize_ingress': {
|
|
96
|
+
selector: { protocol: 'aws', tool: 'authorize_security_group_ingress' },
|
|
97
|
+
/** @param {{group_id: string, cidr: string, protocol?: string, from_port: number, to_port?: number}} p */
|
|
98
|
+
observed: (p) => ({
|
|
99
|
+
action_type: 'aws.ec2.authorize_ingress',
|
|
100
|
+
group_id: p.group_id,
|
|
101
|
+
cidr: p.cidr,
|
|
102
|
+
protocol: p.protocol ?? 'tcp',
|
|
103
|
+
from_port: p.from_port,
|
|
104
|
+
to_port: p.to_port ?? p.from_port,
|
|
105
|
+
}),
|
|
106
|
+
/**
|
|
107
|
+
* @param {AwsClient} client
|
|
108
|
+
* @param {{group_id: string, cidr: string, protocol: string, from_port: number, to_port: number}} p
|
|
109
|
+
*/
|
|
110
|
+
perform: (client, p) => client.ec2.authorizeSecurityGroupIngress({
|
|
111
|
+
GroupId: p.group_id,
|
|
112
|
+
CidrIp: p.cidr,
|
|
113
|
+
FromPort: p.from_port,
|
|
114
|
+
ToPort: p.to_port,
|
|
115
|
+
IpProtocol: p.protocol,
|
|
116
|
+
}),
|
|
117
|
+
},
|
|
118
|
+
};
|
|
119
|
+
const adapter = createAdapter({ system: 'aws', ops: OPS });
|
|
120
|
+
export const AWS_OPS = adapter.OPS;
|
|
121
|
+
/** @param {object[]} extraActions */
|
|
122
|
+
export function createAwsManifest(extraActions = []) {
|
|
123
|
+
return manifestFromPack(AWS_ACTION_PACK, extraActions);
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Guard a high-blast-radius AWS mutation behind the gate.
|
|
127
|
+
* @param {object} gate a gate built with createAwsManifest()
|
|
128
|
+
* @param {AwsClient} client { iam: {attachUserPolicy, createAccessKey, deleteUser}, ec2: {authorizeSecurityGroupIngress} }
|
|
129
|
+
* @param {{ op: string, params?: object, receipt?: any }} args { op, params, receipt }
|
|
130
|
+
* @throws Error{code:'EMILIA_RECEIPT_REQUIRED'} if refused — the call never reaches AWS
|
|
131
|
+
*/
|
|
132
|
+
export function guardAwsMutation(gate, client, args) {
|
|
133
|
+
return adapter.guard(gate, client, /** @type {{ op: any, params: any, receipt: any }} */ (args));
|
|
134
|
+
}
|
|
135
|
+
export default { AWS_ACTION_PACK, AWS_OPS, createAwsManifest, guardAwsMutation };
|
|
136
|
+
//# sourceMappingURL=aws.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aws.js","sourceRoot":"","sources":["../../src/adapters/aws.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAE5D;;;;;GAKG;AACH;;;GAGG;AACH,oEAAoE;AAEpE,MAAM,CAAC,MAAM,eAAe,GAAG,MAAM,CAAC,MAAM,CAAC;IAC3C,MAAM,CAAC,MAAM,CAAC;QACZ,EAAE,EAAE,uBAAuB,EAAE,KAAK,EAAE,mBAAmB,EAAE,WAAW,EAAE,uBAAuB;QA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CAAqC;AACrC,MAAM,UAAU,iBAAiB,CAAC,YAAY,GAAG,EAAE;IACjD,OAAO,gBAAgB,CAAC,eAAe,EAAE,YAAY,CAAC,CAAC;AACzD,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI;IACjD,OAAO,OAAO,CAAC,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,qDAAqD,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;AACnG,CAAC;AAED,eAAe,EAAE,eAAe,EAAE,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,CAAC"}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @typedef {object} CloudflareClient
|
|
3
|
+
* @property {(input: {zone: string, recordId: string}) => any} deleteDnsRecord
|
|
4
|
+
* @property {(input: {zone: string}) => any} deleteZone
|
|
5
|
+
* @property {(input: {zone: string, ruleId: string, enabled: boolean}) => any} setFirewallRule
|
|
6
|
+
*/
|
|
7
|
+
export declare const CLOUDFLARE_ACTION_PACK: readonly (Readonly<{
|
|
8
|
+
id: "cloudflare.dns.delete";
|
|
9
|
+
label: "Delete DNS record";
|
|
10
|
+
action_type: "cloudflare.dns.delete";
|
|
11
|
+
risk: "high";
|
|
12
|
+
receipt_required: true;
|
|
13
|
+
assurance_class: "class_a";
|
|
14
|
+
match: {
|
|
15
|
+
protocol: string;
|
|
16
|
+
tool: string;
|
|
17
|
+
};
|
|
18
|
+
why: "Removing DNS can take a service offline or enable takeover. Bind zone+record.";
|
|
19
|
+
execution_binding: {
|
|
20
|
+
required_fields: string[];
|
|
21
|
+
};
|
|
22
|
+
}> | Readonly<{
|
|
23
|
+
id: "cloudflare.zone.delete";
|
|
24
|
+
label: "Delete zone";
|
|
25
|
+
action_type: "cloudflare.zone.delete";
|
|
26
|
+
risk: "critical";
|
|
27
|
+
receipt_required: true;
|
|
28
|
+
assurance_class: "quorum";
|
|
29
|
+
match: {
|
|
30
|
+
protocol: string;
|
|
31
|
+
tool: string;
|
|
32
|
+
};
|
|
33
|
+
why: "Deletes an entire zone. Quorum.";
|
|
34
|
+
execution_binding: {
|
|
35
|
+
required_fields: string[];
|
|
36
|
+
};
|
|
37
|
+
}> | Readonly<{
|
|
38
|
+
id: "cloudflare.firewall.disable";
|
|
39
|
+
label: "Disable firewall rule";
|
|
40
|
+
action_type: "cloudflare.firewall.disable";
|
|
41
|
+
risk: "critical";
|
|
42
|
+
receipt_required: true;
|
|
43
|
+
assurance_class: "quorum";
|
|
44
|
+
match: {
|
|
45
|
+
protocol: string;
|
|
46
|
+
tool: string;
|
|
47
|
+
};
|
|
48
|
+
why: "Disabling WAF/firewall opens the perimeter. Quorum + bind zone+rule.";
|
|
49
|
+
execution_binding: {
|
|
50
|
+
required_fields: string[];
|
|
51
|
+
};
|
|
52
|
+
}>)[];
|
|
53
|
+
export declare const CLOUDFLARE_OPS: readonly string[];
|
|
54
|
+
/** @param {object[]} extra */
|
|
55
|
+
export declare function createCloudflareManifest(extra?: never[]): {
|
|
56
|
+
'@version': string;
|
|
57
|
+
actions: any[];
|
|
58
|
+
};
|
|
59
|
+
export declare function guardCloudflareMutation(gate: any, client: any, args: any): Promise<{
|
|
60
|
+
result: any;
|
|
61
|
+
reliance: any;
|
|
62
|
+
execution: any;
|
|
63
|
+
}>;
|
|
64
|
+
declare const _default: {
|
|
65
|
+
CLOUDFLARE_ACTION_PACK: readonly (Readonly<{
|
|
66
|
+
id: "cloudflare.dns.delete";
|
|
67
|
+
label: "Delete DNS record";
|
|
68
|
+
action_type: "cloudflare.dns.delete";
|
|
69
|
+
risk: "high";
|
|
70
|
+
receipt_required: true;
|
|
71
|
+
assurance_class: "class_a";
|
|
72
|
+
match: {
|
|
73
|
+
protocol: string;
|
|
74
|
+
tool: string;
|
|
75
|
+
};
|
|
76
|
+
why: "Removing DNS can take a service offline or enable takeover. Bind zone+record.";
|
|
77
|
+
execution_binding: {
|
|
78
|
+
required_fields: string[];
|
|
79
|
+
};
|
|
80
|
+
}> | Readonly<{
|
|
81
|
+
id: "cloudflare.zone.delete";
|
|
82
|
+
label: "Delete zone";
|
|
83
|
+
action_type: "cloudflare.zone.delete";
|
|
84
|
+
risk: "critical";
|
|
85
|
+
receipt_required: true;
|
|
86
|
+
assurance_class: "quorum";
|
|
87
|
+
match: {
|
|
88
|
+
protocol: string;
|
|
89
|
+
tool: string;
|
|
90
|
+
};
|
|
91
|
+
why: "Deletes an entire zone. Quorum.";
|
|
92
|
+
execution_binding: {
|
|
93
|
+
required_fields: string[];
|
|
94
|
+
};
|
|
95
|
+
}> | Readonly<{
|
|
96
|
+
id: "cloudflare.firewall.disable";
|
|
97
|
+
label: "Disable firewall rule";
|
|
98
|
+
action_type: "cloudflare.firewall.disable";
|
|
99
|
+
risk: "critical";
|
|
100
|
+
receipt_required: true;
|
|
101
|
+
assurance_class: "quorum";
|
|
102
|
+
match: {
|
|
103
|
+
protocol: string;
|
|
104
|
+
tool: string;
|
|
105
|
+
};
|
|
106
|
+
why: "Disabling WAF/firewall opens the perimeter. Quorum + bind zone+rule.";
|
|
107
|
+
execution_binding: {
|
|
108
|
+
required_fields: string[];
|
|
109
|
+
};
|
|
110
|
+
}>)[];
|
|
111
|
+
CLOUDFLARE_OPS: readonly string[];
|
|
112
|
+
createCloudflareManifest: typeof createCloudflareManifest;
|
|
113
|
+
guardCloudflareMutation: typeof guardCloudflareMutation;
|
|
114
|
+
};
|
|
115
|
+
export default _default;
|
|
116
|
+
//# sourceMappingURL=cloudflare.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cloudflare.d.ts","sourceRoot":"","sources":["../../src/adapters/cloudflare.ts"],"names":[],"mappings":"AAQA;;;;;GAKG;AAEH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAsBjC,CAAC;AAoCH,eAAO,MAAM,cAAc,mBAAc,CAAC;AAC1C,8BAA8B;AAC9B,wBAAgB,wBAAwB,CAAC,KAAK,UAAK;;;EAA6D;AAChH,wBAAgB,uBAAuB,CAAC,IAAI,KAAA,EAAE,MAAM,KAAA,EAAE,IAAI,KAAA;;;;GAA+C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACzG,wBAA6G"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
/**
|
|
3
|
+
* EMILIA Gate — Cloudflare System-of-Record adapter.
|
|
4
|
+
* Guards DNS record delete, zone delete, and WAF/firewall disable so they never
|
|
5
|
+
* reach Cloudflare without a receipt bound to THIS zone. Client injected.
|
|
6
|
+
*/
|
|
7
|
+
import { createAdapter, manifestFromPack } from './_kit.js';
|
|
8
|
+
/**
|
|
9
|
+
* @typedef {object} CloudflareClient
|
|
10
|
+
* @property {(input: {zone: string, recordId: string}) => any} deleteDnsRecord
|
|
11
|
+
* @property {(input: {zone: string}) => any} deleteZone
|
|
12
|
+
* @property {(input: {zone: string, ruleId: string, enabled: boolean}) => any} setFirewallRule
|
|
13
|
+
*/
|
|
14
|
+
export const CLOUDFLARE_ACTION_PACK = Object.freeze([
|
|
15
|
+
Object.freeze({
|
|
16
|
+
id: 'cloudflare.dns.delete', label: 'Delete DNS record', action_type: 'cloudflare.dns.delete',
|
|
17
|
+
risk: 'high', receipt_required: true, assurance_class: 'class_a',
|
|
18
|
+
match: { protocol: 'cloudflare', tool: 'delete_dns_record' },
|
|
19
|
+
why: 'Removing DNS can take a service offline or enable takeover. Bind zone+record.',
|
|
20
|
+
execution_binding: { required_fields: ['action_type', 'zone', 'record_id'] },
|
|
21
|
+
}),
|
|
22
|
+
Object.freeze({
|
|
23
|
+
id: 'cloudflare.zone.delete', label: 'Delete zone', action_type: 'cloudflare.zone.delete',
|
|
24
|
+
risk: 'critical', receipt_required: true, assurance_class: 'quorum',
|
|
25
|
+
match: { protocol: 'cloudflare', tool: 'delete_zone' },
|
|
26
|
+
why: 'Deletes an entire zone. Quorum.',
|
|
27
|
+
execution_binding: { required_fields: ['action_type', 'zone'] },
|
|
28
|
+
}),
|
|
29
|
+
Object.freeze({
|
|
30
|
+
id: 'cloudflare.firewall.disable', label: 'Disable firewall rule', action_type: 'cloudflare.firewall.disable',
|
|
31
|
+
risk: 'critical', receipt_required: true, assurance_class: 'quorum',
|
|
32
|
+
match: { protocol: 'cloudflare', tool: 'set_firewall_rule' },
|
|
33
|
+
why: 'Disabling WAF/firewall opens the perimeter. Quorum + bind zone+rule.',
|
|
34
|
+
execution_binding: { required_fields: ['action_type', 'zone', 'rule_id'] },
|
|
35
|
+
}),
|
|
36
|
+
]);
|
|
37
|
+
const OPS = {
|
|
38
|
+
'dns.delete': {
|
|
39
|
+
selector: { protocol: 'cloudflare', tool: 'delete_dns_record' },
|
|
40
|
+
/** @param {{zone: string, record_id: string}} p */
|
|
41
|
+
observed: (p) => ({ action_type: 'cloudflare.dns.delete', zone: p.zone, record_id: p.record_id }),
|
|
42
|
+
/**
|
|
43
|
+
* @param {CloudflareClient} c
|
|
44
|
+
* @param {{zone: string, record_id: string}} p
|
|
45
|
+
*/
|
|
46
|
+
perform: (c, p) => c.deleteDnsRecord({ zone: p.zone, recordId: p.record_id }),
|
|
47
|
+
},
|
|
48
|
+
'zone.delete': {
|
|
49
|
+
selector: { protocol: 'cloudflare', tool: 'delete_zone' },
|
|
50
|
+
/** @param {{zone: string}} p */
|
|
51
|
+
observed: (p) => ({ action_type: 'cloudflare.zone.delete', zone: p.zone }),
|
|
52
|
+
/**
|
|
53
|
+
* @param {CloudflareClient} c
|
|
54
|
+
* @param {{zone: string}} p
|
|
55
|
+
*/
|
|
56
|
+
perform: (c, p) => c.deleteZone({ zone: p.zone }),
|
|
57
|
+
},
|
|
58
|
+
'firewall.disable': {
|
|
59
|
+
selector: { protocol: 'cloudflare', tool: 'set_firewall_rule' },
|
|
60
|
+
/** @param {{zone: string, rule_id: string}} p */
|
|
61
|
+
observed: (p) => ({ action_type: 'cloudflare.firewall.disable', zone: p.zone, rule_id: p.rule_id }),
|
|
62
|
+
/**
|
|
63
|
+
* @param {CloudflareClient} c
|
|
64
|
+
* @param {{zone: string, rule_id: string}} p
|
|
65
|
+
*/
|
|
66
|
+
perform: (c, p) => c.setFirewallRule({ zone: p.zone, ruleId: p.rule_id, enabled: false }),
|
|
67
|
+
},
|
|
68
|
+
};
|
|
69
|
+
const adapter = createAdapter({ system: 'cloudflare', ops: OPS });
|
|
70
|
+
export const CLOUDFLARE_OPS = adapter.OPS;
|
|
71
|
+
/** @param {object[]} extra */
|
|
72
|
+
export function createCloudflareManifest(extra = []) { return manifestFromPack(CLOUDFLARE_ACTION_PACK, extra); }
|
|
73
|
+
export function guardCloudflareMutation(gate, client, args) { return adapter.guard(gate, client, args); }
|
|
74
|
+
export default { CLOUDFLARE_ACTION_PACK, CLOUDFLARE_OPS, createCloudflareManifest, guardCloudflareMutation };
|
|
75
|
+
//# sourceMappingURL=cloudflare.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cloudflare.js","sourceRoot":"","sources":["../../src/adapters/cloudflare.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC;;;;GAIG;AACH,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAE5D;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,sBAAsB,GAAG,MAAM,CAAC,MAAM,CAAC;IAClD,MAAM,CAAC,MAAM,CAAC;QACZ,EAAE,EAAE,uBAAuB,EAAE,KAAK,EAAE,mBAAmB,EAAE,WAAW,EAAE,uBAAuB;QAC7F,IAAI,EAAE,MAAM,EAAE,gBAAgB,EAAE,IAAI,EAAE,eAAe,EAAE,SAAS;QAChE,KAAK,EAAE,EAAE,QAAQ,EAAE,YAAY,EAAE,IAAI,EAAE,mBAAmB,EAAE;QAC5D,GAAG,EAAE,+EAA+E;QACpF,iBAAiB,EAAE,EAAE,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AAO,gBAAgB,CAAC,sBAAsB,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;AAChH,MAAM,UAAU,uBAAuB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,IAAI,OAAO,OAAO,CAAC,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;AACzG,eAAe,EAAE,sBAAsB,EAAE,cAAc,EAAE,wBAAwB,EAAE,uBAAuB,EAAE,CAAC"}
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
export declare const GCP_ACTION_PACK: readonly (Readonly<{
|
|
2
|
+
id: "gcp.iam.set_policy";
|
|
3
|
+
label: "GCP IAM set policy";
|
|
4
|
+
action_type: "gcp.iam.set_policy";
|
|
5
|
+
risk: "critical";
|
|
6
|
+
receipt_required: true;
|
|
7
|
+
assurance_class: "quorum";
|
|
8
|
+
match: {
|
|
9
|
+
protocol: string;
|
|
10
|
+
tool: string;
|
|
11
|
+
};
|
|
12
|
+
why: "Grants cloud permissions. Bind resource+member+role; quorum.";
|
|
13
|
+
execution_binding: {
|
|
14
|
+
required_fields: string[];
|
|
15
|
+
};
|
|
16
|
+
}> | Readonly<{
|
|
17
|
+
id: "gcp.sa_key.create";
|
|
18
|
+
label: "GCP service-account key create";
|
|
19
|
+
action_type: "gcp.sa_key.create";
|
|
20
|
+
risk: "critical";
|
|
21
|
+
receipt_required: true;
|
|
22
|
+
assurance_class: "class_a";
|
|
23
|
+
match: {
|
|
24
|
+
protocol: string;
|
|
25
|
+
tool: string;
|
|
26
|
+
};
|
|
27
|
+
why: "Mints long-lived cloud credentials. Bind the service account.";
|
|
28
|
+
execution_binding: {
|
|
29
|
+
required_fields: string[];
|
|
30
|
+
};
|
|
31
|
+
}> | Readonly<{
|
|
32
|
+
id: "gcp.project.delete";
|
|
33
|
+
label: "GCP project delete";
|
|
34
|
+
action_type: "gcp.project.delete";
|
|
35
|
+
risk: "critical";
|
|
36
|
+
receipt_required: true;
|
|
37
|
+
assurance_class: "quorum";
|
|
38
|
+
match: {
|
|
39
|
+
protocol: string;
|
|
40
|
+
tool: string;
|
|
41
|
+
};
|
|
42
|
+
why: "Deletes an entire project. Quorum.";
|
|
43
|
+
execution_binding: {
|
|
44
|
+
required_fields: string[];
|
|
45
|
+
};
|
|
46
|
+
}> | Readonly<{
|
|
47
|
+
id: "gcp.storage.bucket_delete";
|
|
48
|
+
label: "GCP bucket delete";
|
|
49
|
+
action_type: "gcp.storage.bucket_delete";
|
|
50
|
+
risk: "high";
|
|
51
|
+
receipt_required: true;
|
|
52
|
+
assurance_class: "class_a";
|
|
53
|
+
match: {
|
|
54
|
+
protocol: string;
|
|
55
|
+
tool: string;
|
|
56
|
+
};
|
|
57
|
+
why: "Destroys a storage bucket and its objects. Bind the bucket.";
|
|
58
|
+
execution_binding: {
|
|
59
|
+
required_fields: string[];
|
|
60
|
+
};
|
|
61
|
+
}>)[];
|
|
62
|
+
export declare const GCP_OPS: readonly string[];
|
|
63
|
+
export declare function createGcpManifest(extraActions?: never[]): {
|
|
64
|
+
'@version': string;
|
|
65
|
+
actions: any[];
|
|
66
|
+
};
|
|
67
|
+
export declare function guardGcpMutation(gate: any, client: any, args: any): Promise<{
|
|
68
|
+
result: any;
|
|
69
|
+
reliance: any;
|
|
70
|
+
execution: any;
|
|
71
|
+
}>;
|
|
72
|
+
declare const _default: {
|
|
73
|
+
GCP_ACTION_PACK: readonly (Readonly<{
|
|
74
|
+
id: "gcp.iam.set_policy";
|
|
75
|
+
label: "GCP IAM set policy";
|
|
76
|
+
action_type: "gcp.iam.set_policy";
|
|
77
|
+
risk: "critical";
|
|
78
|
+
receipt_required: true;
|
|
79
|
+
assurance_class: "quorum";
|
|
80
|
+
match: {
|
|
81
|
+
protocol: string;
|
|
82
|
+
tool: string;
|
|
83
|
+
};
|
|
84
|
+
why: "Grants cloud permissions. Bind resource+member+role; quorum.";
|
|
85
|
+
execution_binding: {
|
|
86
|
+
required_fields: string[];
|
|
87
|
+
};
|
|
88
|
+
}> | Readonly<{
|
|
89
|
+
id: "gcp.sa_key.create";
|
|
90
|
+
label: "GCP service-account key create";
|
|
91
|
+
action_type: "gcp.sa_key.create";
|
|
92
|
+
risk: "critical";
|
|
93
|
+
receipt_required: true;
|
|
94
|
+
assurance_class: "class_a";
|
|
95
|
+
match: {
|
|
96
|
+
protocol: string;
|
|
97
|
+
tool: string;
|
|
98
|
+
};
|
|
99
|
+
why: "Mints long-lived cloud credentials. Bind the service account.";
|
|
100
|
+
execution_binding: {
|
|
101
|
+
required_fields: string[];
|
|
102
|
+
};
|
|
103
|
+
}> | Readonly<{
|
|
104
|
+
id: "gcp.project.delete";
|
|
105
|
+
label: "GCP project delete";
|
|
106
|
+
action_type: "gcp.project.delete";
|
|
107
|
+
risk: "critical";
|
|
108
|
+
receipt_required: true;
|
|
109
|
+
assurance_class: "quorum";
|
|
110
|
+
match: {
|
|
111
|
+
protocol: string;
|
|
112
|
+
tool: string;
|
|
113
|
+
};
|
|
114
|
+
why: "Deletes an entire project. Quorum.";
|
|
115
|
+
execution_binding: {
|
|
116
|
+
required_fields: string[];
|
|
117
|
+
};
|
|
118
|
+
}> | Readonly<{
|
|
119
|
+
id: "gcp.storage.bucket_delete";
|
|
120
|
+
label: "GCP bucket delete";
|
|
121
|
+
action_type: "gcp.storage.bucket_delete";
|
|
122
|
+
risk: "high";
|
|
123
|
+
receipt_required: true;
|
|
124
|
+
assurance_class: "class_a";
|
|
125
|
+
match: {
|
|
126
|
+
protocol: string;
|
|
127
|
+
tool: string;
|
|
128
|
+
};
|
|
129
|
+
why: "Destroys a storage bucket and its objects. Bind the bucket.";
|
|
130
|
+
execution_binding: {
|
|
131
|
+
required_fields: string[];
|
|
132
|
+
};
|
|
133
|
+
}>)[];
|
|
134
|
+
GCP_OPS: readonly string[];
|
|
135
|
+
createGcpManifest: typeof createGcpManifest;
|
|
136
|
+
guardGcpMutation: typeof guardGcpMutation;
|
|
137
|
+
};
|
|
138
|
+
export default _default;
|
|
139
|
+
//# sourceMappingURL=gcp.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gcp.d.ts","sourceRoot":"","sources":["../../src/adapters/gcp.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA6B1B,CAAC;AA0BH,eAAO,MAAM,OAAO,mBAAc,CAAC;AACnC,wBAAgB,iBAAiB,CAAC,YAAY,UAAK;;;EAA6D;AAChH,wBAAgB,gBAAgB,CAAC,IAAI,KAAA,EAAE,MAAM,KAAA,EAAE,IAAI,KAAA;;;;GAA+C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAClG,wBAAiF"}
|