Question

Difficulty: EasyAnalyzing Software Development Lifecycle (SDLC) and CI/CD Pipelines

A DevOps engineering team is evaluating their CI/CD pipeline in Google Cloud to ensure secure deployments to Google Kubernetes Engine (GKE). Which of the following security practices should the team incorporate into their software development lifecycle and Cloud Build pipeline? (Select TWO.)

  1. Configure Cloud Build triggers to execute using a dedicated user-managed service account granted only the specific IAM roles required for the build and deployment tasks.Answer
  2. Enable automated container image vulnerability scanning in Artifact Registry to detect security issues prior to deployment.Answer
  3. C
    Grant the primitive Owner role to the default Cloud Build service account to prevent permission failures during automated infrastructure deployment steps.
  4. D
    Download and commit a service account JSON private key directly into the application Git repository to authenticate Cloud Build steps.
  5. E
    Assign the Service Account Admin role to developers so they can impersonate the build service account during pipeline runs.

Answer

The team should configure Cloud Build to use a dedicated user-managed service account with minimal necessary permissions and enable container image vulnerability scanning in Artifact Registry.
Configuring Cloud Build to execute using a dedicated user-managed service account adhering to least privilege minimizes security exposure. Additionally, integrating automated container vulnerability scanning in Artifact Registry identifies security vulnerabilities early in the CI/CD pipeline.

Step-by-Step Solution

1
Analyze pipeline identity and IAM permissions management.
Create a dedicated user-managed service account with granular IAM roles rather than using primitive roles or hardcoded credentials.
Applying least privilege limits the blast radius of build pipelines.
2
Analyze artifact security within the CI/CD workflow.
Integrate Artifact Registry container vulnerability scanning into the release process.
Scanning images automatically detects vulnerabilities before deployment to GKE.

Key Concept

Securing CI/CD pipelines with least privilege service accounts and automated vulnerability scanning
Rate this question