Discover APIs in a GitHub repository

August 31, 2023
September 19, 2023

The Docker image discovers APIs in your GitHub account by scanning for OpenAPI or Swagger specifications in your repositories, as well as generating them using static code analysis.

It will create an API per repository, and potentially multiple collections for that API, in the FireTail SaaS Platform.

Build a docker image

The docker image can be built by cloning the repository and using this docker command:

git clone
cd github-api-discovery
docker build --rm -t firetail-io/github-api-discovery:latest 
	// -f build_setup/Dockerfile . --target runtime

Run a test

Run a test using the Dockerfile:

  docker build --rm -t firetail-io/github-api-discovery:test-python 
  	// -f build_setup/Dockerfile . --target test-python

Run tests for the Golang analyser separately using the Dockerfile to yield a html coverage report:

    docker build --rm -t firetail-io/github-api-discovery:test-golang -f 
    	//build_setup/Dockerfile . --target test-golang

Running the image requires two environment variables, `GITHUB_TOKEN` and `FIRETAIL_APP_TOKEN`. You can find a full list of environment variables used by the scanner below.

The scanner also requires a config file to determine the organisations, users and repositories to scan. You can find an example at You can find an example at config-example.yml.

Copy config-example.yml to config.yml and adjust it to your use case, then run the image using the following docker command:

      docker run --rm -e GITHUB_TOKEN=${GITHUB_TOKEN} -e 
        // type=bind,source="$(pwd)"/config.yml,target=/config.yml,readonly 
        // firetail-io/github-api-discovery:latest
Variable Name Description Required? Default
GITHUB_TOKEN A classic GitHub personal access token. Yes None
FIRETAIL_APP_TOKEN An app token from the Firetail SaaS platform. Yes None
FIRETAIL_API_URL The URL of the Firetail SaaS' API. No ""
LOGGING_LEVEL The logging level provided to python's logging library. No "INFO"