Skip to content

Commit 8629f4d

Browse files
rebuild
1 parent 8e08868 commit 8629f4d

File tree

3 files changed

+16
-16
lines changed

3 files changed

+16
-16
lines changed

actions/installer/dist/index.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

actions/installer/spec/index.test.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ describe("Test validVersion", function () {
2929
it("Rejects commit hashes", function () {
3030
expect(
3131
index.validVersion(
32-
"1326430d044e8a9522c51e5f721e237b5f75acb6b4e518d129f669403cf7a79a"
33-
)
32+
"1326430d044e8a9522c51e5f721e237b5f75acb6b4e518d129f669403cf7a79a",
33+
),
3434
).toBe(false);
3535
});
3636
});
@@ -55,15 +55,15 @@ describe("Test fileHasExpectedSha256Hash", function () {
5555

5656
it("Returns false when the computed and expected hashes don't match", function () {
5757
expect(index.fileHasExpectedSha256Hash(this.testFile, "foobar")).toBe(
58-
false
58+
false,
5959
);
6060
});
6161
it("Returns true when the computed and expected hashes don't match", function () {
6262
expect(
6363
index.fileHasExpectedSha256Hash(
6464
this.testFile,
65-
"916f0027a575074ce72a331777c3478d6513f786a591bd892da1a577bf2335f9"
66-
)
65+
"916f0027a575074ce72a331777c3478d6513f786a591bd892da1a577bf2335f9",
66+
),
6767
).toBe(true);
6868
});
6969
});

actions/installer/src/index.ts

+10-10
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export async function getVerifierVersion(actionRef: string): Promise<string> {
4949
{
5050
owner: "slsa-framework",
5151
repository: "slsa-verifier",
52-
}
52+
},
5353
);
5454
for (const tag of tags) {
5555
const commitSha = tag.commit.sha;
@@ -59,14 +59,14 @@ export async function getVerifierVersion(actionRef: string): Promise<string> {
5959
}
6060
}
6161
throw new Error(
62-
`Invalid version provided: ${actionRef}. For the set of valid versions, see https://github.com/slsa-framework/slsa-verifier/releases.`
62+
`Invalid version provided: ${actionRef}. For the set of valid versions, see https://github.com/slsa-framework/slsa-verifier/releases.`,
6363
);
6464
}
6565

6666
// If true, then the file in `path` has the same SHA256 hash as `expectedSha256Hash``.
6767
export function fileHasExpectedSha256Hash(
6868
filePath: string,
69-
expectedSha256Hash: string
69+
expectedSha256Hash: string,
7070
): boolean {
7171
if (!fs.existsSync(filePath)) {
7272
throw new Error(`File not found: ${filePath}`);
@@ -100,7 +100,7 @@ async function run(): Promise<void> {
100100
} catch (error: unknown) {
101101
const errMsg = error instanceof Error ? error.message : String(error);
102102
core.setFailed(
103-
`Invalid version provided. For the set of valid versions, see https://github.com/slsa-framework/slsa-verifier/releases. ${errMsg}`
103+
`Invalid version provided. For the set of valid versions, see https://github.com/slsa-framework/slsa-verifier/releases. ${errMsg}`,
104104
);
105105
cleanup();
106106
return;
@@ -115,7 +115,7 @@ async function run(): Promise<void> {
115115
// Download bootstrap version and validate SHA256 checksum
116116
bootstrapVerifierPath = await tc.downloadTool(
117117
`https://github.com/slsa-framework/slsa-verifier/releases/download/${BOOTSTRAP_VERSION}/slsa-verifier-linux-amd64`,
118-
`${bootstrapDir}/${BINARY_NAME}`
118+
`${bootstrapDir}/${BINARY_NAME}`,
119119
);
120120
} catch (error: unknown) {
121121
const errMsg = error instanceof Error ? error.message : String(error);
@@ -128,7 +128,7 @@ async function run(): Promise<void> {
128128
!fileHasExpectedSha256Hash(bootstrapVerifierPath, BOOTSTRAP_VERIFIER_SHA256)
129129
) {
130130
core.setFailed(
131-
`Unable to verify slsa-verifier checksum. Aborting installation.`
131+
`Unable to verify slsa-verifier checksum. Aborting installation.`,
132132
);
133133
cleanup();
134134
return;
@@ -141,7 +141,7 @@ async function run(): Promise<void> {
141141
// Download requested version binary and provenance
142142
downloadedBinaryPath = await tc.downloadTool(
143143
`https://github.com/slsa-framework/slsa-verifier/releases/download/${version}/slsa-verifier-linux-amd64`,
144-
`${installDir}/${BINARY_NAME}`
144+
`${installDir}/${BINARY_NAME}`,
145145
);
146146
} catch (error: unknown) {
147147
const errMsg = error instanceof Error ? error.message : String(error);
@@ -153,7 +153,7 @@ async function run(): Promise<void> {
153153
try {
154154
downloadedProvenancePath = await tc.downloadTool(
155155
`https://github.com/slsa-framework/slsa-verifier/releases/download/${version}/slsa-verifier-linux-amd64.intoto.jsonl`,
156-
`${installDir}/${PROVENANCE_NAME}`
156+
`${installDir}/${PROVENANCE_NAME}`,
157157
);
158158
} catch (error: unknown) {
159159
const errMsg = error instanceof Error ? error.message : String(error);
@@ -175,11 +175,11 @@ async function run(): Promise<void> {
175175
"github.com/slsa-framework/slsa-verifier",
176176
"--source-tag",
177177
version,
178-
]
178+
],
179179
);
180180
if (exitCode !== 0) {
181181
throw new Error(
182-
`Unable to verify binary provenance. Aborting installation. stdout: ${stdout}; stderr: ${stderr}`
182+
`Unable to verify binary provenance. Aborting installation. stdout: ${stdout}; stderr: ${stderr}`,
183183
);
184184
}
185185
} catch (error: unknown) {

0 commit comments

Comments
 (0)