From f3e9a99aa8dd296e5d1e7030d18e5d642b0fdc69 Mon Sep 17 00:00:00 2001 From: JonasBK Date: Thu, 3 Sep 2026 09:18:55 +0200 Subject: [PATCH 1/2] update og-docs submodule --- docs/og-docs-automation | 2 +- docs/og-docs.json | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/og-docs-automation b/docs/og-docs-automation index 400bd30..eef9c15 160000 --- a/docs/og-docs-automation +++ b/docs/og-docs-automation @@ -1 +1 @@ -Subproject commit 400bd3010e6b106b77991ad6eb2eb586cb627862 +Subproject commit eef9c158b509470209cc08c912c176432ed596ee diff --git a/docs/og-docs.json b/docs/og-docs.json index 59a9d65..c00c958 100644 --- a/docs/og-docs.json +++ b/docs/og-docs.json @@ -1,6 +1,7 @@ { "extensionSchemaPath": "extension/schema.json", "extensionShortName": "GitHub", + "collectorName": "github", "gitHubBaseUrl": "https://github.com/SpecterOps/openhound-github", "stripTitlePrefix": "GitHub: ", "savedSearchesDir": "extension/saved_searches", From 6964b3a2c9659dd3a2ab7a1e25ee75a7a76c7a8c Mon Sep 17 00:00:00 2001 From: JonasBK Date: Thu, 3 Sep 2026 09:19:57 +0200 Subject: [PATCH 2/2] fix modules causing docs gen to fail --- .../models/enterprise_role.py | 171 +++++++++++++++++- src/openhound_github/models/runner.py | 12 +- src/openhound_github/models/scim_user.py | 4 +- 3 files changed, 171 insertions(+), 16 deletions(-) diff --git a/src/openhound_github/models/enterprise_role.py b/src/openhound_github/models/enterprise_role.py index 2fae124..a9feba4 100644 --- a/src/openhound_github/models/enterprise_role.py +++ b/src/openhound_github/models/enterprise_role.py @@ -118,16 +118,167 @@ class GHEnterpriseRoleProperties(GHNodeProperties): description="Enterprise contains role", traversable=False, ), - *[ - EdgeDef( - start=nk.ENTERPRISE_ROLE, - end=nk.ENTERPRISE, - kind=edge_kind, - description=f"Enterprise role has {permission} capability", - traversable=traversable, - ) - for permission, (edge_kind, traversable) in ENTERPRISE_PERMISSION_EDGES.items() - ], + EdgeDef( + start=nk.ENTERPRISE_ROLE, + end=nk.ENTERPRISE, + kind=ek.CREATE_ENTERPRISE_ORGANIZATIONS, + description="Enterprise role has create_enterprise_organizations capability", + traversable=False, + ), + EdgeDef( + start=nk.ENTERPRISE_ROLE, + end=nk.ENTERPRISE, + kind=ek.EDIT_ENTERPRISE_CUSTOM_PROPERTIES_FOR_ORGANIZATIONS, + description="Enterprise role has edit_enterprise_custom_properties_for_organizations capability", + traversable=False, + ), + EdgeDef( + start=nk.ENTERPRISE_ROLE, + end=nk.ENTERPRISE, + kind=ek.MANAGE_ENTERPRISE_ADMINS, + description="Enterprise role has manage_enterprise_admins capability", + traversable=True, + ), + EdgeDef( + start=nk.ENTERPRISE_ROLE, + end=nk.ENTERPRISE, + kind=ek.MANAGE_ENTERPRISE_IDENTITY_PROVIDER, + description="Enterprise role has manage_enterprise_identity_provider capability", + traversable=False, + ), + EdgeDef( + start=nk.ENTERPRISE_ROLE, + end=nk.ENTERPRISE, + kind=ek.MANAGE_ENTERPRISE_MEMBERS, + description="Enterprise role has manage_enterprise_members capability", + traversable=True, + ), + EdgeDef( + start=nk.ENTERPRISE_ROLE, + end=nk.ENTERPRISE, + kind=ek.MANAGE_ENTERPRISE_ORGANIZATION_ADMINS, + description="Enterprise role has manage_enterprise_organization_admins capability", + traversable=True, + ), + EdgeDef( + start=nk.ENTERPRISE_ROLE, + end=nk.ENTERPRISE, + kind=ek.MANAGE_ENTERPRISE_ORGANIZATIONS, + description="Enterprise role has manage_enterprise_organizations capability", + traversable=False, + ), + EdgeDef( + start=nk.ENTERPRISE_ROLE, + end=nk.ENTERPRISE, + kind=ek.MANAGE_ENTERPRISE_REFERRALS, + description="Enterprise role has manage_enterprise_referrals capability", + traversable=False, + ), + EdgeDef( + start=nk.ENTERPRISE_ROLE, + end=nk.ENTERPRISE, + kind=ek.MANAGE_ENTERPRISE_TEAMS, + description="Enterprise role has manage_enterprise_teams capability", + traversable=False, + ), + EdgeDef( + start=nk.ENTERPRISE_ROLE, + end=nk.ENTERPRISE, + kind=ek.READ_ENTERPRISE_AUDIT_LOG, + description="Enterprise role has read_enterprise_audit_log capability", + traversable=False, + ), + EdgeDef( + start=nk.ENTERPRISE_ROLE, + end=nk.ENTERPRISE, + kind=ek.READ_ENTERPRISE_DOMAIN_VERIFICATION, + description="Enterprise role has read_enterprise_domain_verification capability", + traversable=False, + ), + EdgeDef( + start=nk.ENTERPRISE_ROLE, + end=nk.ENTERPRISE, + kind=ek.READ_ENTERPRISE_MEMBERS, + description="Enterprise role has read_enterprise_members capability", + traversable=False, + ), + EdgeDef( + start=nk.ENTERPRISE_ROLE, + end=nk.ENTERPRISE, + kind=ek.READ_ENTERPRISE_ORG_PROJECTS, + description="Enterprise role has read_enterprise_org_projects capability", + traversable=False, + ), + EdgeDef( + start=nk.ENTERPRISE_ROLE, + end=nk.ENTERPRISE, + kind=ek.READ_ENTERPRISE_ORGANIZATION_ADMIN, + description="Enterprise role has read_enterprise_organization_admin capability", + traversable=False, + ), + EdgeDef( + start=nk.ENTERPRISE_ROLE, + end=nk.ENTERPRISE, + kind=ek.SET_ENTERPRISE_INTERACTION_LIMITS, + description="Enterprise role has set_enterprise_interaction_limits capability", + traversable=False, + ), + EdgeDef( + start=nk.ENTERPRISE_ROLE, + end=nk.ENTERPRISE, + kind=ek.VIEW_ENTERPRISE_ACTIONS_USAGE_METRICS, + description="Enterprise role has view_enterprise_actions_usage_metrics capability", + traversable=False, + ), + EdgeDef( + start=nk.ENTERPRISE_ROLE, + end=nk.ENTERPRISE, + kind=ek.VIEW_ENTERPRISE_BILLING, + description="Enterprise role has view_enterprise_billing capability", + traversable=False, + ), + EdgeDef( + start=nk.ENTERPRISE_ROLE, + end=nk.ENTERPRISE, + kind=ek.VIEW_ENTERPRISE_SECRET_SCANNING_ALERTS, + description="Enterprise role has view_enterprise_secret_scanning_alerts capability", + traversable=False, + ), + EdgeDef( + start=nk.ENTERPRISE_ROLE, + end=nk.ENTERPRISE, + kind=ek.WRITE_ENTERPRISE_ACTIONS_POLICIES, + description="Enterprise role has write_enterprise_actions_policies capability", + traversable=False, + ), + EdgeDef( + start=nk.ENTERPRISE_ROLE, + end=nk.ENTERPRISE, + kind=ek.WRITE_ENTERPRISE_BILLING, + description="Enterprise role has write_enterprise_billing capability", + traversable=False, + ), + EdgeDef( + start=nk.ENTERPRISE_ROLE, + end=nk.ENTERPRISE, + kind=ek.WRITE_ENTERPRISE_PERSONAL_ACCESS_TOKEN_POLICIES, + description="Enterprise role has write_enterprise_personal_access_token_policies capability", + traversable=False, + ), + EdgeDef( + start=nk.ENTERPRISE_ROLE, + end=nk.ENTERPRISE, + kind=ek.WRITE_ENTERPRISE_SSO, + description="Enterprise role has write_enterprise_sso capability", + traversable=False, + ), + EdgeDef( + start=nk.ENTERPRISE_ROLE, + end=nk.ENTERPRISE, + kind=ek.WRITE_ENTERPRISE_TEAM_MEMBERS, + description="Enterprise role has write_enterprise_team_members capability", + traversable=False, + ), ], ) class EnterpriseRole(BaseAsset): diff --git a/src/openhound_github/models/runner.py b/src/openhound_github/models/runner.py index 9efe4f7..a810ae0 100644 --- a/src/openhound_github/models/runner.py +++ b/src/openhound_github/models/runner.py @@ -29,7 +29,7 @@ @dataclass class GHRunnerGroupProperties(GHNodeProperties): """Properties for GHRunnerGroupProperties. - + Attributes: scope: Whether the runner group is enterprise or organization scoped. group_id: The GitHub runner group ID. @@ -272,7 +272,9 @@ def edges(self): ) -@app.asset() +@app.asset( + description="Maps an enterprise runner group to an organization without emitting a node." +) class EnterpriseRunnerGroupOrganization(BaseAsset): node_id: str login: str | None = None @@ -296,7 +298,7 @@ def edges(self): @dataclass class GHRunnerProperties(GHNodeProperties): """Properties for GHRunnerProperties. - + Attributes: scope: Whether the runner is enterprise, organization, or repository scoped. runner_id: The GitHub runner ID. @@ -579,7 +581,9 @@ def _can_use_runner_repository_node_ids(self) -> list[str]: actions_enabled_repository_node_ids = { repository_node_id - for (repository_node_id,) in self._lookup.actions_enabled_repository_node_ids_for_org( + for ( + repository_node_id, + ) in self._lookup.actions_enabled_repository_node_ids_for_org( self.org_login ) } diff --git a/src/openhound_github/models/scim_user.py b/src/openhound_github/models/scim_user.py index 48d3fe4..fc9914b 100644 --- a/src/openhound_github/models/scim_user.py +++ b/src/openhound_github/models/scim_user.py @@ -137,7 +137,7 @@ def edges(self): return [] -@app.asset() +@app.asset(description="Represents enterprise-scoped SCIM organization input data.") class EnterpriseScimOrganization(ScimOrganization): """Enterprise-scoped SCIM organization input model. @@ -241,7 +241,7 @@ def edges(self): ) -@app.asset() +@app.asset(description="Represents enterprise-scoped SCIM user input data.") class EnterpriseScimUser(ScimUser): """Enterprise-scoped SCIM user input model."""