GitHub Advanced Security (GHAS) is a suite of security features integrated into GitHub, designed to enhance the security posture of software development projects. It provides a comprehensive set of tools to identify and address security vulnerabilities throughout the development lifecycle, emphasizing a "developer-first" approach to security. For more information, refer to GitHub’s official documentation.
Integration Methods: API, HTTP Collector
Tables: Data Security Finding [2006], Application Security Posture Finding [2007]
This integration supports the following events.
Event | Description |
|---|---|
Automatically detect and notify developers about potential security vulnerabilities, bugs, or code quality issues in the source code using static analysis tools. | |
Secret Scanning Alerts | Identify and alert when sensitive information like API keys, passwords, or tokens are accidentally committed to the repository to prevent credential leaks. |
This integration supports the following versions.
GitHub REST API | V2022-11-28 |
Note:
GitHub is a cloud-based platform that gets continuously updated. As of this document preparation, the latest version is v3.16.
Prerequisites
The user should have a fine-grained access token for "Code scanning & Secret Scanning alerts".
The user should have access to the DataBee console.
Configuration Overview
Generate fine-grained access tokens with the required scope.
Add the GitHub Advanced Security data feed in the DataBee console with the below parameters.
DataBee Parameter
GitHub Parameter
Token
Organization Name
Organization Name
This integration supports two ways to ingest data – API or HTTP Collector (Webhook). This document details both approaches.
GitHub Advanced Security Configuration (API ingestion)
Create a Fine-grained access token
Login to your GitHub account.
In the upper-right corner of GitHub, click your profile photo.

Click on Settings.

In the left sidebar, click Developer settings.

In the left sidebar, under Personal access tokens, click Fine-grained tokens.

Click on Generate new token.

Fill in the form details as mentioned below.
Token name: Enter a name for the token.
Expiration: Select an expiration date for the token.
Description (optional): Add a note to describe the purpose of the token.
Resource owner: Select a resource owner. The token will only be able to access resources owned by the selected resource owner. Organizations that are a member will not appear unless they have opted in to fine-grained personal access tokens. For more details, see "Setting a personal access token policy for your organization."
If the selected resource owner belongs to an organization that requires approval for fine-grained personal access tokens, provide a justification in the text box below the resource owner.

Note:
Ensure that the token expiration is set to a larger number of days.
Repository access: Choose which repositories the token can access. Currently, we’ve selected the All repositories option. Update this selection based on your requirements.

Under the Permissions section, click on + Add permissions.
Search Code scanning alerts, enable the checkbox, and make sure the read-only access is enabled.

Search for Secret scanning alerts, enable the checkbox, and make sure the read-only access is enabled.

Click on Generate Token.

Copy the generated API token for later use.

Get the Organization Name
In the upper-right corner of any page on GitHub, click your profile photo, then click Organizations.

Copy the Organization name for which you created the Fine-grained access token.

DataBee Configuration (API ingestion)
Login to the DataBee UI, navigate to Data > Add New Data Feed button.

Search for the GitHub Advanced Security and click it as shown below.

Click on the API Ingest option for collection.

Enter feed contact information and click Next.

In the configuration page, confirm the following:
API Base URL: This is the base URL that DataBee will interact with
Authorization Method: Bearer Token
Token: Paste the Personal Access Token generated earlier in the GitHub console.
Event Types: Preselected for all the event types that integration pulls.
Organization Name: Paste Organization Name.

Click Submit.
DataBee Configuration (webhook ingestion)
In case of webhooks method in GitHub, please use the HTTP Collector. To learn more about HTTP Collector, refer to this article.
Note:
To use the HTTP collector, certain parameters need to be forwarded to DataBee for proper routing. This includes an API KEY, datasource id, tenant id and other information. DataBee receives this in the HTTP header. However, Github sends these as query parameters.
Currently, a translation layer in the middle is needed to transpose these keys from query parameter to http headers. Please refer to the MITM Proxy document.
Login to the DataBee UI, navigate to Data > Add New Data Feed button.

Search for the GitHub Advanced Security and click it as shown below.

Select HTTP Collector.

Configure Data Feed.
Data Feed Name/Owner details: In this section, you need to add the data feed name, owner name, and email ID
Configuration of data feed: Select the file type from the dropdown. Please use JSON format, set the split delimiter to (\n), and enable the Process array objects as individual log checkbox.
The Endpoint URL, Tenant ID, and API Key will be automatically generated by the UI. Please save a copy for future reference.
Click Submit.


Go to Data > Data Feeds > Click on the respective data feeds > ID (Datasource ID). Copy to clipboard for future use.

GitHub Advanced Security Configuration – HTTP Collector
Creating the webhooks
Login to your GitHub account.
In the upper-right corner of GitHub, click your profile photo.

Click on Organizations.

Click on Webhooks.

Payload URL & Content-Type – Paste the generated Payload URL from the MITM Proxy, select the appropriate content type from the dropdown, and enter the secret if applicable.

To enable Advanced Security events, select Let me select individual events and enable the Code scanning alerts and Secret scanning alerts options.

Click on Update webhook.

Troubleshooting Tips
Invalid or expired token: If you encounter an invalid or expired token error, it may be due to using an incorrect or expired fine-grained personal access token. Double-check that the token you pasted is valid and has not expired.
Pending approval: If you selected an organization as the resource owner and that organization requires approval for fine-grained personal access tokens, your token will remain in a pending state until reviewed by an organization administrator. While pending, the token can only access public resources.
If you are an organization owner, your request is approved automatically.
For more details, see Reviewing and revoking personal access tokens in your organization.