/

Ambitwin · source-available, not open source · © 2026 Nicolò Ghignatti

Dependencies & Security

Keywords on this page
WordMeaningExample
ManifestThe file where a package lists what it needs, with allowed rangesCargo.toml, package.json
LockfileThe exact version of every dependency, direct and indirect, written by the package managerCargo.lock, uv.lock
In syncThe lockfile matches the manifest, so an install changes nothingnpm ci passes
AdvisoryA published warning that a version has a security holeRUSTSEC-2023-0071
AuditA scan of a lockfile against known advisoriescargo audit
RenovateA bot that opens pull requests to update dependencieschore(deps): update ci
SASTScanning source code for security mistakes, without running itCodeQL
TrivyA scanner for the operating-system packages inside an imageapk packages in Alpine

Every package installs its own dependencies: there is no shared root lockfile. This page covers how versions are pinned, how they are updated, and which scans stop a known hole from reaching master.

Related pages: GitHub Actions CI, Release Please.


Lockfiles per language

LanguageManagerLockfileWhereRegenerate with
RustcargoCargo.lock6 services, 4 schemas/*-schema cratesmise exec -- cargo update in the crate, or let cargo add / cargo build write it
Gogogo.sumclaims-gateway, registry, tenancy, auth-middleware, auth-policymise exec -- go mod tidy in the module
Pythonuvuv.lockagent, acceptance, ap-collector, aq-simulator, ap-simulatormise exec -- uv lock in the project
Nodenpmpackage-lock.jsonfrontend, sensor-simulator, tooling/eslint-confignpm install --prefix <dir> --package-lock-only --cpu=x64 --os=linux

Why Node locks are made for Linux

A lockfile written on a Mac or on Windows lists only that machine’s native packages. CI runs npm ci on Linux, finds a missing package, and fails. --cpu=x64 --os=linux writes the Linux entries whatever machine runs it.

Example. A developer on an Apple laptop adds a package to frontend:

  1. npm install some-lib inside frontend/.
  2. npm install --prefix frontend --package-lock-only --cpu=x64 --os=linux.
  3. Commit package.json and package-lock.json together.

just setup clean-install does step 2 for every Node project at once, after deleting node_modules and the lock. It also runs uv lock for every Python project.


Local checks

Two recipes run a moon task in every project.

Recipemoon tasksPer language
just setup deps-check:deps, :deps-checkRust cargo fetch + cargo check. Go go mod download. Python uv sync --locked. Node npm ci
just setup audit:auditRust cargo audit. Python uv audit. TypeScript npm audit --audit-level=high --omit=dev
sequenceDiagram
    autonumber
    participant D as Developer
    participant J as just setup
    participant M as moon
    participant P as Each project
    D->>J: just setup deps-check
    J->>M: mise exec -- moon run :deps :deps-check
    loop every project that defines the task
        M->>P: npm ci, uv sync --locked, go mod download, cargo fetch
        M->>P: cargo check, Rust only
    end
    P-->>D: first failure stops the run
    D->>J: just setup audit
    J->>M: mise exec -- moon run :audit
    M->>P: cargo audit, uv audit, npm audit
StepWhat fails it
4npm ci: lockfile and package.json disagree. uv sync --locked: uv.lock is stale. go mod download: go.sum lacks a hash
5cargo check: the code no longer builds with the locked versions
8An advisory: Rust any, Python any, Node high or worse in production dependencies

In CI

Inside each language leg

LegLockfile checkAuditBlocks the PR?
Rust (tpl-rust-ci)builds with Cargo.lockcargo audit --ignore RUSTSEC-2023-0071 --ignore RUSTSEC-2026-0387 --ignore RUSTSEC-2026-0459Yes, vulnerabilities only; “unmaintained” and “yanked” are warnings
Go (tpl-go-ci)go mod downloadgovulncheck ./..., only for code paths actually calledNo, continue-on-error
Python (tpl-python-ci, simulators)uv sync --lockeduv auditYes
Frontend (ci-frontend)npm cinpm audit --audit-level=high --omit=devYes
Frontend, dev dependencies toonpm audit --audit-level=highNo, only logged

dependency-review: what this PR adds

Runs when a PR changes any manifest or lockfile (filter deps in ci-gate.yml).

CodeQL: the source code

ci-codeql.yml, outside the gate.

SettingValue
WhenEvery PR into master, Monday 03:00, by hand
Languagesjavascript-typescript, python, rust with build-mode: none; go with autobuild
Queriessecurity-extended
Blocks a mergeYes, through the ruleset: security alerts high or higher

Trivy: the image

Runs on every image a PR changes, and again before cd-registry publishes.


Renovate: updates arrive as pull requests

maint-renovate.yml runs Renovate every Monday at 02:00 (Europe/Rome rules in renovate.json), or by hand.

sequenceDiagram
    autonumber
    participant S as Schedule
    participant W as maint-renovate
    participant R as Renovate
    participant GH as GitHub
    participant G as ci-gate
    participant O as Owner
    S->>W: Monday 02:00
    W->>R: run with RENOVATE_TOKEN, LOG_LEVEL debug
    R->>R: read renovate.json, scan every manager in the repo
    R->>R: group updates by folder and by kind
    R->>GH: open or update one PR per group, lockfile regenerated
    GH->>G: PR from a personal token starts the gate
    G->>G: legs of the changed folder, plus dependency-review
    G-->>GH: CI Passed
    O->>GH: review and squash-merge
    GH->>GH: the chore(deps) or fix(deps) title feeds Release Please
StepDetail
2RENOVATE_TOKEN is a personal token: a PR made with the default token would start no workflow
3Managers found: cargo, gomod, npm, pep621 with uv.lock, Dockerfile FROM tags, github-actions SHAs, mise tools in .mise.toml, pip_requirements in .github/requirements-lint.txt
4See the grouping rules below
5Renovate runs the package manager itself, so the lockfile is regenerated, never hand-edited
10Renovate’s titles are Conventional Commits. fix(deps) bumps a patch; chore(deps) bumps nothing

Grouping rules

RuleEffect
Major updateIts own PR, labels dependencies, major
Minor, patch, pin, digest under one folderOne PR per folder: frontend, each backend/* service, each backend/libs/*, backend/acceptance (backend-tests), simulators, tooling
GitHub Actions and mise toolsOne PR, group ci
Python itselfOne PR for every pin (.python-version, .mise.toml, images), so CI never tests a Python the images do not ship
New Python minorOpened only after approval on the dependency dashboard issue: compiled packages publish wheels later
LimitsprConcurrentLimit: 0, prHourlyLimit: 0: no cap

Example. Renovate finds redis 8.10.1 → 8.10.3 in a compose file and a new actions/checkout SHA.


Updating by hand

  1. Change the version in the manifest.
  2. Regenerate the lockfile with the command in the table at the top.
  3. Run just setup deps-check and just setup audit.
  4. Run the package’s tests: just test <svc>.
  5. Open the PR. The gate runs the package’s leg and dependency-review.

For Rust and Go toolchains, the version is pinned in .mise.toml, and CI reads the same pin. A Go bump also moves the golang tag in the four Go Dockerfiles.


Traps