-
Notifications
You must be signed in to change notification settings - Fork 183
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #45 from snyk/feat/add-python38
Add python-3.8 variant
- Loading branch information
Showing
3 changed files
with
73 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,6 +21,7 @@ | |
"Node", | ||
"PHP", | ||
"Python", | ||
"Python-3.8", | ||
"Ruby", | ||
"Scala", | ||
] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# Snyk Python 3.8 Action | ||
|
||
A [GitHub Action](https://github.com/features/actions) for using [Snyk](https://snyk.co/SnykGH) to check for | ||
vulnerabilities in your Python projects. | ||
|
||
You can use the Action as follows: | ||
|
||
```yaml | ||
name: Example workflow for Python using Snyk | ||
on: push | ||
jobs: | ||
security: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
- name: Run Snyk to check for vulnerabilities | ||
uses: snyk/actions/python-3.8@master | ||
env: | ||
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} | ||
``` | ||
The Snyk Python Action has properties which are passed to the underlying image. These are | ||
passed to the action using `with`. | ||
|
||
| Property | Default | Description | | ||
| --- | --- | --- | | ||
| args | | Override the default arguments to the Snyk image | | ||
| command | test | Specify which command to run, for instance test or monitor | | ||
| json | false | In addition to the stdout, save the results as snyk.json | | ||
|
||
For example, you can choose to only report on high severity vulnerabilities. | ||
|
||
```yaml | ||
name: Example workflow for Python using Snyk | ||
on: push | ||
jobs: | ||
security: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
- name: Run Snyk to check for vulnerabilities | ||
uses: snyk/actions/python-3.8@master | ||
env: | ||
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} | ||
with: | ||
args: --severity-threshold=high | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: 'Snyk Python' | ||
description: 'Check your Python application for vulnerabilties using Snyk' | ||
author: 'Gareth Rushgrove' | ||
branding: | ||
icon: 'alert-triangle' | ||
color: 'yellow' | ||
inputs: | ||
command: | ||
description: 'Which Snyk command to run, defaults to test' | ||
default: test | ||
args: | ||
description: 'Additional arguments to pass to Snyk' | ||
json: | ||
description: 'Output a snyk.json file with results if running the test command' | ||
default: false | ||
runs: | ||
using: 'docker' | ||
image: 'docker://snyk/snyk:python-3.8' | ||
env: | ||
SNYK_INTEGRATION_NAME: GITHUB_ACTIONS | ||
SNYK_INTEGRATION_VERSION: python | ||
args: | ||
- snyk | ||
- ${{ inputs.command }} | ||
- ${{ inputs.args }} |