Snyk Code - Clone capability with Broker for Docker

Feature availability

The environment variable to enable Git clone capabilities is currently in closed beta. Contact your Snyk account management team to find out more.

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-com

This 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-com

If 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?

#4580: CLI: help, Ignore - support ticket 49463-add Iac examples

Change request updated