How-to guide
Tokens
Pick the token of a pipeline, make it, and let GitHub Actions and GitLab CI sign in with no stored token.
Pick a token for the pipeline #
Use the smallest token that does the job. If it leaks, less is exposed.
When setting a portal token and URL in CI, use the same family of variable names. Set TUXCARE_PORTAL_TOKEN and TUXCARE_PORTAL_URL together, or set SECURECHAIN_PORTAL_TOKEN and SECURECHAIN_PORTAL_URL together. A token from one family with a URL only from the other, for example a group variable TUXCARE_PORTAL_URL, stops the CLI at exit 5 before it sends anything (CLI 0.1.94 or later). With the GitHub Action, set a custom URL in the portal-url input alongside portal-token.
| Your pipeline | Who makes the token | What to select on Access tokens |
|---|---|---|
| The pipeline of one repository | An admin, or a member of that repository | The CI token (one repository) preset and the repository. The form starts with this preset. The token can send and read that repository only, so the CLI shows no link to the scan of a git dependency in another repository (see links to another repository). It expires in 90 days. A member must set an expiry of 90 days or less. The token stops when the person who made it is disabled or loses the member role on the repository, and Access tokens marks it; it works again if that person gets the role back. |
| A CI server or a shared CI template that builds many repositories of one team | An admin | Scope a department, the department, and the CI upload (all my repositories) rights. One token serves every repository of the department, so the team does not make and replace one token for each repository. A scan of a new repository puts the repository in that department. The token can read every repository of the department, so the CLI shows the link to the scan of a git dependency in another repository of the department (see links to another repository). The token cannot send scans to a repository of another department. This token does not depend on a person: it keeps working when the admin who made it leaves. |
| A pipeline that builds more than one repository, when you are not an admin | A member | The CI upload (all my repositories) rights. The token acts as you: it can read every repository that you can read, and the form warns about it. It expires in 90 days unless you clear the date. It stops when your user is disabled. A job that only sends scans (tuxcarectl sca, tuxcarectl check) can use Upload only: it reads only the findings of its own scans. |
- The Repository box of Set up CI and of Access tokens lists only the repositories that the workspace has, and for a member only the repositories that the member can see. Type a part of the name to filter the list, for example
web-shop
oracme
. The filter ignores upper case and lower case. Select the repository with the mouse, or with the arrow keys and Enter. A CI token needs a repository that the workspace has. For a new repository, select Register repository on Set up CI and paste its URL (an admin and a member can), or send a first scan from your computer. A member's repository goes where the member's first scan would put it: into each department in which the member is a member, or ungrouped when the member has no department. If the departments of the member do not allow a new repository, an admin registers it. - To replace a token that expires: make the new token, change the CI secret, run the pipeline, then revoke the old token.
- The Last CLI column of Access tokens shows the CLI version that each token used last. Use it to find a job that runs an old CLI.
Access tokens explains each right and scope.
Make a token for the pipeline #
Does one CI template or one CI server build many repositories of your team? Then ask an admin for a department token, and do not make one token for each repository. See Pick a token for the pipeline. The steps below make the token of one repository.
- In your workspace, open the account menu at the right of the header, and select My tokens.
- Type a Name, for example
ci web-shop. - Select CI token (one repository) and the repository. An admin and a member can mint it. It expires in 90 days at most.
- Select Mint token and copy the token. The portal shows it one time only.
Give each pipeline its own token. Do not use the token of your computer. Pick a token for the pipeline compares the choices.
Sign in with no stored token #
GitHub Actions and GitLab CI give each job a signed OIDC token. With a trust rule, the job trades that token for a portal token of one hour, and the pipeline stores no portal token. A leaked token stops by itself. The audit log names the repository, the ref, and the run of each sign-in.
- An admin opens Settings › Access › CI sign-in and adds a rule: the CI system, the repository or project path, and the rights and the scope of the tokens. Set the ref too: a branch name, for example
main, or a full ref, for examplerefs/tags/v1.2.0. A branch name never takes a tag with the same name. With no ref, the rule takes each branch, tag, and pull request of the repository that can get an OIDC token. - Change the job as below.
PORTAL_URLis the address of your workspace, with no slash at the end, for examplehttps://acme.example.com. The audience of the OIDC token must be this address.
The job of each CI system: GitHub Actions and GitLab CI.
- The portal answers 401 with one text for each cause: it does not tell a caller which rules exist. Check the audience, the repository, and the ref. An admin of a self-hosted install can read the cause in the log of the portal. One cause has its own text: the rule that names the job is suspended (below).
- A rule depends on the admin who added it. The rule is suspended when that person is disabled, loses the member role on the repository of a rule of one repository, or loses the admin role for a rule of a department or of the whole workspace. A rule of one repository with rights past those of the CI token of a member (the poll permission, the write permission, or the api or mcp channel) also needs the admin role of that person. A suspended rule gives no token, its live tokens stop, and CI sign-in marks it. The rule works again when that person gets the role back. When the person left, an admin adds the rule again and removes the old one. When another live rule names the same job, that rule gives the token.
- An answer 503 means that the portal could not read the keys of the CI system. Try again after a minute.
- When you remove a rule, its live tokens stop at once. The tokens of a rule are not on Access tokens.
- The token of the sign-in lives one hour. A job that runs for longer signs in again.
Access tokens #
A token lets a program use your workspace: the CLI, a CI job, a script, or an AI assistant. Open My tokens in the account menu (an admin also finds every token under Settings › Access), type a Name that tells where the token is used, select the rights, set an expiry, and select Mint token.
Copy it at once and keep it in a secret store. The portal keeps only a hash of the token. If you lose a token, revoke it and make a new one.

- The name of the token.
- The scope. Only an admin sees this list.
- The rights: a preset, or your own selection of channels and permissions.
- Mint token makes the token and shows it one time.
- A token starts with
tuxr_and the name of your workspace. - The table shows the last four characters, the rights, the creation date, the last use, and the expiry of each token. Select Revoke to stop a token at once. A revoked token cannot come back.
- The Last CLI column shows the CLI version of the newest scan that the token sent.
older than
marks an old CLI. Use it to find a CI job that needs an upgrade. - The Browser sessions table lists your sign-ins. Select Sign out on a row to end that session.
Rights #
The rights of a token are two lists:
- Channels: how the token connects.
CLI
is the TuxCare CLI.API
is the REST API.MCP
is the MCP server for AI assistants. - Permissions: what the token can do.
submit
sends scans.read
reads repositories, scans, and findings.write
changes things: triage, the default branch, and the settings.poll
is for scan workers only: do not give it to a CI token.
Select a preset, or select Custom and tick each channel and permission:
| Preset | Channels | Permissions | Use it for |
|---|---|---|---|
| CI token (one repository) | CLI | submit, read | The CI job of one repository. An admin and a member see this preset, and the form starts with it. It sets the scope to one repository and the expiry to 90 days from today. A member needs the member role on that repository, and the expiry is 90 days or less. |
| CI upload (all my repositories) | CLI | submit, read | A CI job that builds more than one repository, or your own computer: send scans and read the findings. The token can read every repository that its scope can read, and the form warns about it. It sets the expiry to 90 days from today; you can clear it. |
| Upload only | CLI | submit | A job or a TuxCare Radar agent that sends scans. It reads only the findings of the scans that it sent. It can run tuxcarectl sca and tuxcarectl check. |
| Read only | API | read | A script or a dashboard that reads findings. |
| Read and write | API | read, write | A script that also triages findings or changes settings. |
| AI assistant | MCP | read | An AI assistant that reads findings. |
| AI assistant with triage | MCP | read, write | An AI assistant that can also triage findings. |
- A token never does more than the role of its user. A viewer can only read, so a token of a viewer cannot send scans. The page shows only the presets that your role can give.
- The CLI channel is always on. An admin must turn on the API and MCP channels for the workspace.
- You cannot change the rights of a token. Revoke it and make a new one.
Scope #
An admin selects a Scope. The scope limits what a token can see on every channel. Use the smallest scope that does the job:
| Scope | What the token can do | Use it for |
|---|---|---|
| a repository | Send scans to one repository and read that repository only. | The CI job of one repository. If the token leaks, only that repository is exposed. |
| a department | Send scans and read the repositories of one department. A scan of a new repository puts the repository in that department. | A CI server that builds many repositories of one team. |
| me, or a user | Act as that user, with the role and the departments of the user. The token stops when the user is disabled. | Your own computer, scripts, and AI assistant. |
| whole workspace | Act as an admin of the whole workspace. The token belongs to no person, so it keeps working when the person who made it leaves. | Automation that manages the workspace. Keep these few. |
A member or a viewer makes tokens for their own user, and does not see the Scope list. A member also makes the CI token of one repository with the CI token (one repository) preset. That token stops when the person who made it is disabled or loses the member role on the repository, and Access tokens marks it; it works again when that person gets the role back. It also stops when it expires or someone revokes it. The member sees it on Access tokens and can revoke it. An admin can make a token of one repository with wider rights (the poll permission, the write permission, or the api or mcp channel): that token stops when the admin loses the admin role, also when the person keeps the member role on the repository. A department token that an admin makes does not depend on a person. A repository or department token cannot read other repositories, and it cannot make, list, or revoke tokens.
Expiry #
Set a date in Expires, or leave the field empty for a token that does not expire. The token stops at the end of that day in the time zone of your browser.
- An expired token gets the same answer as a revoked token: 401
unknown or revoked token
. The table marks itexpired
. - You cannot change the expiry. To replace a token: make the new token, change the CI secret, run the pipeline, then revoke the old token.
- A token that expires cannot make a token that expires later, or a token with no expiry.
Allowed addresses #
A token can work from some networks only. Type them in Allowed from when you make the token, separated by commas: a network such as 10.0.0.0/8 or 2a01:4f8::/64, or one address such as 203.0.113.7. Leave the field empty to allow every address. To change the list of a token, select Addresses in its row.
- The list holds for every use of the token: the API, the MCP server, the CLI and the agent, and a sign-in with the token.
- A request from another address gets 403
this token does not allow requests from
and the address. The address is the one that the portal sees: behind NAT or a proxy, the address of the NAT or the proxy. - For example, give a CI token the network of your CI runners, and a dashboard token the address of its server.
- Only a person who signs in changes a list. A request with a token, or a browser signed in with a token, cannot change the list of a token or the list of the workspace: such a browser shows no Addresses button, and shows the list of the workspace read-only.
- A token with a list can make only a token whose networks are inside its own list.
Next: Departments