From 110f98e49d2b354345e5e5b4d13afa25ad3d3c50 Mon Sep 17 00:00:00 2001 From: "Andoni A." <14891798+andoniaf@users.noreply.github.com> Date: Thu, 31 Jul 2025 20:17:13 +0200 Subject: [PATCH] chore: update CHANGELOG --- prowler/CHANGELOG.md | 1 + prowler/providers/github/github_provider.py | 5 +---- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/prowler/CHANGELOG.md b/prowler/CHANGELOG.md index df8cf277a2..170c276727 100644 --- a/prowler/CHANGELOG.md +++ b/prowler/CHANGELOG.md @@ -24,6 +24,7 @@ All notable changes to the **Prowler SDK** are documented in this file. - Add missing audit evidence for controls 1.1.4 and 2.5.5 for ISMS-P compliance. [(#8386)](https://github.com/prowler-cloud/prowler/pull/8386) - Use the correct @staticmethod decorator for `set_identity` and `set_session_config` methods in AwsProvider [(#8056)](https://github.com/prowler-cloud/prowler/pull/8056) - Use the correct default value for `role_session_name` and `session_duration` in AwsSetUpSession [(#8056)](https://github.com/prowler-cloud/prowler/pull/8056) +- GitHub App authentication inconsistency where `--github-app-key` and `--github-app-key-path` were incorrectly aliased to the same parameter, causing confusion between file paths and key content [(#8422)](https://github.com/prowler-cloud/prowler/pull/8422) --- diff --git a/prowler/providers/github/github_provider.py b/prowler/providers/github/github_provider.py index 6e5bf9bd52..77f12f2fd5 100644 --- a/prowler/providers/github/github_provider.py +++ b/prowler/providers/github/github_provider.py @@ -306,16 +306,13 @@ class GithubProvider(Provider): env_key = environ.get("GITHUB_APP_KEY", "") if app_id and env_key: - # Smart detection: check if env_key is file path or key content + # Check if env_key is file path or key content if env_key.startswith("-----BEGIN"): - # It's key content app_key = format_rsa_key(env_key) elif os.path.isfile(env_key): - # It's a file path with open(env_key, "r") as rsa_key: app_key = rsa_key.read() else: - # Invalid format raise GithubEnvironmentVariableError( file=os.path.basename(__file__), message="GITHUB_APP_KEY must contain either RSA key content (starting with -----BEGIN) or a valid file path.",