Gitea Actions Integration
Introduction
Xygeni provides a xygeni-action for downloading and running the scanner on the repository.
Usage
The xygeni-action action downloads, configures and executes the Xygeni Scanner on the repository where the action is invoked.
Setting API token as encrypted secret in Gitea
The scanner needs an API token to communicate with the Xygeni platform. Such API token is a secret that could be registered safely at the appropriate scope (organization, repository or environment)

For example, to register the API token as a secret named XYGENI_TOKEN, for repository in the current working directory.
Add a step calling the action
In a Gitea workflow (.gitea/workflows/*.yml) the Xygeni scanner could be run on the repository files, typically after actions/checkout to retrieve the branch sources.
You can configure a simple Gitea action with this workflow:
Where XYGENI_TOKEN is the name of the encrypted secret where the API token was saved. By default this action runs manually on: workflow_dispatch.

Parameters
The Xygeni API token is required.
token
Xygeni API token
Yes
gh_token
Gitea token to retrieve repository information for misconfigurations and compliance.
No
GITEA_TOKEN
command
Command to execute by the scanner
No
scan --never-fail
xygeni_url
Base URL of the Xygeni API
No
https://api.xygeni.io
xygeni_dashboard_url
Base URL of the Xygeni Dashboard
No
https://in.xygeni.io/dashboard
Example for scanning only hard-coded secrets and IaC flaws detectors, and failing the build only when critical issues are found:
Note that for secrets and iac scans, the default GITEA_TOKEN has enough permissions.
See Xygeni scan command for full information on the command options available.
Last updated