Google Professional Cloud Developer exam dumps

Google Professional Cloud Developer practice question 252 of 481

Professional Cloud Developer. Professional level, Google Cloud. Free question with the correct answer and a full explanation.

Google Professional Cloud Developer Question 252

Select 3Google Cloud Platform

You are tasked with building a secure container image for your application to be deployed on Google Kubernetes Engine (GKE). Which steps should you take to ensure the container image is secure?

  1. A

    Use a minimal base image such as distroless or alpine to reduce the attack surface.

  2. B

    Store sensitive information such as database credentials in environment variables within the Dockerfile.

  3. C

    Scan the container image for known vulnerabilities using tools like Google Cloud Container Analysis.

  4. D

    Run the application in the container as a non-root user.

  5. E

    Embed hard-coded secrets in the application code to simplify deployment.

Show answer and explanation

Correct answers: A, C, D

Explanation

To create secure container images, follow best practices such as minimizing the base image to reduce vulnerabilities, scanning images for known issues, and running containers as non-root users. Avoid insecure practices like hard-coding secrets or storing sensitive information in Dockerfiles. These steps help ensure your containerized application is secure and compliant with cloud security standards.

  • A. Correct.

    Using minimal base images such as distroless or alpine reduces the attack surface by minimizing unnecessary packages and libraries, which could contain vulnerabilities.

  • B. Incorrect.

    Storing sensitive information like database credentials directly in the Dockerfile or environment variables is a security risk, as these can be exposed in image layers or logs.

  • C. Correct.

    Scanning the container image for known vulnerabilities is a critical step to ensure that the image does not contain any known security flaws. Tools like Google Cloud Container Analysis can help automate this process.

  • D. Correct.

    Running the application as a non-root user helps reduce the impact of potential container breaches by limiting access and privileges.

  • E. Incorrect.

    Embedding hard-coded secrets in the application code is highly insecure and violates best practices for secret management. Using secret management tools like Google Secret Manager is recommended instead.

Timed practice exam

Take a Google Professional Cloud Developer practice test under exam conditions

60 questions in 120 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam