@limetry/ci 1.2.54 → 1.2.57
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/classify.d.ts +25 -0
- package/dist/classify.d.ts.map +1 -0
- package/dist/classify.js +42 -0
- package/dist/classify.js.map +1 -0
- package/dist/evaluate.d.ts +89 -0
- package/dist/evaluate.d.ts.map +1 -0
- package/dist/evaluate.js +45 -0
- package/dist/evaluate.js.map +1 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +14 -0
- package/dist/index.js.map +1 -0
- package/dist/intent.d.ts +49 -0
- package/dist/intent.d.ts.map +1 -0
- package/dist/intent.js +32 -0
- package/dist/intent.js.map +1 -0
- package/dist/receipt.d.ts +48 -0
- package/dist/receipt.d.ts.map +1 -0
- package/dist/receipt.js +37 -0
- package/dist/receipt.js.map +1 -0
- package/dist/run-action.d.ts +22 -0
- package/dist/run-action.d.ts.map +1 -0
- package/dist/run-action.js +116 -0
- package/dist/run-action.js.map +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GitHub Actions event trust classification for CI privilege gating.
|
|
3
|
+
*
|
|
4
|
+
* Distinguishes trusted workflow triggers (push, release, workflow_dispatch)
|
|
5
|
+
* from untrusted fork/PR-adjacent events that must not receive privileged secrets.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Whether a GitHub Actions event is trusted for privileged secrets.
|
|
9
|
+
*/
|
|
10
|
+
export type EventTrust = "trusted" | "untrusted";
|
|
11
|
+
/**
|
|
12
|
+
* Classify whether a GitHub Actions event should receive privileged secrets.
|
|
13
|
+
*
|
|
14
|
+
* Returns `untrusted` for known PR/issue/workflow_run events, pull refs, and
|
|
15
|
+
* any unrecognized event name. Only `push`, `release`, and `workflow_dispatch`
|
|
16
|
+
* are trusted.
|
|
17
|
+
*
|
|
18
|
+
* @param input - Event name and optional git ref from the workflow context.
|
|
19
|
+
* @returns `"trusted"` or `"untrusted"`.
|
|
20
|
+
*/
|
|
21
|
+
export declare function classifyEventTrust(input: {
|
|
22
|
+
eventName: string;
|
|
23
|
+
ref?: string;
|
|
24
|
+
}): EventTrust;
|
|
25
|
+
//# sourceMappingURL=classify.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"classify.d.ts","sourceRoot":"","sources":["../src/classify.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,WAAW,CAAA;AAehD;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE;IACxC,SAAS,EAAE,MAAM,CAAA;IACjB,GAAG,CAAC,EAAE,MAAM,CAAA;CACb,GAAG,UAAU,CAYb"}
|
package/dist/classify.js
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GitHub Actions event trust classification for CI privilege gating.
|
|
3
|
+
*
|
|
4
|
+
* Distinguishes trusted workflow triggers (push, release, workflow_dispatch)
|
|
5
|
+
* from untrusted fork/PR-adjacent events that must not receive privileged secrets.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* GitHub event names treated as untrusted for privileged CI.
|
|
9
|
+
*/
|
|
10
|
+
const UNTRUSTED_EVENTS = new Set([
|
|
11
|
+
"pull_request",
|
|
12
|
+
"pull_request_target",
|
|
13
|
+
"pull_request_review",
|
|
14
|
+
"pull_request_review_comment",
|
|
15
|
+
"issues",
|
|
16
|
+
"issue_comment",
|
|
17
|
+
"workflow_run",
|
|
18
|
+
]);
|
|
19
|
+
/**
|
|
20
|
+
* Classify whether a GitHub Actions event should receive privileged secrets.
|
|
21
|
+
*
|
|
22
|
+
* Returns `untrusted` for known PR/issue/workflow_run events, pull refs, and
|
|
23
|
+
* any unrecognized event name. Only `push`, `release`, and `workflow_dispatch`
|
|
24
|
+
* are trusted.
|
|
25
|
+
*
|
|
26
|
+
* @param input - Event name and optional git ref from the workflow context.
|
|
27
|
+
* @returns `"trusted"` or `"untrusted"`.
|
|
28
|
+
*/
|
|
29
|
+
export function classifyEventTrust(input) {
|
|
30
|
+
const eventName = input.eventName.trim().toLowerCase();
|
|
31
|
+
if (UNTRUSTED_EVENTS.has(eventName)) {
|
|
32
|
+
return "untrusted";
|
|
33
|
+
}
|
|
34
|
+
if (eventName === "push" || eventName === "release" || eventName === "workflow_dispatch") {
|
|
35
|
+
return "trusted";
|
|
36
|
+
}
|
|
37
|
+
if (input.ref?.startsWith("refs/pull/")) {
|
|
38
|
+
return "untrusted";
|
|
39
|
+
}
|
|
40
|
+
return "untrusted";
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=classify.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"classify.js","sourceRoot":"","sources":["../src/classify.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAOH;;GAEG;AACH,MAAM,gBAAgB,GAAG,IAAI,GAAG,CAAC;IAC/B,cAAc;IACd,qBAAqB;IACrB,qBAAqB;IACrB,6BAA6B;IAC7B,QAAQ;IACR,eAAe;IACf,cAAc;CACf,CAAC,CAAA;AAEF;;;;;;;;;GASG;AACH,MAAM,UAAU,kBAAkB,CAAC,KAGlC;IACC,MAAM,SAAS,GAAG,KAAK,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAA;IACtD,IAAI,gBAAgB,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,CAAC;QACpC,OAAO,WAAW,CAAA;IACpB,CAAC;IACD,IAAI,SAAS,KAAK,MAAM,IAAI,SAAS,KAAK,SAAS,IAAI,SAAS,KAAK,mBAAmB,EAAE,CAAC;QACzF,OAAO,SAAS,CAAA;IAClB,CAAC;IACD,IAAI,KAAK,CAAC,GAAG,EAAE,UAAU,CAAC,YAAY,CAAC,EAAE,CAAC;QACxC,OAAO,WAAW,CAAA;IACpB,CAAC;IACD,OAAO,WAAW,CAAA;AACpB,CAAC"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Remote CI privilege / deploy evaluation against a Limetry ActionPolicy.
|
|
3
|
+
*/
|
|
4
|
+
import { type ActionEvaluationResponse, type ActionIntent } from "@limetry/sdk";
|
|
5
|
+
import { type EventTrust } from "./classify.js";
|
|
6
|
+
/**
|
|
7
|
+
* Successful ActionEvaluationResponse (`ok: true`) from `\@limetry/sdk`.
|
|
8
|
+
*/
|
|
9
|
+
export type OkActionEvaluation = Extract<ActionEvaluationResponse, {
|
|
10
|
+
ok: true;
|
|
11
|
+
}>;
|
|
12
|
+
/**
|
|
13
|
+
* Inputs for {@link evaluateCiPrivilege}.
|
|
14
|
+
*/
|
|
15
|
+
export type EvaluateCiPrivilegeInput = {
|
|
16
|
+
/**
|
|
17
|
+
* Limetry API base URL; passed through to {@link RemotePolicyEngine}.
|
|
18
|
+
*/
|
|
19
|
+
baseUrl?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Limetry API key / bearer token.
|
|
22
|
+
*/
|
|
23
|
+
apiKey: string;
|
|
24
|
+
/**
|
|
25
|
+
* Tenant id for multi-tenant evaluation.
|
|
26
|
+
*/
|
|
27
|
+
tenantId?: string;
|
|
28
|
+
/**
|
|
29
|
+
* ActionPolicy id to evaluate against.
|
|
30
|
+
*/
|
|
31
|
+
policyId: string;
|
|
32
|
+
/**
|
|
33
|
+
* Agent id recorded on the ActionIntent.
|
|
34
|
+
*/
|
|
35
|
+
agentId: string;
|
|
36
|
+
/**
|
|
37
|
+
* Whether this is a CI privilege check or a deploy gate.
|
|
38
|
+
*/
|
|
39
|
+
actionType: "ci_privilege" | "deploy";
|
|
40
|
+
/**
|
|
41
|
+
* GitHub repository (`owner/repo`).
|
|
42
|
+
*/
|
|
43
|
+
repository: string;
|
|
44
|
+
/**
|
|
45
|
+
* Commit SHA being gated.
|
|
46
|
+
*/
|
|
47
|
+
sha: string;
|
|
48
|
+
/**
|
|
49
|
+
* GitHub Actions event name used for trust classification.
|
|
50
|
+
*/
|
|
51
|
+
eventName: string;
|
|
52
|
+
/**
|
|
53
|
+
* Optional git ref; pull refs force untrusted classification.
|
|
54
|
+
*/
|
|
55
|
+
ref?: string;
|
|
56
|
+
/**
|
|
57
|
+
* Optional fetch implementation for tests.
|
|
58
|
+
*/
|
|
59
|
+
fetch?: typeof globalThis.fetch;
|
|
60
|
+
};
|
|
61
|
+
/**
|
|
62
|
+
* Combined trust classification, built intent, and successful evaluation result.
|
|
63
|
+
*/
|
|
64
|
+
export type EvaluateCiPrivilegeResult = {
|
|
65
|
+
/**
|
|
66
|
+
* Local trust classification for the GitHub event.
|
|
67
|
+
*/
|
|
68
|
+
trust: EventTrust;
|
|
69
|
+
/**
|
|
70
|
+
* ActionIntent submitted to Limetry.
|
|
71
|
+
*/
|
|
72
|
+
intent: ActionIntent;
|
|
73
|
+
/**
|
|
74
|
+
* Successful remote evaluation response.
|
|
75
|
+
*/
|
|
76
|
+
evaluation: OkActionEvaluation;
|
|
77
|
+
};
|
|
78
|
+
/**
|
|
79
|
+
* Classify event trust and evaluate a CI privilege or deploy ActionIntent.
|
|
80
|
+
*
|
|
81
|
+
* Builds a `repository@sha` resource, attaches `event_name` / `trust` / optional
|
|
82
|
+
* `ref` metadata, then calls {@link RemotePolicyEngine.evaluateAction}.
|
|
83
|
+
*
|
|
84
|
+
* @param input - API credentials, policy, repo context, and action type.
|
|
85
|
+
* @returns Trust label, intent, and successful evaluation.
|
|
86
|
+
* @throws Error When the remote evaluation returns `ok: false`.
|
|
87
|
+
*/
|
|
88
|
+
export declare function evaluateCiPrivilege(input: EvaluateCiPrivilegeInput): Promise<EvaluateCiPrivilegeResult>;
|
|
89
|
+
//# sourceMappingURL=evaluate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"evaluate.d.ts","sourceRoot":"","sources":["../src/evaluate.ts"],"names":[],"mappings":"AAAA;;GAEG;AA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
|
|
3
|
+
*/
|
|
4
|
+
import { RemotePolicyEngine, } from "@limetry/sdk";
|
|
5
|
+
import { classifyEventTrust } from "./classify.js";
|
|
6
|
+
import { buildCiIntent, buildRepoShaResource } from "./intent.js";
|
|
7
|
+
/**
|
|
8
|
+
* Classify event trust and evaluate a CI privilege or deploy ActionIntent.
|
|
9
|
+
*
|
|
10
|
+
* Builds a `repository@sha` resource, attaches `event_name` / `trust` / optional
|
|
11
|
+
* `ref` metadata, then calls {@link RemotePolicyEngine.evaluateAction}.
|
|
12
|
+
*
|
|
13
|
+
* @param input - API credentials, policy, repo context, and action type.
|
|
14
|
+
* @returns Trust label, intent, and successful evaluation.
|
|
15
|
+
* @throws Error When the remote evaluation returns `ok: false`.
|
|
16
|
+
*/
|
|
17
|
+
export async function evaluateCiPrivilege(input) {
|
|
18
|
+
const trust = classifyEventTrust({
|
|
19
|
+
eventName: input.eventName,
|
|
20
|
+
ref: input.ref,
|
|
21
|
+
});
|
|
22
|
+
const intent = buildCiIntent({
|
|
23
|
+
policyId: input.policyId,
|
|
24
|
+
agentId: input.agentId,
|
|
25
|
+
actionType: input.actionType,
|
|
26
|
+
resource: buildRepoShaResource(input.repository, input.sha),
|
|
27
|
+
metadata: {
|
|
28
|
+
event_name: input.eventName,
|
|
29
|
+
trust,
|
|
30
|
+
...(input.ref ? { ref: input.ref } : {}),
|
|
31
|
+
},
|
|
32
|
+
});
|
|
33
|
+
const engine = new RemotePolicyEngine({
|
|
34
|
+
baseUrl: input.baseUrl,
|
|
35
|
+
apiKey: input.apiKey,
|
|
36
|
+
tenantId: input.tenantId,
|
|
37
|
+
fetch: input.fetch,
|
|
38
|
+
});
|
|
39
|
+
const evaluation = await engine.evaluateAction(intent);
|
|
40
|
+
if (!evaluation.ok) {
|
|
41
|
+
throw new Error(evaluation.error ?? "Limetry evaluate failed");
|
|
42
|
+
}
|
|
43
|
+
return { trust, intent, evaluation };
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=evaluate.js.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U,CAAC,EAAE,EAAE,CAAC;QACnB,MAAM,IAAI,KAAK,CAAC,UAAU,CAAC,KAAK,IAAI,yBAAyB,CAAC,CAAA;IAChE,CAAC;IACD,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,CAAA;AACtC,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CI privilege and deploy gating helpers for GitHub Actions (`\@limetry/ci`).
|
|
3
|
+
*
|
|
4
|
+
* Classifies event trust, builds ActionIntents, evaluates against a remote
|
|
5
|
+
* Limetry policy, verifies release receipts, and exposes the Action entrypoint.
|
|
6
|
+
*
|
|
7
|
+
* @packageDocumentation
|
|
8
|
+
*/
|
|
9
|
+
export { classifyEventTrust, type EventTrust } from "./classify.js";
|
|
10
|
+
export { evaluateCiPrivilege, type EvaluateCiPrivilegeInput, type EvaluateCiPrivilegeResult } from "./evaluate.js";
|
|
11
|
+
export { buildCiIntent, type BuildCiIntentInput, buildRepoShaResource } from "./intent.js";
|
|
12
|
+
export { type ReleaseReceiptFields, verifyReleaseReceipt } from "./receipt.js";
|
|
13
|
+
export { runAction } from "./run-action.js";
|
|
14
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,kBAAkB,EAAE,KAAK,UAAU,EAAE,MAAM,eAAe,CAAA;AACnE,OAAO,EAAE,mBAAmB,EAAE,KAAK,wBAAwB,EAAE,KAAK,yBAAyB,EAAE,MAAM,eAAe,CAAA;AAClH,OAAO,EAAE,aAAa,EAAE,KAAK,kBAAkB,EAAC,oBAAoB,EAAE,MAAM,aAAa,CAAA;AACzF,OAAO,EAAE,KAAK,oBAAoB,EAAC,oBAAoB,EAAE,MAAM,cAAc,CAAA;AAC7E,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CI privilege and deploy gating helpers for GitHub Actions (`\@limetry/ci`).
|
|
3
|
+
*
|
|
4
|
+
* Classifies event trust, builds ActionIntents, evaluates against a remote
|
|
5
|
+
* Limetry policy, verifies release receipts, and exposes the Action entrypoint.
|
|
6
|
+
*
|
|
7
|
+
* @packageDocumentation
|
|
8
|
+
*/
|
|
9
|
+
export { classifyEventTrust } from "./classify.js";
|
|
10
|
+
export { evaluateCiPrivilege } from "./evaluate.js";
|
|
11
|
+
export { buildCiIntent, buildRepoShaResource } from "./intent.js";
|
|
12
|
+
export { verifyReleaseReceipt } from "./receipt.js";
|
|
13
|
+
export { runAction } from "./run-action.js";
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,kBAAkB,EAAmB,MAAM,eAAe,CAAA;AACnE,OAAO,EAAE,mBAAmB,EAAiE,MAAM,eAAe,CAAA;AAClH,OAAO,EAAE,aAAa,EAA0B,oBAAoB,EAAE,MAAM,aAAa,CAAA;AACzF,OAAO,EAA4B,oBAAoB,EAAE,MAAM,cAAc,CAAA;AAC7E,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA"}
|
package/dist/intent.d.ts
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ActionIntent builders for CI privilege and deploy gating.
|
|
3
|
+
*/
|
|
4
|
+
import type { ActionIntent } from "@limetry/sdk";
|
|
5
|
+
/**
|
|
6
|
+
* Inputs for {@link buildCiIntent}.
|
|
7
|
+
*/
|
|
8
|
+
export type BuildCiIntentInput = {
|
|
9
|
+
/**
|
|
10
|
+
* Registered ActionPolicy id.
|
|
11
|
+
*/
|
|
12
|
+
policyId: string;
|
|
13
|
+
/**
|
|
14
|
+
* Agent identity bound to the intent (for example `github_actions`).
|
|
15
|
+
*/
|
|
16
|
+
agentId: string;
|
|
17
|
+
/**
|
|
18
|
+
* CI action type to evaluate.
|
|
19
|
+
*/
|
|
20
|
+
actionType: "ci_privilege" | "deploy";
|
|
21
|
+
/**
|
|
22
|
+
* Resource string, typically `repository@sha` from {@link buildRepoShaResource}.
|
|
23
|
+
*/
|
|
24
|
+
resource: string;
|
|
25
|
+
/**
|
|
26
|
+
* ISO-8601 issuance timestamp; defaults to now.
|
|
27
|
+
*/
|
|
28
|
+
issuedAt?: string;
|
|
29
|
+
/**
|
|
30
|
+
* String metadata attached to the intent (event name, trust, ref, etc.).
|
|
31
|
+
*/
|
|
32
|
+
metadata?: Record<string, string>;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Build an ActionIntent for CI privilege or release/deploy gating.
|
|
36
|
+
*
|
|
37
|
+
* @param input - Policy, agent, action type, resource, and optional metadata.
|
|
38
|
+
* @returns A new ActionIntent with a generated `intent_id`.
|
|
39
|
+
*/
|
|
40
|
+
export declare function buildCiIntent(input: BuildCiIntentInput): ActionIntent;
|
|
41
|
+
/**
|
|
42
|
+
* Bind a repository and commit SHA into the ActionIntent resource field.
|
|
43
|
+
*
|
|
44
|
+
* @param repository - GitHub `owner/repo` string.
|
|
45
|
+
* @param sha - Commit SHA being gated.
|
|
46
|
+
* @returns Resource string in the form `repository@sha`.
|
|
47
|
+
*/
|
|
48
|
+
export declare function buildRepoShaResource(repository: string, sha: string): string;
|
|
49
|
+
//# sourceMappingURL=intent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"intent.d.ts","sourceRoot":"","sources":["../src/intent.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAEhD;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAA;IAChB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAA;IACf;;OAEG;IACH,UAAU,EAAE,cAAc,GAAG,QAAQ,CAAA;IACrC;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAA;IAChB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAClC,CAAA;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,GAAG,YAAY,CAUrE;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAE5E"}
|
package/dist/intent.js
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ActionIntent builders for CI privilege and deploy gating.
|
|
3
|
+
*/
|
|
4
|
+
import { randomUUID } from "node:crypto";
|
|
5
|
+
/**
|
|
6
|
+
* Build an ActionIntent for CI privilege or release/deploy gating.
|
|
7
|
+
*
|
|
8
|
+
* @param input - Policy, agent, action type, resource, and optional metadata.
|
|
9
|
+
* @returns A new ActionIntent with a generated `intent_id`.
|
|
10
|
+
*/
|
|
11
|
+
export function buildCiIntent(input) {
|
|
12
|
+
return {
|
|
13
|
+
intent_id: randomUUID(),
|
|
14
|
+
policy_id: input.policyId,
|
|
15
|
+
agent_id: input.agentId,
|
|
16
|
+
action_type: input.actionType,
|
|
17
|
+
resource: input.resource,
|
|
18
|
+
metadata: input.metadata,
|
|
19
|
+
issued_at: input.issuedAt ?? new Date().toISOString(),
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Bind a repository and commit SHA into the ActionIntent resource field.
|
|
24
|
+
*
|
|
25
|
+
* @param repository - GitHub `owner/repo` string.
|
|
26
|
+
* @param sha - Commit SHA being gated.
|
|
27
|
+
* @returns Resource string in the form `repository@sha`.
|
|
28
|
+
*/
|
|
29
|
+
export function buildRepoShaResource(repository, sha) {
|
|
30
|
+
return `${repository}@${sha}`;
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=intent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"intent.js","sourceRoot":"","sources":["../src/intent.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAkCxC;;;;;GAKG;AACH,MAAM,UAAU,aAAa,CAAC,KAAyB;IACrD,OAAO;QACL,SAAS,EAAE,UAAU,EAAE;QACvB,SAAS,EAAE,KAAK,CAAC,QAAQ;QACzB,QAAQ,EAAE,KAAK,CAAC,OAAO;QACvB,WAAW,EAAE,KAAK,CAAC,UAAU;QAC7B,QAAQ,EAAE,KAAK,CAAC,QAAQ;QACxB,QAAQ,EAAE,KAAK,CAAC,QAAQ;QACxB,SAAS,EAAE,KAAK,CAAC,QAAQ,IAAI,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;KACtD,CAAA;AACH,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,oBAAoB,CAAC,UAAkB,EAAE,GAAW;IAClE,OAAO,GAAG,UAAU,IAAI,GAAG,EAAE,CAAA;AAC/B,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* HMAC decision receipt verification for release/deploy gating.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Fields of a Limetry decision receipt used for release verification.
|
|
6
|
+
*/
|
|
7
|
+
export type ReleaseReceiptFields = {
|
|
8
|
+
/**
|
|
9
|
+
* Decision value (for example `allow` or `deny`).
|
|
10
|
+
*/
|
|
11
|
+
decision: string;
|
|
12
|
+
/**
|
|
13
|
+
* Unique decision identifier.
|
|
14
|
+
*/
|
|
15
|
+
decision_id: string;
|
|
16
|
+
/**
|
|
17
|
+
* Digest the receipt is bound to (typically a hash of the intent JSON).
|
|
18
|
+
*/
|
|
19
|
+
digest: string;
|
|
20
|
+
/**
|
|
21
|
+
* Unix expiry timestamp in seconds.
|
|
22
|
+
*/
|
|
23
|
+
exp: number;
|
|
24
|
+
/**
|
|
25
|
+
* Human-readable decision reasons.
|
|
26
|
+
*/
|
|
27
|
+
reasons: string[];
|
|
28
|
+
/**
|
|
29
|
+
* Hex-encoded HMAC-SHA256 signature over the receipt payload.
|
|
30
|
+
*/
|
|
31
|
+
sig: string;
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Verify an HMAC decision receipt is bound to the expected digest (typically intent JSON hash).
|
|
35
|
+
* Matches server `createDecisionReceipt` payload formatting.
|
|
36
|
+
*
|
|
37
|
+
* Checks digest equality, expiry, then timing-safe HMAC comparison of:
|
|
38
|
+
* `decision_id.decision.digest.exp.reasonsJoinedByPipe`.
|
|
39
|
+
*
|
|
40
|
+
* @param input - Receipt fields, expected digest, and HMAC secret.
|
|
41
|
+
* @returns `true` when the receipt is unexpired, digest-matched, and signature-valid.
|
|
42
|
+
*/
|
|
43
|
+
export declare function verifyReleaseReceipt(input: {
|
|
44
|
+
receipt: ReleaseReceiptFields;
|
|
45
|
+
expectedDigest: string;
|
|
46
|
+
secret: string;
|
|
47
|
+
}): boolean;
|
|
48
|
+
//# sourceMappingURL=receipt.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"receipt.d.ts","sourceRoot":"","sources":["../src/receipt.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAA;IAChB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAA;IACnB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAA;IACd;;OAEG;IACH,GAAG,EAAE,MAAM,CAAA;IACX;;OAEG;IACH,OAAO,EAAE,MAAM,EAAE,CAAA;IACjB;;OAEG;IACH,GAAG,EAAE,MAAM,CAAA;CACZ,CAAA;AAED;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE;IAC1C,OAAO,EAAE,oBAAoB,CAAA;IAC7B,cAAc,EAAE,MAAM,CAAA;IACtB,MAAM,EAAE,MAAM,CAAA;CACf,GAAG,OAAO,CAqBV"}
|
package/dist/receipt.js
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* HMAC decision receipt verification for release/deploy gating.
|
|
3
|
+
*/
|
|
4
|
+
import { createHmac, timingSafeEqual } from "node:crypto";
|
|
5
|
+
/**
|
|
6
|
+
* Verify an HMAC decision receipt is bound to the expected digest (typically intent JSON hash).
|
|
7
|
+
* Matches server `createDecisionReceipt` payload formatting.
|
|
8
|
+
*
|
|
9
|
+
* Checks digest equality, expiry, then timing-safe HMAC comparison of:
|
|
10
|
+
* `decision_id.decision.digest.exp.reasonsJoinedByPipe`.
|
|
11
|
+
*
|
|
12
|
+
* @param input - Receipt fields, expected digest, and HMAC secret.
|
|
13
|
+
* @returns `true` when the receipt is unexpired, digest-matched, and signature-valid.
|
|
14
|
+
*/
|
|
15
|
+
export function verifyReleaseReceipt(input) {
|
|
16
|
+
if (input.receipt.digest !== input.expectedDigest) {
|
|
17
|
+
return false;
|
|
18
|
+
}
|
|
19
|
+
if (input.receipt.exp < Math.floor(Date.now() / 1000)) {
|
|
20
|
+
return false;
|
|
21
|
+
}
|
|
22
|
+
const payload = [
|
|
23
|
+
input.receipt.decision_id,
|
|
24
|
+
input.receipt.decision,
|
|
25
|
+
input.receipt.digest,
|
|
26
|
+
String(input.receipt.exp),
|
|
27
|
+
input.receipt.reasons.join("|"),
|
|
28
|
+
].join(".");
|
|
29
|
+
const expected = createHmac("sha256", input.secret).update(payload).digest("hex");
|
|
30
|
+
const left = Buffer.from(expected, "utf8");
|
|
31
|
+
const right = Buffer.from(input.receipt.sig, "utf8");
|
|
32
|
+
if (left.length !== right.length) {
|
|
33
|
+
return false;
|
|
34
|
+
}
|
|
35
|
+
return timingSafeEqual(left, right);
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=receipt.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"receipt.js","sourceRoot":"","sources":["../src/receipt.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAgCzD;;;;;;;;;GASG;AACH,MAAM,UAAU,oBAAoB,CAAC,KAIpC;IACC,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,KAAK,KAAK,CAAC,cAAc,EAAE,CAAC;QAClD,OAAO,KAAK,CAAA;IACd,CAAC;IACD,IAAI,KAAK,CAAC,OAAO,CAAC,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,EAAE,CAAC;QACtD,OAAO,KAAK,CAAA;IACd,CAAC;IACD,MAAM,OAAO,GAAG;QACd,KAAK,CAAC,OAAO,CAAC,WAAW;QACzB,KAAK,CAAC,OAAO,CAAC,QAAQ;QACtB,KAAK,CAAC,OAAO,CAAC,MAAM;QACpB,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC;QACzB,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC;KAChC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;IACX,MAAM,QAAQ,GAAG,UAAU,CAAC,QAAQ,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;IACjF,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAA;IAC1C,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM,CAAC,CAAA;IACpD,IAAI,IAAI,CAAC,MAAM,KAAK,KAAK,CAAC,MAAM,EAAE,CAAC;QACjC,OAAO,KAAK,CAAA;IACd,CAAC;IACD,OAAO,eAAe,CAAC,IAAI,EAAE,KAAK,CAAC,CAAA;AACrC,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* GitHub Action CLI entrypoint that evaluates CI privilege / deploy intents
|
|
4
|
+
* and writes decision outputs for downstream workflow steps.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* GitHub Action entrypoint for Limetry CI privilege / deploy gating.
|
|
8
|
+
*
|
|
9
|
+
* Reads workflow inputs from `INPUT_*` / `LIMETRY_*` / `GITHUB_*` env vars,
|
|
10
|
+
* evaluates via {@link evaluateCiPrivilege}, and sets `decision`, `decision_id`,
|
|
11
|
+
* `approval_id`, and `receipt_digest` outputs.
|
|
12
|
+
*
|
|
13
|
+
* Exit codes:
|
|
14
|
+
* - `0` — allow (or approval_required when `fail_on_approval_required` is false)
|
|
15
|
+
* - `1` — missing inputs, untrusted event (when required), deny, or approval_required
|
|
16
|
+
*
|
|
17
|
+
* @param env - Process environment; defaults to `process.env`.
|
|
18
|
+
* @returns Process exit code (`0` success, `1` failure).
|
|
19
|
+
* @throws Propagates evaluation transport / remote errors to the caller.
|
|
20
|
+
*/
|
|
21
|
+
export declare function runAction(env?: NodeJS.ProcessEnv): Promise<number>;
|
|
22
|
+
//# sourceMappingURL=run-action.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run-action.d.ts","sourceRoot":"","sources":["../src/run-action.ts"],"names":[],"mappings":";AACA;;;GAGG;AAoCH;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,SAAS,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,OAAO,CAAC,MAAM,CAAC,CAiErF"}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* GitHub Action CLI entrypoint that evaluates CI privilege / deploy intents
|
|
4
|
+
* and writes decision outputs for downstream workflow steps.
|
|
5
|
+
*/
|
|
6
|
+
import { appendFileSync } from "node:fs";
|
|
7
|
+
import { evaluateCiPrivilege } from "./evaluate.js";
|
|
8
|
+
/**
|
|
9
|
+
* Parse a boolean env/input string with a fallback when unset or empty.
|
|
10
|
+
*
|
|
11
|
+
* @param value - Raw env value (`"true"` / `"1"` are truthy).
|
|
12
|
+
* @param fallback - Value used when `value` is undefined or empty.
|
|
13
|
+
* @returns Parsed boolean.
|
|
14
|
+
*/
|
|
15
|
+
function readBoolean(value, fallback) {
|
|
16
|
+
if (value === undefined || value === "") {
|
|
17
|
+
return fallback;
|
|
18
|
+
}
|
|
19
|
+
return value === "true" || value === "1";
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Write a GitHub Actions output, or print `name=value` to stdout when
|
|
23
|
+
* `GITHUB_OUTPUT` is unset.
|
|
24
|
+
*
|
|
25
|
+
* @param name - Output name.
|
|
26
|
+
* @param value - Output value.
|
|
27
|
+
*/
|
|
28
|
+
function setOutput(name, value) {
|
|
29
|
+
const destination = process.env.GITHUB_OUTPUT;
|
|
30
|
+
if (!destination) {
|
|
31
|
+
process.stdout.write(`${name}=${value}\n`);
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
appendFileSync(destination, `${name}=${value}\n`);
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* GitHub Action entrypoint for Limetry CI privilege / deploy gating.
|
|
38
|
+
*
|
|
39
|
+
* Reads workflow inputs from `INPUT_*` / `LIMETRY_*` / `GITHUB_*` env vars,
|
|
40
|
+
* evaluates via {@link evaluateCiPrivilege}, and sets `decision`, `decision_id`,
|
|
41
|
+
* `approval_id`, and `receipt_digest` outputs.
|
|
42
|
+
*
|
|
43
|
+
* Exit codes:
|
|
44
|
+
* - `0` — allow (or approval_required when `fail_on_approval_required` is false)
|
|
45
|
+
* - `1` — missing inputs, untrusted event (when required), deny, or approval_required
|
|
46
|
+
*
|
|
47
|
+
* @param env - Process environment; defaults to `process.env`.
|
|
48
|
+
* @returns Process exit code (`0` success, `1` failure).
|
|
49
|
+
* @throws Propagates evaluation transport / remote errors to the caller.
|
|
50
|
+
*/
|
|
51
|
+
export async function runAction(env = process.env) {
|
|
52
|
+
const eventName = env.GITHUB_EVENT_NAME ?? env.INPUT_EVENT_NAME ?? "";
|
|
53
|
+
const sha = env.GITHUB_SHA ?? "";
|
|
54
|
+
const repository = env.GITHUB_REPOSITORY ?? "";
|
|
55
|
+
const ref = env.GITHUB_REF;
|
|
56
|
+
const apiKey = env.INPUT_LIMETRY_API_KEY ?? env.LIMETRY_API_KEY ?? "";
|
|
57
|
+
const baseUrl = env.INPUT_LIMETRY_BASE_URL ?? env.LIMETRY_BASE_URL;
|
|
58
|
+
const policyId = env.INPUT_POLICY_ID ?? env.LIMETRY_POLICY_ID ?? "";
|
|
59
|
+
const agentId = env.INPUT_AGENT_ID ?? "github_actions";
|
|
60
|
+
const actionTypeRaw = env.INPUT_ACTION_TYPE ?? "ci_privilege";
|
|
61
|
+
const actionType = actionTypeRaw === "deploy" ? "deploy" : "ci_privilege";
|
|
62
|
+
const requireTrusted = readBoolean(env.INPUT_REQUIRE_TRUSTED, true);
|
|
63
|
+
const failOnApprovalRequired = readBoolean(env.INPUT_FAIL_ON_APPROVAL_REQUIRED, true);
|
|
64
|
+
if (!apiKey || !policyId || !repository || !sha || !eventName) {
|
|
65
|
+
process.stderr.write("Missing required CI inputs (api key, policy id, repository, sha, or event name)\n");
|
|
66
|
+
return 1;
|
|
67
|
+
}
|
|
68
|
+
const result = await evaluateCiPrivilege({
|
|
69
|
+
baseUrl,
|
|
70
|
+
apiKey,
|
|
71
|
+
policyId,
|
|
72
|
+
agentId,
|
|
73
|
+
actionType,
|
|
74
|
+
repository,
|
|
75
|
+
sha,
|
|
76
|
+
eventName,
|
|
77
|
+
ref,
|
|
78
|
+
});
|
|
79
|
+
setOutput("decision", result.evaluation.decision ?? "deny");
|
|
80
|
+
setOutput("decision_id", result.evaluation.decision_id ?? "");
|
|
81
|
+
setOutput("approval_id", result.evaluation.approval_id ?? "");
|
|
82
|
+
const receipt = result.evaluation.receipt;
|
|
83
|
+
setOutput("receipt_digest", receipt?.digest ?? "");
|
|
84
|
+
if (requireTrusted && result.trust === "untrusted") {
|
|
85
|
+
process.stderr.write(`Refusing privileged CI for untrusted event ${eventName} on ${result.intent.resource}\n`);
|
|
86
|
+
return 1;
|
|
87
|
+
}
|
|
88
|
+
if (result.evaluation.decision === "deny") {
|
|
89
|
+
process.stderr.write(`Limetry denied ${actionType}: ${(result.evaluation.reasons ?? []).join("; ")}\n`);
|
|
90
|
+
return 1;
|
|
91
|
+
}
|
|
92
|
+
if (result.evaluation.decision === "approval_required" && failOnApprovalRequired) {
|
|
93
|
+
process.stderr.write(`Limetry requires approval (${result.evaluation.approval_id ?? "unknown"}): ` +
|
|
94
|
+
`${(result.evaluation.reasons ?? []).join("; ")}\n`);
|
|
95
|
+
return 1;
|
|
96
|
+
}
|
|
97
|
+
process.stdout.write(`Limetry ${result.evaluation.decision ?? "allow"} for ${result.intent.resource}\n`);
|
|
98
|
+
return 0;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* True when this module is executed directly rather than imported.
|
|
102
|
+
*/
|
|
103
|
+
const isDirectRun = process.argv[1]?.endsWith("run-action.js") ||
|
|
104
|
+
process.argv[1]?.endsWith("run-action.ts");
|
|
105
|
+
if (isDirectRun) {
|
|
106
|
+
void runAction()
|
|
107
|
+
.then((code) => {
|
|
108
|
+
process.exit(code);
|
|
109
|
+
})
|
|
110
|
+
.catch((error) => {
|
|
111
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
112
|
+
process.stderr.write(`${message}\n`);
|
|
113
|
+
process.exit(1);
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
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,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC,eAAe,CAAC,CAAA;AAE5C,IAAI,WAAW,EAAE,CAAC;IAChB,KAAK,SAAS,EAAE;SACb,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE;QACb,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IACpB,CAAC,CAAC;SACD,KAAK,CAAC,CAAC,KAAc,EAAE,EAAE;QACxB,MAAM,OAAO,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;QACtE,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,OAAO,IAAI,CAAC,CAAA;QACpC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;IACjB,CAAC,CAAC,CAAA;AACN,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@limetry/ci",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.57",
|
|
4
4
|
"description": "Limetry GitHub Action and helpers for CI privilege and release gating",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"@limetry/sdk": "*"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@limetry/sdk": "^1.2.
|
|
45
|
+
"@limetry/sdk": "^1.2.57",
|
|
46
46
|
"@types/node": "^26.4.1",
|
|
47
47
|
"@vitest/coverage-v8": "4.1.11",
|
|
48
48
|
"typescript": "^5.8.2",
|