Skip to content

Commit 8ecc37b

Browse files
committed
chore: verify SLSA token at creation
Signed-off-by: Ian Lewis <[email protected]>
1 parent 0617b3a commit 8ecc37b

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

actions/delegator/setup-generic/dist/index.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,7 @@ function run() {
172172
const bundle = yield (0, sigstore_1.sign)(Buffer.from(unsignedB64Token));
173173
// Verify just to double check.
174174
// NOTE: this is an offline verification.
175-
// TODO(#1668): re-enable verification.
176-
// await sigstore.verify(bundle, Buffer.from(unsignedB64Token));
175+
yield (0, sigstore_1.verify)(bundle, Buffer.from(unsignedB64Token));
177176
const bundleStr = JSON.stringify(bundle);
178177
const bundleB64 = Buffer.from(bundleStr).toString("base64");
179178
core.info(`bundleStr: ${bundleStr}`);

actions/delegator/setup-generic/dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

actions/delegator/setup-generic/src/main.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ limitations under the License.
1414
import * as github from "@actions/github";
1515
import * as core from "@actions/core";
1616
import * as process from "process";
17-
import { sign } from "sigstore";
17+
import { sign, verify } from "sigstore";
1818
import * as tscommon from "tscommon";
1919

2020
async function run(): Promise<void> {
@@ -132,8 +132,7 @@ async function run(): Promise<void> {
132132

133133
// Verify just to double check.
134134
// NOTE: this is an offline verification.
135-
// TODO(#1668): re-enable verification.
136-
// await sigstore.verify(bundle, Buffer.from(unsignedB64Token));
135+
await verify(bundle, Buffer.from(unsignedB64Token));
137136
const bundleStr = JSON.stringify(bundle);
138137

139138
const bundleB64 = Buffer.from(bundleStr).toString("base64");

0 commit comments

Comments
 (0)