fix(github): solve Github APP auth method (#8529)

This commit is contained in:
Sergio Garcia
2025-08-18 02:35:19 -04:00
committed by GitHub
parent 39e4d20b24
commit fd833eecf0
7 changed files with 60 additions and 7 deletions
@@ -135,6 +135,7 @@ class TestGitHubProvider:
"prowler.providers.github.github_provider.GithubProvider.setup_identity",
return_value=GithubAppIdentityInfo(
app_id=APP_ID,
installations=["test-org"],
),
),
):
@@ -147,7 +148,9 @@ class TestGitHubProvider:
assert provider._type == "github"
assert provider.session == GithubSession(token="", id=APP_ID, key=APP_KEY)
assert provider.identity == GithubAppIdentityInfo(app_id=APP_ID)
assert provider.identity == GithubAppIdentityInfo(
app_id=APP_ID, installations=["test-org"]
)
assert provider._audit_config == {
"inactive_not_archived_days_threshold": 180,
}
@@ -206,7 +209,9 @@ class TestGitHubProvider:
),
patch(
"prowler.providers.github.github_provider.GithubProvider.setup_identity",
return_value=GithubAppIdentityInfo(app_id=APP_ID),
return_value=GithubAppIdentityInfo(
app_id=APP_ID, installations=["test-org"]
),
),
):
connection = GithubProvider.test_connection(