@proofgate-cdk/core 0.0.0-stage → 1.1.1

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/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright 2026 ProofGate contributors
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
package/README.md CHANGED
@@ -1,3 +1,9 @@
1
- # Temporary Holding Version
1
+ # @proofgate-cdk/core
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ ProofGateのTypeScript参照評価器と、決定的なLeanモジュール生成器を提供します。
4
+
5
+ ```bash
6
+ pnpm add @proofgate-cdk/core
7
+ ```
8
+
9
+ 正規化済み`StackModel`に対して`evaluate`で権限昇格経路を評価し、`generateLean`で同じ有限モデルを検査するLeanコードを生成できます。通常は`@proofgate-cdk/cdk-plugin`から間接的に利用します。
@@ -0,0 +1,8 @@
1
+ import type { ProofGateConfig, StackModel, Violation } from "@proofgate-cdk/model";
2
+ /** 4条件をすべて満たす経路を、説明可能なViolationへ変換するTypeScript参照実装です。 */
3
+ export declare function evaluate(model: StackModel, config: ProofGateConfig): Violation[];
4
+ /**
5
+ * 候補経路を具体的なLean値として直列化し、安全性定理を決定的に生成します。
6
+ * #evalのマーカーは「定理が偽」と「Lean自体の実行失敗」を呼び出し側が区別するために使います。
7
+ */
8
+ export declare function generateLean(model: StackModel, config: ProofGateConfig): string;
package/dist/index.js ADDED
@@ -0,0 +1,179 @@
1
+ import { RULE_ID } from "@proofgate-cdk/model";
2
+ /**
3
+ * 正規化済みIAMモデルから権限昇格の候補経路を組み立て、
4
+ * TypeScript参照実装での判定と、同じ事実を検査するLeanコード生成を提供します。
5
+ */
6
+ const lower = (value) => value.toLowerCase();
7
+ // IAMのAction・Resourceで使用される`*`(任意長)と`?`(任意の1文字)を、文字列全体に対するglobとして扱います。
8
+ const matches = (pattern, value) => {
9
+ const escaped = pattern
10
+ .replace(/[.+^${}()|[\]\\]/g, "\\$&")
11
+ .replaceAll("*", ".*")
12
+ .replaceAll("?", ".");
13
+ return new RegExp(`^${escaped}$`, "i").test(value);
14
+ };
15
+ const allowsAction = (statement, actions) => statement.effect === "Allow" &&
16
+ statement.actions.some((pattern) => actions.some((action) => matches(lower(pattern), lower(action))));
17
+ const STAR = { kind: "star" };
18
+ /** IAMのglobを、`*`(任意長)と`?`(任意の1文字)を含むトークン列へ変換します。比較は大文字小文字を区別しません。 */
19
+ const globOf = (pattern) => [...pattern].map((char) => char === "*" ? STAR : char === "?" ? { kind: "one" } : { kind: "lit", char: lower(char) });
20
+ /** ワイルドカードを解釈しない、完全に固定した文字列のトークン列です。 */
21
+ const literalOf = (text) => [...text].map((char) => ({ kind: "lit", char: lower(char) }));
22
+ const isStar = (token) => token?.kind === "star";
23
+ /** 非`*`同士のトークンが、同じ1文字を受理できるかを判定します。 */
24
+ const compatible = (a, b) => a.kind === "one" ||
25
+ b.kind === "one" ||
26
+ (a.kind === "lit" && b.kind === "lit" && a.char === b.char);
27
+ /**
28
+ * 2つのglobが表す文字列集合の共通部分が空でないかを判定します。
29
+ * 一方を他方の文字列として照合する一方向のマッチではなく、集合同士の交差を調べます。
30
+ */
31
+ function globsIntersect(a, b) {
32
+ const memo = new Map();
33
+ const width = b.length + 1;
34
+ const go = (i, j) => {
35
+ const key = i * width + j;
36
+ const cached = memo.get(key);
37
+ if (cached !== undefined)
38
+ return cached;
39
+ const left = a[i];
40
+ const right = b[j];
41
+ let result = left === undefined && right === undefined;
42
+ if (!result && isStar(left))
43
+ result = go(i + 1, j);
44
+ if (!result && isStar(right))
45
+ result = go(i, j + 1);
46
+ if (!result && left !== undefined && right !== undefined) {
47
+ if (!isStar(left) && !isStar(right))
48
+ result = compatible(left, right) && go(i + 1, j + 1);
49
+ // 片方が`*`のとき、もう片方の1文字を`*`が吸収します。
50
+ else if (isStar(left) && !isStar(right))
51
+ result = go(i, j + 1);
52
+ else if (!isStar(left) && isStar(right))
53
+ result = go(i + 1, j);
54
+ }
55
+ memo.set(key, result);
56
+ return result;
57
+ };
58
+ return go(0, 0);
59
+ }
60
+ /**
61
+ * 保護バケットのオブジェクト(`<バケット>/`で始まる任意のキー)に届くStatementを返します。
62
+ * バケットレベルのARNだけではオブジェクト操作に届かず、`bucket/reports/*`のような一部のプレフィックスは届きます。
63
+ */
64
+ function bucketAccessStatements(role, bucketArn) {
65
+ const objects = [...literalOf(`${bucketArn.replace(/\/$/, "")}/`), STAR];
66
+ // 名前のないバケットは、抽出器が不透明な名前`_generated_<LogicalId>`で表します(spec proofgate-cdk-construct-support, design 5)。
67
+ // 保護バケットの名前にワイルドカードがあると、実際の生成名がそれに一致しうるため、不透明な名前を`*`として読みます(過剰検出の側)。
68
+ // リテラルの保護バケットには、生成名は一致しません(ARN文字列のまま比べます)。
69
+ // An unnamed bucket is written as the opaque name `_generated_<LogicalId>`. If the protected bucket
70
+ // name has a wildcard, the real generated name may match it, so the opaque name is read as `*`.
71
+ const protectedHasWildcard = /[*?]/.test(bucketArn);
72
+ const pattern = (resource) => protectedHasWildcard ? resource.replace(GENERATED_NAME, "*") : resource;
73
+ return role.statements.filter((statement) => allowsAction(statement, S3_DATA_ACTIONS) &&
74
+ statement.resources.some((resource) => globsIntersect(globOf(pattern(resource)), objects)));
75
+ }
76
+ /** 抽出器が名前のないリソースに付ける不透明な名前です(`@proofgate-cdk/extractor`の`GENERATED_PREFIX`と同じ形)。 */
77
+ const GENERATED_NAME = /_generated_[A-Za-z0-9]+/g;
78
+ /**
79
+ * StatementのResourceが、指定した対象ロールを表しているかを判定します。
80
+ */
81
+ function allowsPassRoleTarget(statement, target) {
82
+ if (!allowsAction(statement, ["iam:PassRole"]))
83
+ return false;
84
+ const directIdentifiers = [target.logicalId, target.roleName].filter((value) => Boolean(value));
85
+ return statement.resources.some((resourcePattern) => {
86
+ if (directIdentifiers.some((identifier) => matches(resourcePattern, identifier)))
87
+ return true;
88
+ const roleMarker = ":role/";
89
+ const markerIndex = resourcePattern.indexOf(roleMarker);
90
+ if (markerIndex < 0)
91
+ return false;
92
+ const scope = resourcePattern.slice(0, markerIndex + roleMarker.length);
93
+ if (!target.roleName) {
94
+ // 名前のないロール: CloudFormationが付ける名前は合成時に不明なため、不透明な名前
95
+ // `_generated_<LogicalId>`として読みます(spec proofgate-cdk-construct-support, R0)。
96
+ // ロール名部分にワイルドカードがあるPatternは、実際の生成名に一致しうるので対象にします
97
+ // (過剰検出の側です)。リテラルは、不透明な名前そのもの(role.roleArnなど)のときだけ一致します。
98
+ // A role without RoleName: its real name is unknown at synthesis, so it is read as the opaque
99
+ // name `_generated_<LogicalId>`. A pattern with a wildcard in the role-name part may match the
100
+ // real generated name and counts (over-approximation); a literal counts only if it is the opaque name.
101
+ if (/[*?]/.test(resourcePattern.slice(scope.length)))
102
+ return true;
103
+ return matches(resourcePattern, `${scope}_generated_${target.logicalId}`);
104
+ }
105
+ // partitionやアカウント部分はPolicy側の値を保ち、ロール名部分だけを検査対象へ置き換えます。
106
+ return matches(resourcePattern, `${scope}${target.roleName}`);
107
+ });
108
+ }
109
+ const S3_DATA_ACTIONS = ["s3:GetObject", "s3:PutObject", "s3:DeleteObject", "s3:*"];
110
+ /**
111
+ * 任意コードを対象ロールで実行できるLambda操作の根拠を返します。
112
+ * 新規作成は単独で成立します。既存関数の悪用には、ロール設定とコードの両方の更新を要求します。
113
+ */
114
+ function lambdaControlStatements(role) {
115
+ const create = role.statements.filter((statement) => allowsAction(statement, ["lambda:CreateFunction"]));
116
+ if (create.length > 0)
117
+ return create;
118
+ const configure = role.statements.filter((statement) => allowsAction(statement, ["lambda:UpdateFunctionConfiguration"]));
119
+ const code = role.statements.filter((statement) => allowsAction(statement, ["lambda:UpdateFunctionCode"]));
120
+ return configure.length > 0 && code.length > 0 ? [...new Set([...configure, ...code])] : [];
121
+ }
122
+ /** すべての「起点ロール × 対象ロール × 保護バケット」の有限な組み合わせを列挙します。 */
123
+ function candidatePaths(model, config) {
124
+ const candidates = [];
125
+ for (const principal of model.roles) {
126
+ for (const target of model.roles) {
127
+ if (principal.logicalId === target.logicalId ||
128
+ config.allowedPassRoleTargets?.includes(target.logicalId))
129
+ continue;
130
+ const passRole = principal.statements.filter((statement) => allowsPassRoleTarget(statement, target));
131
+ const lambdaControl = lambdaControlStatements(principal);
132
+ const targetIsLambdaAssumable = target.trustServices.some((service) => service === "*" || service === "lambda.amazonaws.com");
133
+ for (const bucketArn of config.protectedBucketArns) {
134
+ candidates.push({
135
+ principal,
136
+ target,
137
+ bucketArn,
138
+ passRole,
139
+ lambdaControl,
140
+ targetIsLambdaAssumable,
141
+ bucketAccess: bucketAccessStatements(target, bucketArn),
142
+ });
143
+ }
144
+ }
145
+ }
146
+ return candidates;
147
+ }
148
+ /** 4条件をすべて満たす経路を、説明可能なViolationへ変換するTypeScript参照実装です。 */
149
+ export function evaluate(model, config) {
150
+ const violations = [];
151
+ for (const { principal, target, bucketArn, passRole, lambdaControl, targetIsLambdaAssumable, bucketAccess, } of candidatePaths(model, config)) {
152
+ if (passRole.length === 0 ||
153
+ lambdaControl.length === 0 ||
154
+ !targetIsLambdaAssumable ||
155
+ bucketAccess.length === 0)
156
+ continue;
157
+ violations.push({
158
+ ruleId: RULE_ID,
159
+ principalLogicalId: principal.logicalId,
160
+ targetRoleLogicalId: target.logicalId,
161
+ protectedBucketArn: bucketArn,
162
+ sourcePaths: [
163
+ ...new Set([...passRole, ...lambdaControl, ...bucketAccess].map((statement) => statement.sourcePath)),
164
+ ],
165
+ explanation: `${principal.logicalId} can pass Lambda-assumable role ${target.logicalId} and control Lambda code or configuration; ${target.logicalId} can access protected bucket ${bucketArn}.`,
166
+ });
167
+ }
168
+ return violations;
169
+ }
170
+ const leanString = (value) => JSON.stringify(value);
171
+ /**
172
+ * 候補経路を具体的なLean値として直列化し、安全性定理を決定的に生成します。
173
+ * #evalのマーカーは「定理が偽」と「Lean自体の実行失敗」を呼び出し側が区別するために使います。
174
+ */
175
+ export function generateLean(model, config) {
176
+ const paths = candidatePaths(model, config).map(({ principal, target, bucketArn, passRole, lambdaControl, targetIsLambdaAssumable, bucketAccess, }) => `{ principal := ${leanString(principal.logicalId)}, target := ${leanString(target.logicalId)}, protectedResource := ${leanString(bucketArn)}, canPassRole := ${passRole.length > 0}, canControlLambda := ${lambdaControl.length > 0}, targetIsLambdaAssumable := ${targetIsLambdaAssumable}, targetCanAccess := ${bucketAccess.length > 0} }`);
177
+ return `import ProofGate.Security\n\ndef generatedPaths : List ProofGate.EscalationPath := [${paths.join(",\n ")}]\n\n#eval if ProofGate.safe generatedPaths then "PROOFGATE_SAFE" else "PROOFGATE_UNSAFE"\n\ntheorem generatedStackIsSafe : ProofGate.safe generatedPaths = true := by\n native_decide\n`;
178
+ }
179
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAE/C;;;GAGG;AACH,MAAM,KAAK,GAAG,CAAC,KAAa,EAAE,EAAE,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC;AAErD,uEAAuE;AACvE,MAAM,OAAO,GAAG,CAAC,OAAe,EAAE,KAAa,EAAW,EAAE;IAC1D,MAAM,OAAO,GAAG,OAAO;SACpB,OAAO,CAAC,mBAAmB,EAAE,MAAM,CAAC;SACpC,UAAU,CAAC,GAAG,EAAE,IAAI,CAAC;SACrB,UAAU,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IACxB,OAAO,IAAI,MAAM,CAAC,IAAI,OAAO,GAAG,EAAE,GAAG,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AACrD,CAAC,CAAC;AAEF,MAAM,YAAY,GAAG,CAAC,SAAyB,EAAE,OAA0B,EAAE,EAAE,CAC7E,SAAS,CAAC,MAAM,KAAK,OAAO;IAC5B,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAC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AS;YACrC,kBAAkB,EAAE,SAAS;YAC7B,WAAW,EAAE;gBACX,GAAG,IAAI,GAAG,CACR,CAAC,GAAG,QAAQ,EAAE,GAAG,aAAa,EAAE,GAAG,YAAY,CAAC,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,UAAU,CAAC,CAC1F;aACF;YACD,WAAW,EAAE,GAAG,SAAS,CAAC,SAAS,mCAAmC,MAAM,CAAC,SAAS,8CAA8C,MAAM,CAAC,SAAS,gCAAgC,SAAS,GAAG;SACjM,CAAC,CAAC;IACL,CAAC;IACD,OAAO,UAAU,CAAC;AACpB,CAAC;AAED,MAAM,UAAU,GAAG,CAAC,KAAa,EAAE,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;AAC5D;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,KAAiB,EAAE,MAAuB;IACrE,MAAM,KAAK,GAAG,cAAc,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,GAAG,CAC7C,CAAC,EACC,SAAS,EACT,MAAM,EACN,SAAS,EACT,QAAQ,EACR,aAAa,EACb,uBAAuB,EACvB,YAAY,GACb,EAAE,EAAE,CACH,kBAAkB,UAAU,CAAC,SAAS,CAAC,SAAS,CAAC,eAAe,UAAU,CAAC,MAAM,CAAC,SAAS,CAAC,0BAA0B,UAAU,CAAC,SAAS,CAAC,oBAAoB,QAAQ,CAAC,MAAM,GAAG,CAAC,yBAAyB,aAAa,CAAC,MAAM,GAAG,CAAC,gCAAgC,uBAAuB,wBAAwB,YAAY,CAAC,MAAM,GAAG,CAAC,IAAI,CAChV,CAAC;IACF,OAAO,uFAAuF,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,2LAA2L,CAAC;AAC/S,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,51 @@
1
1
  {
2
2
  "name": "@proofgate-cdk/core",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "1.1.1",
4
+ "description": "Privilege-escalation evaluator and Lean module generator for ProofGate.",
5
+ "type": "module",
6
+ "main": "./dist/index.js",
7
+ "types": "./dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/index.d.ts",
11
+ "import": "./dist/index.js",
12
+ "default": "./dist/index.js"
13
+ }
14
+ },
15
+ "files": [
16
+ "dist",
17
+ "README.md",
18
+ "LICENSE"
19
+ ],
20
+ "sideEffects": false,
21
+ "engines": {
22
+ "node": ">=26"
23
+ },
24
+ "license": "Apache-2.0",
25
+ "repository": {
26
+ "type": "git",
27
+ "url": "git+https://github.com/mashharuki/proofgate.git",
28
+ "directory": "packages/core"
29
+ },
30
+ "homepage": "https://github.com/mashharuki/proofgate#readme",
31
+ "bugs": {
32
+ "url": "https://github.com/mashharuki/proofgate/issues"
33
+ },
34
+ "keywords": [
35
+ "aws",
36
+ "iam",
37
+ "lean",
38
+ "formal-verification",
39
+ "security"
40
+ ],
41
+ "publishConfig": {
42
+ "access": "public"
43
+ },
44
+ "dependencies": {
45
+ "@proofgate-cdk/model": "^1.1.1"
46
+ },
47
+ "scripts": {
48
+ "build": "tsc -p tsconfig.json",
49
+ "typecheck": "tsc -p tsconfig.json --noEmit"
50
+ }
6
51
  }