GitHub
What it does in Varman
Section titled “What it does in Varman”Varman runs five checks against the repositories you select. Each repository (or organization, for 2FA) gets its own pass or finding.
| Check | Passes when | Evidence task |
|---|---|---|
| Branch Protection Enabled | Every selected branch has a ruleset, a branch rule, or legacy branch protection | Code Changes |
| Code Scanning | CodeQL default setup is on, or a workflow runs CodeQL or uploads SARIF from another tool (Semgrep, Snyk, Trivy and similar) | Sanitized Inputs |
| Dependabot Security Updates Enabled | Dependabot security updates are on and no open alerts are at or above your severity threshold | Secure Code |
| Sanitized Inputs | A supported validation library is found in a package.json, requirements.txt, pyproject.toml or composer.json anywhere in the repository |
Sanitized Inputs |
| 2FA Enforcement | No member of the organizations that own the selected repositories has 2FA turned off | 2FA |
The Sanitized Inputs check looks for these libraries: zod, yup, joi, @effect/schema, effect, valibot, ajv, class-validator, io-ts, superstruct, runtypes (JavaScript and TypeScript), pydantic, marshmallow, cerberus, voluptuous, jsonschema, schematics, typeguard (Python), laravel/framework, respect/validation, symfony/validator, vlucas/valitron (PHP). If you use something else, mark the task manually with your own evidence.
The Branch Protection check also records pull requests from the recent window (180 days by default) as evidence.
What you need
Section titled “What you need”- A GitHub account with access to the repositories you want checked.
- For the 2FA Enforcement check, that account must be an owner of the organization. GitHub only lets organization owners filter members by 2FA status.
- For the Code Scanning and Dependabot status reads, admin access to the repository gives the most complete result. Without it the checks report that they could not read the setting.
- Private repositories need GitHub Code Security (formerly GitHub Advanced Security) for CodeQL. A third-party tool that uploads SARIF also satisfies the check.
Permissions requested
Section titled “Permissions requested”Create a classic personal access token with these scopes:
reporead:orgread:user
Varman sends the token as Authorization: Bearer <token> to https://api.github.com. The checks
only read, but GitHub’s repo scope itself grants write access to private repositories. If that is
a concern, use the GitHub App integration, which has read-only
permissions. See GitHub’s scopes for OAuth apps
for what each scope covers.
Connect
Section titled “Connect”-
In GitHub, go to Settings > Developer settings > Personal access tokens and create a classic token with the scopes above. See GitHub’s guide: Managing your personal access tokens.
-
If your organization uses SAML single sign-on, authorize the token for that organization. See Authorizing a personal access token for use with SAML SSO.
-
In Varman, open Integrations, find GitHub and click Set up.
-
Paste the token into Personal Access Token and click Connect account.
-
The Account Settings panel opens. Under Repositories to monitor, pick the repositories to check. You can add branches per repository; if you do not,
mainis used. -
Optionally set Recent PR window (days) (default 180) and Fail on open alerts at severity (default High or above). Click Save configuration.
The repository picker lists repositories owned by organizations you belong to. Organizations that block the token (SAML SSO not authorized, or access denied) are skipped.
What gets synced and how often
Section titled “What gets synced and how often”Only check results are stored. For each selected repository Varman reads repository metadata, branch rules and rulesets, branch protection, recent pull requests, the code scanning default setup, the file tree and workflow files, dependency manifests, Dependabot settings and open Dependabot alerts. For each organization that owns a selected repository it reads the list of members with 2FA turned off. Checks run on the daily schedule described in the overview, or when you click Run now.
Disconnect
Section titled “Disconnect”Open Integrations > GitHub, click Settings, then Disconnect. Then delete the token in GitHub under Settings > Developer settings > Personal access tokens. See Disconnecting for what Varman keeps.
Troubleshooting
Section titled “Troubleshooting”Needs setup: select Repositories to monitor. No repositories are selected. Open Settings and pick at least one.Repository not found: owner/repo. The repository was renamed, deleted, or the token cannot see it. Check the name and the token’s access, then update the selection.Cannot verify 2FA for <org>with “only available to organization owners”. Reconnect with a token from an organization owner, or remove that organization’s repositories from the selection.Cannot verify 2FA for <org>with “SSO authorization is required”. Authorize the token for the organization’s SAML SSO, then click Run again.Rate limited while checking <org>. GitHub’s API rate limit was hit. Wait for it to reset and run the check again.Cannot access code scanning configuration for <repo>. GitHub returned 403. The token’s account needs admin access to that repository.Code scanning requires GitHub Code Security for <repo>. The repository is private and has no code scanning. Turn on GitHub Code Security and CodeQL default setup, or add a workflow that uploads SARIF withgithub/codeql-action/upload-sarif.Unable to check Dependabot status on <repo>. The account may lack admin access to the repository. Grant it, or check Settings > Code security in the repository yourself.- The token stopped working. Create a new token, then disconnect and connect again with it.