Prepare and test your skills

Prepare and test your skills

Free sample question with answers and detailed explanation below. The Professional Cloud Developer practice bank has an additional 608 practice questions.Try 10 free realistic questions: instant score, no credit card, and no account required.
Your team runs an e-commerce web application on Google Kubernetes Engine (GKE) and executes a Web Security Scanner custom scan in a staging environment. The scan reports three findings:
XSS: Confirmed script execution in a product review input field.OUTDATED_LIBRARY: Flags a client-side JavaScript library to which your team previously applied a manual security patch.XSS_ERROR: Triggered on a search query parameter where the application enforces strict input length limits.How should your team evaluate and remediate these findings to follow secure coding practices?
XSS_ERROR finding as an unrelated client-side syntax bug, rely solely on a Content Security Policy (CSP) header instead of output escaping for XSS, and ignore OUTDATED_LIBRARY because Web Security Scanner suppresses all false positives.This approach treats XSS_ERROR alerts as harmless browser errors, relies exclusively on HTTP response headers such as Content Security Policy (CSP) for XSS mitigation, and assumes OUTDATED_LIBRARY findings are never false positives.
XSS_ERROR occurs when the application modifies an injected test string—such as truncating it—causing a JavaScript execution error in the browser. It still indicates an underlying injection flaw that might become exploitable if an attacker bypasses those input constraints.OUTDATED_LIBRARY relies on signature-based version detection, which can trigger false positives when a library is manually patched.XSS_ERROR findings require manual testing to confirm whether input modifications can be evaded.This option is flawed on multiple technical facts, though implementing a strict CSP header alongside output escaping would be a recommended complementary defense against cross-site scripting.
When verifying XSS findings with a Reproduction URL, strict CSP enforcement can sometimes block the benign test popup in the browser; checking the browser developer console helps confirm whether CSP blocked execution while the underlying injection bug remains.
XSS finding by implementing contextual auto-escaping on output, manually verify if the XSS_ERROR input restrictions can be evaded, and check whether the OUTDATED_LIBRARY alert is a false positive from manual patching before upgrading to a supported secure version.This strategy applies a risk-based triage and secure coding workflow to Web Security Scanner findings. It prioritizes confirmed, actively exploitable cross-site scripting (XSS) vulnerabilities while properly investigating potential injection bugs (XSS_ERROR) and signature-based library alerts (OUTDATED_LIBRARY).
XSS with secure coding: Confirming the flaw via the Reproduction URL and applying contextual auto-escaping in the application's templating system eliminates the root cause of XSS by ensuring untrusted user input cannot execute as browser script.XSS_ERROR: Because XSS_ERROR indicates that user input reached a JavaScript context but broke after application modification (such as truncation), manually testing whether those length limits or filters can be evaded determines real exploitability.OUTDATED_LIBRARY: Web Security Scanner uses signature-based detection to match client-side libraries against known vulnerable versions. Verifying whether the manual patch addressed the CVE—and planning an upgrade to an officially maintained version—prevents wasted effort on false positives while avoiding technical debt.Unlike approaches that rely solely on perimeter controls, ignore XSS_ERROR alerts, or substitute container image scanners, this workflow directly fixes insecure application code, accurately handles Web Security Scanner detection mechanics, and ensures long-term maintainability.
INACTIVE.This approach attempts to mitigate web vulnerabilities strictly at the network perimeter using Google Cloud Armor, relies on Web Security Scanner managed scans for form-based re-testing, and expects Security Command Center to automatically clear resolved findings.
INACTIVE. Findings remain ACTIVE until manually updated.80 and 443) and never submit forms.The goal was to establish zero-configuration weekly baseline monitoring of unauthenticated public endpoints across an organization alongside an edge WAF layer—not to remediate form-based XSS vulnerabilities or manage Security Command Center finding states.
In the standalone Web Security Scanner view, resolved vulnerabilities disappear from new scan reports once fixed, even though Security Command Center keeps the finding ACTIVE until triaged.
XSS finding solely by enforcing maximum character limits on the product review field.Artifact Analysis performs static vulnerability scanning on container images stored in Artifact Registry to detect known CVEs in OS and system packages. Meanwhile, enforcing character length limits restricts input size without sanitizing or escaping dangerous characters.
XSS) and client-side JavaScript library issues.XSS exploit into an XSS_ERROR without removing the underlying injection flaw.The scenario asked how to automatically scan container base images and OS packages for known CVEs as soon as images are pushed to Artifact Registry prior to GKE deployment.
A robust shift-left security pipeline combines Artifact Analysis (and Binary Authorization attestations) for container image integrity with Web Security Scanner for dynamic web vulnerability testing on App Engine, Compute Engine, and GKE.
Answer them yourself and get your score the moment you finish. No account needed.
Full access includes
Keep the momentum going with these hand-picked practice scenarios
Last updated Validated