From ec65a284cb6d9af630b4fe45481943396a8cafe0 Mon Sep 17 00:00:00 2001 From: Maksym Stoianov Date: Wed, 18 Nov 2026 12:29:52 +0100 Subject: [PATCH 1/3] ci: upload test coverage to Codecov and show the badge The checks job writes an lcov report and uploads it with codecov/codecov-action (pinned v7.1.1) using OIDC, without a token; the upload never fails the build (fork pull requests get no OIDC token). codecov.yml: project and patch status with a 1 % threshold, PR comment only when coverage changes. README and translations show the Codecov badge. Co-Authored-By: Claude Opus 5.5 Signed-off-by: Maksym Stoianov --- .github/workflows/ci.yml | 14 +++++++++++++- README.md | 1 + codecov.yml | 15 +++++++++++++++ docs/readme/README.ar.md | 1 + docs/readme/README.cs.md | 1 + docs/readme/README.de.md | 1 + docs/readme/README.es.md | 1 + docs/readme/README.fr.md | 1 + docs/readme/README.id.md | 1 + docs/readme/README.it.md | 1 + docs/readme/README.ja.md | 1 + docs/readme/README.ko.md | 1 + docs/readme/README.nl.md | 1 + docs/readme/README.pl.md | 1 + docs/readme/README.pt.md | 1 + docs/readme/README.ru.md | 1 + docs/readme/README.tr.md | 1 + docs/readme/README.uk.md | 1 + docs/readme/README.vi.md | 1 + docs/readme/README.zh-TW.md | 1 + docs/readme/README.zh.md | 1 + 21 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 codecov.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7dede198..36e87e8b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,6 +21,9 @@ jobs: checks: runs-on: ubuntu-latest timeout-minutes: 15 + permissions: + contents: read + id-token: write steps: - name: checkout @@ -47,7 +50,16 @@ jobs: run: npm run format - name: test - run: npm run test:cov + run: npm run test:cov -- --coverage.reporter=text --coverage.reporter=lcov + + # Coverage report to Codecov (OIDC, no token). Never fails the build: forks get no OIDC token. + - name: codecov + if: always() && !cancelled() + uses: codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5 # v7.1.1 + with: + use_oidc: ${{ github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository }} + files: ./coverage/lcov.info + fail_ci_if_error: false - name: build run: npm run build diff --git a/README.md b/README.md index b91787b9..e8e24168 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,7 @@

CI CodeQL + Codecov OpenSSF Scorecard REUSE status OpenSSF Best Practices diff --git a/codecov.yml b/codecov.yml new file mode 100644 index 00000000..f0c00339 --- /dev/null +++ b/codecov.yml @@ -0,0 +1,15 @@ +# Codecov: https://docs.codecov.com/docs/codecov-yaml +coverage: + status: + project: + default: + target: auto + threshold: 1% + patch: + default: + target: auto + threshold: 1% + +comment: + layout: "diff, files" + require_changes: true diff --git a/docs/readme/README.ar.md b/docs/readme/README.ar.md index 11fc863d..dbbd5248 100644 --- a/docs/readme/README.ar.md +++ b/docs/readme/README.ar.md @@ -21,6 +21,7 @@

CI CodeQL + Codecov OpenSSF Scorecard REUSE status OpenSSF Best Practices diff --git a/docs/readme/README.cs.md b/docs/readme/README.cs.md index 04c90619..387f0220 100644 --- a/docs/readme/README.cs.md +++ b/docs/readme/README.cs.md @@ -17,6 +17,7 @@

CI CodeQL + Codecov OpenSSF Scorecard REUSE status OpenSSF Best Practices diff --git a/docs/readme/README.de.md b/docs/readme/README.de.md index 37f5e377..44299e84 100644 --- a/docs/readme/README.de.md +++ b/docs/readme/README.de.md @@ -17,6 +17,7 @@

CI CodeQL + Codecov OpenSSF Scorecard REUSE status OpenSSF Best Practices diff --git a/docs/readme/README.es.md b/docs/readme/README.es.md index b0e9bb65..7a5aa3f0 100644 --- a/docs/readme/README.es.md +++ b/docs/readme/README.es.md @@ -17,6 +17,7 @@

CI CodeQL + Codecov OpenSSF Scorecard REUSE status OpenSSF Best Practices diff --git a/docs/readme/README.fr.md b/docs/readme/README.fr.md index bbc24819..f5e2fef5 100644 --- a/docs/readme/README.fr.md +++ b/docs/readme/README.fr.md @@ -17,6 +17,7 @@

CI CodeQL + Codecov OpenSSF Scorecard REUSE status OpenSSF Best Practices diff --git a/docs/readme/README.id.md b/docs/readme/README.id.md index 6df934d9..933c74d5 100644 --- a/docs/readme/README.id.md +++ b/docs/readme/README.id.md @@ -17,6 +17,7 @@

CI CodeQL + Codecov OpenSSF Scorecard REUSE status OpenSSF Best Practices diff --git a/docs/readme/README.it.md b/docs/readme/README.it.md index c5e2fb90..fd0b490c 100644 --- a/docs/readme/README.it.md +++ b/docs/readme/README.it.md @@ -17,6 +17,7 @@

CI CodeQL + Codecov OpenSSF Scorecard REUSE status OpenSSF Best Practices diff --git a/docs/readme/README.ja.md b/docs/readme/README.ja.md index 9439defb..8a9854f5 100644 --- a/docs/readme/README.ja.md +++ b/docs/readme/README.ja.md @@ -17,6 +17,7 @@

CI CodeQL + Codecov OpenSSF Scorecard REUSE status OpenSSF Best Practices diff --git a/docs/readme/README.ko.md b/docs/readme/README.ko.md index 1f332d93..603d3a7d 100644 --- a/docs/readme/README.ko.md +++ b/docs/readme/README.ko.md @@ -17,6 +17,7 @@

CI CodeQL + Codecov OpenSSF Scorecard REUSE status OpenSSF Best Practices diff --git a/docs/readme/README.nl.md b/docs/readme/README.nl.md index dfb8e283..6895538d 100644 --- a/docs/readme/README.nl.md +++ b/docs/readme/README.nl.md @@ -17,6 +17,7 @@

CI CodeQL + Codecov OpenSSF Scorecard REUSE status OpenSSF Best Practices diff --git a/docs/readme/README.pl.md b/docs/readme/README.pl.md index 0fdc60fb..54c3acb9 100644 --- a/docs/readme/README.pl.md +++ b/docs/readme/README.pl.md @@ -17,6 +17,7 @@

CI CodeQL + Codecov OpenSSF Scorecard REUSE status OpenSSF Best Practices diff --git a/docs/readme/README.pt.md b/docs/readme/README.pt.md index ea5c212b..5b8aa536 100644 --- a/docs/readme/README.pt.md +++ b/docs/readme/README.pt.md @@ -17,6 +17,7 @@

CI CodeQL + Codecov OpenSSF Scorecard REUSE status OpenSSF Best Practices diff --git a/docs/readme/README.ru.md b/docs/readme/README.ru.md index 74fc055a..f8a1011b 100644 --- a/docs/readme/README.ru.md +++ b/docs/readme/README.ru.md @@ -17,6 +17,7 @@

CI CodeQL + Codecov OpenSSF Scorecard REUSE status OpenSSF Best Practices diff --git a/docs/readme/README.tr.md b/docs/readme/README.tr.md index 4bf99f4a..4ae968fb 100644 --- a/docs/readme/README.tr.md +++ b/docs/readme/README.tr.md @@ -17,6 +17,7 @@

CI CodeQL + Codecov OpenSSF Scorecard REUSE status OpenSSF Best Practices diff --git a/docs/readme/README.uk.md b/docs/readme/README.uk.md index e0c4e3e9..f6d17db9 100644 --- a/docs/readme/README.uk.md +++ b/docs/readme/README.uk.md @@ -17,6 +17,7 @@

CI CodeQL + Codecov OpenSSF Scorecard REUSE status OpenSSF Best Practices diff --git a/docs/readme/README.vi.md b/docs/readme/README.vi.md index 307cf68c..04638702 100644 --- a/docs/readme/README.vi.md +++ b/docs/readme/README.vi.md @@ -17,6 +17,7 @@

CI CodeQL + Codecov OpenSSF Scorecard REUSE status OpenSSF Best Practices diff --git a/docs/readme/README.zh-TW.md b/docs/readme/README.zh-TW.md index 75289f58..ce164070 100644 --- a/docs/readme/README.zh-TW.md +++ b/docs/readme/README.zh-TW.md @@ -17,6 +17,7 @@

CI CodeQL + Codecov OpenSSF Scorecard REUSE status OpenSSF Best Practices diff --git a/docs/readme/README.zh.md b/docs/readme/README.zh.md index b1d2f7f0..dee28c57 100644 --- a/docs/readme/README.zh.md +++ b/docs/readme/README.zh.md @@ -17,6 +17,7 @@

CI CodeQL + Codecov OpenSSF Scorecard REUSE status OpenSSF Best Practices From 9b296e7285923b3a5376e54a5a28d455b96cdf5a Mon Sep 17 00:00:00 2001 From: Maksym Stoianov Date: Wed, 18 Nov 2026 12:50:09 +0100 Subject: [PATCH 2/3] docs: order README languages by language code English first, then the translations by ISO 639-1 code (ar, cs, de, es, fr, id, it, ja, ko, nl, pl, pt, ru, tr, uk, vi, zh, zh-TW), as common in multilingual docs; the checker's LANGUAGES list follows the same order. Co-Authored-By: Claude Opus 5.5 Signed-off-by: Maksym Stoianov --- README.md | 2 +- docs/readme/README.ar.md | 2 +- docs/readme/README.cs.md | 2 +- docs/readme/README.de.md | 2 +- docs/readme/README.es.md | 2 +- docs/readme/README.fr.md | 2 +- docs/readme/README.id.md | 2 +- docs/readme/README.it.md | 2 +- docs/readme/README.ja.md | 2 +- docs/readme/README.ko.md | 2 +- docs/readme/README.nl.md | 2 +- docs/readme/README.pl.md | 2 +- docs/readme/README.pt.md | 2 +- docs/readme/README.ru.md | 2 +- docs/readme/README.tr.md | 2 +- docs/readme/README.uk.md | 2 +- docs/readme/README.vi.md | 2 +- docs/readme/README.zh-TW.md | 2 +- docs/readme/README.zh.md | 2 +- scripts/check-readme-translations.mjs | 18 +++++++++--------- 20 files changed, 28 insertions(+), 28 deletions(-) diff --git a/README.md b/README.md index e8e24168..a8d7c9df 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@

-**English** | [Українська](docs/readme/README.uk.md) | [Русский](docs/readme/README.ru.md) | [Deutsch](docs/readme/README.de.md) | [Français](docs/readme/README.fr.md) | [Español](docs/readme/README.es.md) | [Português](docs/readme/README.pt.md) | [Italiano](docs/readme/README.it.md) | [Nederlands](docs/readme/README.nl.md) | [Polski](docs/readme/README.pl.md) | [Čeština](docs/readme/README.cs.md) | [Türkçe](docs/readme/README.tr.md) | [العربية](docs/readme/README.ar.md) | [Bahasa Indonesia](docs/readme/README.id.md) | [Tiếng Việt](docs/readme/README.vi.md) | [日本語](docs/readme/README.ja.md) | [한국어](docs/readme/README.ko.md) | [简体中文](docs/readme/README.zh.md) | [繁體中文](docs/readme/README.zh-TW.md) +**English** | [العربية](docs/readme/README.ar.md) | [Čeština](docs/readme/README.cs.md) | [Deutsch](docs/readme/README.de.md) | [Español](docs/readme/README.es.md) | [Français](docs/readme/README.fr.md) | [Bahasa Indonesia](docs/readme/README.id.md) | [Italiano](docs/readme/README.it.md) | [日本語](docs/readme/README.ja.md) | [한국어](docs/readme/README.ko.md) | [Nederlands](docs/readme/README.nl.md) | [Polski](docs/readme/README.pl.md) | [Português](docs/readme/README.pt.md) | [Русский](docs/readme/README.ru.md) | [Türkçe](docs/readme/README.tr.md) | [Українська](docs/readme/README.uk.md) | [Tiếng Việt](docs/readme/README.vi.md) | [简体中文](docs/readme/README.zh.md) | [繁體中文](docs/readme/README.zh-TW.md) # Utilities for Google Apps Script™ diff --git a/docs/readme/README.ar.md b/docs/readme/README.ar.md index dbbd5248..43ffc9e3 100644 --- a/docs/readme/README.ar.md +++ b/docs/readme/README.ar.md @@ -8,7 +8,7 @@

-[English](../../README.md) | [Українська](README.uk.md) | [Русский](README.ru.md) | [Deutsch](README.de.md) | [Français](README.fr.md) | [Español](README.es.md) | [Português](README.pt.md) | [Italiano](README.it.md) | [Nederlands](README.nl.md) | [Polski](README.pl.md) | [Čeština](README.cs.md) | [Türkçe](README.tr.md) | **العربية** | [Bahasa Indonesia](README.id.md) | [Tiếng Việt](README.vi.md) | [日本語](README.ja.md) | [한국어](README.ko.md) | [简体中文](README.zh.md) | [繁體中文](README.zh-TW.md) +[English](../../README.md) | **العربية** | [Čeština](README.cs.md) | [Deutsch](README.de.md) | [Español](README.es.md) | [Français](README.fr.md) | [Bahasa Indonesia](README.id.md) | [Italiano](README.it.md) | [日本語](README.ja.md) | [한국어](README.ko.md) | [Nederlands](README.nl.md) | [Polski](README.pl.md) | [Português](README.pt.md) | [Русский](README.ru.md) | [Türkçe](README.tr.md) | [Українська](README.uk.md) | [Tiếng Việt](README.vi.md) | [简体中文](README.zh.md) | [繁體中文](README.zh-TW.md)
diff --git a/docs/readme/README.cs.md b/docs/readme/README.cs.md index 387f0220..ecb464a3 100644 --- a/docs/readme/README.cs.md +++ b/docs/readme/README.cs.md @@ -8,7 +8,7 @@

-[English](../../README.md) | [Українська](README.uk.md) | [Русский](README.ru.md) | [Deutsch](README.de.md) | [Français](README.fr.md) | [Español](README.es.md) | [Português](README.pt.md) | [Italiano](README.it.md) | [Nederlands](README.nl.md) | [Polski](README.pl.md) | **Čeština** | [Türkçe](README.tr.md) | [العربية](README.ar.md) | [Bahasa Indonesia](README.id.md) | [Tiếng Việt](README.vi.md) | [日本語](README.ja.md) | [한국어](README.ko.md) | [简体中文](README.zh.md) | [繁體中文](README.zh-TW.md) +[English](../../README.md) | [العربية](README.ar.md) | **Čeština** | [Deutsch](README.de.md) | [Español](README.es.md) | [Français](README.fr.md) | [Bahasa Indonesia](README.id.md) | [Italiano](README.it.md) | [日本語](README.ja.md) | [한국어](README.ko.md) | [Nederlands](README.nl.md) | [Polski](README.pl.md) | [Português](README.pt.md) | [Русский](README.ru.md) | [Türkçe](README.tr.md) | [Українська](README.uk.md) | [Tiếng Việt](README.vi.md) | [简体中文](README.zh.md) | [繁體中文](README.zh-TW.md) > Tento překlad vznikl s pomocí AI z [README.md](../../README.md) pro verzi 3.0.0. Referenční verzí je anglické README; opravy jsou vítány — viz [CONTRIBUTING.md](../../CONTRIBUTING.md#readme-translations). diff --git a/docs/readme/README.de.md b/docs/readme/README.de.md index 44299e84..d8bd436e 100644 --- a/docs/readme/README.de.md +++ b/docs/readme/README.de.md @@ -8,7 +8,7 @@

-[English](../../README.md) | [Українська](README.uk.md) | [Русский](README.ru.md) | **Deutsch** | [Français](README.fr.md) | [Español](README.es.md) | [Português](README.pt.md) | [Italiano](README.it.md) | [Nederlands](README.nl.md) | [Polski](README.pl.md) | [Čeština](README.cs.md) | [Türkçe](README.tr.md) | [العربية](README.ar.md) | [Bahasa Indonesia](README.id.md) | [Tiếng Việt](README.vi.md) | [日本語](README.ja.md) | [한국어](README.ko.md) | [简体中文](README.zh.md) | [繁體中文](README.zh-TW.md) +[English](../../README.md) | [العربية](README.ar.md) | [Čeština](README.cs.md) | **Deutsch** | [Español](README.es.md) | [Français](README.fr.md) | [Bahasa Indonesia](README.id.md) | [Italiano](README.it.md) | [日本語](README.ja.md) | [한국어](README.ko.md) | [Nederlands](README.nl.md) | [Polski](README.pl.md) | [Português](README.pt.md) | [Русский](README.ru.md) | [Türkçe](README.tr.md) | [Українська](README.uk.md) | [Tiếng Việt](README.vi.md) | [简体中文](README.zh.md) | [繁體中文](README.zh-TW.md) > Diese Übersetzung wurde mit KI-Unterstützung aus [README.md](../../README.md) für Version 3.0.0 erstellt. Maßgeblich ist die englische README; Korrekturen sind willkommen — siehe [CONTRIBUTING.md](../../CONTRIBUTING.md#readme-translations). diff --git a/docs/readme/README.es.md b/docs/readme/README.es.md index 7a5aa3f0..b7b68037 100644 --- a/docs/readme/README.es.md +++ b/docs/readme/README.es.md @@ -8,7 +8,7 @@

-[English](../../README.md) | [Українська](README.uk.md) | [Русский](README.ru.md) | [Deutsch](README.de.md) | [Français](README.fr.md) | **Español** | [Português](README.pt.md) | [Italiano](README.it.md) | [Nederlands](README.nl.md) | [Polski](README.pl.md) | [Čeština](README.cs.md) | [Türkçe](README.tr.md) | [العربية](README.ar.md) | [Bahasa Indonesia](README.id.md) | [Tiếng Việt](README.vi.md) | [日本語](README.ja.md) | [한국어](README.ko.md) | [简体中文](README.zh.md) | [繁體中文](README.zh-TW.md) +[English](../../README.md) | [العربية](README.ar.md) | [Čeština](README.cs.md) | [Deutsch](README.de.md) | **Español** | [Français](README.fr.md) | [Bahasa Indonesia](README.id.md) | [Italiano](README.it.md) | [日本語](README.ja.md) | [한국어](README.ko.md) | [Nederlands](README.nl.md) | [Polski](README.pl.md) | [Português](README.pt.md) | [Русский](README.ru.md) | [Türkçe](README.tr.md) | [Українська](README.uk.md) | [Tiếng Việt](README.vi.md) | [简体中文](README.zh.md) | [繁體中文](README.zh-TW.md) > Esta traducción se hizo con ayuda de IA a partir de [README.md](../../README.md) para la versión 3.0.0. La versión de referencia es el README en inglés; las correcciones son bienvenidas — consulta [CONTRIBUTING.md](../../CONTRIBUTING.md#readme-translations). diff --git a/docs/readme/README.fr.md b/docs/readme/README.fr.md index f5e2fef5..6280c6cc 100644 --- a/docs/readme/README.fr.md +++ b/docs/readme/README.fr.md @@ -8,7 +8,7 @@

-[English](../../README.md) | [Українська](README.uk.md) | [Русский](README.ru.md) | [Deutsch](README.de.md) | **Français** | [Español](README.es.md) | [Português](README.pt.md) | [Italiano](README.it.md) | [Nederlands](README.nl.md) | [Polski](README.pl.md) | [Čeština](README.cs.md) | [Türkçe](README.tr.md) | [العربية](README.ar.md) | [Bahasa Indonesia](README.id.md) | [Tiếng Việt](README.vi.md) | [日本語](README.ja.md) | [한국어](README.ko.md) | [简体中文](README.zh.md) | [繁體中文](README.zh-TW.md) +[English](../../README.md) | [العربية](README.ar.md) | [Čeština](README.cs.md) | [Deutsch](README.de.md) | [Español](README.es.md) | **Français** | [Bahasa Indonesia](README.id.md) | [Italiano](README.it.md) | [日本語](README.ja.md) | [한국어](README.ko.md) | [Nederlands](README.nl.md) | [Polski](README.pl.md) | [Português](README.pt.md) | [Русский](README.ru.md) | [Türkçe](README.tr.md) | [Українська](README.uk.md) | [Tiếng Việt](README.vi.md) | [简体中文](README.zh.md) | [繁體中文](README.zh-TW.md) > Cette traduction a été réalisée avec l'aide de l'IA à partir de [README.md](../../README.md) pour la version 3.0.0. Le README anglais fait foi ; les corrections sont les bienvenues — voir [CONTRIBUTING.md](../../CONTRIBUTING.md#readme-translations). diff --git a/docs/readme/README.id.md b/docs/readme/README.id.md index 933c74d5..4e77f3f3 100644 --- a/docs/readme/README.id.md +++ b/docs/readme/README.id.md @@ -8,7 +8,7 @@

-[English](../../README.md) | [Українська](README.uk.md) | [Русский](README.ru.md) | [Deutsch](README.de.md) | [Français](README.fr.md) | [Español](README.es.md) | [Português](README.pt.md) | [Italiano](README.it.md) | [Nederlands](README.nl.md) | [Polski](README.pl.md) | [Čeština](README.cs.md) | [Türkçe](README.tr.md) | [العربية](README.ar.md) | **Bahasa Indonesia** | [Tiếng Việt](README.vi.md) | [日本語](README.ja.md) | [한국어](README.ko.md) | [简体中文](README.zh.md) | [繁體中文](README.zh-TW.md) +[English](../../README.md) | [العربية](README.ar.md) | [Čeština](README.cs.md) | [Deutsch](README.de.md) | [Español](README.es.md) | [Français](README.fr.md) | **Bahasa Indonesia** | [Italiano](README.it.md) | [日本語](README.ja.md) | [한국어](README.ko.md) | [Nederlands](README.nl.md) | [Polski](README.pl.md) | [Português](README.pt.md) | [Русский](README.ru.md) | [Türkçe](README.tr.md) | [Українська](README.uk.md) | [Tiếng Việt](README.vi.md) | [简体中文](README.zh.md) | [繁體中文](README.zh-TW.md) > Terjemahan ini dibuat dengan bantuan AI dari [README.md](../../README.md) untuk versi 3.0.0. Versi acuannya adalah README berbahasa Inggris; koreksi sangat kami harapkan — lihat [CONTRIBUTING.md](../../CONTRIBUTING.md#readme-translations). diff --git a/docs/readme/README.it.md b/docs/readme/README.it.md index fd0b490c..c8030e94 100644 --- a/docs/readme/README.it.md +++ b/docs/readme/README.it.md @@ -8,7 +8,7 @@

-[English](../../README.md) | [Українська](README.uk.md) | [Русский](README.ru.md) | [Deutsch](README.de.md) | [Français](README.fr.md) | [Español](README.es.md) | [Português](README.pt.md) | **Italiano** | [Nederlands](README.nl.md) | [Polski](README.pl.md) | [Čeština](README.cs.md) | [Türkçe](README.tr.md) | [العربية](README.ar.md) | [Bahasa Indonesia](README.id.md) | [Tiếng Việt](README.vi.md) | [日本語](README.ja.md) | [한국어](README.ko.md) | [简体中文](README.zh.md) | [繁體中文](README.zh-TW.md) +[English](../../README.md) | [العربية](README.ar.md) | [Čeština](README.cs.md) | [Deutsch](README.de.md) | [Español](README.es.md) | [Français](README.fr.md) | [Bahasa Indonesia](README.id.md) | **Italiano** | [日本語](README.ja.md) | [한국어](README.ko.md) | [Nederlands](README.nl.md) | [Polski](README.pl.md) | [Português](README.pt.md) | [Русский](README.ru.md) | [Türkçe](README.tr.md) | [Українська](README.uk.md) | [Tiếng Việt](README.vi.md) | [简体中文](README.zh.md) | [繁體中文](README.zh-TW.md) > Questa traduzione è stata realizzata con l'aiuto dell'IA a partire da [README.md](../../README.md) per la versione 3.0.0. La versione di riferimento è il README in inglese; le correzioni sono benvenute — consulta [CONTRIBUTING.md](../../CONTRIBUTING.md#readme-translations). diff --git a/docs/readme/README.ja.md b/docs/readme/README.ja.md index 8a9854f5..b764a4ab 100644 --- a/docs/readme/README.ja.md +++ b/docs/readme/README.ja.md @@ -8,7 +8,7 @@

-[English](../../README.md) | [Українська](README.uk.md) | [Русский](README.ru.md) | [Deutsch](README.de.md) | [Français](README.fr.md) | [Español](README.es.md) | [Português](README.pt.md) | [Italiano](README.it.md) | [Nederlands](README.nl.md) | [Polski](README.pl.md) | [Čeština](README.cs.md) | [Türkçe](README.tr.md) | [العربية](README.ar.md) | [Bahasa Indonesia](README.id.md) | [Tiếng Việt](README.vi.md) | **日本語** | [한국어](README.ko.md) | [简体中文](README.zh.md) | [繁體中文](README.zh-TW.md) +[English](../../README.md) | [العربية](README.ar.md) | [Čeština](README.cs.md) | [Deutsch](README.de.md) | [Español](README.es.md) | [Français](README.fr.md) | [Bahasa Indonesia](README.id.md) | [Italiano](README.it.md) | **日本語** | [한국어](README.ko.md) | [Nederlands](README.nl.md) | [Polski](README.pl.md) | [Português](README.pt.md) | [Русский](README.ru.md) | [Türkçe](README.tr.md) | [Українська](README.uk.md) | [Tiếng Việt](README.vi.md) | [简体中文](README.zh.md) | [繁體中文](README.zh-TW.md) > この翻訳は、バージョン 3.0.0 の [README.md](../../README.md) をもとに AI の支援を受けて作成しました。正式な内容は英語版 README です。修正の提案を歓迎します。詳しくは [CONTRIBUTING.md](../../CONTRIBUTING.md#readme-translations) をご覧ください。 diff --git a/docs/readme/README.ko.md b/docs/readme/README.ko.md index 603d3a7d..c3f81f26 100644 --- a/docs/readme/README.ko.md +++ b/docs/readme/README.ko.md @@ -8,7 +8,7 @@

-[English](../../README.md) | [Українська](README.uk.md) | [Русский](README.ru.md) | [Deutsch](README.de.md) | [Français](README.fr.md) | [Español](README.es.md) | [Português](README.pt.md) | [Italiano](README.it.md) | [Nederlands](README.nl.md) | [Polski](README.pl.md) | [Čeština](README.cs.md) | [Türkçe](README.tr.md) | [العربية](README.ar.md) | [Bahasa Indonesia](README.id.md) | [Tiếng Việt](README.vi.md) | [日本語](README.ja.md) | **한국어** | [简体中文](README.zh.md) | [繁體中文](README.zh-TW.md) +[English](../../README.md) | [العربية](README.ar.md) | [Čeština](README.cs.md) | [Deutsch](README.de.md) | [Español](README.es.md) | [Français](README.fr.md) | [Bahasa Indonesia](README.id.md) | [Italiano](README.it.md) | [日本語](README.ja.md) | **한국어** | [Nederlands](README.nl.md) | [Polski](README.pl.md) | [Português](README.pt.md) | [Русский](README.ru.md) | [Türkçe](README.tr.md) | [Українська](README.uk.md) | [Tiếng Việt](README.vi.md) | [简体中文](README.zh.md) | [繁體中文](README.zh-TW.md) > 이 번역은 버전 3.0.0의 [README.md](../../README.md)를 바탕으로 AI의 도움을 받아 작성했습니다. 기준이 되는 버전은 영어 README이며, 수정 제안을 환영합니다. 자세한 내용은 [CONTRIBUTING.md](../../CONTRIBUTING.md#readme-translations)를 참고하세요. diff --git a/docs/readme/README.nl.md b/docs/readme/README.nl.md index 6895538d..7eed8535 100644 --- a/docs/readme/README.nl.md +++ b/docs/readme/README.nl.md @@ -8,7 +8,7 @@

-[English](../../README.md) | [Українська](README.uk.md) | [Русский](README.ru.md) | [Deutsch](README.de.md) | [Français](README.fr.md) | [Español](README.es.md) | [Português](README.pt.md) | [Italiano](README.it.md) | **Nederlands** | [Polski](README.pl.md) | [Čeština](README.cs.md) | [Türkçe](README.tr.md) | [العربية](README.ar.md) | [Bahasa Indonesia](README.id.md) | [Tiếng Việt](README.vi.md) | [日本語](README.ja.md) | [한국어](README.ko.md) | [简体中文](README.zh.md) | [繁體中文](README.zh-TW.md) +[English](../../README.md) | [العربية](README.ar.md) | [Čeština](README.cs.md) | [Deutsch](README.de.md) | [Español](README.es.md) | [Français](README.fr.md) | [Bahasa Indonesia](README.id.md) | [Italiano](README.it.md) | [日本語](README.ja.md) | [한국어](README.ko.md) | **Nederlands** | [Polski](README.pl.md) | [Português](README.pt.md) | [Русский](README.ru.md) | [Türkçe](README.tr.md) | [Українська](README.uk.md) | [Tiếng Việt](README.vi.md) | [简体中文](README.zh.md) | [繁體中文](README.zh-TW.md) > Deze vertaling is met behulp van AI gemaakt op basis van [README.md](../../README.md) voor versie 3.0.0. De referentieversie is de Engelse README; correcties zijn welkom — zie [CONTRIBUTING.md](../../CONTRIBUTING.md#readme-translations). diff --git a/docs/readme/README.pl.md b/docs/readme/README.pl.md index 54c3acb9..e2ee0bec 100644 --- a/docs/readme/README.pl.md +++ b/docs/readme/README.pl.md @@ -8,7 +8,7 @@

-[English](../../README.md) | [Українська](README.uk.md) | [Русский](README.ru.md) | [Deutsch](README.de.md) | [Français](README.fr.md) | [Español](README.es.md) | [Português](README.pt.md) | [Italiano](README.it.md) | [Nederlands](README.nl.md) | **Polski** | [Čeština](README.cs.md) | [Türkçe](README.tr.md) | [العربية](README.ar.md) | [Bahasa Indonesia](README.id.md) | [Tiếng Việt](README.vi.md) | [日本語](README.ja.md) | [한국어](README.ko.md) | [简体中文](README.zh.md) | [繁體中文](README.zh-TW.md) +[English](../../README.md) | [العربية](README.ar.md) | [Čeština](README.cs.md) | [Deutsch](README.de.md) | [Español](README.es.md) | [Français](README.fr.md) | [Bahasa Indonesia](README.id.md) | [Italiano](README.it.md) | [日本語](README.ja.md) | [한국어](README.ko.md) | [Nederlands](README.nl.md) | **Polski** | [Português](README.pt.md) | [Русский](README.ru.md) | [Türkçe](README.tr.md) | [Українська](README.uk.md) | [Tiếng Việt](README.vi.md) | [简体中文](README.zh.md) | [繁體中文](README.zh-TW.md) > To tłumaczenie powstało z pomocą AI na podstawie [README.md](../../README.md) dla wersji 3.0.0. Wersją wzorcową jest angielskie README; poprawki są mile widziane — zajrzyj do [CONTRIBUTING.md](../../CONTRIBUTING.md#readme-translations). diff --git a/docs/readme/README.pt.md b/docs/readme/README.pt.md index 5b8aa536..e224af68 100644 --- a/docs/readme/README.pt.md +++ b/docs/readme/README.pt.md @@ -8,7 +8,7 @@

-[English](../../README.md) | [Українська](README.uk.md) | [Русский](README.ru.md) | [Deutsch](README.de.md) | [Français](README.fr.md) | [Español](README.es.md) | **Português** | [Italiano](README.it.md) | [Nederlands](README.nl.md) | [Polski](README.pl.md) | [Čeština](README.cs.md) | [Türkçe](README.tr.md) | [العربية](README.ar.md) | [Bahasa Indonesia](README.id.md) | [Tiếng Việt](README.vi.md) | [日本語](README.ja.md) | [한국어](README.ko.md) | [简体中文](README.zh.md) | [繁體中文](README.zh-TW.md) +[English](../../README.md) | [العربية](README.ar.md) | [Čeština](README.cs.md) | [Deutsch](README.de.md) | [Español](README.es.md) | [Français](README.fr.md) | [Bahasa Indonesia](README.id.md) | [Italiano](README.it.md) | [日本語](README.ja.md) | [한국어](README.ko.md) | [Nederlands](README.nl.md) | [Polski](README.pl.md) | **Português** | [Русский](README.ru.md) | [Türkçe](README.tr.md) | [Українська](README.uk.md) | [Tiếng Việt](README.vi.md) | [简体中文](README.zh.md) | [繁體中文](README.zh-TW.md) > Esta tradução foi feita com ajuda de IA a partir do [README.md](../../README.md) para a versão 3.0.0. A versão de referência é o README em inglês; correções são bem-vindas — veja [CONTRIBUTING.md](../../CONTRIBUTING.md#readme-translations). diff --git a/docs/readme/README.ru.md b/docs/readme/README.ru.md index f8a1011b..d20d28dc 100644 --- a/docs/readme/README.ru.md +++ b/docs/readme/README.ru.md @@ -8,7 +8,7 @@

-[English](../../README.md) | [Українська](README.uk.md) | **Русский** | [Deutsch](README.de.md) | [Français](README.fr.md) | [Español](README.es.md) | [Português](README.pt.md) | [Italiano](README.it.md) | [Nederlands](README.nl.md) | [Polski](README.pl.md) | [Čeština](README.cs.md) | [Türkçe](README.tr.md) | [العربية](README.ar.md) | [Bahasa Indonesia](README.id.md) | [Tiếng Việt](README.vi.md) | [日本語](README.ja.md) | [한국어](README.ko.md) | [简体中文](README.zh.md) | [繁體中文](README.zh-TW.md) +[English](../../README.md) | [العربية](README.ar.md) | [Čeština](README.cs.md) | [Deutsch](README.de.md) | [Español](README.es.md) | [Français](README.fr.md) | [Bahasa Indonesia](README.id.md) | [Italiano](README.it.md) | [日本語](README.ja.md) | [한국어](README.ko.md) | [Nederlands](README.nl.md) | [Polski](README.pl.md) | [Português](README.pt.md) | **Русский** | [Türkçe](README.tr.md) | [Українська](README.uk.md) | [Tiếng Việt](README.vi.md) | [简体中文](README.zh.md) | [繁體中文](README.zh-TW.md) > Этот перевод выполнен с помощью ИИ по [README.md](../../README.md) для версии 3.0.0. Основной считается английская версия README; исправления приветствуются — см. [CONTRIBUTING.md](../../CONTRIBUTING.md#readme-translations). diff --git a/docs/readme/README.tr.md b/docs/readme/README.tr.md index 4ae968fb..f0a2f6bf 100644 --- a/docs/readme/README.tr.md +++ b/docs/readme/README.tr.md @@ -8,7 +8,7 @@

-[English](../../README.md) | [Українська](README.uk.md) | [Русский](README.ru.md) | [Deutsch](README.de.md) | [Français](README.fr.md) | [Español](README.es.md) | [Português](README.pt.md) | [Italiano](README.it.md) | [Nederlands](README.nl.md) | [Polski](README.pl.md) | [Čeština](README.cs.md) | **Türkçe** | [العربية](README.ar.md) | [Bahasa Indonesia](README.id.md) | [Tiếng Việt](README.vi.md) | [日本語](README.ja.md) | [한국어](README.ko.md) | [简体中文](README.zh.md) | [繁體中文](README.zh-TW.md) +[English](../../README.md) | [العربية](README.ar.md) | [Čeština](README.cs.md) | [Deutsch](README.de.md) | [Español](README.es.md) | [Français](README.fr.md) | [Bahasa Indonesia](README.id.md) | [Italiano](README.it.md) | [日本語](README.ja.md) | [한국어](README.ko.md) | [Nederlands](README.nl.md) | [Polski](README.pl.md) | [Português](README.pt.md) | [Русский](README.ru.md) | **Türkçe** | [Українська](README.uk.md) | [Tiếng Việt](README.vi.md) | [简体中文](README.zh.md) | [繁體中文](README.zh-TW.md) > Bu çeviri, 3.0.0 sürümü için [README.md](../../README.md) dosyasından yapay zekâ desteğiyle yapılmıştır. Referans sürüm İngilizce README'dir; düzeltmelerinizi bekliyoruz — bkz. [CONTRIBUTING.md](../../CONTRIBUTING.md#readme-translations). diff --git a/docs/readme/README.uk.md b/docs/readme/README.uk.md index f6d17db9..2f189258 100644 --- a/docs/readme/README.uk.md +++ b/docs/readme/README.uk.md @@ -8,7 +8,7 @@

-[English](../../README.md) | **Українська** | [Русский](README.ru.md) | [Deutsch](README.de.md) | [Français](README.fr.md) | [Español](README.es.md) | [Português](README.pt.md) | [Italiano](README.it.md) | [Nederlands](README.nl.md) | [Polski](README.pl.md) | [Čeština](README.cs.md) | [Türkçe](README.tr.md) | [العربية](README.ar.md) | [Bahasa Indonesia](README.id.md) | [Tiếng Việt](README.vi.md) | [日本語](README.ja.md) | [한국어](README.ko.md) | [简体中文](README.zh.md) | [繁體中文](README.zh-TW.md) +[English](../../README.md) | [العربية](README.ar.md) | [Čeština](README.cs.md) | [Deutsch](README.de.md) | [Español](README.es.md) | [Français](README.fr.md) | [Bahasa Indonesia](README.id.md) | [Italiano](README.it.md) | [日本語](README.ja.md) | [한국어](README.ko.md) | [Nederlands](README.nl.md) | [Polski](README.pl.md) | [Português](README.pt.md) | [Русский](README.ru.md) | [Türkçe](README.tr.md) | **Українська** | [Tiếng Việt](README.vi.md) | [简体中文](README.zh.md) | [繁體中文](README.zh-TW.md) > Цей переклад зроблено за допомогою ШІ з [README.md](../../README.md) для версії 3.0.0. Основною є англійська версія README; виправлення вітаються — див. [CONTRIBUTING.md](../../CONTRIBUTING.md#readme-translations). diff --git a/docs/readme/README.vi.md b/docs/readme/README.vi.md index 04638702..88f869de 100644 --- a/docs/readme/README.vi.md +++ b/docs/readme/README.vi.md @@ -8,7 +8,7 @@

-[English](../../README.md) | [Українська](README.uk.md) | [Русский](README.ru.md) | [Deutsch](README.de.md) | [Français](README.fr.md) | [Español](README.es.md) | [Português](README.pt.md) | [Italiano](README.it.md) | [Nederlands](README.nl.md) | [Polski](README.pl.md) | [Čeština](README.cs.md) | [Türkçe](README.tr.md) | [العربية](README.ar.md) | [Bahasa Indonesia](README.id.md) | **Tiếng Việt** | [日本語](README.ja.md) | [한국어](README.ko.md) | [简体中文](README.zh.md) | [繁體中文](README.zh-TW.md) +[English](../../README.md) | [العربية](README.ar.md) | [Čeština](README.cs.md) | [Deutsch](README.de.md) | [Español](README.es.md) | [Français](README.fr.md) | [Bahasa Indonesia](README.id.md) | [Italiano](README.it.md) | [日本語](README.ja.md) | [한국어](README.ko.md) | [Nederlands](README.nl.md) | [Polski](README.pl.md) | [Português](README.pt.md) | [Русский](README.ru.md) | [Türkçe](README.tr.md) | [Українська](README.uk.md) | **Tiếng Việt** | [简体中文](README.zh.md) | [繁體中文](README.zh-TW.md) > Bản dịch này được thực hiện với sự hỗ trợ của AI từ [README.md](../../README.md) cho phiên bản 3.0.0. Phiên bản tham chiếu là README tiếng Anh; mọi góp ý chỉnh sửa đều được hoan nghênh — xem [CONTRIBUTING.md](../../CONTRIBUTING.md#readme-translations). diff --git a/docs/readme/README.zh-TW.md b/docs/readme/README.zh-TW.md index ce164070..33de6577 100644 --- a/docs/readme/README.zh-TW.md +++ b/docs/readme/README.zh-TW.md @@ -8,7 +8,7 @@

-[English](../../README.md) | [Українська](README.uk.md) | [Русский](README.ru.md) | [Deutsch](README.de.md) | [Français](README.fr.md) | [Español](README.es.md) | [Português](README.pt.md) | [Italiano](README.it.md) | [Nederlands](README.nl.md) | [Polski](README.pl.md) | [Čeština](README.cs.md) | [Türkçe](README.tr.md) | [العربية](README.ar.md) | [Bahasa Indonesia](README.id.md) | [Tiếng Việt](README.vi.md) | [日本語](README.ja.md) | [한국어](README.ko.md) | [简体中文](README.zh.md) | **繁體中文** +[English](../../README.md) | [العربية](README.ar.md) | [Čeština](README.cs.md) | [Deutsch](README.de.md) | [Español](README.es.md) | [Français](README.fr.md) | [Bahasa Indonesia](README.id.md) | [Italiano](README.it.md) | [日本語](README.ja.md) | [한국어](README.ko.md) | [Nederlands](README.nl.md) | [Polski](README.pl.md) | [Português](README.pt.md) | [Русский](README.ru.md) | [Türkçe](README.tr.md) | [Українська](README.uk.md) | [Tiếng Việt](README.vi.md) | [简体中文](README.zh.md) | **繁體中文** > 本翻譯以 AI 輔助,依據版本 3.0.0 的 [README.md](../../README.md) 製作。參考版本為英文版 README;歡迎提出修正,請參閱 [CONTRIBUTING.md](../../CONTRIBUTING.md#readme-translations)。 diff --git a/docs/readme/README.zh.md b/docs/readme/README.zh.md index dee28c57..220f2150 100644 --- a/docs/readme/README.zh.md +++ b/docs/readme/README.zh.md @@ -8,7 +8,7 @@

-[English](../../README.md) | [Українська](README.uk.md) | [Русский](README.ru.md) | [Deutsch](README.de.md) | [Français](README.fr.md) | [Español](README.es.md) | [Português](README.pt.md) | [Italiano](README.it.md) | [Nederlands](README.nl.md) | [Polski](README.pl.md) | [Čeština](README.cs.md) | [Türkçe](README.tr.md) | [العربية](README.ar.md) | [Bahasa Indonesia](README.id.md) | [Tiếng Việt](README.vi.md) | [日本語](README.ja.md) | [한국어](README.ko.md) | **简体中文** | [繁體中文](README.zh-TW.md) +[English](../../README.md) | [العربية](README.ar.md) | [Čeština](README.cs.md) | [Deutsch](README.de.md) | [Español](README.es.md) | [Français](README.fr.md) | [Bahasa Indonesia](README.id.md) | [Italiano](README.it.md) | [日本語](README.ja.md) | [한국어](README.ko.md) | [Nederlands](README.nl.md) | [Polski](README.pl.md) | [Português](README.pt.md) | [Русский](README.ru.md) | [Türkçe](README.tr.md) | [Українська](README.uk.md) | [Tiếng Việt](README.vi.md) | **简体中文** | [繁體中文](README.zh-TW.md) > 本译文借助 AI 根据 3.0.0 版本的 [README.md](../../README.md) 翻译而成。以英文版 README 为准;欢迎指正——请参阅 [CONTRIBUTING.md](../../CONTRIBUTING.md#readme-translations)。 diff --git a/scripts/check-readme-translations.mjs b/scripts/check-readme-translations.mjs index 86d02595..b590a48b 100644 --- a/scripts/check-readme-translations.mjs +++ b/scripts/check-readme-translations.mjs @@ -38,22 +38,22 @@ const ROOT = resolve(dirname(fileURLToPath(import.meta.url)), ".."); */ const LANGUAGES = [ { code: "en", name: "English" }, - { code: "uk", name: "Українська" }, - { code: "ru", name: "Русский" }, + { code: "ar", name: "العربية" }, + { code: "cs", name: "Čeština" }, { code: "de", name: "Deutsch" }, - { code: "fr", name: "Français" }, { code: "es", name: "Español" }, - { code: "pt", name: "Português" }, + { code: "fr", name: "Français" }, + { code: "id", name: "Bahasa Indonesia" }, { code: "it", name: "Italiano" }, + { code: "ja", name: "日本語" }, + { code: "ko", name: "한국어" }, { code: "nl", name: "Nederlands" }, { code: "pl", name: "Polski" }, - { code: "cs", name: "Čeština" }, + { code: "pt", name: "Português" }, + { code: "ru", name: "Русский" }, { code: "tr", name: "Türkçe" }, - { code: "ar", name: "العربية" }, - { code: "id", name: "Bahasa Indonesia" }, + { code: "uk", name: "Українська" }, { code: "vi", name: "Tiếng Việt" }, - { code: "ja", name: "日本語" }, - { code: "ko", name: "한국어" }, { code: "zh", name: "简体中文" }, { code: "zh-TW", name: "繁體中文" } ]; From ef5d8bd53c5e39f1103298859bf9abae18111a62 Mon Sep 17 00:00:00 2001 From: Maksym Stoianov Date: Wed, 18 Nov 2026 12:59:50 +0100 Subject: [PATCH 3/3] docs: OSPS Baseline documentation, validated release tag, versioned SBOM - CONTRIBUTING: how dependencies are selected, obtained and tracked; setup uses npm ci; clone instructions point to bootgs/utils. - MAINTAINERS: who has access to sensitive resources. - GOVERNANCE: collaborators are reviewed before getting elevated access. - SECURITY: verifying a release (npm audit signatures, gh attestation verify), secrets and credentials policy, SCA and SAST thresholds. - docs/design.md: modules, Apps Script services, packaging, docs pipeline. - release-please.yml: the release tag must match vX.Y.Z (also guards the workflow_dispatch input); the SBOM asset is named bootgs-utils-.cdx.json. Co-Authored-By: Claude Opus 5.5 Signed-off-by: Maksym Stoianov --- .github/workflows/release-please.yml | 28 +++++-- CONTRIBUTING.md | 41 +++++++++- GOVERNANCE.md | 6 ++ MAINTAINERS.md | 13 ++++ SECURITY.md | 63 +++++++++++++++ docs/design.md | 110 +++++++++++++++++++++++++++ 6 files changed, 252 insertions(+), 9 deletions(-) create mode 100644 docs/design.md diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index 4ab388d1..019df81f 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -58,12 +58,22 @@ jobs: permissions: contents: read id-token: write + env: + TAG: ${{ github.event_name == 'workflow_dispatch' && inputs.tag || needs.release-please.outputs.tag_name }} steps: + # Release tags are vX.Y.Z; anything else (e.g. a mistyped workflow_dispatch input) stops the job. + - name: validate-tag + run: | + if [[ ! "$TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then + echo "::error::Invalid release tag: must match ^v[0-9]+\.[0-9]+\.[0-9]+\$" + exit 1 + fi + - name: checkout uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: - ref: ${{ github.event_name == 'workflow_dispatch' && inputs.tag || needs.release-please.outputs.tag_name }} + ref: ${{ env.TAG }} persist-credentials: false - name: setup-node @@ -106,8 +116,8 @@ jobs: path: ${{ steps.pack.outputs.file }} retention-days: 5 - # Release assets: CycloneDX SBOM of the production dependency tree, the npm tarball and its - # signed build provenance (Sigstore bundle from actions/attest-build-provenance). + # Release assets: CycloneDX SBOM of the production dependency tree (bootgs-utils-.cdx.json), + # the npm tarball and its signed build provenance (Sigstore bundle from actions/attest-build-provenance). sbom: needs: [release-please, publish] if: >- @@ -122,6 +132,14 @@ jobs: TAG: ${{ github.event_name == 'workflow_dispatch' && inputs.tag || needs.release-please.outputs.tag_name }} steps: + # Release tags are vX.Y.Z; anything else (e.g. a mistyped workflow_dispatch input) stops the job. + - name: validate-tag + run: | + if [[ ! "$TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then + echo "::error::Invalid release tag: must match ^v[0-9]+\.[0-9]+\.[0-9]+\$" + exit 1 + fi + - name: checkout uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: @@ -137,7 +155,7 @@ jobs: run: npm ci --ignore-scripts - name: sbom - run: npm sbom --sbom-format cyclonedx --omit dev > sbom.cdx.json + run: npm sbom --sbom-format cyclonedx --omit dev > "bootgs-utils-${TAG#v}.cdx.json" - name: download-package uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2 @@ -158,4 +176,4 @@ jobs: run: | tgz=$(ls package/*.tgz) cp "$BUNDLE" "$tgz.sigstore.json" - gh release upload "$TAG" sbom.cdx.json "$tgz" "$tgz.sigstore.json" --clobber --repo "$GITHUB_REPOSITORY" + gh release upload "$TAG" "bootgs-utils-${TAG#v}.cdx.json" "$tgz" "$tgz.sigstore.json" --clobber --repo "$GITHUB_REPOSITORY" diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 714b694a..e908e36c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -24,6 +24,7 @@ Great that you are here and you want to contribute to **@bootgs/utils**! - [2. PR Specific Requirements](#2-pr-specific-requirements) - [Test Suite](#test-suite) - [README Translations](#readme-translations) + - [Dependencies](#dependencies) - [License](#license) @@ -44,6 +45,8 @@ The project is organized as follows: - [**`src/`**](src/) — Source code of the library. Organized into logical modules like `appsscript/`, `lang/`, `net/`, etc. - [**`test/`**](test/) — Test suites mirroring the `src` structure. +How the modules in `src/` fit together is described in [Design](docs/design.md). + ## Development Setup ### Requirements @@ -61,16 +64,16 @@ The project is organized as follows: 1. **Fork** the repository on GitHub. 2. **Clone** your fork locally: ```bash - git clone https://github.com//apps-script-utils.git - cd @bootgs/utils + git clone https://github.com//utils.git + cd utils ``` 3. **Add upstream remote**: ```bash git remote add upstream https://github.com/bootgs/utils.git ``` -4. **Install dependencies**: +4. **Install dependencies** from the lockfile: ```bash - npm install + npm ci ``` 5. **Build the project**: ```bash @@ -280,6 +283,36 @@ Chinese (`zh-TW`). Corrections from native speakers are welcome as ordinary pull a different number of `##`/`###` headings than `README.md`, or its note names a version other than the one in `package.json`. It does not compare wording. +## Dependencies + +**Obtaining.** Dependencies come from the npm registry. `package-lock.json` is committed and pins every direct and +transitive version with its integrity hash; install with `npm ci`, which installs exactly what the lockfile says. +Commit `package.json` and `package-lock.json` together whenever a dependency changes. + +**Selecting.** The published package has no runtime dependencies: `package.json` declares only `devDependencies` +(build, lint, test, documentation), and none of them is shipped. A new dependency needs a reason in the issue or +pull request and must be: + +- free/open-source software; a runtime dependency must use a licence on the CI allow-list: `Apache-2.0`, `MIT`, + `BSD-2-Clause`, `BSD-3-Clause`, `ISC` or `0BSD` (the `licences` step in [ci.yml](.github/workflows/ci.yml) fails + otherwise); +- actively maintained (recent releases, issues answered) and without known high or critical vulnerabilities; +- small for what it does: prefer a few lines of our own code over a package for a trivial helper. Adding the first + runtime dependency is a larger change and starts with an issue (see [GOVERNANCE.md](GOVERNANCE.md#decision-making)). + +**Tracking.** + +- [Dependabot](.github/dependabot.yml) checks npm packages and GitHub Actions weekly and opens pull requests against + `develop`. Minor and patch updates of development dependencies are grouped into one pull request + (`dev-dependencies`); other npm updates and GitHub Actions updates arrive as one pull request each. Dependabot + security updates are enabled for the repository. +- CI runs `npm audit --omit=dev --audit-level=high` on every pull request and push to `main` and `develop`, so a + known high or critical vulnerability in a runtime dependency fails the build. +- GitHub Actions in workflows are pinned to full commit SHAs, with the version in a comment. +- [OpenSSF Scorecard](.github/workflows/scorecard.yml) runs weekly and on pushes to `main`, and reports supply-chain + issues such as unpinned dependencies to code scanning. +- Each GitHub release carries a CycloneDX SBOM of the runtime dependency tree. + ## License By contributing to **@bootgs/utils**, you agree that your contributions will be licensed under diff --git a/GOVERNANCE.md b/GOVERNANCE.md index 3fd97c99..7623b71a 100644 --- a/GOVERNANCE.md +++ b/GOVERNANCE.md @@ -33,6 +33,12 @@ discussions — may be invited to become maintainers. You can also ask: open a d maintainer. New maintainers are added to [MAINTAINERS.md](MAINTAINERS.md) through a pull request and receive access step by step (triage, then write, then release). +Before anyone receives write or admin access to the repository or organisation, or npm publishing rights, the lead +maintainer reviews them: a track record of merged contributions, two-factor authentication on their GitHub and npm +accounts, and agreement to handle vulnerabilities as described in [SECURITY.md](SECURITY.md). Access is reviewed +whenever a role changes and removed when it is no longer needed. Current access is listed in +[MAINTAINERS.md](MAINTAINERS.md#access-to-sensitive-resources). + Maintainers who are inactive for 12 months may be moved to emeritus status, with thanks. ## Continuity diff --git a/MAINTAINERS.md b/MAINTAINERS.md index 5d1365bb..bc826e1d 100644 --- a/MAINTAINERS.md +++ b/MAINTAINERS.md @@ -4,4 +4,17 @@ | :-------------- | :--------------------------------------------------- | :-------------- | | Maksym Stoianov | [@MaksymStoianov](https://github.com/MaksymStoianov) | Lead maintainer | +## Access to sensitive resources + +| Resource | Who has access | +| :--------------------------------------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| GitHub organisation `bootgs` and repository `bootgs/utils` | Owner/admin: @MaksymStoianov | +| npm package `@bootgs/utils` (publishing) | npm account `maksymstoianov` (@MaksymStoianov), the only maintainer on the registry. CI publishes with npm trusted publishing (OIDC) from the `publish` job of `release-please.yml` in the environment `npm`, which deploys only from `main`; no npm token is stored in GitHub | +| GitHub Actions secrets | None are stored in the repository or its environments. Workflows use only the per-run `GITHUB_TOKEN` (`release-please.yml` passes it to release-please and to `gh release upload`, `docs.yml` uses it to push the `docs-archive` branch), with permissions declared per job; Codecov uploads use OIDC | +| Documentation site [bootgs.github.io/utils](https://bootgs.github.io/utils/) | Deployed by `docs.yml` through GitHub Pages in the environment `github-pages`, which deploys only from `main`; repository admins | +| Security advisories and private vulnerability reports | Maintainers listed above (repository admins) | +| Emergency access to the organisation and the npm package | A trusted backup person, only to keep the project available (see [Continuity](GOVERNANCE.md#continuity)) | + +Access is granted and reviewed as described in [GOVERNANCE.md](GOVERNANCE.md#becoming-a-maintainer). + See [GOVERNANCE.md](GOVERNANCE.md) for how decisions are made and how to become a maintainer. diff --git a/SECURITY.md b/SECURITY.md index 0b209035..c687804b 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -66,6 +66,69 @@ Out of scope: vulnerabilities in Google Apps Script itself or other Google servi upstream; we will update the dependency), and in scripts built with the library that are caused by their own code or configuration. +## Verifying a Release + +**npm package.** After installing, check the registry signatures (and provenance attestations, where present) of +your dependency tree: + +```bash +npm audit signatures +``` + +The release workflow publishes new versions from GitHub Actions with +[npm provenance](https://docs.npmjs.com/generating-provenance-statements); the provenance shown on +[npmjs.com/package/@bootgs/utils](https://www.npmjs.com/package/@bootgs/utils) names the repository `bootgs/utils`, +the workflow `.github/workflows/release-please.yml` and the commit the version was built from. `3.0.0`, the first +version under the new name, was published by hand and has a registry signature but no npm provenance; its tarball +is the same file as the attested GitHub release asset below (compare `npm view @bootgs/utils@3.0.0 dist.shasum` with +`shasum bootgs-utils-3.0.0.tgz`). + +**GitHub release assets.** Releases from `v3.0.0` on carry the npm tarball `bootgs-utils-.tgz` and its +Sigstore build provenance `bootgs-utils-.tgz.sigstore.json`, plus a CycloneDX SBOM of the runtime +dependency tree (`sbom.cdx.json` in `v3.0.0`, `bootgs-utils-.cdx.json` in later releases). Earlier +releases have no assets. Verify a downloaded tarball with the [GitHub CLI](https://cli.github.com/): + +```bash +gh attestation verify bootgs-utils-.tgz --repo bootgs/utils \ + --signer-workflow bootgs/utils/.github/workflows/release-please.yml +``` + +Add `--bundle bootgs-utils-.tgz.sigstore.json` to verify against the downloaded bundle instead of fetching +the attestation from GitHub. The attestation is valid only if it was signed by the `release-please.yml` workflow of +`bootgs/utils`, which runs on pushes to `main` (or a manual run for an existing tag). + +## Secrets and Credentials + +- No long-lived publishing credential exists: npm publishing uses + [trusted publishing](https://docs.npmjs.com/trusted-publishers) (OIDC) from the `npm` environment. +- No secrets are stored in the repository or its environments. Workflows use only the per-run `GITHUB_TOKEN`, with + permissions declared per job (`release-please.yml` and `docs.yml` reference `secrets.GITHUB_TOKEN`; no other + secret is referenced). Codecov uploads authenticate with OIDC. +- If a secret becomes necessary, it is stored only as a GitHub Actions secret scoped to an environment, is + accessible to maintainers only, and is rotated at least once a year and immediately on suspected exposure. +- GitHub secret scanning and push protection are enabled for the repository. +- Who has access to these resources: [MAINTAINERS.md](MAINTAINERS.md#access-to-sensitive-resources). + +## Dependency and Code Scanning Policy + +**Software composition analysis (SCA).** +[ci.yml](.github/workflows/ci.yml) runs on every pull request and on pushes to `main` and `develop`: + +- `npm audit --omit=dev --audit-level=high` — a high or critical vulnerability in a runtime dependency fails the + `checks` job; +- the `licences` step — a runtime dependency outside the allow-list (`Apache-2.0`, `MIT`, `BSD-2-Clause`, + `BSD-3-Clause`, `ISC`, `0BSD`) fails the `checks` job. + +`checks` is a required status check for pull requests into `develop`, so either failure blocks merging. Moderate +and low findings are fixed within 30 days or before the next release, whichever comes first, usually through +[Dependabot](.github/dependabot.yml) updates. No release is made while an SCA violation is open. + +**Static analysis (SAST).** [CodeQL](.github/workflows/codeql.yml) analyses JavaScript/TypeScript and GitHub Actions +on every pull request and push to `main` and `develop` and weekly; ESLint with `eslint-plugin-security` runs in the +`checks` job. High and critical CodeQL alerts are fixed before merging, medium ones before the next release. A +finding may be dismissed only as a false positive or not exploitable, with the reason written in the alert. CodeQL +is not a required status check; these thresholds are applied through maintainer review of every pull request. + ## Security Best Practices for Users 1. **Keep dependencies updated:** use the latest `@bootgs/utils` release and keep other packages current. diff --git a/docs/design.md b/docs/design.md new file mode 100644 index 00000000..1ed34cf3 --- /dev/null +++ b/docs/design.md @@ -0,0 +1,110 @@ +# Design + +[← Back to README](../README.md) · [Documentation site](https://bootgs.github.io/utils/) + +This page describes how **@bootgs/utils** is organised: its modules and their boundaries, how it uses the Google +Apps Script services, how it is packaged and how the documentation is generated. It describes the code in +[`src/`](../src/) as of version 3.0.x. + +The library is a collection of independent functions and exception classes. It has no state, no configuration, no +network listener and no storage of its own, and it makes no network calls (see [Privacy](privacy.md)). Every +function runs inside the caller's Apps Script execution (or in Node.js, for the runtime-independent part) and works +only on the values it is given or the Apps Script service objects it reaches for. + +## Modules + +`src/index.ts` re-exports every module, so the whole public API is available from the package root. Each module +directory has an `index.ts` barrel that re-exports its files; each public function lives in a file of its own, +named after the function. + +| Module | Contents | +| :------------------ | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `lang/base` | Type guards for JavaScript values (`isString`, `nonNil`, `requireObject`, …). | +| `lang/array` | Array helpers (`chunk`, `unique`, `transpose`, …) and 2D-array checks used before writing to a sheet. | +| `lang/number` | Number guards (`isInteger`, `requireSafeInteger`, …). | +| `lang/string` | String guards and validators (e-mail, locale, slug, version), case conversion, `escapeRegExp`, `merge` (`{{placeholder}}` templates). | +| `lang/object` | `getPath`, `setPath`, `equals`, `flat`, `hashCode`, `objectToString`. | +| `lang/function` | `retry`. | +| `lang` (root) | The `Class` abstract type and the `Iterator` interface. | +| `exception` | The exception hierarchy: `Exception` extends `Error`, `RuntimeException` extends `Exception`, and every concrete exception extends `RuntimeException`. Service-specific ones are in `exception/appsscript/{admin,sheet,slide}` and `exception/net`. | +| `net/path` | Path helpers (`join`, `normalize`, `parse`, `isAbsolute`, …) and domain validation. | +| `net/url` | URL guards (`isUrl`, `requireUrl`). | +| `json` | `parseJson`, `stringifyJson`. | +| `html` | `escapeHtml`, `escapeXml`, `encodeHtml`, `decodeHtml`. | +| `time` | `StopWatch`, `TimeUnit`, `now`, `diff`, `offset`, month helpers. | +| `appsscript/sheet` | Spreadsheet helpers: A1 notation parsing and building, column letters, `GridRange` comparisons, row and column writes, conditional clear/delete, schemas stored in developer metadata, rich text to HTML. | +| `appsscript/slide` | Presentation and slide guards, slide lookup, Markdown ↔ rich text conversion, find and replace. | +| `appsscript/ui` | Guards for `Ui`, `HtmlOutput` and `TextOutput`; `checkMultipleAccount`. | +| `appsscript/admin` | `isAdmin`, `nonAdmin`, `requireAdmin` (Admin SDK Directory). | +| `appsscript/drive` | `createFolder`. | +| `appsscript/base` | `getTriggerById`, `getByteSize`. | +| `appsscript/net` | `requireValidToken` (checks an API key or `Bearer` token against allowed values). | +| `appsscript` (root) | `requireService`, `requireRepository` (throw when a service, such as an advanced service, or a repository is not defined). | + +`appsscript/doc`, `appsscript/form` and `net/emitter` are placeholders and export nothing yet. + +Most functions follow one naming scheme — `isX` and `nonX` return a `boolean`, `requireX` and `requireNonX` return +the value or throw — described in [Validation conventions](https://bootgs.github.io/utils/validation-conventions.html). +Which exception each function throws is listed in +[Exception handling](https://bootgs.github.io/utils/exception-handling.html). + +### Boundaries + +Imports between modules are relative (`../../exception`), never through the package name, and go one way: + +- `appsscript/*` packages depend only on `lang` and `exception`, never on each other; +- `net`, `json` and `html` depend on `lang` (and `net` on `exception`); `time` depends on `exception`; +- `lang` and `exception` depend on each other (guards throw exceptions, exceptions use guards), and `lang` uses + `json` and `net` in a few validators. + +Nothing outside `appsscript` refers to an Apps Script global, with one exception: `retry` calls `Utilities.sleep` +when it exists. That split is what lets most of the library run and be tested in Node.js. + +## Apps Script services + +Functions in `appsscript` either take the service object they work on as an argument (`appendRows(sheet, rows)`, +`requireSheet(value)`) or, for a small, listed set, reach for a global such as `SpreadsheetApp`, `SlidesApp`, +`DriveApp`, `ScriptApp`, `Session`, `LockService` or `AdminDirectory` themselves. The library never calls +`UrlFetchApp`, `PropertiesService` or `CacheService`. + +Which functions reach for which global, and the OAuth scope each one needs in `appsscript.json`, are listed on +[The Apps Script runtime](https://bootgs.github.io/utils/apps-script-runtime.html). Apps Script derives scopes from +the code of the whole project, so a project that bundles the library should set `oauthScopes` explicitly; that page +gives the narrowest scope for each function. + +## Packaging + +- The package is ESM only (`"type": "module"`) with one entry point: `exports["."]` maps to `dist/index.js` and + `dist/index.d.ts`. `"sideEffects": false` lets bundlers drop unused functions. +- `npm run build` compiles `src/` with `tsc -b` (target `ESNext`) into `dist/` and runs + [`scripts/fix-esm-specifiers.mjs`](../scripts/fix-esm-specifiers.mjs), which rewrites extensionless relative + imports to `./file.js` / `./dir/index.js` so `dist/` loads in Node.js without a bundler. No source maps or + declaration maps are emitted, because `src/` is not shipped. +- The published tarball contains only `dist/`, `NOTICE`, `LICENSE`, `README.md` and `package.json` (`files` in + `package.json`). `dist/` is not committed. +- Apps Script has no module system, so applications bundle the library with their own code. For the runtime tests + in [`scripts/gas/`](../scripts/gas/README.md), `npm run build:gas` flattens `dist/` into one script file in + dependency order. +- Releases are built, tested, packed and published by + [`release-please.yml`](../.github/workflows/release-please.yml); see + [Verifying a Release](../SECURITY.md#verifying-a-release). + +## Documentation pipeline + +The documentation site is built with [Writerside](https://www.jetbrains.com/writerside/) in five languages +(English in `docs/writerside/`, the others in `docs/writerside-/`). + +1. **Generate.** [`scripts/docs/generate-topics.mjs`](../scripts/docs/generate-topics.mjs) reads `src/` with the + TypeScript compiler (signatures, parameter and return types, thrown exceptions, `@since`) and combines it with + hand-written prose from `docs/content//` into the reference pages of every language project. The JSDoc + is only a fallback; [`docs/content/COVERAGE.md`](content/COVERAGE.md) lists pages still using it. +2. **Check.** CI fails when the generated pages are stale (`npm run docs:check`); [`docs.yml`](../.github/workflows/docs.yml) + additionally verifies the documented examples and the examples and links in the JSDoc. +3. **Build and test.** `docs.yml` builds each language with the Writerside Docker builder and runs the Writerside + checker on the result. +4. **Publish.** On pushes to `main`, `docs.yml` assembles the languages into one site, adds hreflang links, a + sitemap and `robots.txt`, restores earlier versions from the `docs-archive` branch and deploys to GitHub Pages + at . + +The README and its translations in `docs/readme/` are not part of the site; they are checked by +`npm run docs:check-i18n` (see [README Translations](../CONTRIBUTING.md#readme-translations)).