From d39736e83a6b3d4d96699f823ea968c2d072fe3a Mon Sep 17 00:00:00 2001 From: Jared Atkinson Date: Fri, 20 Nov 2026 10:45:51 -0800 Subject: [PATCH] fix: BED-10671 add stable IDs to searches and Tier Zero rules --- extension/privilege_zone_rules/t0-all-repo-admin-role.json | 1 + .../privilege_zone_rules/t0-app-installations-all-repos.json | 1 + extension/privilege_zone_rules/t0-apps-all-repos.json | 1 + extension/privilege_zone_rules/t0-enterprise-owners-role.json | 1 + .../privilege_zone_rules/t0-external-identities-owners.json | 1 + extension/privilege_zone_rules/t0-organizations.json | 1 + extension/privilege_zone_rules/t0-owner-users.json | 1 + extension/privilege_zone_rules/t0-owners-role.json | 1 + extension/privilege_zone_rules/t0-pats-all-repos.json | 1 + .../privilege_zone_rules/t0-privilege-escalation-roles.json | 1 + .../privilege_zone_rules/t0-privilege-escalation-users.json | 1 + extension/privilege_zone_rules/t0-saml-identity-providers.json | 1 + extension/saved_searches/actions-sha-pinning-not-required.json | 1 + extension/saved_searches/active-leaked-secrets.json | 1 + .../saved_searches/advanced-security-disabled-new-repos.json | 1 + extension/saved_searches/all-actions-allowed.json | 1 + extension/saved_searches/app-installations-all-repos.json | 1 + .../saved_searches/branch-protection-admins-not-enforced.json | 1 + .../saved_searches/branch-protection-deletions-allowed.json | 1 + extension/saved_searches/branch-protection-force-pushes.json | 1 + .../saved_searches/branch-protection-no-code-owner-reviews.json | 1 + extension/saved_searches/branch-protection-no-pr-reviews.json | 1 + extension/saved_searches/branch-protection-no-status-checks.json | 1 + extension/saved_searches/branch-protection-self-approval.json | 1 + extension/saved_searches/branch-protection-stale-reviews.json | 1 + extension/saved_searches/bypass-pr-requirements.json | 1 + extension/saved_searches/dangerous-branch-perms.json | 1 + extension/saved_searches/default-repository-permissions.json | 1 + extension/saved_searches/demo-sso-to-cloud-round-trip.json | 1 + .../saved_searches/dependabot-alerts-disabled-new-repos.json | 1 + .../saved_searches/dependabot-updates-disabled-new-repos.json | 1 + .../saved_searches/dependency-graph-disabled-new-repos.json | 1 + extension/saved_searches/environments-admin-bypass.json | 1 + extension/saved_searches/expired-pats.json | 1 + extension/saved_searches/external-identities-without-scim.json | 1 + extension/saved_searches/github-to-azure-identity.json | 1 + extension/saved_searches/global-repo-perms.json | 1 + extension/saved_searches/hybrid-identities.json | 1 + extension/saved_searches/members-can-change-repo-visibility.json | 1 + extension/saved_searches/members-can-create-pages.json | 1 + extension/saved_searches/members-can-create-public-repos.json | 1 + extension/saved_searches/members-can-delete-repos.json | 1 + extension/saved_searches/members-can-fork-private-repos.json | 1 + .../saved_searches/members-can-invite-outside-collaborators.json | 1 + extension/saved_searches/org-owners.json | 1 + extension/saved_searches/orgs-without-2fa.json | 1 + extension/saved_searches/pats-all-repo-access.json | 1 + extension/saved_searches/pending-pat-requests.json | 1 + extension/saved_searches/private-repos-forking-allowed.json | 1 + extension/saved_searches/privileged-custom-org-roles.json | 1 + extension/saved_searches/privileged-hybrid-identities.json | 1 + extension/saved_searches/public-repos.json | 1 + extension/saved_searches/push-protection-disabled-new-repos.json | 1 + extension/saved_searches/push-to-protected-branches.json | 1 + extension/saved_searches/repos-secret-scanning-disabled.json | 1 + .../repos-vulnerable-to-workflow-secret-exfil.json | 1 + extension/saved_searches/repository-workflows.json | 1 + extension/saved_searches/saml-configuration.json | 1 + extension/saved_searches/secret-scanning-alerts.json | 1 + extension/saved_searches/secret-scanning-disabled-new-repos.json | 1 + extension/saved_searches/secrets-reachable-by-user.json | 1 + .../self-hosted-runners-can-intercept-broad-token-jobs.json | 1 + ...ed-self-hosted-runners-can-intercept-secret-bearing-jobs.json | 1 + extension/saved_searches/team-membership-admin.json | 1 + extension/saved_searches/team-structure.json | 1 + extension/saved_searches/unprotected-branches.json | 1 + .../saved_searches/unprotected-default-branch-with-workflow.json | 1 + extension/saved_searches/unprotected-default-branches.json | 1 + extension/saved_searches/web-commit-signoff-not-required.json | 1 + .../workflow-jobs-interceptable-by-self-hosted-runners.json | 1 + .../workflow-jobs-with-broad-token-write-permissions.json | 1 + ...workflow-jobs-with-id-token-write-on-self-hosted-runners.json | 1 + extension/saved_searches/workflow-jobs-with-id-token-write.json | 1 + .../workflow-jobs-with-observed-oidc-auth-steps.json | 1 + 74 files changed, 74 insertions(+) diff --git a/extension/privilege_zone_rules/t0-all-repo-admin-role.json b/extension/privilege_zone_rules/t0-all-repo-admin-role.json index 2ae42998..6db55fa6 100644 --- a/extension/privilege_zone_rules/t0-all-repo-admin-role.json +++ b/extension/privilege_zone_rules/t0-all-repo-admin-role.json @@ -1,4 +1,5 @@ { + "key": "GH_t0_all_repo_admin_role", "name": "GitHub: Tier Zero All-Repo Admin Role", "description": "The synthetic all_repo_admin role grants admin access to every repository in the organization. This role is inherited by the owners role via GH_HasBaseRole and cascades admin permissions including branch protection editing, secret access, and deploy key management to all repositories.", "cypher": "MATCH (n:GH_OrgRole)\nWHERE n.name CONTAINS 'all_repo_admin'\nRETURN n", diff --git a/extension/privilege_zone_rules/t0-app-installations-all-repos.json b/extension/privilege_zone_rules/t0-app-installations-all-repos.json index af8bbdea..4cd19abd 100644 --- a/extension/privilege_zone_rules/t0-app-installations-all-repos.json +++ b/extension/privilege_zone_rules/t0-app-installations-all-repos.json @@ -1,4 +1,5 @@ { + "key": "GH_t0_app_installations_all_repos", "name": "GitHub: Tier Zero App Installations (All Repositories)", "description": "GitHub App installations scoped to all repositories in the organization that have repository-control write permissions. A compromised app credential may grant code, workflow, Actions, or administrative control across every repository. Installations with only read or lower-impact write permissions are excluded.", "cypher": "MATCH (n:GH_AppInstallation)-[:GH_CanAccess]->(:GH_Scope {scope_type:'repository', scope:'all'})\nWHERE ANY(permission IN n.permissions WHERE permission IN ['contents:write', 'administration:write', 'workflows:write', 'actions:write'])\nRETURN n", diff --git a/extension/privilege_zone_rules/t0-apps-all-repos.json b/extension/privilege_zone_rules/t0-apps-all-repos.json index 274fc2a1..92e6865c 100644 --- a/extension/privilege_zone_rules/t0-apps-all-repos.json +++ b/extension/privilege_zone_rules/t0-apps-all-repos.json @@ -1,4 +1,5 @@ { + "key": "GH_t0_apps_all_repos", "name": "GitHub: Tier Zero Apps (All-Repository Installations)", "description": "GitHub App definitions whose installations have repository-control write permissions across all repositories. The app owner controls the private key that can generate tokens for any installation. Compromise of the app's private key may grant code, workflow, Actions, or administrative control across every repository in organizations where it is installed. Apps whose installations have only read or lower-impact write permissions are excluded.", "cypher": "MATCH (n:GH_App)-[:GH_InstalledAs]->(i:GH_AppInstallation)-[:GH_CanAccess]->(:GH_Scope {scope_type:'repository', scope:'all'})\nWHERE ANY(permission IN i.permissions WHERE permission IN ['contents:write', 'administration:write', 'workflows:write', 'actions:write'])\nRETURN n", diff --git a/extension/privilege_zone_rules/t0-enterprise-owners-role.json b/extension/privilege_zone_rules/t0-enterprise-owners-role.json index 51811c23..5a7fc672 100644 --- a/extension/privilege_zone_rules/t0-enterprise-owners-role.json +++ b/extension/privilege_zone_rules/t0-enterprise-owners-role.json @@ -1,4 +1,5 @@ { + "key": "GH_t0_enterprise_owners_role", "name": "GitHub: Tier Zero Enterprise Owners Role", "description": "The enterprise owners role grants administrative control over the GitHub Enterprise account, including enterprise organizations, members, identity provider configuration, and enterprise-wide security settings.", "cypher": "MATCH (n:GH_EnterpriseRole {short_name:'owners'})\nRETURN n", diff --git a/extension/privilege_zone_rules/t0-external-identities-owners.json b/extension/privilege_zone_rules/t0-external-identities-owners.json index 7b95fec8..c599cc3a 100644 --- a/extension/privilege_zone_rules/t0-external-identities-owners.json +++ b/extension/privilege_zone_rules/t0-external-identities-owners.json @@ -1,4 +1,5 @@ { + "key": "GH_t0_external_identities_owners", "name": "GitHub: Tier Zero External Identities (Owner-Mapped)", "description": "External identities from SAML/SCIM providers that map to GitHub users holding the owners role. Compromise of these external identities in the identity provider grants organizational owner access to GitHub via SSO.", "cypher": "MATCH (n:GH_ExternalIdentity)-[:GH_MapsToUser]->(:GH_User)-[:GH_HasRole]->(:GH_OrgRole {short_name:'owners'})\nRETURN n", diff --git a/extension/privilege_zone_rules/t0-organizations.json b/extension/privilege_zone_rules/t0-organizations.json index e0335b40..a00e6ffc 100644 --- a/extension/privilege_zone_rules/t0-organizations.json +++ b/extension/privilege_zone_rules/t0-organizations.json @@ -1,4 +1,5 @@ { + "key": "GH_t0_organizations", "name": "GitHub: Tier Zero Organizations", "description": "GitHub organizations are the root trust boundary for all repositories, teams, users, and settings. Compromise of the organization grants full administrative control over all contained assets.", "cypher": "MATCH (n:GH_Organization)\nRETURN n", diff --git a/extension/privilege_zone_rules/t0-owner-users.json b/extension/privilege_zone_rules/t0-owner-users.json index 2bd28340..9ea473fc 100644 --- a/extension/privilege_zone_rules/t0-owner-users.json +++ b/extension/privilege_zone_rules/t0-owner-users.json @@ -1,4 +1,5 @@ { + "key": "GH_t0_owner_users", "name": "GitHub: Tier Zero Owner Users", "description": "Users who hold the organization owners role have full administrative control over the GitHub organization. Compromise of any owner account grants control over all repositories, secrets, SSO configuration, and cloud identities.", "cypher": "MATCH (n:GH_User)-[:GH_HasRole]->(:GH_OrgRole {short_name:'owners'})\nRETURN n", diff --git a/extension/privilege_zone_rules/t0-owners-role.json b/extension/privilege_zone_rules/t0-owners-role.json index 972da2fc..29530a34 100644 --- a/extension/privilege_zone_rules/t0-owners-role.json +++ b/extension/privilege_zone_rules/t0-owners-role.json @@ -1,4 +1,5 @@ { + "key": "GH_t0_owners_role", "name": "GitHub: Tier Zero Owners Role", "description": "The owners organization role grants full administrative control including all repository admin, member management, SSO configuration, app management, and billing. Owners inherit all_repo_admin, cascading admin access to every repository, secret, environment, and cloud identity in the organization.", "cypher": "MATCH (n:GH_OrgRole {short_name:'owners'})\nRETURN n", diff --git a/extension/privilege_zone_rules/t0-pats-all-repos.json b/extension/privilege_zone_rules/t0-pats-all-repos.json index 25ab1180..47fa7883 100644 --- a/extension/privilege_zone_rules/t0-pats-all-repos.json +++ b/extension/privilege_zone_rules/t0-pats-all-repos.json @@ -1,4 +1,5 @@ { + "key": "GH_t0_pats_all_repos", "name": "GitHub: Tier Zero PATs (All Repositories)", "description": "Fine-grained personal access tokens scoped to all repositories in the organization that have repository-control write permissions. A single compromised token may grant code, workflow, Actions, or administrative control across every repository. PATs with only read or lower-impact write permissions are excluded.", "cypher": "MATCH (n:GH_PersonalAccessToken {token_expired:false})-[:GH_CanAccess]->(:GH_Scope {scope_type:'repository', scope:'all'})\nWHERE ANY(permission IN n.repository_permissions WHERE permission IN ['contents:write', 'administration:write', 'workflows:write', 'actions:write'])\nRETURN n", diff --git a/extension/privilege_zone_rules/t0-privilege-escalation-roles.json b/extension/privilege_zone_rules/t0-privilege-escalation-roles.json index 2ec1095f..942f8b7b 100644 --- a/extension/privilege_zone_rules/t0-privilege-escalation-roles.json +++ b/extension/privilege_zone_rules/t0-privilege-escalation-roles.json @@ -1,4 +1,5 @@ { + "key": "GH_t0_privilege_escalation_roles", "name": "GitHub: Tier Zero Privilege Escalation Roles", "description": "Custom organization roles with write_organization_custom_org_role permission can modify organization role definitions, including setting the base_role to inherit all_repo_admin. Since this permission only exists on custom organization roles, the holder can escalate the role they already hold — a guaranteed self-escalation path to full organizational control.", "cypher": "MATCH (n:GH_OrgRole)-[:GH_WriteOrganizationCustomOrgRole]->(:GH_Organization)\nRETURN n", diff --git a/extension/privilege_zone_rules/t0-privilege-escalation-users.json b/extension/privilege_zone_rules/t0-privilege-escalation-users.json index a98cffe5..20d9db1e 100644 --- a/extension/privilege_zone_rules/t0-privilege-escalation-users.json +++ b/extension/privilege_zone_rules/t0-privilege-escalation-users.json @@ -1,4 +1,5 @@ { + "key": "GH_t0_privilege_escalation_users", "name": "GitHub: Tier Zero Privilege Escalation Users", "description": "Users who hold custom organization roles with write_organization_custom_org_role permission. These users can modify organization role definitions — including the role they hold — to set the base_role to all_repo_admin, granting themselves admin access to every repository in the organization.", "cypher": "MATCH (n:GH_User)-[:GH_HasRole|GH_HasBaseRole*1..]->(:GH_OrgRole)-[:GH_WriteOrganizationCustomOrgRole]->(:GH_Organization)\nRETURN n", diff --git a/extension/privilege_zone_rules/t0-saml-identity-providers.json b/extension/privilege_zone_rules/t0-saml-identity-providers.json index bacd75c5..fb35ca2b 100644 --- a/extension/privilege_zone_rules/t0-saml-identity-providers.json +++ b/extension/privilege_zone_rules/t0-saml-identity-providers.json @@ -1,4 +1,5 @@ { + "key": "GH_t0_saml_identity_providers", "name": "GitHub: Tier Zero SAML Identity Providers", "description": "SAML identity providers control authentication for all organization members via SSO. Compromise of the identity provider grants the ability to impersonate any user, including organization owners, by manipulating SAML assertions or resetting credentials.", "cypher": "MATCH (n:GH_SamlIdentityProvider)\nRETURN n", diff --git a/extension/saved_searches/actions-sha-pinning-not-required.json b/extension/saved_searches/actions-sha-pinning-not-required.json index bffd975b..7320da18 100644 --- a/extension/saved_searches/actions-sha-pinning-not-required.json +++ b/extension/saved_searches/actions-sha-pinning-not-required.json @@ -1,4 +1,5 @@ { + "query_key": "GH_actions_sha_pinning_not_required", "name": "GitHub: Actions SHA Pinning Not Required", "query": "MATCH (org:GH_Organization {actions_sha_pinning_required: false})\nRETURN org\nLIMIT 1000", "description": "Finds organizations that do not require SHA pinning for GitHub Actions. Without pinning, actions referenced by tag can be silently replaced with malicious versions." diff --git a/extension/saved_searches/active-leaked-secrets.json b/extension/saved_searches/active-leaked-secrets.json index 9198c61c..200b3c4d 100644 --- a/extension/saved_searches/active-leaked-secrets.json +++ b/extension/saved_searches/active-leaked-secrets.json @@ -1,4 +1,5 @@ { + "query_key": "GH_active_leaked_secrets", "name": "GitHub: Active Leaked Secrets", "query": "MATCH p=(:GH_Repository)-[:GH_Contains]->(alert:GH_SecretScanningAlert {state: 'open', validity: 'active'})\nRETURN p\nLIMIT 1000", "description": "Finds secret scanning alerts that are both unresolved and confirmed active. These are valid, usable credentials committed to source code and represent an immediate compromise risk." diff --git a/extension/saved_searches/advanced-security-disabled-new-repos.json b/extension/saved_searches/advanced-security-disabled-new-repos.json index 868c7abc..fd3fa7e0 100644 --- a/extension/saved_searches/advanced-security-disabled-new-repos.json +++ b/extension/saved_searches/advanced-security-disabled-new-repos.json @@ -1,4 +1,5 @@ { + "query_key": "GH_advanced_security_disabled_new_repos", "name": "GitHub: Advanced Security Disabled for New Repositories", "query": "MATCH (org:GH_Organization {advanced_security_enabled_for_new_repositories: false})\nRETURN org\nLIMIT 1000", "description": "Finds organizations where GitHub Advanced Security is not automatically enabled for new repositories. New repositories will lack code scanning, secret scanning, and other GHAS features." diff --git a/extension/saved_searches/all-actions-allowed.json b/extension/saved_searches/all-actions-allowed.json index d0d5117c..4696dbba 100644 --- a/extension/saved_searches/all-actions-allowed.json +++ b/extension/saved_searches/all-actions-allowed.json @@ -1,4 +1,5 @@ { + "query_key": "GH_all_actions_allowed", "name": "GitHub: All GitHub Actions Allowed", "query": "MATCH (org:GH_Organization {actions_allowed_actions: 'all'})\nRETURN org\nLIMIT 1000", "description": "Finds organizations that allow all GitHub Actions to run, including third-party actions from the marketplace. This creates supply chain risk if a malicious or compromised action is used." diff --git a/extension/saved_searches/app-installations-all-repos.json b/extension/saved_searches/app-installations-all-repos.json index b1a21f2b..2dbc2fe1 100644 --- a/extension/saved_searches/app-installations-all-repos.json +++ b/extension/saved_searches/app-installations-all-repos.json @@ -1,4 +1,5 @@ { + "query_key": "GH_app_installations_all_repos", "name": "GitHub: App Installations with Access to All Repositories", "query": "MATCH (app:GH_AppInstallation {repository_selection: 'all'})\nRETURN app\nLIMIT 1000", "description": "Finds GitHub App installations that have access to every repository in the organization. A compromised app credential would affect all repositories." diff --git a/extension/saved_searches/branch-protection-admins-not-enforced.json b/extension/saved_searches/branch-protection-admins-not-enforced.json index 9f1a8a8d..f318cf9a 100644 --- a/extension/saved_searches/branch-protection-admins-not-enforced.json +++ b/extension/saved_searches/branch-protection-admins-not-enforced.json @@ -1,4 +1,5 @@ { + "query_key": "GH_branch_protection_admins_not_enforced", "name": "GitHub: Branch Protection Rules - Admins Not Enforced", "query": "MATCH p=(:GH_BranchProtectionRule {enforce_admins: false})-[:GH_ProtectedBy]->(:GH_Branch)\nRETURN p\nLIMIT 1000", "description": "Finds branch protection rules where administrators can bypass all protections. Admins can push directly, skip reviews, and override status checks on these branches." diff --git a/extension/saved_searches/branch-protection-deletions-allowed.json b/extension/saved_searches/branch-protection-deletions-allowed.json index 2e036c12..d08531ba 100644 --- a/extension/saved_searches/branch-protection-deletions-allowed.json +++ b/extension/saved_searches/branch-protection-deletions-allowed.json @@ -1,4 +1,5 @@ { + "query_key": "GH_branch_protection_deletions_allowed", "name": "GitHub: Branch Protection Rules - Deletions Allowed", "query": "MATCH p=(:GH_BranchProtectionRule {allows_deletions: true})-[:GH_ProtectedBy]->(:GH_Branch)\nRETURN p\nLIMIT 1000", "description": "Finds protected branches that can be deleted. Branch deletion can result in loss of code and removal of audit history." diff --git a/extension/saved_searches/branch-protection-force-pushes.json b/extension/saved_searches/branch-protection-force-pushes.json index fec33b71..88257333 100644 --- a/extension/saved_searches/branch-protection-force-pushes.json +++ b/extension/saved_searches/branch-protection-force-pushes.json @@ -1,4 +1,5 @@ { + "query_key": "GH_branch_protection_force_pushes", "name": "GitHub: Branch Protection Rules - Force Pushes Allowed", "query": "MATCH p=(:GH_BranchProtectionRule {allows_force_pushes: true})-[:GH_ProtectedBy]->(:GH_Branch)\nRETURN p\nLIMIT 1000", "description": "Finds branches where force pushes are allowed. Force pushes can rewrite commit history, potentially hiding malicious changes or destroying audit trails." diff --git a/extension/saved_searches/branch-protection-no-code-owner-reviews.json b/extension/saved_searches/branch-protection-no-code-owner-reviews.json index 8d270ff2..34a20b6d 100644 --- a/extension/saved_searches/branch-protection-no-code-owner-reviews.json +++ b/extension/saved_searches/branch-protection-no-code-owner-reviews.json @@ -1,4 +1,5 @@ { + "query_key": "GH_branch_protection_no_code_owner_reviews", "name": "GitHub: Branch Protection Rules - No Code Owner Reviews", "query": "MATCH p=(:GH_BranchProtectionRule {require_code_owner_reviews: false})-[:GH_ProtectedBy]->(:GH_Branch)\nRETURN p\nLIMIT 1000", "description": "Finds branches where code owner reviews are not required. Changes to security-critical paths can be merged without authorization from the designated code owners." diff --git a/extension/saved_searches/branch-protection-no-pr-reviews.json b/extension/saved_searches/branch-protection-no-pr-reviews.json index 21250d99..16053880 100644 --- a/extension/saved_searches/branch-protection-no-pr-reviews.json +++ b/extension/saved_searches/branch-protection-no-pr-reviews.json @@ -1,4 +1,5 @@ { + "query_key": "GH_branch_protection_no_pr_reviews", "name": "GitHub: Branch Protection Rules - No Pull Request Reviews Required", "query": "MATCH p=(:GH_BranchProtectionRule {required_pull_request_reviews: false})-[:GH_ProtectedBy]->(:GH_Branch)\nRETURN p\nLIMIT 1000", "description": "Finds branches where pull request reviews are not required. Code can be merged directly without peer review, increasing the risk of undetected vulnerabilities or malicious changes." diff --git a/extension/saved_searches/branch-protection-no-status-checks.json b/extension/saved_searches/branch-protection-no-status-checks.json index 68e639aa..ccb53162 100644 --- a/extension/saved_searches/branch-protection-no-status-checks.json +++ b/extension/saved_searches/branch-protection-no-status-checks.json @@ -1,4 +1,5 @@ { + "query_key": "GH_branch_protection_no_status_checks", "name": "GitHub: Branch Protection Rules - No Status Checks Required", "query": "MATCH p=(:GH_BranchProtectionRule {requires_status_checks: false})-[:GH_ProtectedBy]->(:GH_Branch)\nRETURN p\nLIMIT 1000", "description": "Finds branches where CI/CD status checks are not required before merging. Code with failing tests or security scans can be merged into protected branches." diff --git a/extension/saved_searches/branch-protection-self-approval.json b/extension/saved_searches/branch-protection-self-approval.json index 53870bf8..f4910d9e 100644 --- a/extension/saved_searches/branch-protection-self-approval.json +++ b/extension/saved_searches/branch-protection-self-approval.json @@ -1,4 +1,5 @@ { + "query_key": "GH_branch_protection_self_approval", "name": "GitHub: Branch Protection Rules - Self-Approval Allowed", "query": "MATCH p=(:GH_BranchProtectionRule {require_last_push_approval: false})-[:GH_ProtectedBy]->(:GH_Branch)\nRETURN p\nLIMIT 1000", "description": "Finds branches where the author of the last push can approve their own pull request. This allows a single person to both write and approve code changes." diff --git a/extension/saved_searches/branch-protection-stale-reviews.json b/extension/saved_searches/branch-protection-stale-reviews.json index 87f56eb9..4aff4a42 100644 --- a/extension/saved_searches/branch-protection-stale-reviews.json +++ b/extension/saved_searches/branch-protection-stale-reviews.json @@ -1,4 +1,5 @@ { + "query_key": "GH_branch_protection_stale_reviews", "name": "GitHub: Branch Protection Rules - Stale Reviews Not Dismissed", "query": "MATCH p=(:GH_BranchProtectionRule {dismisses_stale_reviews: false})-[:GH_ProtectedBy]->(:GH_Branch)\nRETURN p\nLIMIT 1000", "description": "Finds branches where stale reviews are not dismissed when new commits are pushed. An attacker could get a review approved, then push additional malicious commits that inherit the stale approval." diff --git a/extension/saved_searches/bypass-pr-requirements.json b/extension/saved_searches/bypass-pr-requirements.json index 9ab14b93..58612f9a 100644 --- a/extension/saved_searches/bypass-pr-requirements.json +++ b/extension/saved_searches/bypass-pr-requirements.json @@ -1,4 +1,5 @@ { + "query_key": "GH_bypass_pr_requirements", "name": "GitHub: Users Who Can Bypass Pull Request Requirements", "query": "MATCH p=(actor)-[:GH_BypassPullRequestAllowances]->(rule:GH_BranchProtectionRule)-[:GH_ProtectedBy]->(branch:GH_Branch)\nRETURN p\nLIMIT 1000", "description": "Finds users and teams that can bypass pull request review requirements on protected branches. These actors can merge code without any reviews." diff --git a/extension/saved_searches/dangerous-branch-perms.json b/extension/saved_searches/dangerous-branch-perms.json index 72313be9..8500cfb6 100644 --- a/extension/saved_searches/dangerous-branch-perms.json +++ b/extension/saved_searches/dangerous-branch-perms.json @@ -1,4 +1,5 @@ { + "query_key": "GH_dangerous_branch_perms", "name": "GitHub: Dangerous Branch Permissions", "query": "MATCH p=(:GH_User)-[:GH_HasRole|GH_HasBaseRole|GH_MemberOf*1..]->(:GH_RepoRole)-[:GH_PushProtectedBranch|GH_BypassBranchProtection]-(r:GH_Repository)\nMATCH p1=(:GH_User)-[:GH_BypassPullRequestAllowances|GH_RestrictionsCanPush]->(rule:GH_BranchProtectionRule)-[:GH_ProtectedBy]->(b:GH_Branch)\nRETURN p,p1\nLIMIT 1000", "description": "Identifies users with dangerous branch permissions in a GitHub organization, including bypass allowances on protection rules." diff --git a/extension/saved_searches/default-repository-permissions.json b/extension/saved_searches/default-repository-permissions.json index 5c943d62..e6305318 100644 --- a/extension/saved_searches/default-repository-permissions.json +++ b/extension/saved_searches/default-repository-permissions.json @@ -1,4 +1,5 @@ { + "query_key": "GH_default_repository_permissions", "name": "GitHub: Organizations with default repository permission", "query": "MATCH (o:GH_Organization)\nWHERE o.default_repository_permission <> 'none'\nRETURN o\nLIMIT 1000", "description": "Returns organizations that have a default repository permission other than 'none'." diff --git a/extension/saved_searches/demo-sso-to-cloud-round-trip.json b/extension/saved_searches/demo-sso-to-cloud-round-trip.json index 85e43d83..94168457 100644 --- a/extension/saved_searches/demo-sso-to-cloud-round-trip.json +++ b/extension/saved_searches/demo-sso-to-cloud-round-trip.json @@ -1,4 +1,5 @@ { + "query_key": "GH_demo_sso_to_cloud_round_trip", "name": "[Demo] SSO Round-Trip: Azure/Okta \u2192 GitHub \u2192 Cloud Identity", "query": "MATCH p1=(extUser)-[:SyncedToGHUser]->(ghUser:GH_User)\nMATCH p2=(ghUser)-[:GH_HasRole|GH_HasBaseRole|GH_MemberOf*1..]->(:GH_RepoRole)-[:GH_WriteRepoContents]->(:GH_Repository)-[:GH_CanAssumeIdentity]->(cred:AZFederatedIdentityCredential)\nRETURN p1, p2\nLIMIT 1000", "description": "The cloud-to-cloud pivot through GitHub: a compromised Azure or Okta identity syncs to a GitHub user via SSO. That GitHub user has write access to repositories configured with OIDC federation to Azure workload identities. The attacker pivots from one cloud identity through GitHub into a completely different Azure identity — crossing cloud boundaries twice in a single attack chain." diff --git a/extension/saved_searches/dependabot-alerts-disabled-new-repos.json b/extension/saved_searches/dependabot-alerts-disabled-new-repos.json index c71c8c24..bc297349 100644 --- a/extension/saved_searches/dependabot-alerts-disabled-new-repos.json +++ b/extension/saved_searches/dependabot-alerts-disabled-new-repos.json @@ -1,4 +1,5 @@ { + "query_key": "GH_dependabot_alerts_disabled_new_repos", "name": "GitHub: Dependabot Alerts Disabled for New Repositories", "query": "MATCH (org:GH_Organization {dependabot_alerts_enabled_for_new_repositories: false})\nRETURN org\nLIMIT 1000", "description": "Finds organizations where Dependabot alerts are not enabled for new repositories. Vulnerable dependencies in new repositories will go undetected." diff --git a/extension/saved_searches/dependabot-updates-disabled-new-repos.json b/extension/saved_searches/dependabot-updates-disabled-new-repos.json index bfbc704e..fd4ee812 100644 --- a/extension/saved_searches/dependabot-updates-disabled-new-repos.json +++ b/extension/saved_searches/dependabot-updates-disabled-new-repos.json @@ -1,4 +1,5 @@ { + "query_key": "GH_dependabot_updates_disabled_new_repos", "name": "GitHub: Dependabot Security Updates Disabled for New Repositories", "query": "MATCH (org:GH_Organization {dependabot_security_updates_enabled_for_new_repositories: false})\nRETURN org\nLIMIT 1000", "description": "Finds organizations where Dependabot security update PRs are not enabled for new repositories. Known vulnerable dependencies will not receive automated fix PRs." diff --git a/extension/saved_searches/dependency-graph-disabled-new-repos.json b/extension/saved_searches/dependency-graph-disabled-new-repos.json index 0b72d5a6..51867593 100644 --- a/extension/saved_searches/dependency-graph-disabled-new-repos.json +++ b/extension/saved_searches/dependency-graph-disabled-new-repos.json @@ -1,4 +1,5 @@ { + "query_key": "GH_dependency_graph_disabled_new_repos", "name": "GitHub: Dependency Graph Disabled for New Repositories", "query": "MATCH (org:GH_Organization {dependency_graph_enabled_for_new_repositories: false})\nRETURN org\nLIMIT 1000", "description": "Finds organizations where the dependency graph is not enabled for new repositories. Without the dependency graph, transitive dependency vulnerabilities cannot be tracked." diff --git a/extension/saved_searches/environments-admin-bypass.json b/extension/saved_searches/environments-admin-bypass.json index 48680403..5697e9b1 100644 --- a/extension/saved_searches/environments-admin-bypass.json +++ b/extension/saved_searches/environments-admin-bypass.json @@ -1,4 +1,5 @@ { + "query_key": "GH_environments_admin_bypass", "name": "GitHub: Environments Where Admins Can Bypass Protections", "query": "MATCH p=(:GH_Repository)-[:GH_Contains]->(env:GH_Environment {can_admins_bypass: true})\nRETURN p\nLIMIT 1000", "description": "Finds deployment environments where administrators can bypass protection rules such as required reviewers and wait timers. Admins can deploy to these environments without any approval." diff --git a/extension/saved_searches/expired-pats.json b/extension/saved_searches/expired-pats.json index c29fe767..69d8f5a3 100644 --- a/extension/saved_searches/expired-pats.json +++ b/extension/saved_searches/expired-pats.json @@ -1,4 +1,5 @@ { + "query_key": "GH_expired_pats", "name": "GitHub: Expired Personal Access Tokens", "query": "MATCH (token)\nWHERE (token:GH_PersonalAccessToken AND token.token_expired = true) OR (token:GH_ClassicPersonalAccessToken AND token.credential_state = 'expired')\nOPTIONAL MATCH p=(:GH_User)-[:GH_HasPersonalAccessToken]->(token)\nRETURN token, p\nLIMIT 1000", "description": "Finds expired fine-grained and classic personal access tokens, including tokens whose owner could not be resolved. Expired tokens should be cleaned up to reduce credential inventory and audit noise." diff --git a/extension/saved_searches/external-identities-without-scim.json b/extension/saved_searches/external-identities-without-scim.json index 805b85fe..9910bb3c 100644 --- a/extension/saved_searches/external-identities-without-scim.json +++ b/extension/saved_searches/external-identities-without-scim.json @@ -1,4 +1,5 @@ { + "query_key": "GH_external_identities_without_scim", "name": "GitHub: External Identities Without SCIM Provisioning", "query": "MATCH (ei:GH_ExternalIdentity)\nWHERE ei.scim_identity_username = ''\nRETURN ei\nLIMIT 1000", "description": "Finds external identities that lack SCIM synchronization. Without SCIM, user deprovisioning in the identity provider will not automatically revoke GitHub access." diff --git a/extension/saved_searches/github-to-azure-identity.json b/extension/saved_searches/github-to-azure-identity.json index f1e6c2e3..2a567593 100644 --- a/extension/saved_searches/github-to-azure-identity.json +++ b/extension/saved_searches/github-to-azure-identity.json @@ -1,4 +1,5 @@ { + "query_key": "GH_github_to_azure_identity", "name": "GitHub: GitHub-to-Azure Identity Assumptions", "query": "MATCH p=(src)-[:GH_CanAssumeIdentity]->(cred:AZFederatedIdentityCredential)\nRETURN p\nLIMIT 1000", "description": "Finds GitHub entities (repositories, branches, environments) that can assume Azure identities via OIDC federation. Verify that each trust relationship is intentional and scoped appropriately." diff --git a/extension/saved_searches/global-repo-perms.json b/extension/saved_searches/global-repo-perms.json index 4eda5899..b4a94332 100644 --- a/extension/saved_searches/global-repo-perms.json +++ b/extension/saved_searches/global-repo-perms.json @@ -1,4 +1,5 @@ { + "query_key": "GH_global_repo_perms", "name": "GitHub: Global Repo Permissions", "query": "MATCH p=(:GH_User)-[:GH_HasBaseRole|GH_HasRole|GH_MemberOf*1..3]->(role:GH_OrgRole)\nWHERE role.short_name CONTAINS 'all_repo_'\nRETURN p\nLIMIT 1000", "description": "Returns all users who hold a global repository permission role (i.e., roles that are not default)." diff --git a/extension/saved_searches/hybrid-identities.json b/extension/saved_searches/hybrid-identities.json index 756adc96..d540f6ee 100644 --- a/extension/saved_searches/hybrid-identities.json +++ b/extension/saved_searches/hybrid-identities.json @@ -1,4 +1,5 @@ { + "query_key": "GH_hybrid_identities", "name": "GitHub: External Identities", "query": "MATCH p=(s)-[]->(d:GH_User)\nWHERE s:AZUser\nOR s:Okta_User\nRETURN p\nLIMIT 1000", "description": "Returns all external identities (e.g., Azure or Okta users) that are associated with GitHub users." diff --git a/extension/saved_searches/members-can-change-repo-visibility.json b/extension/saved_searches/members-can-change-repo-visibility.json index 9e2289ab..6af4bdca 100644 --- a/extension/saved_searches/members-can-change-repo-visibility.json +++ b/extension/saved_searches/members-can-change-repo-visibility.json @@ -1,4 +1,5 @@ { + "query_key": "GH_members_can_change_repo_visibility", "name": "GitHub: Members Can Change Repository Visibility", "query": "MATCH (org:GH_Organization {members_can_change_repo_visibility: true})\nRETURN org\nLIMIT 1000", "description": "Finds organizations where members can change repository visibility. This allows any member to make a private repository public, potentially exposing source code and secrets." diff --git a/extension/saved_searches/members-can-create-pages.json b/extension/saved_searches/members-can-create-pages.json index 2ddad3ac..aabfb1d3 100644 --- a/extension/saved_searches/members-can-create-pages.json +++ b/extension/saved_searches/members-can-create-pages.json @@ -1,4 +1,5 @@ { + "query_key": "GH_members_can_create_pages", "name": "GitHub: Members Can Create GitHub Pages", "query": "MATCH (org:GH_Organization {members_can_create_pages: true})\nRETURN org\nLIMIT 1000", "description": "Finds organizations where members can create GitHub Pages sites. Pages can be used to host phishing content, data exfiltration endpoints, or other malicious resources." diff --git a/extension/saved_searches/members-can-create-public-repos.json b/extension/saved_searches/members-can-create-public-repos.json index 01619414..64d570cf 100644 --- a/extension/saved_searches/members-can-create-public-repos.json +++ b/extension/saved_searches/members-can-create-public-repos.json @@ -1,4 +1,5 @@ { + "query_key": "GH_members_can_create_public_repos", "name": "GitHub: Members Can Create Public Repositories", "query": "MATCH (org:GH_Organization {members_can_create_public_repositories: true})\nRETURN org\nLIMIT 1000", "description": "Finds organizations where members can create internet-facing public repositories. This increases the risk of accidental exposure of proprietary code or secrets." diff --git a/extension/saved_searches/members-can-delete-repos.json b/extension/saved_searches/members-can-delete-repos.json index a5dde562..4855fea7 100644 --- a/extension/saved_searches/members-can-delete-repos.json +++ b/extension/saved_searches/members-can-delete-repos.json @@ -1,4 +1,5 @@ { + "query_key": "GH_members_can_delete_repos", "name": "GitHub: Members Can Delete Repositories", "query": "MATCH (org:GH_Organization {members_can_delete_repositories: true})\nRETURN org\nLIMIT 1000", "description": "Finds organizations where members can delete repositories. This poses a risk of accidental or malicious destruction of code and audit history." diff --git a/extension/saved_searches/members-can-fork-private-repos.json b/extension/saved_searches/members-can-fork-private-repos.json index a05d24be..ab576057 100644 --- a/extension/saved_searches/members-can-fork-private-repos.json +++ b/extension/saved_searches/members-can-fork-private-repos.json @@ -1,4 +1,5 @@ { + "query_key": "GH_members_can_fork_private_repos", "name": "GitHub: Members Can Fork Private Repositories", "query": "MATCH (org:GH_Organization {members_can_fork_private_repositories: true})\nRETURN org\nLIMIT 1000", "description": "Finds organizations where members can fork private repositories to personal accounts. Forked copies leave organizational control and oversight." diff --git a/extension/saved_searches/members-can-invite-outside-collaborators.json b/extension/saved_searches/members-can-invite-outside-collaborators.json index c722138d..148e264c 100644 --- a/extension/saved_searches/members-can-invite-outside-collaborators.json +++ b/extension/saved_searches/members-can-invite-outside-collaborators.json @@ -1,4 +1,5 @@ { + "query_key": "GH_members_can_invite_outside_collaborators", "name": "GitHub: Members Can Invite Outside Collaborators", "query": "MATCH (org:GH_Organization {members_can_invite_outside_collaborators: true})\nRETURN org\nLIMIT 1000", "description": "Finds organizations where any member can invite external users. This can lead to unauthorized third-party access to repositories without centralized oversight." diff --git a/extension/saved_searches/org-owners.json b/extension/saved_searches/org-owners.json index 1ea106de..075f74de 100644 --- a/extension/saved_searches/org-owners.json +++ b/extension/saved_searches/org-owners.json @@ -1,4 +1,5 @@ { + "query_key": "GH_org_owners", "name": "GitHub: Organization Owners", "query": "MATCH p=(:GH_User)-[:GH_HasRole]->(:GH_OrgRole {short_name:'owners'})\nRETURN p\nLIMIT 1000", "description": "Returns all users who hold the organization owners role." diff --git a/extension/saved_searches/orgs-without-2fa.json b/extension/saved_searches/orgs-without-2fa.json index d305de7a..68f85f03 100644 --- a/extension/saved_searches/orgs-without-2fa.json +++ b/extension/saved_searches/orgs-without-2fa.json @@ -1,4 +1,5 @@ { + "query_key": "GH_orgs_without_2fa", "name": "GitHub: Organizations without 2FA", "query": "MATCH (o:GH_Organization)\nWHERE o.two_factor_requirement_enabled = false\nRETURN o\nLIMIT 1000", "description": "Returns organizations that do not require two-factor authentication." diff --git a/extension/saved_searches/pats-all-repo-access.json b/extension/saved_searches/pats-all-repo-access.json index ad650495..466cb8df 100644 --- a/extension/saved_searches/pats-all-repo-access.json +++ b/extension/saved_searches/pats-all-repo-access.json @@ -1,4 +1,5 @@ { + "query_key": "GH_pats_all_repo_access", "name": "GitHub: PATs with Access to All Repositories", "query": "MATCH p=(:GH_User)-[:GH_HasPersonalAccessToken]->(token:GH_PersonalAccessToken {repository_selection: 'all'})\nRETURN p\nLIMIT 1000", "description": "Finds fine-grained personal access tokens scoped to all repositories. A single compromised token grants access to every repository in the organization." diff --git a/extension/saved_searches/pending-pat-requests.json b/extension/saved_searches/pending-pat-requests.json index 4c60b2b0..36a1b075 100644 --- a/extension/saved_searches/pending-pat-requests.json +++ b/extension/saved_searches/pending-pat-requests.json @@ -1,4 +1,5 @@ { + "query_key": "GH_pending_pat_requests", "name": "GitHub: Pending PAT Requests", "query": "MATCH p=(:GH_User)-[:GH_HasPersonalAccessTokenRequest]->(req:GH_PersonalAccessTokenRequest)\nRETURN p\nLIMIT 1000", "description": "Finds pending fine-grained personal access token requests awaiting approval. Review these to ensure requested permissions are appropriate before granting access." diff --git a/extension/saved_searches/private-repos-forking-allowed.json b/extension/saved_searches/private-repos-forking-allowed.json index 2c75fbb1..8512e64a 100644 --- a/extension/saved_searches/private-repos-forking-allowed.json +++ b/extension/saved_searches/private-repos-forking-allowed.json @@ -1,4 +1,5 @@ { + "query_key": "GH_private_repos_forking_allowed", "name": "GitHub: Private Repositories with Forking Allowed", "query": "MATCH (repo:GH_Repository {visibility: 'private', allow_forking: true})\nRETURN repo\nLIMIT 1000", "description": "Finds private repositories that allow forking. Forked copies of private repositories can leave organizational governance and visibility." diff --git a/extension/saved_searches/privileged-custom-org-roles.json b/extension/saved_searches/privileged-custom-org-roles.json index 367a9bd9..c7300561 100644 --- a/extension/saved_searches/privileged-custom-org-roles.json +++ b/extension/saved_searches/privileged-custom-org-roles.json @@ -1,4 +1,5 @@ { + "query_key": "GH_privileged_custom_org_roles", "name": "GitHub: Privileged Custom Org Roles", "query": "MATCH p=(role:GH_OrgRole {type:'custom'})-[r]->(dest)\nWHERE dest:GH_Organization\nOR dest:GH_OrgRole\nRETURN p\nLIMIT 1000", "description": "Returns all custom organization roles that are privileged (i.e., have permissions that are not default)" diff --git a/extension/saved_searches/privileged-hybrid-identities.json b/extension/saved_searches/privileged-hybrid-identities.json index daff24a1..16f3e51b 100644 --- a/extension/saved_searches/privileged-hybrid-identities.json +++ b/extension/saved_searches/privileged-hybrid-identities.json @@ -1,4 +1,5 @@ { + "query_key": "GH_privileged_hybrid_identities", "name": "GitHub: Privileged Hybrid Identities", "query": "MATCH p=()-[:GH_SyncedTo]->(:GH_User)-[:GH_HasRole]->(:GH_OrgRole {short_name:'owners'})\nRETURN p\nLIMIT 1000", "description": "Returns all hybrid identities (e.g., Azure or Okta users) that are associated with GitHub users who hold the organization owners role." diff --git a/extension/saved_searches/public-repos.json b/extension/saved_searches/public-repos.json index 4ea897b8..9d1518cb 100644 --- a/extension/saved_searches/public-repos.json +++ b/extension/saved_searches/public-repos.json @@ -1,4 +1,5 @@ { + "query_key": "GH_public_repos", "name": "GitHub: Public Repositories", "query": "MATCH (repo:GH_Repository {private: false})\nRETURN repo\nLIMIT 1000", "description": "Returns all public repositories." diff --git a/extension/saved_searches/push-protection-disabled-new-repos.json b/extension/saved_searches/push-protection-disabled-new-repos.json index 269fa14d..cc7778c5 100644 --- a/extension/saved_searches/push-protection-disabled-new-repos.json +++ b/extension/saved_searches/push-protection-disabled-new-repos.json @@ -1,4 +1,5 @@ { + "query_key": "GH_push_protection_disabled_new_repos", "name": "GitHub: Secret Scanning Push Protection Disabled for New Repositories", "query": "MATCH (org:GH_Organization {secret_scanning_push_protection_enabled_for_new_repositories: false})\nRETURN org\nLIMIT 1000", "description": "Finds organizations where push protection is not enabled for new repositories. Without push protection, secrets can be committed without being blocked before they reach the repository." diff --git a/extension/saved_searches/push-to-protected-branches.json b/extension/saved_searches/push-to-protected-branches.json index dc147e0d..94fba148 100644 --- a/extension/saved_searches/push-to-protected-branches.json +++ b/extension/saved_searches/push-to-protected-branches.json @@ -1,4 +1,5 @@ { + "query_key": "GH_push_to_protected_branches", "name": "GitHub: Users Who Can Push to Protected Branches", "query": "MATCH p=(actor)-[:GH_RestrictionsCanPush]->(rule:GH_BranchProtectionRule)-[:GH_ProtectedBy]->(branch:GH_Branch)\nRETURN p\nLIMIT 1000", "description": "Finds users and teams that are allowed to push directly to protected branches when push restrictions are enabled. These actors bypass the normal pull request workflow." diff --git a/extension/saved_searches/repos-secret-scanning-disabled.json b/extension/saved_searches/repos-secret-scanning-disabled.json index c4becc5f..25386f50 100644 --- a/extension/saved_searches/repos-secret-scanning-disabled.json +++ b/extension/saved_searches/repos-secret-scanning-disabled.json @@ -1,4 +1,5 @@ { + "query_key": "GH_repos_secret_scanning_disabled", "name": "GitHub: Repositories with Secret Scanning Disabled", "query": "MATCH (repo:GH_Repository {secret_scanning: 'disabled'})\nRETURN repo\nLIMIT 1000", "description": "Finds repositories where secret scanning is disabled. Committed credentials in these repositories will not be detected by GitHub." diff --git a/extension/saved_searches/repos-vulnerable-to-workflow-secret-exfil.json b/extension/saved_searches/repos-vulnerable-to-workflow-secret-exfil.json index 0c56df14..20441674 100644 --- a/extension/saved_searches/repos-vulnerable-to-workflow-secret-exfil.json +++ b/extension/saved_searches/repos-vulnerable-to-workflow-secret-exfil.json @@ -1,4 +1,5 @@ { + "query_key": "GH_repos_vulnerable_to_workflow_secret_exfil", "name": "GitHub: Repos Vulnerable to Workflow Secret Exfiltration", "query": "MATCH p1=(:GH_User)-[:GH_HasRole|GH_HasBaseRole|GH_MemberOf*1..]->(:GH_RepoRole)-[:GH_CanCreateBranch]->(repo:GH_Repository)-[:GH_HasSecret|GH_ScopedTo*1..2]->(s)\nWHERE (s:GH_RepoSecret\nOR s:GH_OrgSecret)\nOPTIONAL MATCH p2=(repo)<-[:GH_CanCreateBranch]-(:GH_User)\nOPTIONAL MATCH p3=(repo)<-[:GH_CanCreateBranch]-(:GH_Team)<-[:GH_HasRole|GH_MemberOf|GH_AddMember*1..]-(:GH_User)\nRETURN p1, p2, p3\nLIMIT 1000", "description": "Secrets reachable by users who can create new branches. The GH_CanCreateBranch edge accounts for branch protection rules, push restrictions, blocks_creations settings, and all bypass mechanisms (admin, push_protected_branch, pushAllowances). Edges emit from RepoRole in the common case; per-actor edges from User/Team are only present when per-rule allowances grant additional access beyond the role." diff --git a/extension/saved_searches/repository-workflows.json b/extension/saved_searches/repository-workflows.json index c349625e..4c28a678 100644 --- a/extension/saved_searches/repository-workflows.json +++ b/extension/saved_searches/repository-workflows.json @@ -1,4 +1,5 @@ { + "query_key": "GH_repository_workflows", "name": "GitHub: Repository Workflows", "query": "MATCH p=(:GH_Repository)-[:GH_Contains]->(:GH_Workflow)\nRETURN p\nLIMIT 1000", "description": "Returns all repository workflows" diff --git a/extension/saved_searches/saml-configuration.json b/extension/saved_searches/saml-configuration.json index 33a0f1cd..fef00c28 100644 --- a/extension/saved_searches/saml-configuration.json +++ b/extension/saved_searches/saml-configuration.json @@ -1,4 +1,5 @@ { + "query_key": "GH_saml_configuration", "name": "GitHub: SAML Configuration Mapping", "query": "MATCH p=(OIP:GH_SamlIdentityProvider)-[:GH_HasExternalIdentity]->(EI:GH_ExternalIdentity)\nMATCH p1=(OIP)<-[:GH_HasSamlIdentityProvider]-(:GH_Organization)\nMATCH p2=(EI)-[:GH_MapsToUser]->()\nRETURN p,p1,p2\nLIMIT 1000", "description": "Finds SAML Identity Providers, their external identities, and mapped users." diff --git a/extension/saved_searches/secret-scanning-alerts.json b/extension/saved_searches/secret-scanning-alerts.json index 4cb0801a..80d38641 100644 --- a/extension/saved_searches/secret-scanning-alerts.json +++ b/extension/saved_searches/secret-scanning-alerts.json @@ -1,4 +1,5 @@ { + "query_key": "GH_secret_scanning_alerts", "name": "GitHub: Secret Scanning Alerts", "query": "MATCH p=(repo:GH_Repository)-[:GH_Contains]->(:GH_SecretScanningAlert {state:'open'})\nRETURN p\nLIMIT 1000", "description": "Returns all repositories that have secret scanning alerts." diff --git a/extension/saved_searches/secret-scanning-disabled-new-repos.json b/extension/saved_searches/secret-scanning-disabled-new-repos.json index 42ca05af..fbececd3 100644 --- a/extension/saved_searches/secret-scanning-disabled-new-repos.json +++ b/extension/saved_searches/secret-scanning-disabled-new-repos.json @@ -1,4 +1,5 @@ { + "query_key": "GH_secret_scanning_disabled_new_repos", "name": "GitHub: Secret Scanning Disabled for New Repositories", "query": "MATCH (org:GH_Organization {secret_scanning_enabled_for_new_repositories: false})\nRETURN org\nLIMIT 1000", "description": "Finds organizations where secret scanning is not automatically enabled for new repositories. New repositories will not detect committed credentials until manually enabled." diff --git a/extension/saved_searches/secrets-reachable-by-user.json b/extension/saved_searches/secrets-reachable-by-user.json index 3a2bd859..51e463b1 100644 --- a/extension/saved_searches/secrets-reachable-by-user.json +++ b/extension/saved_searches/secrets-reachable-by-user.json @@ -1,4 +1,5 @@ { + "query_key": "GH_secrets_reachable_by_user", "name": "GitHub: Secrets Reachable by User", "query": "MATCH p=(:GH_User)-[:GH_HasRole|GH_HasBaseRole|GH_MemberOf*1..]->(:GH_RepoRole)-[:GH_WriteRepoContents]->(:GH_Repository)-[:GH_HasSecret|GH_ScopedTo*1..2]->(s)\nWHERE s:GH_RepoSecret\nOR s:GH_OrgSecret\nRETURN p\nLIMIT 1000", "description": "Returns all repo and org secrets reachable by users through write access. Users with write access can create GitHub Actions workflows to access secrets." diff --git a/extension/saved_searches/self-hosted-runners-can-intercept-broad-token-jobs.json b/extension/saved_searches/self-hosted-runners-can-intercept-broad-token-jobs.json index f47717c8..5fef71f5 100644 --- a/extension/saved_searches/self-hosted-runners-can-intercept-broad-token-jobs.json +++ b/extension/saved_searches/self-hosted-runners-can-intercept-broad-token-jobs.json @@ -1,4 +1,5 @@ { + "query_key": "GH_self_hosted_runners_can_intercept_broad_token_jobs", "name": "GitHub: Self-Hosted Runners Can Intercept Broad-Token Jobs", "query": "MATCH p=(runner:GH_Runner)-[:GH_CanInterceptJob]->(job:GH_WorkflowJob)\nWHERE 'contents:write' IN job.effective_github_token_permissions\nOR 'actions:write' IN job.effective_github_token_permissions\nOR 'pull-requests:write' IN job.effective_github_token_permissions\nRETURN p\nLIMIT 1000", "description": "Returns self-hosted runners that can intercept workflow jobs whose effective GITHUB_TOKEN has high-impact write permissions. These jobs can materially increase the blast radius of runner compromise." diff --git a/extension/saved_searches/shared-self-hosted-runners-can-intercept-secret-bearing-jobs.json b/extension/saved_searches/shared-self-hosted-runners-can-intercept-secret-bearing-jobs.json index deb8fcf4..0ce217d2 100644 --- a/extension/saved_searches/shared-self-hosted-runners-can-intercept-secret-bearing-jobs.json +++ b/extension/saved_searches/shared-self-hosted-runners-can-intercept-secret-bearing-jobs.json @@ -1,4 +1,5 @@ { + "query_key": "GH_shared_self_hosted_runners_can_intercept_secret_bearing_jobs", "name": "GitHub: Shared Self-Hosted Runners Can Intercept Secret-Bearing Jobs", "query": "MATCH p=(runner:GH_Runner)-[:GH_CanInterceptJob]->(job:GH_WorkflowJob)-[:GH_CanAccessSecret]->(secret:GH_Secret)\nWHERE runner:GH_OrgRunner\nOR runner:GH_EnterpriseRunner\nRETURN p\nLIMIT 1000", "description": "Returns organization- and enterprise-scoped self-hosted runners that can intercept workflow jobs with statically resolvable secret access. Shared runners are especially important to review because compromise can expose execution contexts across multiple repositories." diff --git a/extension/saved_searches/team-membership-admin.json b/extension/saved_searches/team-membership-admin.json index 35614adf..14d41b17 100644 --- a/extension/saved_searches/team-membership-admin.json +++ b/extension/saved_searches/team-membership-admin.json @@ -1,4 +1,5 @@ { + "query_key": "GH_team_membership_admin", "name": "GitHub: Team Membership Admins", "query": "MATCH p=(:GH_User)-[:GH_HasRole]->(:GH_TeamRole)-[:GH_AddMember]->(team:GH_Team)\nMATCH p1=(team)<-[:GH_MemberOf]-(:GH_Team)<-[:GH_AddMember]-(:GH_TeamRole)<-[:GH_HasRole]-(:GH_User)\nRETURN p,p1\nLIMIT 1000", "description": "Returns all users who hold the maintainer role over a team, this also represents team nesting." diff --git a/extension/saved_searches/team-structure.json b/extension/saved_searches/team-structure.json index 34695e14..90c25801 100644 --- a/extension/saved_searches/team-structure.json +++ b/extension/saved_searches/team-structure.json @@ -1,4 +1,5 @@ { + "query_key": "GH_team_structure", "name": "GitHub: Team Structure", "query": "MATCH p=(:GH_User)-[:GH_HasRole]->(:GH_TeamRole)-[:GH_MemberOf*1..]->(team)\nWHERE team:GH_Team OR team:GH_EnterpriseTeam\nRETURN p\nLIMIT 1000", "description": "Returns the structure of teams within organizations, including team roles and their members." diff --git a/extension/saved_searches/unprotected-branches.json b/extension/saved_searches/unprotected-branches.json index 6db0b41c..775036e5 100644 --- a/extension/saved_searches/unprotected-branches.json +++ b/extension/saved_searches/unprotected-branches.json @@ -1,4 +1,5 @@ { + "query_key": "GH_unprotected_branches", "name": "GitHub: Unprotected Branches", "query": "MATCH p=(repo:GH_Repository)-[:GH_Contains]-(:GH_Branch {protected: false})\nRETURN p\nLIMIT 1000", "description": "Returns all unprotected branches in repositories." diff --git a/extension/saved_searches/unprotected-default-branch-with-workflow.json b/extension/saved_searches/unprotected-default-branch-with-workflow.json index 7e566dce..90e77b00 100644 --- a/extension/saved_searches/unprotected-default-branch-with-workflow.json +++ b/extension/saved_searches/unprotected-default-branch-with-workflow.json @@ -1,4 +1,5 @@ { + "query_key": "GH_unprotected_default_branch_with_workflow", "name": "GitHub: Repositories with Workflows and Unprotected Default Branch", "query": "MATCH p=(repo:GH_Repository)-[:GH_Contains]->(:GH_Workflow)\nMATCH p1=(repo)-[:GH_Contains]->(branch:GH_Branch)\nWHERE repo.default_branch = branch.short_name\nAND branch.protected = false\nRETURN p1\nLIMIT 1000", "description": "Returns all repositories that have GitHub Actions workflows and an unprotected default branch. This means that users with GH_WriteRepoContents to the Repository can overwrite or change the workflow." diff --git a/extension/saved_searches/unprotected-default-branches.json b/extension/saved_searches/unprotected-default-branches.json index 7defa37f..a80e684f 100644 --- a/extension/saved_searches/unprotected-default-branches.json +++ b/extension/saved_searches/unprotected-default-branches.json @@ -1,4 +1,5 @@ { + "query_key": "GH_unprotected_default_branches", "name": "GitHub: Unprotected Default Branches", "query": "MATCH p=(repo:GH_Repository)-[:GH_Contains]-(branch:GH_Branch {protected: false})\nWHERE repo.default_branch = branch.short_name\nRETURN p\nLIMIT 1000", "description": "Returns all default branches in repositories that are not protected." diff --git a/extension/saved_searches/web-commit-signoff-not-required.json b/extension/saved_searches/web-commit-signoff-not-required.json index 896d383c..e46552d7 100644 --- a/extension/saved_searches/web-commit-signoff-not-required.json +++ b/extension/saved_searches/web-commit-signoff-not-required.json @@ -1,4 +1,5 @@ { + "query_key": "GH_web_commit_signoff_not_required", "name": "GitHub: Web Commit Signoff Not Required", "query": "MATCH (org:GH_Organization {web_commit_signoff_required: false})\nRETURN org\nLIMIT 1000", "description": "Finds organizations that do not require sign-off for web-based commits. Without signoff, commit attribution cannot be verified." diff --git a/extension/saved_searches/workflow-jobs-interceptable-by-self-hosted-runners.json b/extension/saved_searches/workflow-jobs-interceptable-by-self-hosted-runners.json index c88845d2..a496fc75 100644 --- a/extension/saved_searches/workflow-jobs-interceptable-by-self-hosted-runners.json +++ b/extension/saved_searches/workflow-jobs-interceptable-by-self-hosted-runners.json @@ -1,4 +1,5 @@ { + "query_key": "GH_workflow_jobs_interceptable_by_self_hosted_runners", "name": "GitHub: Workflow Jobs Interceptable by Self-Hosted Runners", "query": "MATCH p=(runner:GH_Runner)-[:GH_CanInterceptJob]->(job:GH_WorkflowJob)\nRETURN p\nLIMIT 1000", "description": "Returns workflow jobs whose future execution context may be exposed to an actor controlling a collected self-hosted runner that is not explicitly marked ephemeral." diff --git a/extension/saved_searches/workflow-jobs-with-broad-token-write-permissions.json b/extension/saved_searches/workflow-jobs-with-broad-token-write-permissions.json index b50d2ab8..036a19d7 100644 --- a/extension/saved_searches/workflow-jobs-with-broad-token-write-permissions.json +++ b/extension/saved_searches/workflow-jobs-with-broad-token-write-permissions.json @@ -1,4 +1,5 @@ { + "query_key": "GH_workflow_jobs_with_broad_token_write_permissions", "name": "GitHub: Workflow Jobs with Broad GITHUB_TOKEN Write Permissions", "query": "MATCH p=(repo:GH_Repository)-[:GH_Contains]->(:GH_Workflow)-[:GH_Contains]->(job:GH_WorkflowJob)\nWHERE 'contents:write' IN job.effective_github_token_permissions\nOR 'actions:write' IN job.effective_github_token_permissions\nOR 'pull-requests:write' IN job.effective_github_token_permissions\nRETURN p\nLIMIT 1000", "description": "Returns workflow jobs whose calculated effective GITHUB_TOKEN permissions include write access to repository contents, Actions, or pull requests. These permissions can materially increase the impact of workflow compromise." diff --git a/extension/saved_searches/workflow-jobs-with-id-token-write-on-self-hosted-runners.json b/extension/saved_searches/workflow-jobs-with-id-token-write-on-self-hosted-runners.json index 50eea1c4..cd1e40bd 100644 --- a/extension/saved_searches/workflow-jobs-with-id-token-write-on-self-hosted-runners.json +++ b/extension/saved_searches/workflow-jobs-with-id-token-write-on-self-hosted-runners.json @@ -1,4 +1,5 @@ { + "query_key": "GH_workflow_jobs_with_id_token_write_on_self_hosted_runners", "name": "GitHub: OIDC-Capable Workflow Jobs Interceptable by Self-Hosted Runners", "query": "MATCH p=(runner:GH_Runner)-[:GH_CanInterceptJob]->(job:GH_WorkflowJob)\nWHERE 'id-token:write' IN job.effective_github_token_permissions\nRETURN p\nLIMIT 1000", "description": "Returns OIDC-capable workflow jobs whose execution context may be exposed to an actor controlling a collected self-hosted runner that is not explicitly marked ephemeral. These jobs are especially important to review because runner compromise could expose short-lived cloud federation tokens." diff --git a/extension/saved_searches/workflow-jobs-with-id-token-write.json b/extension/saved_searches/workflow-jobs-with-id-token-write.json index 4302a657..29f24778 100644 --- a/extension/saved_searches/workflow-jobs-with-id-token-write.json +++ b/extension/saved_searches/workflow-jobs-with-id-token-write.json @@ -1,4 +1,5 @@ { + "query_key": "GH_workflow_jobs_with_id_token_write", "name": "GitHub: Workflow Jobs with OIDC Token Permission", "query": "MATCH p=(repo:GH_Repository)-[:GH_Contains]->(:GH_Workflow)-[:GH_Contains]->(job:GH_WorkflowJob)\nWHERE 'id-token:write' IN job.effective_github_token_permissions\nRETURN p\nLIMIT 1000", "description": "Returns workflow jobs whose calculated effective GITHUB_TOKEN permissions include id-token:write. These jobs can request GitHub OIDC tokens, though additional step analysis is needed to determine whether the token is actually used." diff --git a/extension/saved_searches/workflow-jobs-with-observed-oidc-auth-steps.json b/extension/saved_searches/workflow-jobs-with-observed-oidc-auth-steps.json index 7bd654b4..d5608623 100644 --- a/extension/saved_searches/workflow-jobs-with-observed-oidc-auth-steps.json +++ b/extension/saved_searches/workflow-jobs-with-observed-oidc-auth-steps.json @@ -1,4 +1,5 @@ { + "query_key": "GH_workflow_jobs_with_observed_oidc_auth_steps", "name": "GitHub: Workflow Jobs with Observed OIDC Authentication Steps", "query": "MATCH p=(repo:GH_Repository)-[:GH_Contains]->(:GH_Workflow)-[:GH_Contains]->(job:GH_WorkflowJob)-[:GH_Contains]->(step:GH_WorkflowStep)\nWHERE 'id-token:write' IN job.effective_github_token_permissions\nAND (\n step.action_slug = 'aws-actions/configure-aws-credentials'\n OR step.action_slug = 'azure/login'\n OR step.action_slug = 'Azure/login'\n OR step.action_slug = 'actions/deploy-pages'\n OR step.contents CONTAINS 'getIDToken'\n OR step.contents CONTAINS 'ACTIONS_ID_TOKEN_REQUEST_URL'\n OR step.contents CONTAINS 'ACTIONS_ID_TOKEN_REQUEST_TOKEN'\n)\nRETURN p\nLIMIT 1000", "description": "Returns OIDC-capable workflow jobs with direct descendant steps that show likely OIDC token consumption, including common AWS, Azure, GitHub Pages, and direct token-request patterns. This is evidence of likely use, not a complete classifier for every possible OIDC consumer; reusable workflow callers may require following GH_CallsWorkflow to find the consuming steps."