Conversation
There was a problem hiding this comment.
Code Review
This pull request updates GCPUtils.loadServiceAccountCredentials to load credentials using ServiceAccountCredentials.fromStream instead of GoogleCredentials.fromStream and adds corresponding unit tests. The feedback suggests enhancing the positive test case by asserting that the returned credentials are an instance of ServiceAccountCredentials to ensure the security fix is explicitly verified.
04bc968 to
354a90a
Compare
|
/gemini review |
1 similar comment
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request updates the loadServiceAccountCredentials method in GCPUtils to return ServiceAccountCredentials instead of GoogleCredentials, preventing the loading of non-service-account credentials. A new test class GCPUtilsTest has been added to validate this behavior with both positive and negative test cases. I have no feedback to provide.
|
The changes in this pull request correctly address the identified security vulnerability by restricting credential parsing to |
There was a problem hiding this comment.
Code Review
This pull request updates GCPUtils to load credentials specifically as ServiceAccountCredentials instead of the generic GoogleCredentials to mitigate potential external account payload attacks, and introduces unit tests to verify this behavior. The review feedback suggests programmatically generating a dummy RSA keypair at runtime in the test instead of hardcoding a static private key string, which prevents triggering automated credential scanners in CI/CD pipelines.
354a90a to
e1c02fe
Compare
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request updates GCPUtils.loadServiceAccountCredentials to load credentials using ServiceAccountCredentials.fromStream instead of the generic GoogleCredentials.fromStream to prevent loading arbitrary external account credentials. Additionally, a new test class GCPUtilsTest has been added to verify both positive and negative scenarios for loading service account credentials. No review comments were provided, so there is no feedback to address.
Emit a WARN audit log in GCPUtils.loadServiceAccountCredentials whenever the credentials supplied via the service account file path / JSON are not of type 'service_account' (e.g. external_account, authorized_user), so that any such usage can be identified. No behaviour change.
ab79f09 to
dc17146
Compare
This PR updates
GCPUtils.loadServiceAccountCredentialsto emit aWARNaudit log whenever the credentials supplied (via file path or JSON) are not of the standardservice_accounttype (e.g.,external_account,authorized_user,impersonated_service_account).There is no change to existing credential parsing behavior.