All Collections
CI/CD Integration
'No default configuration file' error when running HawkScan in GitLab
'No default configuration file' error when running HawkScan in GitLab
Anthony Stinn avatar
Written by Anthony Stinn
Updated over a week ago

Issue

When running HawkScan in GitLab, the following error appears in the GitLab runner logs and the scan fails to run:

General Configuration Error: No default configuration file (stackhawk.yml,stackhawk.yaml) found in /hawk"

Cause

One or more of the following issues with the Docker configuration is present in GitLab's Docker runner config (config.toml):

  1. Docker isn't running in privileged mode (privileged = true) in the GitLab runner

  2. The Docker UNIX socket (docker.sock) isn't mounted within the runner

  3. Volume mounting issues associated with using the docker.dind image in config.toml

Solution

Configure Docker to run:

  1. In privileged mode

  2. With docker.sock in the volumes configuration in config.toml

  3. With "/builds:/builds" in the volumes list in config.toml (see Issue 4794 on GitLab's issue list for more details)

For example:

[[runners]]
name = "stackhawk-test"
url = "https://git.example.org/"
token = "xxxxxxxxxxxxxxxxxxxx"
executor = "docker"
[runners.docker]
tls_verify = false
image = "docker:stable"
privileged = true
disable_cache = false
volumes = ["/var/run/docker.sock:/var/run/docker.sock","/cache","/builds:/builds"]
shm_size = 0

Additional Information

Other Incarnations:

This docker socket issue in can manifest elsewhere in the GitLab environment, such as:

Did this answer your question?