Conversation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a new AI-category challenge demonstrating that an MCP server configured with an overly-privileged Google Service Account allows callers to read Google Drive documents they are not directly authorized to access — a real-world privilege escalation pattern seen widely in agent/MCP deployments.
Challenge design
/mcp62exposes a singleread_google_drive_documenttoolGOOGLE_SERVICE_ACCOUNT_KEY, base64-encoded JSON key) and returns the document's plain-text contentWRONGSECRETS_MCP_GOOGLEDRIVE_SECRETNew env vars (all defaulted in
application.properties)GOOGLE_SERVICE_ACCOUNT_KEYGOOGLE_DRIVE_DOCUMENT_IDWRONGSECRETS_MCP_GOOGLEDRIVE_SECRETImplementation notes
ServiceAccountCredentialsfromgoogle-auth-library-oauth2-http(already a transitive dep viagoogle-cloud-secretmanager) — no new dependencies added@Autowiredon the primary constructor disambiguates Spring injection from the package-private test constructorOperator setup
docs/CHALLENGE62_GOOGLE_DRIVE_SETUP.mdcovers end-to-end: create GCP project → enable Drive API → create service account → share document → encode key → configure env vars.Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
checkstyle.org/opt/hostedtoolcache/CodeQL/2.24.3/x64/codeql/tools/linux64/java/bin/java /opt/hostedtoolcache/CodeQL/2.24.3/x64/codeql/tools/linux64/java/bin/java -jar /opt/hostedtoolcache/CodeQL/2.24.3/x64/codeql/xml/tools/xml-extractor.jar --fileList=/tmp/codeql-scratch-54b93b06a133b0d9/dbs/java/working/files-to-index3796442728103403313.list --sourceArchiveDir=/tmp/codeql-scratch-54b93b06a133b0d9/dbs/java/src --outputDir=/tmp/codeql-scratch-54b93b06a133b0d9/dbs/java/trap/java --global nfig/composer/ve/home/REDACTED/work/wrongsecrets/wrongsecrets/src/test/java/org/owasp/wrongsecretsc21324bbeaa5380a50a9b7265f9930c251045693:src/main/resources/explanations/challenge62_hint.adoc credential.userngit(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.