Getting started
CLI

CLI

You can run Coana using the CLI. However, we recommend using CI-specific getting started guides (GitHub or GitLab) whenever possible.

Generate an API key

Go to Settings → API Keys (opens in a new tab) to generate an API key.

Store key

Save the API key in an environment variable named COANA_API_KEY:

export COANA_API_KEY=your-api-key

Store repo url

Store the repository URL of your project in an environment variable named REPO_URL. The repository URL is solely meant as a way for you to identify the project later in the dashboard.

export REPO_URL=your-repo-url

You can also use the --project-name as described below if you don't have a repository URL.

Move to your project's root directory

Change directories (cd) to the root of your project and ensure that all dependencies are installed.

Run the CLI

Initiate the Coana vulnerability analysis with the following command:

docker run \
    -t \
    -v "$PWD":/project \
     coana/coana:stable \
     coana run /project \
     --api-key "$COANA_API_KEY" \
     --repo-url $REPO_URL

You can also supply a project name instead of the repo url:

docker run \
    -t \
    -v "$PWD":/project \
     coana/coana:stable \
     coana run /project \
     --api-key "$COANA_API_KEY" \
     --project-name nameOfYourProject
💡
A new project is automatically created in Coana when you submit your first report if a project matching its repository url or project name dosen't already exist. There is no reason to manually create the project in Coana first.