Custom approved-listing filter with Docker
The default approved-listing filter supports the bare minimum to operate on all repositories supported by Snyk. In order to customize the approved-listing filter, create the default filter locally by installing snyk-broker
and running broker init [Git type]
. The created accept.json
is the default filter for the chosen Git type. Place the file in a separate folder such as ./private/accept.json
, and provide it to the Docker container by mounting the folder and using the ACCEPT
environment variable:
To filter by header, add a validation block with the following key and values:
Key | Value | Value Type | Example |
---|---|---|---|
header | The name of the header you wish to filter on. If this is defined then the named header must explicitly exist on the request; otherwise it will be blocked | String |
|
values | The header value must match one of the defined strings | Array<String> |
|
Example: To only allow the SHA Media Type accept header for requests to the GitHub Commits API, you would add the following:
Last updated