GitHub Advanced Security — Integration Setup
Prerequisites
- GitHub repositories with GitHub Advanced Security (GHAS) enabled — code scanning, Dependabot alerts, and/or secret scanning
- A GitHub personal access token or GitHub App installation token with read access to security alerts
- CMDash Essentials tier or above
Step 1: Create a Token
Option A — Fine-grained personal access token (recommended):
- In GitHub, go to Settings → Developer settings → Personal access tokens → Fine-grained tokens → Generate new token.
- Select the specific repositories you want CMDash to monitor.
- Under Repository permissions, grant Read-only access to:
- Code scanning alerts
- Dependabot alerts
- Secret scanning alerts
- Generate the token and copy it — it is shown only once.
Option B — GitHub App installation token: if your org already uses a GitHub App for tooling, add the same three read-only security permissions to it and use its installation token instead.
Step 2: Connect in CMDash
- Navigate to Integrations in your CMDash dashboard.
- Find GitHub Advanced Security and click Connect.
- Enter:
- Token (stored as this connection's access token)
- Repositories — a list of
owner/repostrings to monitor (e.g.,acme-corp/api,acme-corp/web)
- Click Save & Test Connection.
Note: CMDash syncs exactly the repositories you list (as
owner/repo) and nothing else. To read every non-archived repository of the GitHub organization you entered (up to 500), enter*as the only entry; the token then needs access to all of them. A list that is empty, or that contains even one entry that is not anowner/reponame, is refused with a message saying what to fix. CMDash never widens a list you gave it to the whole organization.
What Syncs
| Data Type | GitHub API | Sync Frequency |
|---|---|---|
| Vulnerabilities (Dependabot alerts) | GET /repos/{repo}/dependabot/alerts?state=open | Every 4 hours by default (configurable per connection) |
| Vulnerabilities (code scanning / CodeQL alerts) | GET /repos/{repo}/code-scanning/alerts?state=open | Every 4 hours by default (configurable per connection) |
| Incidents (secret scanning alerts) | GET /repos/{repo}/secret-scanning/alerts?state=open | Every 4 hours by default (configurable per connection) |
Each of the three alert types is fetched per repository, 100 open alerts per request, following GitHub's Link: rel="next" header until the last page (up to 50 pages, 5,000 alerts, per alert type per repository). Secret scanning alerts are always normalized as critical-severity incidents, regardless of the secret type. If a repository doesn't have a given GHAS feature enabled (or the token cannot see it), GitHub returns 404 or 403 for that alert type. CMDash does not read that as "zero alerts": the connection shows as Limited with a note naming the repository and the alert type, so a repository that is not actually being monitored never looks clean. One repository's answer never fails the sync. A different failure for a repository (a server error) loses that repository's alerts for the run and is recorded as partial.
Troubleshooting
- 401 Unauthorized: Token expired or was revoked; generate a new one and update the connection.
- 403 Forbidden: The token lacks the
security_eventspermission (classic PATs) or the specific fine-grained repository permission for the alert type in question. - Connection shows "Limited" with a 404 or 403 note: GitHub answered 404 or 403 for that repository and alert type — the feature is not enabled (Settings → Code security and analysis) or the token has no access to it. Enable the feature or remove the repository from the list; the note goes away on the next sync.
- More than 5,000 open alerts for one alert type in one repository: the sync stops at the 50-page ceiling and is recorded as partial with a warning.
Rate Limits & Sync Behavior
| Setting | Value |
|---|---|
| Sync frequency | Every 4 hours by default (syncInterval is configurable per connection) |
| First sync | All currently-open alerts across the configured repositories, every open alert (up to 5,000 per alert type per repo) |
| GitHub's own limit | 5,000 requests/hour per authenticated token (standard REST API limit; higher for GitHub Enterprise Cloud) |
| Rate limit handling | Every outbound request is paced through CMDash's shared per-tenant token bucket for this provider, and a vendor 429 (with its Retry-After) holds that tenant's budget until the vendor says it is ready (#507) |
| Failed sync retry | Job queue retries 3 times with exponential backoff (starting at 30s) — see docs/developers/dead-letter.md |
Credential Rotation
Personal access tokens can be given an expiration date at creation (GitHub recommends 90 days for fine-grained tokens). CMDash displays a 30-day expiry warning banner if the token you provided carries expiry metadata GitHub exposes via the API.
To rotate:
- Generate a new fine-grained token following Step 1, with the same repository selection and permissions.
- In CMDash: Settings → Integrations → GitHub Advanced Security → Edit.
- Enter the new Token and Save.
- Once confirmed healthy, revoke the old token in GitHub.
Multiple Instances / Multi-Site
If you use GitHub Enterprise Server (self-hosted) in addition to github.com, or want to segment repositories by business unit with different tokens, create additional connections.
To add another connection:
- In CMDash: Settings → Integrations → Add Integration → GitHub Advanced Security.
- Enter the token and repository list for the additional scope.
- Give the connection a descriptive name (e.g.,
GitHub - Platform Team,GitHub - Mobile Team). - Click Save & Test Connection.
Findings across all connections are merged in the CMDash compliance dashboard.
Compliance Framework Coverage
The GitHub Advanced Security integration provides evidence for the following controls. Coverage is automatically mapped when data is synced.
| Framework | Control | Description |
|---|---|---|
| PCI DSS | 6.3 | Secure software development — code scanning and Dependabot findings mapped to secure-SDLC evidence |
| PCI DSS | 6.2 | Patch management — Dependabot dependency vulnerability status |
| HITRUST | 10.m | Patch/vulnerability management — dependency and code scanning alert age |
| CMMC L2 | RA.2.141 | Vulnerability scanning — code scanning and Dependabot findings |
| SOC 2 | CC7.1 | Threat/exposure detection — secret scanning incidents feed the threat-detection evidence bucket |