@docker/actions-toolkit 0.63.0 → 0.65.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.
Files changed (55) hide show
  1. package/lib/buildx/imagetools.d.ts +6 -0
  2. package/lib/buildx/imagetools.js +37 -0
  3. package/lib/buildx/imagetools.js.map +1 -1
  4. package/lib/buildx/install.d.ts +4 -2
  5. package/lib/buildx/install.js +22 -17
  6. package/lib/buildx/install.js.map +1 -1
  7. package/lib/compose/install.d.ts +4 -2
  8. package/lib/compose/install.js +22 -17
  9. package/lib/compose/install.js.map +1 -1
  10. package/lib/cosign/cosign.d.ts +40 -0
  11. package/lib/cosign/cosign.js +180 -0
  12. package/lib/cosign/cosign.js.map +1 -0
  13. package/lib/cosign/dockerfile.d.ts +16 -0
  14. package/lib/cosign/dockerfile.js +64 -0
  15. package/lib/cosign/dockerfile.js.map +1 -0
  16. package/lib/cosign/install.d.ts +35 -0
  17. package/lib/cosign/install.js +273 -0
  18. package/lib/cosign/install.js.map +1 -0
  19. package/lib/docker/assets.d.ts +1 -1
  20. package/lib/docker/assets.js +22 -12
  21. package/lib/docker/assets.js.map +1 -1
  22. package/lib/docker/install.d.ts +3 -1
  23. package/lib/docker/install.js +17 -17
  24. package/lib/docker/install.js.map +1 -1
  25. package/lib/github.d.ts +3 -1
  26. package/lib/github.js +19 -1
  27. package/lib/github.js.map +1 -1
  28. package/lib/regclient/install.d.ts +6 -1
  29. package/lib/regclient/install.js +16 -14
  30. package/lib/regclient/install.js.map +1 -1
  31. package/lib/sigstore/sigstore.d.ts +69 -0
  32. package/lib/sigstore/sigstore.js +362 -0
  33. package/lib/sigstore/sigstore.js.map +1 -0
  34. package/lib/toolkit.d.ts +13 -1
  35. package/lib/toolkit.js +13 -1
  36. package/lib/toolkit.js.map +1 -1
  37. package/lib/types/buildx/buildx.d.ts +2 -1
  38. package/lib/types/buildx/imagetools.d.ts +25 -0
  39. package/lib/types/buildx/imagetools.js +18 -0
  40. package/lib/types/buildx/imagetools.js.map +1 -0
  41. package/lib/types/compose/compose.d.ts +2 -1
  42. package/lib/types/cosign/cosign.d.ts +21 -0
  43. package/lib/types/cosign/cosign.js +18 -0
  44. package/lib/types/cosign/cosign.js.map +1 -0
  45. package/lib/types/github.d.ts +6 -0
  46. package/lib/types/intoto/intoto.d.ts +4 -0
  47. package/lib/types/regclient/regclient.d.ts +2 -1
  48. package/lib/types/sigstore/sigstore.d.ts +19 -0
  49. package/lib/types/sigstore/sigstore.js +23 -0
  50. package/lib/types/sigstore/sigstore.js.map +1 -0
  51. package/lib/types/undock/undock.d.ts +2 -1
  52. package/lib/undock/install.d.ts +6 -1
  53. package/lib/undock/install.js +18 -16
  54. package/lib/undock/install.js.map +1 -1
  55. package/package.json +12 -7
@@ -0,0 +1,362 @@
1
+ "use strict";
2
+ /**
3
+ * Copyright 2025 actions-toolkit authors
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
18
+ if (k2 === undefined) k2 = k;
19
+ var desc = Object.getOwnPropertyDescriptor(m, k);
20
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
21
+ desc = { enumerable: true, get: function() { return m[k]; } };
22
+ }
23
+ Object.defineProperty(o, k2, desc);
24
+ }) : (function(o, m, k, k2) {
25
+ if (k2 === undefined) k2 = k;
26
+ o[k2] = m[k];
27
+ }));
28
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
29
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
30
+ }) : function(o, v) {
31
+ o["default"] = v;
32
+ });
33
+ var __importStar = (this && this.__importStar) || (function () {
34
+ var ownKeys = function(o) {
35
+ ownKeys = Object.getOwnPropertyNames || function (o) {
36
+ var ar = [];
37
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
38
+ return ar;
39
+ };
40
+ return ownKeys(o);
41
+ };
42
+ return function (mod) {
43
+ if (mod && mod.__esModule) return mod;
44
+ var result = {};
45
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
46
+ __setModuleDefault(result, mod);
47
+ return result;
48
+ };
49
+ })();
50
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
51
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
52
+ return new (P || (P = Promise))(function (resolve, reject) {
53
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
54
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
55
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
56
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
57
+ });
58
+ };
59
+ var __importDefault = (this && this.__importDefault) || function (mod) {
60
+ return (mod && mod.__esModule) ? mod : { "default": mod };
61
+ };
62
+ Object.defineProperty(exports, "__esModule", { value: true });
63
+ exports.Sigstore = void 0;
64
+ const crypto_1 = require("crypto");
65
+ const fs_1 = __importDefault(require("fs"));
66
+ const path_1 = __importDefault(require("path"));
67
+ const core = __importStar(require("@actions/core"));
68
+ const sign_1 = require("@actions/attest/lib/sign");
69
+ const bundle_1 = require("@sigstore/bundle");
70
+ const cosign_1 = require("../cosign/cosign");
71
+ const exec_1 = require("../exec");
72
+ const github_1 = require("../github");
73
+ const imagetools_1 = require("../buildx/imagetools");
74
+ const intoto_1 = require("../types/intoto/intoto");
75
+ const sigstore_1 = require("../types/sigstore/sigstore");
76
+ class Sigstore {
77
+ constructor(opts) {
78
+ this.cosign = (opts === null || opts === void 0 ? void 0 : opts.cosign) || new cosign_1.Cosign();
79
+ this.imageTools = (opts === null || opts === void 0 ? void 0 : opts.imageTools) || new imagetools_1.ImageTools();
80
+ }
81
+ signAttestationManifests(opts) {
82
+ return __awaiter(this, void 0, void 0, function* () {
83
+ if (!(yield this.cosign.isAvailable())) {
84
+ throw new Error('Cosign is required to sign attestation manifests');
85
+ }
86
+ const result = {};
87
+ try {
88
+ if (!process.env.ACTIONS_ID_TOKEN_REQUEST_URL) {
89
+ throw new Error('missing "id-token" permission. Please add "permissions: id-token: write" to your workflow.');
90
+ }
91
+ const endpoints = this.signingEndpoints(opts.noTransparencyLog);
92
+ core.info(`Using Sigstore signing endpoint: ${endpoints.fulcioURL}`);
93
+ const noTransparencyLog = Sigstore.noTransparencyLog(opts.noTransparencyLog);
94
+ const attestationDigests = yield this.imageTools.attestationDigests(`${opts.imageName}@${opts.imageDigest}`);
95
+ for (const attestationDigest of attestationDigests) {
96
+ const attestationRef = `${opts.imageName}@${attestationDigest}`;
97
+ yield core.group(`Signing attestation manifest ${attestationRef}`, () => __awaiter(this, void 0, void 0, function* () {
98
+ // prettier-ignore
99
+ const cosignArgs = [
100
+ '--verbose',
101
+ 'sign',
102
+ '--yes',
103
+ '--oidc-provider', 'github-actions',
104
+ '--registry-referrers-mode', 'oci-1-1',
105
+ '--new-bundle-format',
106
+ '--use-signing-config'
107
+ ];
108
+ if (noTransparencyLog) {
109
+ cosignArgs.push('--tlog-upload=false');
110
+ }
111
+ core.info(`[command]cosign ${[...cosignArgs, attestationRef].join(' ')}`);
112
+ const execRes = yield exec_1.Exec.getExecOutput('cosign', [...cosignArgs, attestationRef], {
113
+ ignoreReturnCode: true,
114
+ silent: true,
115
+ env: Object.assign({}, process.env, {
116
+ COSIGN_EXPERIMENTAL: '1'
117
+ })
118
+ });
119
+ const signResult = cosign_1.Cosign.parseCommandOutput(execRes.stderr.trim());
120
+ if (execRes.exitCode != 0) {
121
+ if (signResult.errors && signResult.errors.length > 0) {
122
+ const errorMessages = signResult.errors.map(e => `- [${e.code}] ${e.message} : ${e.detail}`).join('\n');
123
+ throw new Error(`Cosign sign command failed with errors:\n${errorMessages}`);
124
+ }
125
+ else {
126
+ throw new Error(`Cosign sign command failed with exit code ${execRes.exitCode}`);
127
+ }
128
+ }
129
+ const attest = Sigstore.toAttestation((0, bundle_1.bundleFromJSON)(signResult.bundle));
130
+ if (attest.tlogID) {
131
+ core.info(`Uploaded to Rekor transparency log: ${sigstore_1.SEARCH_URL}?logIndex=${attest.tlogID}`);
132
+ }
133
+ core.info(`Signature manifest pushed: https://oci.dag.dev/?referrers=${attestationRef}`);
134
+ result[attestationRef] = Object.assign(Object.assign({}, attest), { imageName: opts.imageName });
135
+ }));
136
+ }
137
+ }
138
+ catch (err) {
139
+ throw new Error(`Signing BuildKit attestation manifests failed: ${err.message}`);
140
+ }
141
+ return result;
142
+ });
143
+ }
144
+ verifySignedManifests(opts, signed) {
145
+ return __awaiter(this, void 0, void 0, function* () {
146
+ var _a;
147
+ const result = {};
148
+ const retries = (_a = opts.retries) !== null && _a !== void 0 ? _a : 15;
149
+ if (!(yield this.cosign.isAvailable())) {
150
+ throw new Error('Cosign is required to verify signed manifests');
151
+ }
152
+ let lastError;
153
+ for (const [attestationRef, signedRes] of Object.entries(signed)) {
154
+ yield core.group(`Verifying signature of ${attestationRef}`, () => __awaiter(this, void 0, void 0, function* () {
155
+ // prettier-ignore
156
+ const cosignArgs = [
157
+ '--verbose',
158
+ 'verify',
159
+ '--experimental-oci11',
160
+ '--new-bundle-format',
161
+ '--certificate-oidc-issuer', 'https://token.actions.githubusercontent.com',
162
+ '--certificate-identity-regexp', opts.certificateIdentityRegexp
163
+ ];
164
+ if (!signedRes.tlogID) {
165
+ // skip tlog verification but still verify the signed timestamp
166
+ cosignArgs.push('--use-signed-timestamps', '--insecure-ignore-tlog');
167
+ }
168
+ core.info(`[command]cosign ${[...cosignArgs, attestationRef].join(' ')}`);
169
+ for (let attempt = 0; attempt < retries; attempt++) {
170
+ const execRes = yield exec_1.Exec.getExecOutput('cosign', [...cosignArgs, attestationRef], {
171
+ ignoreReturnCode: true,
172
+ silent: true,
173
+ env: Object.assign({}, process.env, {
174
+ COSIGN_EXPERIMENTAL: '1'
175
+ })
176
+ });
177
+ const verifyResult = cosign_1.Cosign.parseCommandOutput(execRes.stderr.trim());
178
+ if (execRes.exitCode === 0) {
179
+ result[attestationRef] = {
180
+ cosignArgs: cosignArgs,
181
+ signatureManifestDigest: verifyResult.signatureManifestDigest
182
+ };
183
+ lastError = undefined;
184
+ core.info(`Signature manifest verified: https://oci.dag.dev/?image=${signedRes.imageName}@${verifyResult.signatureManifestDigest}`);
185
+ break;
186
+ }
187
+ else {
188
+ if (verifyResult.errors && verifyResult.errors.length > 0) {
189
+ const errorMessages = verifyResult.errors.map(e => `- [${e.code}] ${e.message} : ${e.detail}`).join('\n');
190
+ lastError = new Error(`Cosign verify command failed with errors:\n${errorMessages}`);
191
+ if (verifyResult.errors.some(e => e.code === 'MANIFEST_UNKNOWN')) {
192
+ core.info(`Cosign verify command failed with MANIFEST_UNKNOWN, retrying attempt ${attempt + 1}/${retries}...\n${errorMessages}`);
193
+ yield new Promise(res => setTimeout(res, Math.pow(2, attempt) * 100));
194
+ }
195
+ else {
196
+ throw lastError;
197
+ }
198
+ }
199
+ else {
200
+ throw new Error(`Cosign verify command failed: ${execRes.stderr}`);
201
+ }
202
+ }
203
+ }
204
+ }));
205
+ }
206
+ if (lastError) {
207
+ throw lastError;
208
+ }
209
+ return result;
210
+ });
211
+ }
212
+ signProvenanceBlobs(opts) {
213
+ return __awaiter(this, void 0, void 0, function* () {
214
+ const result = {};
215
+ try {
216
+ if (!process.env.ACTIONS_ID_TOKEN_REQUEST_URL) {
217
+ throw new Error('missing "id-token" permission. Please add "permissions: id-token: write" to your workflow.');
218
+ }
219
+ const endpoints = this.signingEndpoints(opts.noTransparencyLog);
220
+ core.info(`Using Sigstore signing endpoint: ${endpoints.fulcioURL}`);
221
+ const provenanceBlobs = Sigstore.getProvenanceBlobs(opts);
222
+ for (const p of Object.keys(provenanceBlobs)) {
223
+ yield core.group(`Signing ${p}`, () => __awaiter(this, void 0, void 0, function* () {
224
+ var _a;
225
+ const blob = provenanceBlobs[p];
226
+ const bundlePath = path_1.default.join(path_1.default.dirname(p), `${(_a = opts.name) !== null && _a !== void 0 ? _a : 'provenance'}.sigstore.json`);
227
+ const subjects = Sigstore.getProvenanceSubjects(blob);
228
+ if (subjects.length === 0) {
229
+ core.warning(`No subjects found in provenance ${p}, skip signing.`);
230
+ return;
231
+ }
232
+ const bundle = yield (0, sign_1.signPayload)({
233
+ body: blob,
234
+ type: intoto_1.MEDIATYPE_PAYLOAD
235
+ }, endpoints);
236
+ const attest = Sigstore.toAttestation(bundle);
237
+ core.info(`Provenance blob signed for:`);
238
+ for (const subject of subjects) {
239
+ const [digestAlg, digestValue] = Object.entries(subject.digest)[0] || [];
240
+ core.info(` - ${subject.name} (${digestAlg}:${digestValue})`);
241
+ }
242
+ if (attest.tlogID) {
243
+ core.info(`Attestation signature uploaded to Rekor transparency log: ${sigstore_1.SEARCH_URL}?logIndex=${attest.tlogID}`);
244
+ }
245
+ core.info(`Writing Sigstore bundle to: ${bundlePath}`);
246
+ fs_1.default.writeFileSync(bundlePath, JSON.stringify(attest.bundle, null, 2), {
247
+ encoding: 'utf-8'
248
+ });
249
+ result[p] = Object.assign(Object.assign({}, attest), { bundlePath: bundlePath, subjects: subjects });
250
+ }));
251
+ }
252
+ }
253
+ catch (err) {
254
+ throw new Error(`Signing BuildKit provenance blobs failed: ${err.message}`);
255
+ }
256
+ return result;
257
+ });
258
+ }
259
+ verifySignedArtifacts(opts, signed) {
260
+ return __awaiter(this, void 0, void 0, function* () {
261
+ const result = {};
262
+ if (!(yield this.cosign.isAvailable())) {
263
+ throw new Error('Cosign is required to verify signed artifacts');
264
+ }
265
+ for (const [provenancePath, signedRes] of Object.entries(signed)) {
266
+ const baseDir = path_1.default.dirname(provenancePath);
267
+ yield core.group(`Verifying signature bundle ${signedRes.bundlePath}`, () => __awaiter(this, void 0, void 0, function* () {
268
+ for (const subject of signedRes.subjects) {
269
+ const artifactPath = path_1.default.join(baseDir, subject.name);
270
+ core.info(`Verifying signed artifact ${artifactPath}`);
271
+ // prettier-ignore
272
+ const cosignArgs = [
273
+ 'verify-blob-attestation',
274
+ '--new-bundle-format',
275
+ '--certificate-oidc-issuer', 'https://token.actions.githubusercontent.com',
276
+ '--certificate-identity-regexp', opts.certificateIdentityRegexp
277
+ ];
278
+ if (!signedRes.tlogID) {
279
+ // if there is no tlog entry, we skip tlog verification but still verify the signed timestamp
280
+ cosignArgs.push('--use-signed-timestamps', '--insecure-ignore-tlog');
281
+ }
282
+ const execRes = yield exec_1.Exec.getExecOutput('cosign', [...cosignArgs, '--bundle', signedRes.bundlePath, artifactPath], {
283
+ ignoreReturnCode: true
284
+ });
285
+ if (execRes.stderr.length > 0 && execRes.exitCode != 0) {
286
+ throw new Error(execRes.stderr);
287
+ }
288
+ result[artifactPath] = {
289
+ bundlePath: signedRes.bundlePath,
290
+ cosignArgs: cosignArgs
291
+ };
292
+ }
293
+ }));
294
+ }
295
+ return result;
296
+ });
297
+ }
298
+ signingEndpoints(noTransparencyLog) {
299
+ noTransparencyLog = Sigstore.noTransparencyLog(noTransparencyLog);
300
+ core.info(`Upload to transparency log: ${noTransparencyLog ? 'disabled' : 'enabled'}`);
301
+ return {
302
+ fulcioURL: sigstore_1.FULCIO_URL,
303
+ rekorURL: noTransparencyLog ? undefined : sigstore_1.REKOR_URL,
304
+ tsaServerURL: sigstore_1.TSASERVER_URL
305
+ };
306
+ }
307
+ static noTransparencyLog(noTransparencyLog) {
308
+ var _a;
309
+ return noTransparencyLog !== null && noTransparencyLog !== void 0 ? noTransparencyLog : (_a = github_1.GitHub.context.payload.repository) === null || _a === void 0 ? void 0 : _a.private;
310
+ }
311
+ static getProvenanceBlobs(opts) {
312
+ // For single platform build
313
+ const singleProvenance = path_1.default.join(opts.localExportDir, 'provenance.json');
314
+ if (fs_1.default.existsSync(singleProvenance)) {
315
+ return { [singleProvenance]: fs_1.default.readFileSync(singleProvenance) };
316
+ }
317
+ // For multi-platform build
318
+ const dirents = fs_1.default.readdirSync(opts.localExportDir, { withFileTypes: true });
319
+ const platformFolders = dirents.filter(dirent => dirent.isDirectory());
320
+ if (platformFolders.length > 0 && platformFolders.length === dirents.length && platformFolders.every(platformFolder => fs_1.default.existsSync(path_1.default.join(opts.localExportDir, platformFolder.name, 'provenance.json')))) {
321
+ const result = {};
322
+ for (const platformFolder of platformFolders) {
323
+ const p = path_1.default.join(opts.localExportDir, platformFolder.name, 'provenance.json');
324
+ result[p] = fs_1.default.readFileSync(p);
325
+ }
326
+ return result;
327
+ }
328
+ throw new Error(`No valid provenance.json found in ${opts.localExportDir}`);
329
+ }
330
+ static getProvenanceSubjects(body) {
331
+ const statement = JSON.parse(body.toString());
332
+ return statement.subject.map(s => ({
333
+ name: s.name,
334
+ digest: s.digest
335
+ }));
336
+ }
337
+ // https://github.com/actions/toolkit/blob/d3ab50471b4ff1d1274dffb90ef9c5d9949b4886/packages/attest/src/attest.ts#L90
338
+ static toAttestation(bundle) {
339
+ let certBytes;
340
+ switch (bundle.verificationMaterial.content.$case) {
341
+ case 'x509CertificateChain':
342
+ certBytes = bundle.verificationMaterial.content.x509CertificateChain.certificates[0].rawBytes;
343
+ break;
344
+ case 'certificate':
345
+ certBytes = bundle.verificationMaterial.content.certificate.rawBytes;
346
+ break;
347
+ default:
348
+ throw new Error('Bundle must contain an x509 certificate');
349
+ }
350
+ const signingCert = new crypto_1.X509Certificate(certBytes);
351
+ // Collect transparency log ID if available
352
+ const tlogEntries = bundle.verificationMaterial.tlogEntries;
353
+ const tlogID = tlogEntries.length > 0 ? tlogEntries[0].logIndex : undefined;
354
+ return {
355
+ bundle: (0, bundle_1.bundleToJSON)(bundle),
356
+ certificate: signingCert.toString(),
357
+ tlogID: tlogID
358
+ };
359
+ }
360
+ }
361
+ exports.Sigstore = Sigstore;
362
+ //# sourceMappingURL=sigstore.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sigstore.js","sourceRoot":"","sources":["../../src/sigstore/sigstore.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,mCAAuC;AACvC,4CAAoB;AACpB,gDAAwB;AAGxB,oDAAsC;AACtC,mDAAqD;AACrD,6CAA8D;AAI9D,6CAAwC;AACxC,kCAA6B;AAC7B,sCAAiC;AACjC,qDAAgD;AAEhD,mDAA8F;AAC9F,yDAA4F;AA+C5F,MAAa,QAAQ;IAInB,YAAY,IAAmB;QAC7B,IAAI,CAAC,MAAM,GAAG,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,MAAM,KAAI,IAAI,eAAM,EAAE,CAAC;QAC3C,IAAI,CAAC,UAAU,GAAG,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,UAAU,KAAI,IAAI,uBAAU,EAAE,CAAC;IACzD,CAAC;IAEY,wBAAwB,CAAC,IAAkC;;YACtE,IAAI,CAAC,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC,EAAE,CAAC;gBACvC,MAAM,IAAI,KAAK,CAAC,kDAAkD,CAAC,CAAC;YACtE,CAAC;YACD,MAAM,MAAM,GAAmD,EAAE,CAAC;YAClE,IAAI,CAAC;gBACH,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,4BAA4B,EAAE,CAAC;oBAC9C,MAAM,IAAI,KAAK,CAAC,4FAA4F,CAAC,CAAC;gBAChH,CAAC;gBAED,MAAM,SAAS,GAAG,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;gBAChE,IAAI,CAAC,IAAI,CAAC,oCAAoC,SAAS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  * limitations under the License.
15
15
  */
16
+ import { GitHub } from './github';
16
17
  import { Buildx } from './buildx/buildx';
17
18
  import { Build as BuildxBuild } from './buildx/build';
18
19
  import { Bake as BuildxBake } from './buildx/bake';
@@ -21,8 +22,13 @@ import { Builder } from './buildx/builder';
21
22
  import { BuildKit } from './buildkit/buildkit';
22
23
  import { Compose } from './compose/compose';
23
24
  import { Install as ComposeInstall } from './compose/install';
25
+ import { Cosign } from './cosign/cosign';
26
+ import { Install as CosignInstall } from './cosign/install';
27
+ import { Regctl } from './regclient/regctl';
28
+ import { Install as RegctlInstall } from './regclient/install';
24
29
  import { Undock } from './undock/undock';
25
- import { GitHub } from './github';
30
+ import { Install as UndockInstall } from './undock/install';
31
+ import { Sigstore } from './sigstore/sigstore';
26
32
  export interface ToolkitOpts {
27
33
  /**
28
34
  * GitHub token to use for authentication.
@@ -40,6 +46,12 @@ export declare class Toolkit {
40
46
  buildkit: BuildKit;
41
47
  compose: Compose;
42
48
  composeInstall: ComposeInstall;
49
+ cosign: Cosign;
50
+ cosignInstall: CosignInstall;
51
+ regctl: Regctl;
52
+ regctlInstall: RegctlInstall;
53
+ sigstore: Sigstore;
43
54
  undock: Undock;
55
+ undockInstall: UndockInstall;
44
56
  constructor(opts?: ToolkitOpts);
45
57
  }
package/lib/toolkit.js CHANGED
@@ -16,6 +16,7 @@
16
16
  */
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
18
  exports.Toolkit = void 0;
19
+ const github_1 = require("./github");
19
20
  const buildx_1 = require("./buildx/buildx");
20
21
  const build_1 = require("./buildx/build");
21
22
  const bake_1 = require("./buildx/bake");
@@ -24,8 +25,13 @@ const builder_1 = require("./buildx/builder");
24
25
  const buildkit_1 = require("./buildkit/buildkit");
25
26
  const compose_1 = require("./compose/compose");
26
27
  const install_2 = require("./compose/install");
28
+ const cosign_1 = require("./cosign/cosign");
29
+ const install_3 = require("./cosign/install");
30
+ const regctl_1 = require("./regclient/regctl");
31
+ const install_4 = require("./regclient/install");
27
32
  const undock_1 = require("./undock/undock");
28
- const github_1 = require("./github");
33
+ const install_5 = require("./undock/install");
34
+ const sigstore_1 = require("./sigstore/sigstore");
29
35
  class Toolkit {
30
36
  constructor(opts = {}) {
31
37
  this.github = new github_1.GitHub({ token: opts.githubToken });
@@ -37,7 +43,13 @@ class Toolkit {
37
43
  this.buildkit = new buildkit_1.BuildKit({ buildx: this.buildx });
38
44
  this.compose = new compose_1.Compose();
39
45
  this.composeInstall = new install_2.Install();
46
+ this.cosign = new cosign_1.Cosign();
47
+ this.cosignInstall = new install_3.Install({ buildx: this.buildx });
48
+ this.regctl = new regctl_1.Regctl();
49
+ this.regctlInstall = new install_4.Install();
50
+ this.sigstore = new sigstore_1.Sigstore();
40
51
  this.undock = new undock_1.Undock();
52
+ this.undockInstall = new install_5.Install();
41
53
  }
42
54
  }
43
55
  exports.Toolkit = Toolkit;
@@ -1 +1 @@
1
- {"version":3,"file":"toolkit.js","sourceRoot":"","sources":["../src/toolkit.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,4CAAuC;AACvC,0CAAoD;AACpD,wCAAiD;AACjD,8CAA0D;AAC1D,8CAAyC;AACzC,kDAA6C;AAC7C,+CAA0C;AAC1C,+CAA4D;AAC5D,4CAAuC;AACvC,qCAAgC;AAUhC,MAAa,OAAO;IAYlB,YAAY,OAAoB,EAAE;QAChC,IAAI,CAAC,MAAM,GAAG,IAAI,eAAM,CAAC,EAAC,KAAK,EAAE,IAAI,CAAC,WAAW,EAAC,CAAC,CAAC;QACpD,IAAI,CAAC,MAAM,GAAG,IAAI,eAAM,EAAE,CAAC;QAC3B,IAAI,CAAC,WAAW,GAAG,IAAI,aAAW,CAAC,EAAC,MAAM,EAAE,IAAI,CAAC,MAAM,EAAC,CAAC,CAAC;QAC1D,IAAI,CAAC,UAAU,GAAG,IAAI,WAAU,CAAC,EAAC,MAAM,EAAE,IAAI,CAAC,MAAM,EAAC,CAAC,CAAC;QACxD,IAAI,CAA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IAAI,iBAAa,EAAE,CAAC;QACzC,IAAI,CAAC,OAAO,GAAG,IAAI,iBAAO,CAAC,EAAC,MAAM,EAAE,IAAI,CAAC,MAAM,EAAC,CAAC,CAAC;QAClD,IAAI,CAAC,QAAQ,GAAG,IAAI,mBAAQ,CAAC,EAAC,MAAM,EAAE,IAAI,CAAC,MAAM,EAAC,CAAC,CAAC;QACpD,IAAI,CAAC,OAAO,GAAG,IAAI,iBAAO,EAAE,CAAC;QAC7B,IAAI,CAAC,cAAc,GAAG,IAAI,iBAAc,EAAE,CAAC;QAC3C,IAAI,CAAC,MAAM,GAAG,IAAI,eAAM,EAAE,CAAC;QAC3B,IAAI,CAAC,aAAa,GAAG,IAAI,iBAAa,CAAC,EAAC,MAAM,EAAE,IAAI,CAAC,MAAM,EAAC,CAAC,CAAC;QAC9D,IAAI,CAAC,MAAM,GAAG,IAAI,eAAM,EAAE,CAAC;QAC3B,IAAI,CAAC,aAAa,GAAG,IAAI,iBAAa,EAAE,CAAC;QACzC,IAAI,CAAC,QAAQ,GAAG,IAAI,mBAAQ,EAAE,CAAC;QAC/B,IAAI,CAAC,MAAM,GAAG,IAAI,eAAM,EAAE,CAAC;QAC3B,IAAI,CAAC,aAAa,GAAG,IAAI,iBAAa,EAAE,CAAC;IAC3C,CAAC;CACF;AApCD,0BAoCC"}
@@ -13,6 +13,7 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
+ import { GitHubContentOpts } from '../github';
16
17
  export interface Cert {
17
18
  cacert?: string;
18
19
  cert?: string;
@@ -22,7 +23,7 @@ export interface DownloadVersion {
22
23
  key: string;
23
24
  version: string;
24
25
  downloadURL: string;
25
- releasesURL: string;
26
+ contentOpts: GitHubContentOpts;
26
27
  }
27
28
  export interface LocalRefsOpts {
28
29
  dir: string;
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Copyright 2025 actions-toolkit authors
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { Versioned } from '../oci/versioned';
17
+ import { Descriptor } from '../oci/descriptor';
18
+ import { Digest } from '../oci/digest';
19
+ export interface Manifest extends Versioned {
20
+ mediaType?: string;
21
+ digest: Digest;
22
+ size: number;
23
+ manifests?: Descriptor[];
24
+ annotations?: Record<string, string>;
25
+ }
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ /**
3
+ * Copyright 2025 actions-toolkit authors
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ //# sourceMappingURL=imagetools.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"imagetools.js","sourceRoot":"","sources":["../../../src/types/buildx/imagetools.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG"}
@@ -13,9 +13,10 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
+ import { GitHubContentOpts } from '../github';
16
17
  export interface DownloadVersion {
17
18
  key: string;
18
19
  version: string;
19
20
  downloadURL: string;
20
- releasesURL: string;
21
+ contentOpts: GitHubContentOpts;
21
22
  }
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Copyright 2025 actions-toolkit authors
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { GitHubContentOpts } from '../github';
17
+ export interface DownloadVersion {
18
+ version: string;
19
+ downloadURL: string;
20
+ contentOpts: GitHubContentOpts;
21
+ }
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ /**
3
+ * Copyright 2025 actions-toolkit authors
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ //# sourceMappingURL=cosign.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cosign.js","sourceRoot":"","sources":["../../../src/types/cosign/cosign.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG"}
@@ -24,6 +24,12 @@ export interface GitHubRelease {
24
24
  html_url: string;
25
25
  assets: Array<string>;
26
26
  }
27
+ export interface GitHubContentOpts {
28
+ owner: string;
29
+ repo: string;
30
+ ref?: string;
31
+ path: string;
32
+ }
27
33
  export type GitHubRepo = OctoOpenApiTypes['schemas']['repository'];
28
34
  export interface GitHubActionsRuntimeToken extends JwtPayload {
29
35
  ac?: string;
@@ -15,3 +15,7 @@
15
15
  */
16
16
  export declare const MEDIATYPE_PAYLOAD = "application/vnd.in-toto+json";
17
17
  export declare const MEDIATYPE_PREDICATE = "in-toto.io/predicate-type";
18
+ export interface Subject {
19
+ name: string;
20
+ digest: Record<string, string>;
21
+ }
@@ -13,8 +13,9 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
+ import { GitHubContentOpts } from '../github';
16
17
  export interface DownloadVersion {
17
18
  version: string;
18
19
  downloadURL: string;
19
- releasesURL: string;
20
+ contentOpts: GitHubContentOpts;
20
21
  }
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Copyright 2025 actions-toolkit authors
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ export declare const FULCIO_URL = "https://fulcio.sigstore.dev";
17
+ export declare const REKOR_URL = "https://rekor.sigstore.dev";
18
+ export declare const TSASERVER_URL = "https://timestamp.sigstore.dev";
19
+ export declare const SEARCH_URL = "https://search.sigstore.dev";