Ensure that CodeBuild GitHub or Bitbucket source repository URLs use OAuth instead of personal access tokens for authorization. To prevent unauthorized access, Amazon CodeBuild integrates with OAuth to provide secure authorization to the GitHub/Bitbucket repositories configured as code sources for CodeBuild build projects.
Securing sign-in credentials is vital when it comes to protecting sensitive information. Under no circumstances should these credentials ever be stored or transmitted in plain, readable text, nor should they be visible in the repository URL. To enhance security, it is recommended to adopt OAuth as the preferred method for granting authorization to access GitHub or Bitbucket repositories. Relying on personal access tokens or sign-in credentials could potentially expose your sensitive data to unintended breaches and unauthorized access, compromising your account's safety.
Audit
To determine if CodeBuild GitHub or Bitbucket source repository URLs use OAuth, perform the following actions:
Remediation / Resolution
To ensure that CodeBuild GitHub/Bitbucket source repository URLs use OAuth for authorization, perform the following actions:
OAUTH connections are not currently supported by the AWS CLI and must be created using the Amazon CodeBuild console.References
- AWS Documentation
- AWS CodeBuild FAQs
- Access your source provider in CodeBuild
- Change a build project's settings in AWS CodeBuild
- Change a build project's settings (console)
- Change a build project's settings (AWS CLI)
- AWS Command Line Interface (CLI) Documentation
- list-projects
- list-source-credentials