Control: AWS > PCI v3.2.1 > CodeBuild > 1 CodeBuild GitHub or Bitbucket source repository URLs should use OAuth
This control checks whether the GitHub or Bitbucket source repository URL contains either personal access tokens or a user name and password.
You can use CodeBuild in your PCI DSS environment to compile your source code, run unit tests, or produce artifacts that are ready to deploy. If you do, your authentication credentials should never be stored or transmitted in clear text or appear in the repository URL.
You should use OAuth instead of personal access tokens or a user name and password to grant authorization for accessing GitHub or Bitbucket repositories. This is a method to use strong cryptography to render authentication credentials unreadable.
Remediation
To remove basic authentication / (GitHub) Personal Access Token from CodeBuild Project Source
- Open the CodeBuild console
- Select your Build project that contains personal access tokens or a user name and password.
- From Edit, choose Source.
- Choose Disconnect from
GitHub / Bitbucket
. - Choose Connect using
OAuth
and then choose Connect toGitHub / Bitbucket
. - In the message displayed by your
source provider
, authorize as appropriate. - Reconfigure your Repository URL and additional configuration settings, as needed.
- Choose Update source.
PCI requirement(s): 8.2.1
Resource Types
This control targets the following resource types:
Category
In Your Workspace
Developers
- tmod:@turbot/aws-pciv3-2-1#/control/types/codeBuildProjectSourceRepoOauthConfigured
- tmod:@turbot/turbot#/control/categories/compliancePci
- turbot graphql controls --filter "controlTypeId:tmod:@turbot/aws-pciv3-2-1#/control/types/codeBuildProjectSourceRepoOauthConfigured"
Get Controls