Skip to main content

Cotool + GitHub

Connect GitHub to Cotool so agents read code, commits, and blame, open pull requests, sync agents as code, and ingest GitHub audit logs, with read-only option.

Code & CI
Updated

The short answer

The GitHub integration connects Cotool to repositories through a GitHub App. Agents read files, commits, blame, pull requests, and branch rules, can open and update pull requests when their workflow needs to change code, and can sync response agents and skills as code. GitHub audit logs can also be ingested into Cotool.[1][2]

How it connects: Connect with the Cotool-managed GitHub App, with a GitHub App your organization registers and owns, or both. With your own App, GitHub enforces the permissions you chose on every request Cotool makes.[1][6]

What Cotool uses from GitHub

Repository context
Agents inspect files, commit history, blame, pull requests with reviews and inline comments, repository rulesets, and metadata.[1][2]
GitHub audit logs
Cotool's managed log ingestion supports GitHub audit logs. GitHub's organization audit log covers the last 180 days and is visible only to owners, so storing it elsewhere keeps history longer.[2][8]

Response actions

These change state in GitHub, so they are the steps teams usually gate behind approval.

Pull requests
Agents can create pull requests, including drafts, update, review, and close them, and check out a repository into the sandbox to prepare changes.[1][2]
GitHub Actions workflows
Workflow tools create and update GitHub Actions workflow files through pull requests, protected by explicit permissions.[1][2]

Detections, hunts, and triage

Code context for an alertTriage
When an alert names a service or a secret, an agent reads the relevant code, recent commits, and blame to see who changed what before deciding.[1][4]
Detections and agents as codeDetection
Response agent definitions sync from YAML files in a chosen repository, branch, and folder, and agent skills can be managed and synced from GitHub the same way.[1][2][3]
Hunt in the audit logHunt
With GitHub audit logs in Cotool, a hunt looks for events such as new personal access tokens or repository changes and correlates them with identity logs.[2][5][8]

Setup and permissions

Install the GitHub App on an organization and pick all or selected repositories. For your own App, create it in GitHub, then give Cotool its App ID, client ID, client secret, and private key.[1]

PermissionAccess
Contents: ReadRead files, commits, blame, branch rules, and repository metadata.[1][6]Read
Pull requests: ReadRead and list pull requests.[1][6]Read
Organization members: ReadRequired on your own App so setup can verify the installer is an organization owner.[1][6]Read
Contents and Pull requests: Read and writeCommit to branches and open, update, or close pull requests. Leave at Read for a read-only App.[1][6]Write
Workflows: Read and writeCreate or update GitHub Actions workflow files.[1][6]Write
  • GitHub recommends selecting the minimum permissions an app needs, and calls the private key the single most valuable secret for a GitHub App.[6][7]

How Cotool works with GitHub

  • A read-only App with Contents: Read, Pull requests: Read, and Organization members: Read lets agents investigate while GitHub itself refuses every write.[1]
  • One Cotool organization can connect several GitHub organizations and route each repository to either the managed App or your own, with conflict detection.[1][2]

FAQ

Can I give Cotool read-only GitHub access?
Yes. Register your own GitHub App with read permissions only. Cotool's docs describe it as the most common reason to bring your own App.[1]
What happens when I change my App's permissions?
GitHub asks an organization owner to approve the new permissions for each installation. Cotool picks them up on its next request without a reconnect.[1]

Sources

  1. GitHub integration (Cotool docs) · accessed November 16, 2026
  2. Changelog (Cotool docs) · accessed November 16, 2026
  3. Response agents as code (Cotool docs) · accessed November 16, 2026
  4. Respond to every signal (Cotool Respond) · accessed November 16, 2026
  5. Threat hunting (Cotool Hunt) · accessed November 16, 2026
  6. Choosing permissions for a GitHub App (GitHub Docs) · accessed November 16, 2026
  7. Managing private keys for GitHub Apps (GitHub Docs) · accessed November 16, 2026
  8. Reviewing the audit log for your organization (GitHub Docs) · accessed November 16, 2026

Related integrations

All integrations

Use cases with GitHub

Related reading

Attackers are scaling with tokens

Cotool helps defenders operate at machine speed. See how security teams are scaling Detection & Response.

Book a demo