For the complete documentation index, see llms.txt. This page is also available as Markdown.

CircleCI Integration

Introduction

CircleCI is a continuous integration and continuous delivery platform that can be used to implement DevOps practices.

The following configuration examples show how to install & run the scanner using an API Token stored as a secret named XYGENI_TOKEN. See Generate Xygeni API Token for Scanner or ask your Xygeni administrator to generate it.

See Private keys and secrets for details about how to add the token as a secret in CircleCI.

Using the installation script

You may automatically install the scanner using the bootstrap script: get-xygeni.sh for bash, or get-xygeni.ps1 for PowerShell. It downloads the scanner, verifies its SHA-256 checksum and unpacks it into $HOME/.xygeni.

The scanner needs Java 17 or higher on the executor, and reads your API token from the XYGENI_TOKEN environment variable:

jobs:
  build:
    steps:
      - run:
        name: Install Xygeni scanner
        command: >
          curl -sSfL -o get-xygeni.sh https://get.xygeni.io/latest/scanner/get-xygeni.sh &&
          curl -sSfL -o get-xygeni.sh.sha256 https://raw.githubusercontent.com/xygeni/xygeni/main/checksum/latest/get-xygeni.sh.sha256 &&
          echo "$(cat get-xygeni.sh.sha256)  get-xygeni.sh" | sha256sum -c - &&
          bash get-xygeni.sh

      - run:
        name: Scan for issues
        command: >
          $HOME/.xygeni/xygeni scan
            -n $PROJECT_NAME
            --dir $PROJECT_HOME

See installation script for more details.

Please refer to the scanner documentation for full details on the scanner command line options and configuration.

Using the docker image

If it is not possible to install the scanner in the CircleCI host running the job, you may run the docker image instead:

See Xygeni Scanner docker image for more details.

Last updated