Discover APIs in a GitLab repository

Created:
August 28, 2024
Updated:
September 2, 2024

This integration allows you to set up scanning of your GitLab repositories for OpenAPI specifications. This integration can also generate OpenAPI specifications through static code analysis for selected languages.

Before configuring the integration, you must first create an application within GitLab:

  1. Open GitLab.
  2. On the left menu, select Settings > Applications.
  3. Click Add new application.
  4. Enter a Name for the application.
  5. Provide a Redirect URI
  6. Under Scopes, select api and read_repositiory.
  7. Click Save application.
  8. Copy the Application ID and Secret. These credentials are required when setting up the integration in FireTail.

Configuring the FireTail Integration

When the GitLab application is created, proceed with setting up the FireTail integration:

1. Navigate to Integrations in the FireTail platform. 

2. Click GitLab Repo Scanning.

3. Fill out the integration form:

  • Name of Integration: Enter a name for the integration.
  • GitLab URL: This is the address where your GitLab instance is hosted. If you are using the cloud-based version provided by GitLab, the URL will be https://gitlab.com. For self-hosted instances, input the URL specific to your environment. For example, https://gitlab.companyname.com.
  • GitLab Group Path - The path used to define the location of a group within GitLab. For example, gitlab.com/development-team or companyname.com/development-team
  • Gitlab Application ID - Paste the application ID from the GitLab application you created.
  • Gitlab Application Secret - Paste the application secret provided when the application was created.
  • Application: Select an existing application from the dropdown, or click Create to create a new one. Discovered APIs will be grouped under this application.
  • Ignore Archived Repositories: Enable to skip scanning of any archived repositories.
  • Delete Archived Repository: Enable to remove APIs associated with archived repositories from the FireTail platform, including all specifications and findings.
  • Scan Frequency: Enter the scan interval in seconds (minimum 900 seconds or 15 minutes).

4. Click Authenticate.

  • Click button to authenticate.
  • A new window will open, click Authorize firetail.io to grant access.
  • The integration after creation will automatically redirect to the associated application.

Viewing Discovered APIs

Navigate to APIs or Applications in the platform to view discovered APIs. Any Specifications and Findings are automatically loaded.

Note: It may take a few minutes for the APIs to populate into the platform