Skip to content

Commit c7de0fd

Browse files
authored
Maintenance (#7)
1 parent 1497b52 commit c7de0fd

File tree

5 files changed

+392
-65
lines changed

5 files changed

+392
-65
lines changed

.github/workflows/snyk.yml

Lines changed: 30 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,34 +2,39 @@
22
name: "Security Scan: Snyk Code"
33

44
on:
5-
push:
5+
push:
66

77
jobs:
8-
snyk:
9-
runs-on: ubuntu-latest
8+
snyk:
9+
runs-on: ubuntu-latest
1010

11-
strategy:
12-
# see https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstrategyfail-fast
13-
fail-fast: false
11+
permissions:
12+
security-events: write
13+
actions: read
14+
contents: read
1415

15-
steps:
16-
- name: Checkout Repository
17-
uses: actions/checkout@v3
18-
with:
19-
fetch-depth: 1
16+
strategy:
17+
# see https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstrategyfail-fast
18+
fail-fast: false
2019

21-
# see https://github.com/snyk/actions/tree/master/node
22-
- name: Lint Code with Snyk
23-
uses: snyk/actions/node@master
24-
env:
25-
# see https://github.com/snyk/actions#getting-your-snyk-token
26-
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
27-
with:
28-
# see https://github.com/snyk/actions/tree/master/node#uploading-snyk-scan-results-to-github-code-scanning
29-
args: --policy-path=.snyk --sarif-file-output=snyk.sarif --org=${{ secrets.SNYK_ORG }}
20+
steps:
21+
- name: Checkout Repository
22+
uses: actions/checkout@v3
23+
with:
24+
fetch-depth: 1
3025

31-
# # see https://github.com/github/codeql-action/tree/main/upload-sarif
32-
# - name: Upload Snyk IaC results to GitHub Code Scanning
33-
# uses: github/codeql-action/upload-sarif@v2
34-
# with:
35-
# sarif_file: snyk.sarif
26+
# see https://github.com/snyk/actions/tree/master/node
27+
- name: Lint Code with Snyk
28+
uses: snyk/actions/node@master
29+
env:
30+
# see https://github.com/snyk/actions#getting-your-snyk-token
31+
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
32+
with:
33+
# see https://github.com/snyk/actions/tree/master/node#uploading-snyk-scan-results-to-github-code-scanning
34+
args: --policy-path=.snyk --sarif-file-output=snyk.sarif --org=${{ secrets.SNYK_ORG }}
35+
36+
# see https://github.com/github/codeql-action/tree/main/upload-sarif
37+
- name: Upload Snyk IaC results to GitHub Code Scanning
38+
uses: github/codeql-action/upload-sarif@v2
39+
with:
40+
sarif_file: snyk.sarif

index.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@ import { setupBinary } from "./setup-binary";
88

99
export async function getHashicorpRelease(binary: string, version: string) {
1010
if (version === "") {
11-
version = "latest"
11+
version = "latest";
1212
}
13-
core.info(`Installing ${binary}:${version} and adding it to GitHub Actions Path`);
13+
core.info(
14+
`Installing ${binary}:${version} and adding it to GitHub Actions Path`
15+
);
1416
try {
1517
await setupBinary(binary, version);
1618
} catch (error) {

0 commit comments

Comments
 (0)