Account

CLI tokens

Create, store and revoke the tokens the Guardian CLI and CI jobs use to act for your company.

A CLI token lets the Guardian command-line tool or a CI job act for you without signing in with a password. Manage them on the CLI tokens page: select your name in the top-right corner, then Account settings, then Tokens in the side menu.

What a CLI token is

A CLI token is a secret string that starts with gdn_. A tool presents it to run tests and upload results to your company. A token acts with your role as it is now, not the role you had when you created it, so a role change applies to your tokens straight away.

Who can create one

  • Run tests and upload results: Admins, Managers, Engineers and Security members. A Security member's token only runs Samurai Security tests.
  • CI push (manage custom tests from CI): Admins only.

Viewers and Compliance users can't create tokens. Admins see every token in the company; everyone else sees only their own, and can revoke only their own.

Create a token

  1. Enter a Label that says where the token will be used, such as GitHub Actions.
  2. Choose what the token can do and how long it lasts: 30, 90 (the default), 180 or 365 days.
  3. Select Create token.

You can have up to 25 active tokens, and create up to 10 per hour.

Sign in with guardian login

Instead of creating a token by hand, you can run guardian login in your terminal. It prints a short code (such as BCDF-GHJK) and opens this site's Approve CLI login page; if your browser does not open, go to /device yourself. Sign in if asked, type the code into the page, check the details, then select Approve.

Before you approve, check that:

  • you just ran guardian login yourself and the code matches your terminal. Guardian never asks you for a code any other way, so if someone else sent you a code, select Deny;
  • the organization and your email are the ones you expect. If not, sign out and sign in to the right organization;
  • the request came from an address you recognize. A warning appears if it came from a different network than the one you are using now.

Approving creates a Run tests and upload results token for you in that organization. It lasts 90 days and appears in your list labelled CLI login with the date. You get an email when a login is approved; if it was not you, revoke the token here and change your password. Codes expire after 10 minutes. Admins, Managers, Engineers and Security members can approve; other roles can only deny.

Store it safely

The token is shown once, right after you create it. Copy it into your CI secret store or a password manager before you select Done. Guardian Samurai can't show it again; if you lose it, revoke it and create a new one. Never put a token in code, a chat message or a ticket.

If you leave the page before copying the token, revoke it and create a new one: the value can't be shown again.

If a token may have leaked, revoke it immediately.

Self-reported results

Tests the Guardian CLI uploads with a token appear in your test history and on the dashboard with a Local (run from a machine) or CI badge, and are marked self-reported: they were uploaded with a Guardian CLI token from a machine or CI job, and Guardian did not run them itself and can't verify them. Opening an uploaded run shows a line such as "Local run: tests executed from MY-LAPTOP on Oct 16, 2026, 10:00 AM" (or "CI run"), with the computer name only when the CLI reported one. Tests Guardian runs from the cloud carry a Cloud badge. The dashboard counts the two separately: its main tiles show Cloud runs only, with a separate Self-reported (Local/CI) group beneath them. The CLI doesn't upload test arguments, so an uploaded run's request details say so.

When a token stops working

  • It reaches its expiry date.
  • You or an Admin revoke it. Revoking takes effect immediately.
  • You are removed from the company or deactivated.
  • You change or reset your password. This revokes all of your tokens.

Expired and revoked tokens stay in the list for 90 days, then disappear.