The safest and simplest way to start Google Gruyere is the official hosted lab: open https://google-gruyere.appspot.com/start, wait for the redirect, and save the full instance URL containing the unique identifier.
The official setup guide states that each hosted instance is sandboxed from other users. You do not need Docker, Linux packages, Windows services, or a local Python installation to complete the codelab.
Official hosted start: https://google-gruyere.appspot.com/start After the redirect: https://google-gruyere.appspot.com/<unique-id>/
What Is Google Gruyere?
Google’s Web Application Exploits and Defenses codelab describes Gruyere as a small web application with intentional security bugs. It allows users to publish text snippets and store files while presenting training scenarios involving cross-site scripting, cross-site request forgery, information disclosure, denial of service, remote code execution, path traversal, client-state manipulation, and configuration weaknesses.
The OWASP Vulnerable Web Applications Directory lists Gruyere as a Google-authored Python application that supports black-box and white-box security education. The codelab combines hands-on tasks with explanations of how to fix or prevent the underlying problem.
Black-box learning
Observe application behavior, URLs, fields, cookies, requests, responses, and errors without relying on the implementation.
White-box learning
Read the source code to understand trust boundaries, validation failures, state handling, and defensive changes.
Defensive objective
The codelab explains not only how a flaw manifests, but also how safer code and design reduce the risk.
Deliberate isolation
Gruyere is vulnerable by design and should never be treated as a normal production application.
Official Google Gruyere Start, Download, and Source Resources
| Resource | What it provides | Recommended use |
|---|---|---|
| Official codelab | Training chapters, challenge context, hints, explanations, and defenses | Primary learning source |
| Official Appspot start page | Creates a unique hosted Gruyere instance | Best beginner setup |
| Official setup chapter | Hosted instance, local execution, source, reset, safety, and unique-ID guidance | Verify setup behavior |
| Official source browser | Online access to application files | White-box review without installing Python |
| Official source ZIP | Downloadable Gruyere source archive | Run only inside an isolated lab |
| Official gruyere.py source | Main Python 2.7 server and local safety controls | Confirm port, loopback, unique ID, and timeout behavior |
| Google Open Source Blog announcement | Original project background and educational purpose | Historical project context |
| OWASP VWAD listing | Independent directory entry for legal security training | Confirm project category and technology |
There is no official Google GitHub repository or official Google Docker image linked by the codelab. Search results that use “official Google Gruyere Docker” should therefore be answered carefully: Google provides the hosted lab and source code, while Docker packaging is community-maintained.
Start Google Gruyere on Appspot
1. Open the official start page
https://google-gruyere.appspot.com/start
2. Save the redirected URL
The official setup chapter says App Engine creates a new instance, assigns a unique ID, and redirects the browser. That identifier is part of the exercise URLs.
3. Keep the instance scoped to the codelab
Do not use the hosted environment for unrelated scanning, denial-of-service testing, automated traffic generation, or attacks outside the tasks described by Google.
4. Reset only your assigned instance
The codelab documents a reset mechanism for an instance that becomes unusable. Use the reset flow only for your own unique instance and follow the current official instructions.
Google Gruyere Login and First Session
Google Gruyere does not use one universal public username and password for the hosted lab. The official “Using Gruyere” section instructs learners to create an account inside their assigned instance and explicitly warns against reusing a password from a real service.
- Open the complete redirected instance URL.
- Select the sign-up option.
- Create a synthetic username and a password used only for the lab.
- Sign in to the same unique instance.
- Keep the instance URL and lab credentials out of public posts.
- Do not enter real personal, corporate, customer, or production information.
A disposable account makes the exercises easier to reset and prevents accidental credential reuse.
Google Gruyere Download and Source-Code Options
The official codelab supports source browsing and a source ZIP for white-box learning. It also says that local execution is optional; most learners can complete the lab through the hosted instance.
Browse source online
Use the official source-code browser to inspect files without installing an unsupported runtime.
Download the official ZIP
Use the official Gruyere archive for an isolated source-review or debugging environment.
Use the hosted lab
Follow the codelab and inspect the online source when local execution is unnecessary.
Respect the source notice
The official code contains usage and redistribution restrictions. Preserve notices and review the terms before modifying or sharing files.
Download from Linux or macOS
curl -fL -o gruyere-code.zip https://google-gruyere.appspot.com/gruyere-code.zip unzip gruyere-code.zip
Download from Windows PowerShell
Invoke-WebRequest ` -Uri "https://google-gruyere.appspot.com/gruyere-code.zip" ` -OutFile "gruyere-code.zip" Expand-Archive ` -Path "gruyere-code.zip" ` -DestinationPath "gruyere-source"
Verify that the URL is the official google-gruyere.appspot.com domain before opening or running the archive.
Google Gruyere and the Python 2.7 Limitation
The official local-run instructions say Gruyere was developed and tested with Python 2.7. The Python Software Foundation marks Python 2.7 as end-of-life since January 1, 2020.
| Option | Advantage | Limitation |
|---|---|---|
| Official hosted lab | No local Python installation | Requires browser access to the hosted service |
| Online source browser | Supports code review without execution | No local debugger or modified instance |
| Isolated Python 2.7 VM | Closest to official local instructions | Obsolete runtime with no security support |
| Community container image | Packages the old dependency stack | Not an official Google build and may be outdated |
| Community Python 3 fork | May run on a supported interpreter | May differ from the official codelab and licensing constraints |
For most readers, the best decision is to use the hosted lab. Local Python 2.7 execution should be limited to a disposable VM with no sensitive data, no shared browser session, and no external exposure.
Google Gruyere Docker: Official Status and Community Options
Google does not publish an official Gruyere Docker image in the codelab. The karthequian/gruyere Docker Hub repository is a community image. It can be useful for an isolated lab, but its publisher, build history, base image, architecture support, package age, and contents should be reviewed before use.
Review the image before running it
docker pull karthequian/gruyere docker image inspect karthequian/gruyere docker history karthequian/gruyere
Docker documents how to search Docker Hub, but search visibility does not make an image official or trusted. The image namespace should be evaluated independently from Google’s source distribution.
Local-only community Docker example
docker run --rm --name google-gruyere -p 127.0.0.1:8008:8008 karthequian/gruyere
Docker’s port-publishing documentation states that including 127.0.0.1 restricts access to the Docker host. Docker also warns that omitting a host IP publishes the port on all interfaces by default.
Stop and remove the lab
docker stop google-gruyere
Run Google Gruyere on Linux
The hosted lab works in a Linux browser without installation. For a local container, install Docker from current vendor documentation rather than an old copied package command.
| Linux platform | Official Docker source | Gruyere guidance |
|---|---|---|
| Ubuntu | Install Docker Engine on Ubuntu | Use a supported Ubuntu release and verify firewall behavior |
| RHEL | Install Docker Engine on RHEL | Follow current repository and service instructions |
| Other distributions | Use the matching official Docker Engine page | Do not assume Ubuntu commands apply unchanged |
Verify Docker before using a community image
docker --version docker run --rm hello-world
Run on Linux loopback
docker run --rm --name google-gruyere -p 127.0.0.1:8008:8008 karthequian/gruyere
Use a nonproduction workstation or VM, confirm the published address with docker port google-gruyere, and never change the mapping to a public interface for convenience.
Run Google Gruyere on Windows
The simplest Windows method is still the official hosted lab. A local Docker option requires Docker Desktop and a reviewed community image.
- Follow the current Docker Desktop for Windows installation guide.
- Use the recommended supported backend and confirm Docker Desktop is running.
- Open PowerShell.
- Inspect the community image before running it.
- Bind port 8008 only to
127.0.0.1. - Use a separate browser profile with no real credentials or active production sessions.
docker pull karthequian/gruyere docker run --rm ` --name google-gruyere ` -p 127.0.0.1:8008:8008 ` karthequian/gruyere
Open http://localhost:8008, then follow the redirected unique local path. If port 8008 is unavailable, map another host port while keeping the container port at 8008.
docker run --rm ` --name google-gruyere ` -p 127.0.0.1:8009:8008 ` karthequian/gruyere
Run the Official Google Gruyere Source Locally
The official local instructions use the downloaded source and Python 2.7. Because that runtime is unsupported, use a disposable VM created specifically for the lab.
cd <gruyere-directory> python2.7 gruyere.py
The official server source shows several deliberate local safeguards: it binds to 127.0.0.1, uses port 8008, creates a random identifier in the path, rejects requests from nonlocal addresses, and exits automatically after two hours. The source labels those controls as sections not to change.
Important local differences
- Use
localhost:8008instead of the Appspot hostname. - Use the random local unique ID shown by the server.
- The hosted App Engine sandbox can stop certain runaway behavior that may affect a local process differently.
- Close unrelated browser pages and avoid shared user sessions while the local vulnerable service runs.
- Do not modify the loopback, unique-ID, remote-address, or timeout safeguards.
Google Gruyere Troubleshooting
| Problem | What to check | Recommended response |
|---|---|---|
| The official start page does not redirect | Browser, network filtering, cookies, and service availability | Retry the official URL and preserve the redirect |
| The instance URL no longer works | Complete unique ID, accidental reset, or expired state | Create a fresh official instance |
localhost:8008 does not open |
Process state, logs, port mapping, and unique local path | Confirm the server output and published port |
| Port 8008 is already in use | Existing container or process | Use host port 8009 while keeping container port 8008 |
| Community container exits | docker logs google-gruyere and image architecture |
Review the image rather than disabling security controls |
| Python syntax or module errors | Interpreter version | Use the hosted lab or an isolated Python 2.7 environment |
| The codelab example does not match local paths | Hostname and unique-ID placement | Apply the local URL differences documented by Google |
| Lab data is damaged | Assigned instance and reset instructions | Reset only your own instance or recreate the container |
Google Gruyere Walkthrough: A Better Learning Method
The official codelab is organized by vulnerability family. A useful walkthrough should preserve the learning process rather than immediately reveal a payload or final solution.
- Read the vulnerability explanation. Identify the trust boundary and expected control.
- Map the feature. Record pages, fields, URLs, parameters, cookies, AJAX requests, and response behavior.
- State a hypothesis. Explain which assumption may be unsafe.
- Test only the assigned lab task. Do not broaden the activity to other hosts or services.
- Inspect the source when required. Connect the behavior to a specific design or implementation choice.
- Write the defensive fix. Focus on validation, encoding, authorization, state integrity, safe routing, resource limits, or configuration.
- Retest the intended behavior. A fix should block the unsafe path without breaking the legitimate feature.
Learning record: - Feature or route: - Trusted and untrusted data: - Expected security control: - Observed behavior: - Root cause: - Defensive change: - Regression test: - Runtime monitoring signal:
This structure turns the codelab into a secure-development exercise rather than a collection of copied solutions.
What Google Gruyere Teaches About Modern Web and API Security
Gruyere is an older application, but its core lessons remain relevant because modern APIs and single-page applications still depend on trust decisions involving identity, object access, state, input, output, browser behavior, server-side routing, and resource consumption.
| Gruyere lesson | Modern application or API connection | Runtime signal |
|---|---|---|
| Cross-site scripting | Unsafe HTML, template output, rich text, and client-side rendering | Unexpected markup, scripts, and response changes |
| Cross-site request forgery | Browser-authenticated state-changing operations | Origin, token, method, and sequence anomalies |
| Client-state manipulation | JWT, cookie, role, feature, price, and tenant claims | Identity and authorization inconsistencies |
| Path traversal | File APIs, object storage, import/export, and document services | Unexpected path patterns and file responses |
| Information disclosure | Verbose errors, excessive response fields, secrets, tokens, and PII | Sensitive-data detection in responses |
| Denial of service | Expensive queries, unbounded inputs, repeated workflows, and resource amplification | Latency, volume, identity, and endpoint-cost patterns |
| Configuration weaknesses | Debug routes, unsafe defaults, exposed admin functions, and missing hardening | Unexpected hosts, endpoints, methods, and error details |
For a wider comparison, see API security testing versus runtime monitoring and REST API endpoint security best practices.
Use Ammune to Observe an Authorized Google Gruyere Lab
Ammune can complement a local or authorized Gruyere environment by adding runtime API and HTTP traffic visibility. This should be done only inside the lab scope and without sending real data or credentials through the training application.
Traffic discovery
Observe hosts, paths, methods, parameters, AJAX requests, response codes, and feature flows.
Request and response context
Connect inputs with returned content, errors, latency, user state, and sensitive-data indicators.
Behavior analytics
Compare normal lab navigation with repeated failures, unusual sequences, automation, and resource-heavy actions.
SIEM-ready evidence
Forward normalized events for defensive triage, correlation, investigation, and remediation exercises.
Suggested defensive workshop flow
Official or isolated Gruyere instance → Normal navigation and account setup → Ammune runtime traffic learning → Authorized codelab exercise → Request and response evidence → Root-cause and remediation discussion → SIEM or incident workflow → Repeat the legitimate feature after the fix
Related Ammune resources include API runtime security protection, enterprise API monitoring best practices, real-time API threat detection, and the API security incident response playbook.
Google Gruyere Alternatives
| Training application | Best fit | Current official source |
|---|---|---|
| Google Gruyere | Compact web-security codelab with source review and defensive explanations | Google codelab |
| OWASP WebGoat | Guided lessons with explanations, assignments, and mitigation guidance | OWASP WebGoat |
| OWASP Juice Shop | Modern JavaScript application, REST APIs, gamified challenges, and CTF use | OWASP Juice Shop |
| OWASP crAPI | API authorization, business logic, microservices, and OWASP API Top 10 practice | OWASP crAPI |
| DVWA | Classic PHP web vulnerabilities with adjustable difficulty | Official DVWA repository |
| OWASP VWAD | Find additional legal vulnerable applications by technology and learning objective | OWASP Vulnerable Web Applications Directory |
Choose the lab based on the technology and defensive skill you want to learn. Gruyere remains useful for fundamentals; Juice Shop and crAPI provide stronger coverage of modern JavaScript and API-centric architectures.
Google Gruyere Setup and Safety Checklist
| Requirement | Verification | Desired outcome |
|---|---|---|
| Official source | Appspot codelab, start page, source browser, or source ZIP | No unrelated download site |
| Authorization | Your assigned hosted instance or isolated local environment | No third-party system testing |
| Network binding | 127.0.0.1 and port 8008 for local execution | No public or LAN exposure |
| Unique instance | Complete redirected or local URL with identifier | Exercises use the correct instance |
| Credentials | Synthetic lab account and unique password | No credential reuse |
| Data | Only synthetic snippets, files, and account details | No personal, corporate, or customer data |
| Python runtime | Hosted lab or isolated Python 2.7 VM | Unsupported runtime separated from normal work |
| Docker provenance | Publisher, image history, contents, digest, age, and architecture | Community image clearly identified and reviewed |
| Browser isolation | Dedicated profile with no production sessions | Reduced cross-site and credential risk |
| Cleanup | Stop container, close VM, delete disposable credentials and data | Lab is not left running |
| Monitoring | Approved proxy or API security visibility only inside scope | Defensive evidence without expanding the target |
| Learning record | Root cause, defensive change, regression test, and monitoring signal | Practical secure-development outcome |
Conclusion
The official Google Gruyere hosted lab is the best starting point: it creates a sandboxed instance, requires no local installation, and follows the original Web Application Exploits and Defenses codelab. The official source browser and ZIP support white-box learning when code inspection is needed.
Docker is not an official Google distribution path for Gruyere. Treat every Docker image as community packaging, inspect it before use, bind port 8008 to 127.0.0.1, and keep the lab disposable. The original source requires Python 2.7, which is end-of-life, so avoid installing it on a normal workstation.
Ammune can add runtime traffic visibility, behavior analytics, sensitive-data context, and SIEM-ready evidence to an authorized Gruyere workshop, helping teams connect each training flaw with modern web and API security operations.
Frequently Asked Questions About Google Gruyere
What is Google Gruyere?
Google Gruyere is an intentionally vulnerable web application used by Google’s Web Application Exploits and Defenses codelab. The lab teaches how common web vulnerabilities are found and how developers can defend against them in an authorized training environment.
How do I start Google Gruyere online?
Open the official Google Gruyere start page. The hosted service creates a sandboxed instance, assigns it a unique identifier, and redirects the browser to that instance. Save the complete redirected URL.
What is the official Google Gruyere Appspot start URL?
The official start URL is https://google-gruyere.appspot.com/start. The official setup guide identifies it as the normal way to create a hosted instance.
How does Google Gruyere login work?
Open the assigned instance, choose the sign-up option, and create a disposable lab account. The official codelab warns users not to reuse a password from a real service.
How do I download Google Gruyere?
Use the official Gruyere source archive or browse the official source-code directory. The original local instructions require Python 2.7, so use an isolated lab rather than installing the obsolete runtime on a normal workstation.
Does Google provide an official Gruyere Docker image?
No official Google Docker image is linked by the codelab. Docker Hub repositories such as karthequian/gruyere are community packaging, not Google releases. Review provenance, image history, contents, age, and network exposure before using one.
How can I run Google Gruyere with Docker?
After reviewing a community image, bind its port to the local loopback interface, for example docker run --rm --name google-gruyere -p 127.0.0.1:8008:8008 karthequian/gruyere. Docker documents that a localhost binding limits the published port to the Docker host.
How do I run Google Gruyere on Linux?
The recommended option is the official hosted lab. For Docker, install Docker through the current Ubuntu or RHEL instructions, review the community image, and publish port 8008 only to 127.0.0.1.
How do I run Google Gruyere on Windows?
Use the hosted lab in a browser or install Docker Desktop through the current official Windows guide. Run only a reviewed community image, publish port 8008 to 127.0.0.1, and keep the lab separate from real accounts and data.
Why does localhost:8008 not open?
Confirm that the process or container is running, inspect its logs, check the published port, and wait for the unique local instance URL. The official local instructions explain that localhost uses port 8008 and a random identifier in the path.
Does Google Gruyere include a walkthrough and solutions?
Yes. The official codelab is organized by vulnerability category and provides tasks, explanations, hints, and defensive guidance. Attempt each authorized exercise first and use the explanation to understand the failed trust boundary and remediation.
What are good Google Gruyere alternatives?
Current alternatives include OWASP WebGoat for guided Java lessons, OWASP Juice Shop for a modern JavaScript and REST API challenge application, OWASP crAPI for API-focused practice, and DVWA for classic web vulnerabilities.
Connect secure-development training with runtime API visibility
Use Ammune in an isolated, authorized lab to observe endpoints, requests, responses, behavior, sensitive data, and investigation evidence while developers work through Google Gruyere’s defensive lessons.
