Skip to content

Commit e4b0c3a

Browse files
authored
Adds Snyk support (#3)
* updates GitHub Org references * adds GitHub Action for @snyk
1 parent 55d84e4 commit e4b0c3a

File tree

3 files changed

+57
-3
lines changed

3 files changed

+57
-3
lines changed

.github/workflows/snyk.yml

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
name: "Security Scan: Snyk Code"
3+
4+
on:
5+
push:
6+
7+
jobs:
8+
snyk:
9+
runs-on: ubuntu-latest
10+
11+
strategy:
12+
# see https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstrategyfail-fast
13+
fail-fast: false
14+
15+
steps:
16+
- name: Checkout Repository
17+
uses: actions/checkout@v3
18+
with:
19+
fetch-depth: 1
20+
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 }}
30+
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

.snyk

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
version: v1.25.0
2+
3+
# see https://docs.snyk.io/snyk-cli/test-for-vulnerabilities/the-.snyk-file?q=
4+
ignore:
5+
# see https://security.snyk.io/vuln/snyk:lic:npm:hashicorp:js-releases:MPL-2.0]
6+
'snyk:lic:npm:hashicorp:js-releases:MPL-2.0':
7+
- '@hashicorp/js-releases':
8+
reason: acceptable license
9+
expires: 2023-12-31T00:00:00.000Z
10+
created: 2022-08-16T00:00:00.000Z
11+
12+
# see https://security.snyk.io/vuln/snyk:lic:npm:openpgp:LGPL-3.0
13+
'snyk:lic:npm:openpgp:LGPL-3.0':
14+
- '@hashicorp/js-releases > openpgp':
15+
reason: acceptable license
16+
expires: 2023-12-31T00:00:00.000Z
17+
created: 2022-08-16T00:00:00.000Z
18+
19+
patch: {}

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454

5555
- name: Setup `nomad-pack`
5656
# TODO: define `v1`
57-
uses: hashicorp/setup-nomad-pack@v1
57+
uses: hashicorp/setup-nomad-pack@v0.9.2
5858
id: setup
5959
with:
6060
version: "0.0.1-techpreview2"
@@ -75,7 +75,7 @@ jobs:
7575
In the above example, the following definitions have been set.
7676
7777
- The event trigger has been set to `push`. For a complete list, see [Events that trigger workflows](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows).
78-
- The origin of this GitHub Action has been set as `ksatirli/setup-nomad-pack@0.1.3`. For newer versions, see the [Releases](https://github.com/ksatirli/setup-nomad-pack/releases).
78+
- The origin of this GitHub Action has been set as `hashicorp/setup-nomad-pack@0.9.2`. For newer versions, see the [Releases](https://github.com/hashicorp/setup-nomad-pack/releases).
7979
- The version of `nomad-pack` to set up has been set as `0.0.1-techpreview2`. For a complete list, see [releases.hashicorp.com](https://releases.hashicorp.com/nomad-pack/).
8080
- The pack to deploy has been set as `./packs/simple_service`
8181

@@ -97,7 +97,7 @@ This section contains a list of all outputs that can be consumed from this Actio
9797

9898
## Author Information
9999

100-
This module is maintained by the contributors listed on [GitHub](https://github.com/ksatirli/setup-nomad-pack/graphs/contributors).
100+
This module is maintained by the contributors listed on [GitHub](https://github.com/hashicorp/setup-nomad-pack/graphs/contributors).
101101

102102
The original code of this repository is based on work done by [Matthew Sanabria](https://github.com/sudomateo) as part of the [setup-packer](https://github.com/sudomateo/setup-packer) GitHub Action.
103103

0 commit comments

Comments
 (0)