The Simplest Way to Make Cloud Run and GitHub Codespaces Work Like They Should
Teams pair cloud run and github codespaces to build and ship container apps fast. Developers write code in a cloud editor and run containers on managed servers. This workflow removes local machine bugs and keeps builds consistent across the team. Engineers test changes in a remote dev box and push updates to staging. How cloud run and github codespaces share logins and data Each workspace runs inside a remote virtual machine tied to a GitHub user. That machine needs a cloud role to push imag
Your coding agents run with your access.
Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.
Teams pair cloud run and github codespaces to build and ship container apps fast. Developers write code in a cloud editor and run containers on managed servers.
This workflow removes local machine bugs and keeps builds consistent across the team. Engineers test changes in a remote dev box and push updates to staging.
How cloud run and github codespaces share logins and data
Each workspace runs inside a remote virtual machine tied to a GitHub user. That machine needs a cloud role to push images and update running services.
Instead of static JSON keys, teams can use workload identity federation for logins. The workspace trades a short GitHub token for a temporary Google Cloud token.
Once logged in, the workspace builds a container image and sends it out. Then the workspace tells the serverless platform to pull and run that image.
Developers also send test traffic from the cloud editor to private service URLs. Identity tokens in request headers prove the caller has the right cloud role.
Common risks with shared service accounts and wide permissions
Many teams take shortcuts when they first wire up these two cloud tools. A common mistake is putting a single service account key into shared secrets.
When every workspace uses the same static key, audit logs lose user detail. Security teams cannot tell which developer deployed a broken build or changed settings.
Broad project roles create another big risk for your live cloud services. A workspace with editor rights can delete databases or read secret store values.
GitHub Actions Security + End-to-End Encryption: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
If an attacker steals a token from a workspace, they gain wide control. Malicious extensions or bad packages inside the editor can grab local cloud tokens.
How to scope roles and network paths between both tools
Start by removing long-lived service account keys from your repo and user settings. Set up token exchange rules that map specific repos to narrow cloud roles.
Give the workspace role only the rights needed to deploy to staging services. Block direct changes to production services from any personal developer workspace machine.
Use separate cloud projects for dev, staging, and production to limit blast radius. Require pull request reviews and automated build pipelines for all production service updates.
Lock down network ingress so private services only accept traffic from trusted sources. When developers query databases from a workspace, mask emails and card numbers in results.
Log every deploy command and private service call with the human user identity. Clear logs help teams trace bugs fast and pass security audits without stress.
Check database and API queries on the wire
Identity tools, roles, and network rules decide who opens a session. Setup alone cannot check what each query does or mask sensitive values in a response once a session starts. When workflows touch Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes APIs, SSH, or internal HTTP APIs, hoop.dev runs beside those services as an open-source proxy, a sidecar for your Postgres or API. It inspects requests coming in and results going back on the wire.
Your login details and client tools stay as they are while hoop.dev guardrails refuse bad deletes or drops before they run. On responses, hoop.dev data masking rewrites matched sensitive values in memory. Furthermore, hoop.dev holds SOC 2 Type II, is MIT licensed, and writes every query and decision to an audit trail that generates evidence for HIPAA, GDPR, and PCI DSS. See the source on GitHub.
Frequently asked questions
How should a workspace log in to Google Cloud without static keys?
Use federated identity to trade a GitHub identity token for a temporary cloud token. This method removes stored JSON keys and expires tokens after a short window.
Can developers test private serverless URLs from their remote editor?
Yes, developers can send requests with an identity token in the header. The caller must hold the invoker role on that specific cloud service.
How do we stop workspaces from changing production services?
Put production services in a separate cloud project with strict role rules. Only allow your automated release pipeline to deploy code to that production project.
Related guides
In this post