Pulse Beta

User guide

Reference

Package managers

What the scan reads for each package manager, what a CI job must install before the scan, and the details of Python, Go, and a repository with more than one project.

What the job needs before the scan #

Run the scan in the image that builds the project, after its install step. For some package managers the CLI reads what is installed, not only the lockfile:

Package managerWhat the job needs before the scan
npm, pnpm, Yarn, BunThe installed node_modules. Run npm ci, pnpm install --frozen-lockfile, yarn install --immutable, or bun install --frozen-lockfile.
pip, PDM, Pipenv, condaThe environment of the project, with the requirements installed in it. For pip, activate the virtual environment, set VIRTUAL_ENV, or keep it in .venv in the project (CLI 0.1.34 or later). An earlier CLI does not read .venv by itself: activate the environment or set VIRTUAL_ENV. From CLI 0.1.75, an installed environment comes before a uv.lock, poetry.lock, pdm.lock, or Pipfile.lock beside the requirements.txt (see Python projects).
Maven, Gradle, uv, PoetryThe tool on the PATH (mvn, ./gradlew or gradle, uv, poetry). The CLI asks it for the dependency tree.
Go, Cargo, Composer, Bundler, NuGet, and the othersNothing. The CLI reads the lockfile.

A job with no package manager of its own can use the image tuxcare/tuxcarectl:<version>-toolchains, which has npm, mvn, and pip. See Install the CLI.

Python projects #

A pip job must install the requirements, or the CLI finds no packages. Each job ends with tuxcarectl sca --fail-on high. Use the install line of your project in place of the one shown.

uv (GitLab CI):

tuxcarectl:
  image: ghcr.io/astral-sh/uv:python3.12-bookworm
  rules:
    - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
  script:
    - uv sync --frozen
    - curl -fsSL https://securechain.tuxcare.com/get/tuxcarectl | sh
    - tuxcarectl sca --fail-on high

The line uv sync --frozen is optional. The CLI reads the packages from uv.lock, so the findings are the same without it. The line installs the packages into .venv, and the CLI reads from .venv the version ranges that each package sets for its dependencies. Without .venv, the CLI assumes a range that admits every version. Then, in the CLI report, the WHERE cell of a fix that rests on such a range ends in (range assumed), and the fix that it names can fail when the real range is narrower. On a large project, the install can download several hundred MB on each run. Remove the line to save the download, or keep it to get exact WHERE cells.

WHERE names the file that you change to move the package to the fixed version, not the file that holds the version. For a package that comes in through another package, this is often the override section of your package manager, for example pyproject.toml (tool.uv.override-dependencies), while the version is in uv.lock. add, as in pyproject.toml (add tool.uv.override-dependencies), means that the section does not exist in the file yet: the fix adds it (from the CLI release after version 0.1.72).

Poetry (GitLab CI):

tuxcarectl:
  image: python:3.12
  rules:
    - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
  script:
    - pip install poetry
    - poetry install --no-root
    - curl -fsSL https://securechain.tuxcare.com/get/tuxcarectl | sh
    - tuxcarectl sca --fail-on high

pip (GitLab CI):

tuxcarectl:
  image: python:3.12
  rules:
    - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
  script:
    - python -m venv .venv
    - .venv/bin/pip install -r requirements.txt
    - curl -fsSL https://securechain.tuxcare.com/get/tuxcarectl | sh
    - tuxcarectl sca --fail-on high

On a PyPI release line with both TuxCare build forms, tuxcarectl check and tuxcarectl harden can warn that a version range may install a .postN+tuxcare build instead of the selected +tuxcare.N build. The warning names both builds and gives the requirement that keeps the selected build.

The installed environment comes before a lockfile #

From CLI 0.1.75, the installed Python environment is the source of the scan. The scan then shows what the image or the job holds, not what a lockfile recorded at an earlier time. An earlier release reads the lockfile first. Your results can change after the upgrade when the project has both an environment and a lockfile: the report shows the versions of the environment, and no package that only the lockfile names.

A lockfile that disagrees with the installed environment #

The project with only a pyproject.toml and a uv.lock, poetry.lock, or pdm.lock is the one exception to the rule above: it keeps the tool of the lockfile, also with an installed environment, because no requirements file says that pip installs the environment. The findings of uv and Poetry then come from the lockfile, and a stale lockfile reports versions that the environment does not hold. From CLI 0.1.75, sca, check, and harden compare the lockfile with the installed packages and warn where the two disagree.

Go projects #

The CLI matches the Go standard library against the Go version of the build. In CI, state the toolchain with --go-toolchain 1.24.13 or with the variable TUXCARE_GO_TOOLCHAIN=1.24.13 (CLI 0.1.34 or later; a CLI before 0.1.93 reads only the old name SECURECHAIN_GO_TOOLCHAIN). The commands tuxcarectl sca, check, harden, update, status, and compare all read the variable. Without it, the CLI uses go env GOVERSION, then the toolchain line of go.mod, then the go line. An earlier release has no flag and no variable: it uses go env GOVERSION, then the go line of go.mod. With an earlier release, run the job in an image that holds the Go toolchain of your build, for example golang:1.24.13.

tuxcarectl:
  image: golang:1.24
  variables:
    TUXCARE_GO_TOOLCHAIN: "1.24.13"
  rules:
    - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
  script:
    - curl -fsSL https://securechain.tuxcare.com/get/tuxcarectl | sh
    - tuxcarectl sca --fail-on high

More than one project in a repository #

Next: Terms