Skip to main content
The GitHub Code Scanner installs as a GitHub App, scans connected repositories for LLM SDK calls that are not routed through PromptGuard, and can open a pull request that fixes them. Scans run when you connect a repository, on pushes to its default branch, and on pull requests.
Detection uses the same AST-based engine as the CLI — it parses the syntax tree rather than matching text, so a commented-out call or a string that merely mentions a provider is not reported.

Install the GitHub App

1

Install the app

Go to github.com/apps/promptguard-security and choose the account or organization to install into. You can grant access to every repository or pick individual ones — PromptGuard only ever sees the repositories you select.
2

Connect the installation

In the dashboard, open Settings → Integrations. The GitHub card shows the installation once GitHub redirects back. Connecting links that installation to your PromptGuard account.
3

Connect a repository to a project

Pick a repository from the available list and choose which PromptGuard project it belongs to. Findings and fixes are scoped to that project.A full scan starts as soon as the repository is connected. You do not need to trigger the first one.

What a scan reports

Each scan records how many files it examined, how many LLM calls it found, and how many of those were unprotected. Progress is reported while it runs — files discovered, files analyzed, and the current phase — so a large repository shows movement rather than sitting blank. Every finding carries:

Fix pull requests

From a completed scan, open a fix pull request for every unprotected finding, or select individual findings and fix only those. PromptGuard pushes a branch and opens the PR against your repository; you review and merge it like any other change. Nothing is committed to your default branch on your behalf.
Auto-fix is not wired up yet. The dashboard shows an auto-fix toggle per repository and it saves, but no scan currently opens a pull request on its own — every fix PR has to be started from a completed scan as described above. Treat the toggle as a stored preference, not as automation, until this note goes away.

When scans run

Push and pull-request scanning follow the repository’s auto-scan setting. Two limits worth knowing before you rely on this as a gate:
  • Only pushes to the repository’s own default branch are scanned. Pushes to any other branch are ignored. The scan-branch setting below does not change this — it selects the branch a full scan reads from, not which pushes fire one.
  • Only one scan runs per repository at a time, and extra events are dropped rather than queued. A manual trigger during a scan returns a clear error, but a push or pull-request webhook that arrives while a scan is running is silently skipped — no scan record, no check run, no notification. Push three commits in quick succession and only the first is scanned. Re-run the scan by hand if you need the later commits covered.

Per-repository settings

Disconnecting

Disconnecting a repository stops all scanning for it and removes it from the dashboard. Disconnecting the installation removes every connected repository at once. To revoke access entirely, uninstall the app from your GitHub account settings — suspending or uninstalling it in GitHub is reflected in PromptGuard automatically.

Scanning without GitHub

The same detection runs locally, with no app install and no repository access:
See the CLI reference for JSON output and CI usage.