Connect GitHub (read-only)
TrustEvidence reads your organisation's and repositories' security settings, branch rules and alert counts. Every permission it asks for is read-only.
Choose how to connect
- Recommended: the TrustEvidence GitHub App. It uses short-lived installation tokens, you choose which repositories it can see, and you can uninstall it at any time.
- Alternative: a fine-grained personal access token with the read-only permissions below. Organisation-wide checks need the token of an organisation owner.
- Not recommended: OAuth sign-in. GitHub's OAuth
reposcope technically includes write access. TrustEvidence never uses it to write, but the App or a fine-grained token gives you a smaller grant.
Option 1: install the GitHub App
- On the Integrations page, choose Install the TrustEvidence GitHub App.
- On GitHub, pick the organisation and either all repositories or the ones you want assessed, then confirm. GitHub shows the permissions listed below before you install.
- You return to TrustEvidence and the first scan starts.
Option 2: fine-grained personal access token
- On GitHub: your profile picture, then Settings, Developer settings, Personal access tokens, Fine-grained tokens, Generate new token.
- Resource owner: your organisation. If the organisation requires approval for fine-grained tokens, an owner approves it under the organisation's settings.
- Expiration: 90 days or less. Put the date in your calendar.
- Repository access: all repositories, or only the ones you want assessed.
- Permissions: set each of the permissions below to Read-only and leave everything else at No access.
- Generate the token. On the Integrations page, under Connect GitHub, enter the organisation name, optionally the repositories, and the token.
Permissions
Repository permissions, all read-only:
Administration (read)Code scanning alerts (read)Contents (read)Dependabot alerts (read)Metadata (read)
Organisation permissions, all read-only:
Administration (read)Members (read)
The audit-log check also needs GitHub Enterprise Cloud and the read:audit_log permission. Without them it reports insufficient evidence.
What is read and what is never touched
What TrustEvidence reads
- Organisation settings: two-factor requirement, members' base permission, public repository creation, allowed Actions and the default GITHUB_TOKEN permission
- Organisation owners and outside collaborators (GitHub usernames)
- Each repository's visibility, branch protection and rulesets, security features and workflow token setting
- Repository collaborators with admin access (usernames)
- Workflow files in .github/workflows, analysed for known-unsafe patterns, and whether CODEOWNERS is valid
- Counts and severities of open Dependabot and code scanning alerts
What it never touches
- Source code: the Contents permission could read any file; TrustEvidence reads only the workflow files
- Issues, pull request contents, discussions, wikis and packages
- Secrets and variables of repositories, environments or the organisation
- Any write: nothing is pushed, opened, commented on or changed
Checks
| Check | What it reads | Passes when |
|---|---|---|
| Code scanning enabled | Checks CodeQL default setup and uploaded analyses. | Code scanning results exist. |
| CODEOWNERS defined | Checks for a valid CODEOWNERS file. | A valid CODEOWNERS file exists. |
| Default branch is protected | Reads classic branch protection and active rulesets for the default branch. | Protection or a ruleset applies. |
| Dependabot alerts enabled | Probes the vulnerability-alerts endpoint. | Enabled (HTTP 204). |
| Dependabot security updates enabled | Reads automated security fixes. | enabled |
| Force pushes and deletion blocked | Reads force-push and deletion settings. | Both blocked. |
| Members cannot create public repositories | Reads members_can_create_public_repositories. | false |
| Members' base permission is read or none | Reads default_repository_permission. | read or none |
| No open critical/high code scanning alerts | Lists open critical and high code scanning alerts. | None open beyond SLA. |
| No open critical/high Dependabot alerts | Lists open critical and high Dependabot alerts. | None open beyond SLA. |
| Only approved GitHub Actions may run | Reads organisation Actions permissions. | allowed_actions is local_only or selected. |
| Organisation audit log is retained and accessible | Probes the audit-log API. | Audit log accessible (API or regular export). |
| Organisation default GITHUB_TOKEN is read-only | Reads default workflow permissions. | read |
| Organisation owners are limited | Lists organisation members with the admin (owner) role. | 3 or fewer owners, each justified. |
| Organisation requires 2FA | Reads two_factor_requirement_enabled from the organisation. | true |
| Outside collaborators are reviewed | Lists outside collaborators. | None, or each reviewed and justified. |
| Public repositories are intentional | Reads repository visibility. | Private/internal, or public by documented decision. |
| Pull requests require approval | Reads required approving review count from protection and rulesets. | ≥ 1 approving review. |
| Repository admins are limited | Lists collaborators with admin permission (including inherited). | 3 or fewer, each justified. |
| Repository default GITHUB_TOKEN is read-only | Reads repository workflow permissions. | read |
| Secret scanning enabled | Reads security_and_analysis.secret_scanning. | enabled |
| Secret scanning push protection enabled | Reads security_and_analysis.secret_scanning_push_protection. | enabled |
| Status checks required before merge | Reads required status checks. | At least one required check. |
| Workflows avoid known-unsafe patterns | Statically analyses workflow files for pwn-request, write-all and script-injection patterns. | No unsafe patterns. |
24 checks. A check that cannot read what it needs reports insufficient evidence, never a pass.
Rotate or remove access
- Rotate a token: generate a new one with the same permissions, reconnect the integration, run a scan, then delete the old token on GitHub.
- Remove access: disconnect the integration in TrustEvidence (stored credentials are deleted at once), then uninstall the GitHub App under the organisation's Settings, GitHub Apps, or delete the token on GitHub.