The GitHub Repository API Discovery integration using Docker enables FireTail to scan your GitHub repositories for OpenAPI or Swagger specifications, or generate them through static code analysis. By running a Docker-based image, you can automate API discovery across multiple repositories, with each repository generating an API, and potentially multiple specifications for that API, in the FireTail SaaS platform. The integration uses GITHUB_TOKEN and FIRETAIL_APP_TOKEN for authentication and a config.yml file to specify the organizations, users, or repositories to scan. Once the Docker image completes the scan, discovered APIs and specifications are automatically populated into FireTail under the appropriate application for centralized management. To set up the integration:
The docker image can be built by cloning the repository and using this docker command:
Run a test using the Dockerfile:
Run tests for the Golang analyzer separately using the Dockerfile to yield a html coverage report:
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 organizations, users and repositories to scan. 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: