Check ID:
Provider: AWS
Service:
Severity: MEDIUM
Categories:
Resource type:
codepipeline_project_repo_privateProvider: AWS
Service:
codepipelineSeverity: MEDIUM
Categories:
software-supply-chain, secretsResource type:
AwsCodePipelinePipelineWhat this check verifies
CodePipeline pipeline should configure its source stage to use a private repository with authenticated connection rather than a public GitHub or GitLab repository. This ensures deployment configurations, build artifacts, and CI/CD logic remain protected from unauthorized access.Risk
Using public repositories as pipeline sources exposes deployment configurations and CI/CD workflows to the internet, increasing risk of supply chain attacks, credential exposure, and intellectual property theft. Adversaries can inject malicious code or leverage exposed secrets to compromise production systems.Recommendation
Configure CodePipeline source stages to use private repositories with AWS CodeStar Connections for GitHub or GitLab. Apply least privilege to connection permissions, enable branch protection, require code review, use signed commits, and monitor pipeline execution logs. Consider AWS CodeCommit for fully managed private Git hosting with native IAM integration.Remediation
- CLI
- Terraform
- Native IaC
- Dashboard steps
aws codestar-connections create-connection —provider-type GitHub —connection-name my-github-connection
aws codepipeline update-pipeline —pipeline file://pipeline-config.json
References
- https://docs.aws.amazon.com/codepipeline/latest/userguide/welcome.html
- https://docs.aws.amazon.com/dtconsole/latest/userguide/connections.html
Where this check fires
This check runs on every scheduled scan against your AWS account. Findings appear at Cloud Security → Findings filterable byCheck ID = codepipeline_project_repo_private. To re-evaluate after a fix, hit Run now on the account’s schedule under Cloud Security → Schedules — the next scan re-checks this control and marks the finding fixed or keeps it persistent.
← Back to AWS checks