Snyk Code - Clone capability with Broker for Docker
By default, the Git clone capabilities required by Snyk Code are disabled. To grant Broker access to perform a Git clone of your repository, add the environment variable: ACCEPT_CODE=true.
Example:
docker run --restart=always \
-p 8000:8000 \
-e BROKER_TOKEN=secret-broker-token \
-e GITHUB_TOKEN=secret-github-token \
-e PORT=8000 \
-e BROKER_CLIENT_URL=http://my.broker.client:8000 \
-e ACCEPT_CODE=true
snyk/broker:github-comThis adds the necessary accept rules for your choice of Git server. These rules are in the client templates in the Broker GitHub repository.
If custom accept rules are required, you can provide a custom accept.json.
Example:
docker run --restart=always \
-p 8000:8000 \
-e BROKER_TOKEN=secret-broker-token \
-e GITHUB_TOKEN=secret-github-token \
-e PORT=8000 \
-e BROKER_CLIENT_URL=http://my.broker.client:8000 \
-e ACCEPT=/myFolder/accept.json
snyk/broker:github-comIf you are using a custom accept file, from a separate folder, with the ACCEPT environment variable, you cannot use the ACCEPT_CODE mechanism.
Last updated
Was this helpful?

