The Simplest Way to Make Github and Webauthn Work Like They Should

Published
Length
3 min read

Luis Felipe Dias

All posts

Teams pair github and webauthn to verify developer identities with hardware keys before code changes. This setup stops password theft and blocks fake login prompts across your code host. When engineers push code or approve pull requests, password checks alone leave gaps. Attackers can steal session cookies or trick users into typing one-time codes on fake sites. Hardware keys bound to browser origins stop these attacks cold. How github and webauthn handle logins and permissions The browser a

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 github and webauthn to verify developer identities with hardware keys before code changes. This setup stops password theft and blocks fake login prompts across your code host.

When engineers push code or approve pull requests, password checks alone leave gaps. Attackers can steal session cookies or trick users into typing one-time codes on fake sites. Hardware keys bound to browser origins stop these attacks cold.

How github and webauthn handle logins and permissions

The browser and the code host talk through public key crypto during login. First, the engineer registers a physical security key or built-in device sensor with their account. The device creates a new key pair scoped to the exact website domain. It sends the public key to the server and keeps the private key locked inside.

When the user logs in, the server sends a random challenge back to the browser. The browser checks the domain name and asks the user to touch their key. The hardware key signs the challenge only if the domain matches the registered origin. This domain check stops phishing because a fake site gets a failed signature.

Beyond basic web logins, teams use these keys to sign commits and approve deployment runs. Admins can require hardware key checks before anyone merges code into main branches. You can also link your central identity provider so one key check covers both systems. Permissions still live in team role settings, while the hardware key proves who sits there.

Common failure modes and how to scope roles

A strong browser login does not fix weak token habits in your terminal. Many engineers log in with a hardware key, then create a long-lived personal token. They paste this broad token into local scripts, build servers, and shared chat rooms. If an attacker steals that token, they bypass the hardware key check right away.

Shared bot accounts create another big blind spot for security teams. When five people share one release account, nobody knows who pushed a broken build. Audit logs only show the bot name instead of the real person on the team. Unlogged actions on production branches make incident reviews slow and painful.

FIDO2 / WebAuthn + GitHub Actions Security: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

To fix this, ban classic personal tokens that hold full write rights across all repos. Force every developer to use short-lived credentials tied to their own verified login session. Scope every token to the exact repo and the single task it needs to run. Require hardware key checks for sensitive actions like changing team roles or reading production secrets.

Securing command line workflows and automated runs

Developers spend most of their day in the terminal, not in the web browser. Good security setups bring hardware key checks directly to command line git operations. Engineers can set up SSH keys that live right on their physical security keys. Every time they push or pull code, they must tap the flashing key.

For automated deployment jobs, avoid user keys and personal tokens altogether. Give your build runners narrow, short-lived role tokens that expire when the job ends. Keep human accounts for human work, and keep machine roles locked to single pipelines. Network rules should also restrict where build runners can send data during a run. When you combine hardware checks with tight role boundaries, stolen passwords lose their value.

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

What happens if a developer loses their hardware security key?

Teams should require every user to register at least two separate keys during onboarding. One key stays at their desk, and the backup key stays in a safe place. If both fail, an admin must verify the user on a call before resetting access.

Do hardware keys replace personal tokens for command line git?

They can replace static tokens when developers use hardware-backed SSH keys for git pushes. When a tool still needs a token, set a short expiration window and narrow permissions. Never allow a token to hold broad admin rights across your whole code account.

Can we use built-in laptop sensors instead of USB keys?

Yes, modern laptops and phones include secure chips that follow the exact same standard. You can allow fingerprint sensors for daily work and require USB keys for admin roles. Both options check the website domain and protect your team from phishing pages.

The query runs. The emails stay hidden.