Dependency Security Policy
このコンテンツはまだ日本語訳がありません。
How to fix a dependency advisory, where each security gate runs, and how to record an advisory you
accept. Almost every advisory is transitive (a dependency of a dependency), so bumping a package in
dependencies rarely fixes it.
Choose a fix
Section titled “Choose a fix”Try these in order and stop at the first that works.
overridesinpackage.json. Forces a transitive package to a patched version across the tree. It is the only fixbun auditand Trivy can see, because both read resolved lockfile versions. Use a floor ("sanitize-html": ">=2.17.7") rather than an exact pin, or scope it to one parent ("body-parser>qs": "6.15.2"). A scoped override can lose to a parent’s exact pin; then bump the parent instead, as[email protected]did by widening itsip-addressrange.patches/(patchedDependencies). Only to change metadata or failure behavior: bump a manifest, add a compatibility shim, or replace an unusable module with stubs that throw when called. Never rewrite a library’s logic; owning someone else’s parsing or range math breaks more than it fixes. A patch does not change the lockfile, sobun auditstill flags it. Reasons and revert steps for each patch are inpatches/README.md.- An audit exception, when no version is both patched and working. See below.
| Where | Command | Blocks | Ignore list |
|---|---|---|---|
Deploy workflows, security-dependencies job | bun run audit:clean | Yes, the release | AUDIT_IGNORED_ADVISORIES |
Deploy workflows, security-container job | Trivy image scan | Yes, the release | .github/.trivyignore |
bun run audit:clean locally | bun audit --audit-level=high | Yes | AUDIT_IGNORED_ADVISORIES |
.github/workflows/ci.yml | bun audit --audit-level=high | No: a PR’s merge lockfile can carry advisories its author cannot fix | Inline --ignore flags |
bun run vl | bun audit | No, warning | AUDIT_IGNORED_ADVISORIES |
AUDIT_IGNORED_ADVISORIES in scripts/checks/lib/auditIgnores.ts feeds audit:clean and vl.
ci.yml cannot import TypeScript, so it repeats the IDs; keep it in sync. bun audit never
reads .trivyignore and Trivy never reads --ignore, so an advisory caught by both needs both
entries. The image installs with --production, so Trivy never sees devDependency advisories.
Both lists match the advisory ID exactly as reported. Many npm advisories have no CVE, and then the
GHSA ID is the one to use: bun audit --json shows the url, and a missing CVE appears as a
cvss.score of 0 with a null vectorString.
Active exceptions
Section titled “Active exceptions”Docs math dependencies
Section titled “Docs math dependencies”The docs build uses KaTeX 0.18.2 or newer in the 0.18 release line to address
GHSA-238p-pmpm-9mq7.
Scoped overrides for rehype-katex and micromark-extension-math replace their older KaTeX
requirements. Both use its renderToString interface. Remove each override when its parent accepts
a patched KaTeX version, and verify the docs build before removing it.
Advisory exceptions
Section titled “Advisory exceptions”CVE-2026-25128, fast-xml-parser (Trivy only): the global"fast-xml-parser": ">=5.12.0"override raises the parser used by@google-cloud/storage.@aws-sdk/xml-builderhas no parser dependency. Recheck with Trivy whether the advisory still matches before keeping this entry.GHSA-vfj7-8cjw-p6xm, braces (bun auditonly): no patched release exists (3.0.3 is both the latest and affected), and the neweststarlight-llms-txtstill depends onmicromatchand so onbraces. It is reached only while building the docs site, wheremicromatchexpands glob patterns written inapps/docs/astro.config.mts, never user input. The image prunes the docs workspace with--production, so Trivy never sees it. Remove the entry whenbracespublishes a fix (then add an override floor) orstarlight-llms-txtdropsmicromatch.GHSA-w5hq-g745-h8pq, uuid (bun auditonly, moderate):uuid8 and 9 are pinned bygaxios(^9.0.1) and@google-cloud/storage(^8.0.0), so a global override to a patched release breaks the@google-cloud/storageimport (bun run check-runtime-importsguards this). The flaw needsv3,v5, orv6called with a caller-suppliedbuf; those libraries only callv4without one. Remove the entry whengaxiosand@google-cloud/storagedeclareuuid11 or newer.GHSA-gcqx-w48m-w2h4, deepmerge (bun auditonly, low):deepmerge4.3.1 is both the latest and affected release, reached only throughmatrix-appservice-bridge > @vector-im/matrix-bot-sdk > html-to-text, which merges its own static formatter options. The flaw needs attacker-controlled objects passed tomergeObject(); none reach it. Remove the entry whendeepmergepublishes a fix (then add an override floor) orhtml-to-textdrops it.
Optional Irodori server
Section titled “Optional Irodori server”servers/tts/irodoritts/pyproject.toml owns the Python dependency policy; uv.lock records
the resolved versions for every backend. These packages are installed by the Irodori setup scripts
and are outside the main bot Docker image and Bun audit gates.
Use tool.uv.constraint-dependencies for security floors that fit upstream ranges. The protobuf
and sentencepiece fixes require tool.uv.override-dependencies: descript-audiotools 0.7.2 caps
protobuf below 3.20, and the pinned Irodori revision caps sentencepiece below 0.2. Remove each
override when its parent admits the patched version. Validate overrides with runtime imports,
TensorBoard event writing, tokenizer encode/decode, and actual cloning and VoiceDesign synthesis.
The cu128 extra adds triton-windows on Windows, because IRODORI_COMPILE_MODE needs Triton
and the Windows CUDA torch wheels do not depend on it (the Linux ones depend on triton). It is a
community build that packages Triton for Windows; keep its minor version on the Triton release the
pinned torch expects (torch 2.10 uses Triton 3.6) and move both together.
The following individual Dependabot alerts accept risk within the current server interface:
GHSA-rrmf-rvhw-rf47/CVE-2025-3000, torch: retain the coordinated Torch/Torchaudio 2.10 backend pins. The reported crash requires compiling a scripted class with a bare list or tuple annotation. The pinned codec’sdacvae/nn/layers.pyscripts a fixed tensor function,snake; synthesis requests supply text, captions, and audio, never Python source. Revisit if the server admits user-supplied scripted code or when a coordinated backend upgrade can move Torch to 2.13 or newer.GHSA-4j2p-28q2-5m79/CVE-2026-69112, accelerate: the advisory has no listed patched version. Malicious sharded checkpoint indexes can escape the checkpoint directory or hang a loader. Model and checkpoint selection belongs to the operator through environment variables; synthesis requests cannot select checkpoints. Use only trusted model repositories and local checkpoints. Revisit when upstream publishes a verified fix, checkpoint loading changes, or callers gain control over model assets. See the upstream report.
Record these dismissals on the individual GitHub alerts with the reasons above. Bun audit ignore lists and Trivy exceptions do not suppress Python Dependabot alerts.
Adding an exception
Section titled “Adding an exception”- Show that no override or parent bump works, and record what you tried.
- Name the code path that reaches the package and whether TomoriBot runs it.
- Add the ID to
AUDIT_IGNORED_ADVISORIESand theci.ymlflags, and to.github/.trivyignoreif the package ships in the image. - Add an entry under Active exceptions with the path, reason, risk, and the condition for removing it.
An ignored ID is hidden everywhere in the tree, including dependency paths added later. If a change puts the package on a reachable path, the exception keeps hiding it, so re-check the recorded path whenever the dependency moves.
Verifying a change
Section titled “Verifying a change”bun audit reads the lockfile, not node_modules, so it can pass while the installed tree still
holds the old version. On Windows an interrupted install also leaves a .old_modules-* folder that
serves stale copies. Reinstall before trusting any result:
rm -rf node_modules && bun installbun run checkbun testbun run vlbun auditWhen an override forces a package past its parent’s declared range, test the parent’s entry point. Resolve from the parent’s location, since the project root may hold a different hoisted copy:
import { createRequire } from "node:module";
const require = createRequire("<path to the consumer's package.json>");console.log(require("<forced-package>/package.json").version);