openhound-github 0.14.0__py3-none-any.whl → 0.14.2.dev2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- openhound_github/graph.py +10 -0
- openhound_github/main.py +1 -1
- openhound_github/models/scim_user.py +4 -5
- {openhound_github-0.14.0.dist-info → openhound_github-0.14.2.dev2.dist-info}/METADATA +1 -1
- {openhound_github-0.14.0.dist-info → openhound_github-0.14.2.dev2.dist-info}/RECORD +8 -8
- {openhound_github-0.14.0.dist-info → openhound_github-0.14.2.dev2.dist-info}/WHEEL +0 -0
- {openhound_github-0.14.0.dist-info → openhound_github-0.14.2.dev2.dist-info}/entry_points.txt +0 -0
- {openhound_github-0.14.0.dist-info → openhound_github-0.14.2.dev2.dist-info}/licenses/LICENSE.md +0 -0
openhound_github/graph.py
CHANGED
|
@@ -4,6 +4,9 @@ from openhound.core.models.entries_dataclass import EdgeProperties
|
|
|
4
4
|
from openhound.core.models.entries_dataclass import Node as BaseNode
|
|
5
5
|
from openhound.core.models.entries_dataclass import NodeProperties as BaseProperties
|
|
6
6
|
|
|
7
|
+
GITHUB_SOURCE_KIND = "GitHub"
|
|
8
|
+
SAML_SOURCE_KIND = "SAML"
|
|
9
|
+
|
|
7
10
|
|
|
8
11
|
@dataclass
|
|
9
12
|
class GHNodeProperties(BaseProperties):
|
|
@@ -22,6 +25,13 @@ class GHNode(BaseNode):
|
|
|
22
25
|
# Use GitHub's native node_id as the OpenGraph node id so edges can
|
|
23
26
|
# reference nodes by the same identifier used during collection.
|
|
24
27
|
self.id = self.properties.node_id
|
|
28
|
+
source_kind = (
|
|
29
|
+
SAML_SOURCE_KIND
|
|
30
|
+
if any(kind.startswith("SAML_") for kind in self.kinds)
|
|
31
|
+
else GITHUB_SOURCE_KIND
|
|
32
|
+
)
|
|
33
|
+
if source_kind not in self.kinds:
|
|
34
|
+
self.kinds.append(source_kind)
|
|
25
35
|
|
|
26
36
|
|
|
27
37
|
@dataclass
|
openhound_github/main.py
CHANGED
|
@@ -8,7 +8,7 @@ from openhound.core.preproc import PreProcContext
|
|
|
8
8
|
from .lookup import GithubLookup
|
|
9
9
|
from .transforms import transforms
|
|
10
10
|
|
|
11
|
-
app = OpenHound("github",
|
|
11
|
+
app = OpenHound("github", help="OpenGraph collector for GitHub")
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
@app.collect()
|
|
@@ -23,6 +23,8 @@ from openhound_github.kinds import nodes as nk
|
|
|
23
23
|
from openhound_github.main import app
|
|
24
24
|
from openhound_github.models.saml_helpers import detect_foreign_idp
|
|
25
25
|
|
|
26
|
+
SCIM_SOURCE_KIND = "SCIM"
|
|
27
|
+
|
|
26
28
|
|
|
27
29
|
def scim_organization_id(scope_node_id: str) -> str:
|
|
28
30
|
return f"SCIM_Organization_{scope_node_id}"
|
|
@@ -40,7 +42,6 @@ class ScimNodeProperties(NodeProperties):
|
|
|
40
42
|
profile_url: str | None = None
|
|
41
43
|
enterprise: str | None = None
|
|
42
44
|
organization: str | None = None
|
|
43
|
-
source_kind: str | None = None
|
|
44
45
|
|
|
45
46
|
|
|
46
47
|
@dataclass
|
|
@@ -48,7 +49,8 @@ class ScimNode(Node):
|
|
|
48
49
|
id: str
|
|
49
50
|
|
|
50
51
|
def __post_init__(self):
|
|
51
|
-
|
|
52
|
+
if SCIM_SOURCE_KIND not in self.kinds:
|
|
53
|
+
self.kinds.append(SCIM_SOURCE_KIND)
|
|
52
54
|
|
|
53
55
|
|
|
54
56
|
class Name(BaseModel):
|
|
@@ -128,7 +130,6 @@ class ScimOrganization(ScimScopeAsset):
|
|
|
128
130
|
environmentid=self.scope_node_id,
|
|
129
131
|
enterprise=self.enterprise_slug,
|
|
130
132
|
organization=self.org_login,
|
|
131
|
-
source_kind="GitHub",
|
|
132
133
|
),
|
|
133
134
|
)
|
|
134
135
|
|
|
@@ -210,7 +211,6 @@ class ScimUser(ScimScopeAsset):
|
|
|
210
211
|
profile_url=self.meta.location if self.meta else None,
|
|
211
212
|
enterprise=self.enterprise_slug,
|
|
212
213
|
organization=self.org_login,
|
|
213
|
-
source_kind="GitHub",
|
|
214
214
|
),
|
|
215
215
|
)
|
|
216
216
|
|
|
@@ -306,7 +306,6 @@ class ScimGroup(ScimScopeAsset):
|
|
|
306
306
|
external_id=self.external_id,
|
|
307
307
|
enterprise=self.enterprise_slug,
|
|
308
308
|
organization=self.org_login,
|
|
309
|
-
source_kind="GitHub",
|
|
310
309
|
),
|
|
311
310
|
)
|
|
312
311
|
|
|
@@ -2,11 +2,11 @@ openhound_github/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,
|
|
|
2
2
|
openhound_github/auth.py,sha256=fO0vEdpJIEHXUgF6rP_sZf_k7gMTa9jMFbZbKBw38Dg,10106
|
|
3
3
|
openhound_github/github_rest_client.py,sha256=WnrUIbkHFEepAZSdIAFBeyeSkoumbWT_FiPjBZsoyqk,115
|
|
4
4
|
openhound_github/github_retry.py,sha256=j4VJ-VWLE-s-PO9wPRPVkRkJdv4SCOR3HWvaywzsUJk,1325
|
|
5
|
-
openhound_github/graph.py,sha256=
|
|
5
|
+
openhound_github/graph.py,sha256=7PApox9Uk88xav9ilwYDa1fLv0FBduuENRPDiudUgv0,1306
|
|
6
6
|
openhound_github/graphql.py,sha256=QQpom5MHAu4Yw153mifxOI5N_Ou_GvJ7eRlbCN7XW5g,10796
|
|
7
7
|
openhound_github/helpers.py,sha256=xQmYyzVpG73lebbyhUdT73EAi2YPk9_s4d_Korqh054,16149
|
|
8
8
|
openhound_github/lookup.py,sha256=6TxoW9FYNpZpir0ncH40uULRo80_WBozibpbObDS4_k,47436
|
|
9
|
-
openhound_github/main.py,sha256=
|
|
9
|
+
openhound_github/main.py,sha256=5DWn8LyKtsA2Yktm6RQzsGOiJbrPgn0ESRe3KBsrOzM,3993
|
|
10
10
|
openhound_github/runner_ids.py,sha256=rlAi0Fz2xUMcb4s7YQGqL2csHVaLdZP-vMxDpoPgHo8,478
|
|
11
11
|
openhound_github/source.py,sha256=kSr8OiDd3q1UaEr2Uo358hd9W-_e1_PDU13QoUQtwBg,17878
|
|
12
12
|
openhound_github/transforms.py,sha256=qXagoTMMnQ6CjSI-XVf_HcXAsqZKJTns5ZW9KOz-ffY,22945
|
|
@@ -61,7 +61,7 @@ openhound_github/models/saml_helpers.py,sha256=9YUckYOI_LkZ4pQfc559_enk2-mIR9Zhf
|
|
|
61
61
|
openhound_github/models/saml_issuer.py,sha256=335ra0YiHZhI7kwAuAdSnZSxxUP_Q1DY-iaagGM8s_0,4089
|
|
62
62
|
openhound_github/models/saml_provider.py,sha256=4jDEDqN_ZVncQglPIfOr1Lfxczlc1NkhZvHxzeAAOuI,5202
|
|
63
63
|
openhound_github/models/saml_service_provider.py,sha256=FqD1jpAwANC_HTc1D90x1d6q3CbzF06aEN5fTcmx6iM,4712
|
|
64
|
-
openhound_github/models/scim_user.py,sha256=
|
|
64
|
+
openhound_github/models/scim_user.py,sha256=YqqVElZxOMYT2ZytpWW58QaMCV1VZaYzso7r_3h00Rs,11610
|
|
65
65
|
openhound_github/models/secret_scanning_alert.py,sha256=nElFrnrqzjm9uMmkvRs1-_eQxAAbTGfnCzKQYjB3Ib4,9330
|
|
66
66
|
openhound_github/models/team.py,sha256=l9ZT3DBzAHE9DbYRHcus3nI7iUM45-Ef_DiTm5i1pzU,8385
|
|
67
67
|
openhound_github/models/team_member.py,sha256=YgSvClbaVGsPQW0rMeXRWWb1aRYfzCa4GxnjmihcSig,1668
|
|
@@ -75,8 +75,8 @@ openhound_github/resources/__init__.py,sha256=jGuYogLtrEsUP3neBw41YZeC1yAOV3tDIz
|
|
|
75
75
|
openhound_github/resources/enterprise.py,sha256=qDdctdmg2nACGlUmgBEnE-zV7Yebov_MEunAHJxiX1U,34749
|
|
76
76
|
openhound_github/resources/organization.py,sha256=fVmPxA5GYiVs4im5262X76RMJ_32MXTe0RdBOmxGTk4,89765
|
|
77
77
|
openhound_github/extension.yaml,sha256=iqEqiG14paSzaH7xISg7oy9PviLGHSMvEYOallBpKw0,706
|
|
78
|
-
openhound_github-0.14.
|
|
79
|
-
openhound_github-0.14.
|
|
80
|
-
openhound_github-0.14.
|
|
81
|
-
openhound_github-0.14.
|
|
82
|
-
openhound_github-0.14.
|
|
78
|
+
openhound_github-0.14.2.dev2.dist-info/METADATA,sha256=oygwwuxk6C-5r25xpCtJrUXDGa3Lxp_2q_ZNYcziHyc,6366
|
|
79
|
+
openhound_github-0.14.2.dev2.dist-info/WHEEL,sha256=zOwg4jB6zX2kU910N-cMawjivD6tO8NEWvE12je1bVk,87
|
|
80
|
+
openhound_github-0.14.2.dev2.dist-info/entry_points.txt,sha256=dn_0GC3hAM9jAcn81NhGSZK_vQtKEazxGRfXcaNJQsA,55
|
|
81
|
+
openhound_github-0.14.2.dev2.dist-info/licenses/LICENSE.md,sha256=hl-6dfjqiqdl-iWur-TsJegvxJxByg2rZ7DmjsVZ1pI,10802
|
|
82
|
+
openhound_github-0.14.2.dev2.dist-info/RECORD,,
|
|
File without changes
|
{openhound_github-0.14.0.dist-info → openhound_github-0.14.2.dev2.dist-info}/entry_points.txt
RENAMED
|
File without changes
|
{openhound_github-0.14.0.dist-info → openhound_github-0.14.2.dev2.dist-info}/licenses/LICENSE.md
RENAMED
|
File without changes
|