How to Timely Identify Secrets in Cloud Functions Environment Variables?
You are responsible for a set of Cloud Functions running on your organization's Google Cloud environment. During the last annual security review, secrets were identified in environment variables of some of these Cloud Functions. You must ensure that secrets are identified in a timely manner. What should you do?
Community Votes
70% of anonymous learners picked answer C. Votes are pick records left by other test-takers — they are not the verified answer.
Community Insight
Tests knowledge of native GCP secret discovery workflows versus manual or pipeline-only approaches, with the trap being CI/CD static or dynamic testing which misses runtime exposure.
This PCSE question addresses ongoing secret detection in Google Cloud Functions. The page establishes that Sensitive Data Protection is the native service for periodic environment variable scanning and Security Command Center integration.
Option D is frequently chosen due to overemphasis on CI/CD prevention, but it fails to address ongoing runtime identification and incorrectly suggests Dynamic Application Security Testing for this use case.
Community Discussion (6 comments)
Comments & Corrections
No comments yet — spotted an error or have a note? Share it below.
Expert Analysis
Why the Answer Is Correct
Sensitive Data Protection provides a native, scalable solution for continuous secret discovery across Google Cloud resources. By configuring a discovery scan, administrators can schedule periodic checks against Cloud Functions environment variables, ensuring timely detection of newly injected credentials. When a match occurs, the service automatically generates a finding in Security Command Center, fulfilling the requirement for ongoing visibility without manual intervention.Why the Other Options Are Wrong
Option A relies on manual peer reviews, which are inherently slow and cannot satisfy a "timely manner" requirement. Option B suggests building a custom Cloud Function to perform scanning, which unnecessarily duplicates existing managed capabilities and increases operational overhead. Option D focuses exclusively on the CI/CD pipeline, meaning it only catches secrets before deployment while ignoring runtime exposures, and incorrectly recommends Dynamic Application Security Testing for credential detection.Community Comment Notes
Several learners initially favored the CI/CD approach, arguing that preventing secrets from entering production is ideal. However, the group consensus shifted once participants recognized that the prompt specifically demands ongoing identification rather than build-time blocking. As dv1 noted, "Question asks for secret identification, not blocking," which directly aligns with scheduled scanning. Verified documentation also confirms that Sensitive Data Protection natively supports this exact workflow for environment variables.Official Reference
Exam Strategy
Focus on native GCP services for continuous compliance and monitoring rather than custom scripts or build-time checks. Always match the question's timeframe to automated, scheduled cloud-native solutions.
Frequently Asked Questions
Why isn't CI/CD secret scanning sufficient for this scenario?
CI/CD only validates code before deployment, missing runtime injections or post-deployment changes. Scheduled scanning covers the entire lifecycle.
Can Sensitive Data Protection replace manual peer reviews?
Yes, it automates continuous discovery across organizations and projects, eliminating human error and ensuring consistent, timely reporting.