Files
poli0981-dev/THIRD-PARTY-NOTICES.md
poli0981andClaude Opus 5.5 0c56acd806 ci: Qodana analysis and a licence check over the whole dependency tree (#135)
* ci: Qodana analysis and a licence check over the whole dependency tree

- Qodana (JetBrains, Qodana for JS) runs on every PR, on main and by hand
  (.github/workflows/qodana.yml, settings in qodana.yaml): native mode on the runner's
  Node 26 after `npm ci --ignore-scripts` and the generated types, profile
  qodana.recommended over the whole repository, build output, generated files, the
  content submodule and the design docs excluded, spelling/grammar checks off (they do
  not read Vietnamese). Results go to Qodana Cloud and, for main, to code scanning as
  SARIF. Dependabot and fork PRs skip it (no secrets), so it stays advisory.
- Licences: the allowlist moves to scripts/license-policy.mjs, shared by gen-notices
  (direct dependencies, THIRD-PARTY-NOTICES.md) and a new check-licenses step in the
  build job that reads every package in package-lock.json — transitive ones and every
  platform binary — with a small SPDX evaluator (OR, AND, WITH, parentheses). Packages
  with no licence fail; reviews are per package with a reason instead of per licence
  (an MPL note written for satori used to clear @axe-core/playwright too). Today:
  735 packages, 42 cleared (MPL-2.0 build/test tools, sharp's LGPL libvips).
- README badges and Quality row, THIRD-PARTY-NOTICES tool list.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix: Qodana's first findings, and a zero-problem quality gate

The first Qodana run reported 11 problems; all are handled:
- scripts/smoke-worker.mjs: the forged Access JWT is now built from its JSON parts at run
  time (same bytes) instead of sitting in the source as a token literal, which secret
  scanners rightly flag; the "did not come up" case reports through the same helper as
  any other failure instead of throwing into its own catch.
- scripts/check-csp-hashes.mjs: ("|') → ["'] in the JSON-LD matcher.
- src/lib/format.ts: drop the two escapes of `]` outside a character class (a lone `]`
  is a literal there); the classes keep theirs.
- src/lib/legal-lang.ts: the heading → language table is a Map, so "Tiếng Việt" is data,
  not a property name mixing scripts.
- qodana.yaml: ES6PreferShortImport off, with the reason — the build scripts and
  astro.config.mjs run under plain Node, where the `@/` alias doesn't resolve and a
  TypeScript import keeps its `.ts`.
- failThreshold: 0, so any new problem turns the check red.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix: sort the licence report with an explicit compare function

Sonar S2871: Array#sort() without a compare function sorts by UTF-16 code units, which
is not alphabetical for every name. Both lists now sort with localeCompare.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 07:55:31 +07:00

5.2 KiB

Third-Party Notices

This site is built with open-source software. Each component below remains under its own license; the full license texts ship inside each package under node_modules/.

A shorter, human-facing version is rendered on the site at /legal/third-party.

The table below is generated from package-lock.json by scripts/gen-notices.mjs, and CI fails if it drifts (docs 08 §6). Edit the script, not the block.

Generated by scripts/gen-notices.mjs from package-lock.json. CI fails if this block drifts, so do not edit it by hand.

Direct dependencies (36)

runtime are declared in dependencies; build in devDependencies and never served.

Package License Kind
@astrojs/check MIT build
@astrojs/cloudflare MIT runtime
@astrojs/mdx MIT runtime
@astrojs/rss MIT runtime
@astrojs/sitemap MIT runtime
@astrojs/svelte MIT runtime
@axe-core/playwright MPL-2.0 build
@resvg/resvg-js MPL-2.0 build
@tailwindcss/vite MIT runtime
@types/node MIT build
@typescript/native Apache-2.0 build
astro MIT runtime
eslint MIT build
eslint-plugin-astro MIT build
eslint-plugin-svelte MIT build
exifr MIT build
jose MIT runtime
knip ISC build
lefthook MIT build
marked MIT runtime
pagefind MIT build
playwright Apache-2.0 build
prettier MIT build
prettier-plugin-astro MIT build
prettier-plugin-svelte MIT build
prettier-plugin-tailwindcss MIT build
satori MPL-2.0 build
satori-html MIT build
sharp Apache-2.0 runtime
svelte MIT runtime
tailwindcss MIT runtime
typescript Apache-2.0 build
typescript-eslint MIT build
wrangler MIT OR Apache-2.0 build
yaml ISC runtime
zod MIT runtime

License spread across direct dependencies

License Packages
MIT 26
Apache-2.0 4
MPL-2.0 3
ISC 2
MIT OR Apache-2.0 1

Transitive dependencies are deliberately not tallied here. Which packages get installed depends on the platform (npm resolves only the matching @img/sharp-* / *-msvc binaries), and even a bare count would change with every lockfile bump. The complete inventory is package-lock.json; platform binaries are covered in prose below.

Licenses outside the standard allowlist

MPL-2.0 — 3 package(s):

  • @axe-core/playwright — reviewed: File-level copyleft. Runs only in the accessibility tests (tests/a11y); never shipped.
  • @resvg/resvg-js — reviewed: File-level copyleft. Used unmodified at build time to draw the OG cards (scripts/gen-og.mjs); never shipped to the browser or the Worker.
  • satori — reviewed: File-level copyleft. Used unmodified at build time to draw the OG cards (scripts/gen-og.mjs); never shipped to the browser or the Worker.

Platform binaries (not in the table above)

npm installs only the prebuilt binary matching the build machine, so these vary by platform and are surveyed in prose rather than generated.

@img/sharp-* — Apache-2.0 AND LGPL-3.0-or-later. sharp's prebuilt binaries bundle libvips, part of which is LGPL. This is fine here and worth writing down rather than rediscovering: sharp is a build-time dependency (imageService: "compile"), the binary runs on the build machine and is never served to a visitor, and LGPL obligations attach to distributing the library. The built site contains only the resulting AVIF/WebP files.

@resvg/resvg-js-*, lightningcss-* — MPL-2.0. File-level copyleft, used unmodified as build tools, likewise never shipped.

Infrastructure services

Not packages — listed for transparency:

  • Cloudflare — Workers and static assets (hosting, CDN), Workers KV (widget data, mirrored widget images, the IP denylist, the admin audit log), R2 (images uploaded through the admin), Images (one-time AVIF/WebP transforms), Rate Limiting, Turnstile (bot gate and bug-report form), Access (the admin), Web Analytics (cookieless page views, production builds only) and Workers Logs.
  • GitHub — source code, the content repository, Actions CI, and issues in a private repository for site bug reports.
  • Discord — a webhook receiving bug-report notifications.
  • YouTube, Steam and GitHub public APIs — read by the widgets cron worker; visitors' browsers never call them (images are mirrored and served from the site).
  • SonarCloud, Qodana (JetBrains), CodeQL, OSV-Scanner, Snyk — code and dependency analysis in CI; nothing they do reaches the running site.

Fonts

Bricolage Grotesque, Be Vietnam Pro, Literata and JetBrains Mono are served self-hosted via Astro's Fonts API under the SIL Open Font License 1.1. They are fetched at build time, so they do not appear in the dependency table above.

AI tooling

The models used to write this site's code are disclosed separately at /legal/ai-usage.