LoFP LoFP / github

github rule

TitleTags
a developer signing in from a new laptop or phone. confirm with the user and that mfa succeeded.
a self-hosted runner is automatically removed from github if it has not connected to github actions for more than 14 days.
allowed administrative activities.
allowed self-hosted runners changes in the environment.
an ephemeral self-hosted runner is automatically removed from github if it has not connected to github actions for more than 1 day.
approved administrator/owner activities.
approved changes by the organization owner. please validate the 'actor' if authorized to make the changes.
approved org moves between enterprises or decommission of a lab org. confirm with enterprise owners before treating as incident.
archiving or unarchiving a repository is often legitimate. investigate this action to determine if it was authorized.
authorized secret-scanning jobs that identify as trufflehog in ci. restrict exceptions to known automation identities and repositories.
authorized self-hosted github actions runner.
authorized users may create repositories for development, testing, documentation, or migration. confirm the actor, organization, repository visibility, and business purpose before escalating.
automation that deletes failed or temporary workflow runs shortly after execution. review whether the workflow, repository, and actors are expected.
briefly disabling restrictions to onboard an approved vendor app. re-enable immediately and approve that app explicitly instead when possible.
broken automation, expired tokens, or inventory tools hitting renamed repositories. review the routes and whether the token is expected.
ci, git gui, or library upgrades that change the user-agent on an existing pat or oauth token. confirm the token owner and whether the client is expected.
ci, laptops, or travel networks using the same pat or oauth token from a new egress ip. confirm the token owner and whether the repositories are expected.
cost-control or license changes that turn ghas off for archival orgs. confirm billing intent and that production orgs remain covered.
developers adding a key for a new workstation, or administrators adding an approved deploy key for ci/cd or repository automation. confirm the key, source ip, affected account or repository, and expected access level.
developers authorizing approved internal or vendor oauth apps. maintain an allowlist of expected application names and investigate first-time grants from unusual ips or user agents.
developers downloading archives for offline review, backup jobs, or ci that fetches zipballs. confirm the actor, token type, and whether the repositories are expected.
developers travelling or switching between home, mobile and corporate networks will appear from a new asn the first time each is used. ci runners and cloud build services appear once per cloud provider asn; add exceptions for known automation identities if the volume is high.
documented disaster-recovery tests. dual-control these events and store codes offline.
documented test of push protection using a dummy token, or a temporary disable while fixing a noisy pattern. re-enable afterward and confirm no live secret was pushed.
emergency access during an idp outage. this should be rare, ticketed, and re-enabled immediately.
example or dummy tokens that are themselves committed to a public repository can still be flagged as publicly leaked. tune by repository, pattern name (`github.secret_type`), or known test org when such keys are expected.
finance rotating cards at expiry. confirm with the billing owners.
installing a documented ci, chat, or ticketing integration that uses github webhooks. confirm the payload url and subscribed events with the repository owners.
legitimate ci/cd automation that commits and pushes changes (e.g., auto-formatting, changelog updates, version bumps, dependabot auto-merge) will trigger this alert on first use in a repository. review the repository's workflow configurations to determine if bot pushes are expected.
legitimate ci/cd automation that requires workflow file modifications may trigger this alert if not properly configured with the necessary permissions. review the workflow configuration and ensure the github_token or pat has the required 'workflows' permission if the modification is intentional.
legitimate publishing of repository pages by authorized users
network changes, office ip rotations, or vpn egress updates performed by org owners. confirm the entry value and that enforcement was not enabled unexpectedly.
onboarding a contractor or vendor as an outside collaborator, or adding a personal account during a documented inner-source exercise. confirm the collaborator, repository, and permission with the repo owners.
onboarding a new deployment environment or rotating ci credentials. confirm the secret name (`github.key`) and that a change ticket exists.
org-wide backup, secret-rotation, or inventory scripts that list secrets, hooks, and repositories. allowlist known automation tokens and user agents.
organization approved new members
organizations may enable fine-grained pat auto-approval intentionally to streamline trusted internal token workflows. confirm the change against a policy decision or change ticket, and scope exceptions by actor when the behavior is expected.
planned ca rotation. create the replacement ca before deleting the old one, and do not disable the certificate requirement except during a documented outage.
planned identity provider (idp) migration or saml reconfiguration performed during an approved change window. confirm the change against a ticket, keep a second owner session active, and re-enable sso as soon as the new provider is ready.
planned ownership moves during org restructuring or when an employee takes a personal project. confirm the destination owner and that the transfer was approved.
planned policy change to allow inner-source forks. confirm change tickets and that the setting is reverted if it was a test.
planned stream rotation, sink migration, or pausing a misconfigured destination by an enterprise owner. confirm the actor, change ticket, and that the production siem sink remains enabled.
repository admins disabling dependabot on archival, template, or non-code repos. confirm the change was intended and that production application repos remain covered.
temporarily allowing pats during a documented migration off github apps, then re-enabling the restriction. confirm with organization owners.
this detection cloud be noisy depending on the environment. it is recommended to keep a check on the new secrets when created and validate the \"actor\".
validate the actor if permitted to access the repo.
validate the deletion activity is permitted. the \"actor\" field need to be validated.
validate the multifactor authentication changes.