heroui logo

GitHub Outside Collaborator Added to Repository

Elastic Detection Rules

View Source
Summary
This rule detects when an account outside the organization is added as a GitHub repository collaborator via the audit event org.add_outside_collaborator. Outside collaborators have direct repository access without being organization members, often bypassing SSO and team-based reviews, which can be exploited by an attacker who has compromised credentials to maintain access after revocation. The ES|QL query filters GitHub audit logs for event.action == "org.add_outside_collaborator" and returns key fields such as actor, repository, permission, actor IP, hashed token, and programmatic access type to aid investigation. The rule supports attribution to persistence activity and potential post-compromise actions (e.g., cloning or pushing using the same token). MITRE ATT&CK mapping is included (T1098.003 Additional Cloud Roles under Persistence). Investigation flow: examine the actor (user.name, github.actor_ip) for legitimacy, identify the added collaborator (github.repo and github.permission), and check token usage (github.hashed_token, github.programmatic_access_type) to determine if access was interactive or token-driven. Validate that the added account is outside the organization and confirm whether the access was authorized by repo owners. Prioritize high-risk cases where write/admin access is granted on private repositories. Look for subsequent events indicating usage (clones, downloads, git.push) with the same hashed token. False positives: legitimate onboarding of contractors or vendors with documented approvals and expiry dates, or non-production inner-source testing with temporary outside collaborators. Validate each case against ticketing, ownership, and scope. Remediation: if unauthorized, remove the outside collaborator, revoke sessions and tokens associated with the event, and tighten outside-collaborator permissions and SSO controls. Review the organization’s policy on granting external access and audit related activity for potential credential compromise or abuse.
Categories
  • Cloud
  • Application
  • Identity Management
Data Sources
  • Application Log
ATT&CK Techniques
  • T1098
  • T1098.003
Created: 2026-09-22