A GitHub action to run security scans on your applications.
In order to explore and scan a web application you can run the following:
jobs:
test:
runs-on: ubuntu-latest
name: Action Test
steps:
# ...
- id: sauce-security-test
uses: saucelabs/sauce-security-action@v1
with:
username: ${{ secrets.SAUCE_USERNAME }}
accessKey: ${{ secrets.SAUCE_ACCESS_KEY }}
target: https://my-app.com
allowedSevereVulnerabilties: 0
downloadReports: true
- name: Upload Report
uses: actions/upload-artifact@master
with:
name: security-scan-log
path: ${{ steps.sauce-security-test.outputs.reports-folder-path }}
# ...
To run API scans, make sure to provide either an OpenAPI spec or a reference to a GraphQL endpoint, e.g.:
jobs:
test:
runs-on: ubuntu-latest
name: Action Test
steps:
- id: sauce-api-test-openapi
uses: saucelabs/sauce-security-action@v1
with:
username: ${{ secrets.SAUCE_USERNAME }}
accessKey: ${{ secrets.SAUCE_ACCESS_KEY }}
target: https://api.apac-southeast-1.saucelabs.com/v1/security
openapi: https://api.apac-southeast-1.saucelabs.com/v1/security/openapi
Required Sauce Labs user name.
Required Sauce Labs API Key.
Url to the application under test.
An url to an OpenAPI specification to help scan the full API.
An url to a graphql schema to help scan the full API.
Amount of severe vulnerabilities that are allowed to be discovered - if set to -1
these will be ignored. (Default: 0)
Amount of severe vulnerabilities that are allowed to be discovered - if set to -1
these will be ignored. (Default: 0)
Amount of low vulnerabilities that are allowed to be discovered - if set to -1
these will be ignored. (Default: 0)
Amount of informational vulnerabilities that are allowed to be discovered - if set to -1
these will be ignored. (Default: -1
)
If set to true, this action will download Zap reports for you. (Default: false
)
If set to true, this action will download all Sauce Labs job assets for you. (Default: false
)
Path of the directory to which all Zap reports got downloaded to. This output is only set if downloadReports
is set to true
.
Path of the directory to which all Sauce job assets got downloaded to. This output is only set if downloadJobAssets
is set to true
.