1. Home
  2. Integrations
  3. GitHub CodeQL Integration

GitHub CodeQL Integration

This article covers the step required to integrate your Phoenix Security account with GitHub CodeQL, for which you have the required credentials.

Prerequisites

– In order to create a new scanner integration you should have access to the platform as an Org Admin user.
– To connect your account to GitHub you need to have the API URL and your credentials (Personal Access Token)

GitHub Credentials

In order to integrate with GitHub CodeQL you’ll need a Personal Access Token. The follow steps guide you through the token creation process.

  1. To create a Personal Access Token, make sure that you are logged in with the user that you want to create the token with (e.g. “john-doe” in the screenshot below), and client on the “Settings” link at the bottom of the drop-down.
  1. In the left-hand menu select “Developer settings” in the bottom section.
  1. Then select “Personal access tokens” on the left:
  1. You would normally want to create a new token for this integration. Click on “Generate new token” at the top and fill in the details in the token configuration form. The two key points to keep in mind are:
  • Make sure that you enter a fairly long, custom defined Expiration date. You can select “No expiration” to ensure that the token never expires.
  • In the Scopes section select “repo” and “read:org” within “admin:org”.

Make sure that you copy the token in the last step since this is the last time that it will be visible.

Create a CodeQL Integration

  1. On the sidebar menu, navigate to the Scanners tab in the Integrations section.
  1. In the SAST section, click on the plus icon (+) that appears in “CodeQL” banner. If you already have a CodeQL integration, click on the context menu in the banner […] and select “Create new integration”.
  1. In the first step, enter a name for this scanner integration and populate the following details to complete the configuration:
  • Server URL: Enter the URL for GitHub’s REST API; typically “https://api.github.com”.
  • Access Token: Enter the Personal Access Token obtained using the instructions at the start of this article.
  1. Click on the ‘Next’ button
  2. Select whether to fetch vulnerabilities from all repositories accessible to the Access Token, or to choose which ones to include or exclude.
  1. Then click on “Save” to complete the process.

Unless there are issues with the credentials, the new scanner will appear in your list of integrations (under Integrations > Scanners) and the platform will start to collect asset and vulnerability details from the selected repositories (available through the integration credentials).

All the scanner’s assets and vulnerabilities will be automatically added to your account’s Default Application, and will be available to start assigning them to user-created Applications as required.

Updated on April 18, 2023

Related Articles

x  Powerful Protection for WordPress, from Shield Security
This Site Is Protected By
Shield Security