Skip to content

Commit f604eca

Browse files
committed
Generated new GitHub Actions templates
skip-checks: true
1 parent abec074 commit f604eca

File tree

1 file changed

+8
-34
lines changed

1 file changed

+8
-34
lines changed

README.md

Lines changed: 8 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ you are using. We currently support:
2020
* [Ruby](ruby)
2121
* [Scala](scala)
2222
* [Docker](docker)
23-
* [Setup](setup)
2423

2524
Here's an example of using one of the Actions, in this case to test a Node.js project:
2625

@@ -61,37 +60,11 @@ jobs:
6160
6261
See the individual Actions linked above for per-language instructions.
6362
64-
Note that GitHub Actions will not pass on secrets set in the repository to forks being used in pull requests, and so the Snyk actions that require the token will fail to run.
63+
Note: GitHub Actions will not pass on secrets set in the repository to forks being used in pull requests, and so the Snyk actions that require the token will fail to run.
6564
65+
## Getting your Snyk token
6666
67-
### Bring your own development environment
68-
69-
The per-language Actions automatically install all the required development tools for Snyk to determine the correct dependencies and hence vulnerabilities from different language environments. If you have a workflow where you already have those installed then you can instead use the `snyk/actions/setup` Action to just install Snyk
70-
71-
```yaml
72-
name: Snyk example
73-
on: push
74-
jobs:
75-
security:
76-
runs-on: ubuntu-latest
77-
steps:
78-
- uses: actions/checkout@master
79-
- uses: snyk/actions/setup@master
80-
- uses: actions/setup-go@v1
81-
with:
82-
go-version: "1.13"
83-
- name: Snyk monitor
84-
run: snyk test
85-
env:
86-
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
87-
```
88-
89-
The example here uses `actions/setup-go` would you would need to select the right actions to install the relevant development requirements for your project. If you are already using the same pipeline to build and test your application you're likely already doing so.
90-
91-
92-
### Getting your Snyk token
93-
94-
The Actions example above refer to a Snyk API token:
67+
The Actions example above refer to a Snyk API token:
9568
9669
```yaml
9770
env:
@@ -100,12 +73,10 @@ env:
10073
10174
Every Snyk account has this token, and you can find it in one of two ways:
10275
1. If you're using the [Snyk CLI](https://support.snyk.io/hc/en-us/articles/360003812458-Getting-started-with-the-CLI) you can retrieve it by running `snyk config get api`.
103-
2. In the UI, go to your Snyk account's [settings page](https://app.snyk.io/account) and retrieve the API token, as shown in the following [Revoking and regenerating Snyk API tokens](https://support.snyk.io/hc/en-us/articles/360004008278-Revoking-and-regenerating-Snyk-API-tokens).
104-
76+
2. In the UI, go to your account's general settings page (https://app.snyk.io/account) and retrieve the API token, as shown in the following [Revoking and regenerating Snyk API tokens](https://support.snyk.io/hc/en-us/articles/360004008278-Revoking-and-regenerating-Snyk-API-tokens).
10577

106-
### Continuing on error
10778

108-
The above examples will fail the workflow when issues are found. If you want to ensure the Action continues, even if Snyk finds vulnerabilities, then [continue-on-error](https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idstepscontinue-on-error) can be used..
79+
Note: The above examples will halt the action when issues are found. If you want to ensure the action continues, even if Snyk finds issues, then [conmtinue-on-error]https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idstepscontinue-on-error will need to be set.
10980

11081
```yaml
11182
name: Example workflow using Snyk with continue on error
@@ -120,4 +91,7 @@ jobs:
12091
continue-on-error: true
12192
env:
12293
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
94+
with:
95+
command: monitor
12396
```
97+

0 commit comments

Comments
 (0)