Pulse Beta

User guide

Reference

Gates and pull requests

Choose when a CI job fails: on the severity of a finding, on a known-exploited or malicious package, or only on the findings that a pull request adds; and read the exit codes of the CLI.

Choose the gate #

CommandThe job fails whenUse it on
tuxcarectl scaNever. It only reports.Any branch, to keep the portal current.
tuxcarectl sca --fail-on highAn open finding is high or critical. The other levels are critical, medium, and low.The default branch and the release branches.
tuxcarectl sca --fail-on-exploitedAn open finding is known exploited, at any severity. It combines with --fail-on: either gate fails the job. CLI 0.1.80 or later.The default branch and the release branches.
tuxcarectl compare --base main --fail-on-newThe branch has an open finding that the latest scan of main does not have.Pull requests and merge requests. See Pull and merge requests.
tuxcarectl checkA project that uses TuxCare builds is not in the state that harden made.Projects that use TuxCare builds. See Fix vulnerabilities.

Pull and merge requests #

A pull request often inherits old findings from the base branch. compare --fail-on-new fails it only on the findings that it adds. The base branch needs a scan of its own, so scan the base branch on each push too. A finding that is Not evaluated on the base branch (TuxCare has not assessed the build, see Servers) and open on your branch counts as new, so compare --fail-on-new fails on it.

A Gradle or Maven project runs its build. Each command that reads a Gradle or Maven project runs the build of the project, registry check too: its build scripts and ./gradlew, or the files and extensions of .mvn/ of Maven. This holds with and without --run-project-hooks, and no option turns it off. So a scan of a merge request from a fork, or of other code that you do not trust yet, runs that code. Run such a scan in a sandbox job that holds no secret that the code must not read.

The jobs for each CI system: GitHub Actions, GitLab CI, and Jenkins.

The portal files the scan of a pull request under the branch that it comes from. The portal sends alerts for the default branch and the supported releases only, so a feature branch sends none.

Exit codes in CI #

CodeMeaningWhat to do
0The run finished. No finding failed the gate.Nothing.
1A finding failed the gate.Read the findings in the job log or in the portal.
2A wrong option, a configuration file that the CLI cannot read, no package manager that it knows, or an --ecosystem or ecosystems name that it does not know (from version 0.1.71; the message lists the names).Read the message.
3No token, or the portal refused it.Check the secret variable. See Troubleshooting.
4The portal did not answer in time, or its answer failed a check.Run the job again, or use --on-portal-error warn.
5A tool on your side failed: the install command of your package manager, a project environment that the CLI cannot find, or a file that the CLI cannot write. Starting with the release that adds shared configuration locking, a wait for the lock also exits 5 if it reaches the timeout or the command cancels the wait after a signal. The two names of the portal URL (TUXCARE_PORTAL_URL and SECURECHAIN_PORTAL_URL) for two portals while a token is set stop with this code and send nothing; a refused global flag still exits 2 first.Read the job log. If the CLI was waiting for the lock, the error names the --timeout limit or the signal that ended the wait.
6harden, update, unharden, or fix changed the project, but the installed packages are not the planned ones. The CLI put your files back.Read the message. Contact TuxCare if the error stays.
7An error in the CLI. The CLI prints internal error: what the run was doing: error; please report this to TuxCare support and writes no report file.Run tuxcarectl doctor --bundle file, and send the archive to TuxCare.

The install script never exits 1 (from version 0.1.71). It exits 5 when you must fix something on your side: the operating system or the CPU type, a directory that it cannot write, no answer from the server, or a download that failed. It exits 7 when the TuxCare release is wrong: no version, no checksum line, a checksum that does not match, a missing or invalid TuxCare signature of checksums.txt, or a downloaded binary that reports another version than the one that the script installs (install scripts since CLI 0.1.99). So exit_codes: [1] below lets only findings through, and a failed install fails the job. An older install script exits 1 when it fails: pin version 0.1.71 or later, or end the install line with || exit 5.

To let a job report findings and not stop the pipeline, allow exit code 1 only. In GitLab, write allow_failure: exit_codes: [1]. Do not write allow_failure: true: it also hides the codes 2 to 7, where the CLI could not do its job, and the pipeline then shows green for a scan that did not run.

The install command of your project also exits 1 when it fails, for example npm ci or pip install. With exit_codes: [1], the job then shows amber for a scan that did not run. End each install line with || exit 5, as in the example below. The CI/CD component does this for its install input from the CLI release after version 0.1.72: it prints the code of the install and exits 5.

GitLab Runner 19.0 and earlier can report exit code 1 in place of the real code, so exit_codes: [1] also lets a code from 2 to 7 pass. Set the variable FF_USE_NEW_BASH_EVAL_STRATEGY: "true" in the job: the runner then reports the real code. Runner 19.1 and later always reports the real code and ignores the variable.

tuxcarectl:
  image: node:22
  variables:
    FF_USE_NEW_BASH_EVAL_STRATEGY: "true"   # GitLab Runner 19.0 and earlier
  allow_failure:
    exit_codes: [1]
  script:
    - npm ci || exit 5    # the install step of your project
    - curl -fsSL https://securechain.tuxcare.com/get/tuxcarectl | sh
    - tuxcarectl sca --fail-on high

Exit codes lists every code.

Next: Releases