From 0beae4895dc1e87b60d8dec3cd981238387538aa Mon Sep 17 00:00:00 2001 From: shira Date: Sat, 10 Oct 2026 18:40:06 +0300 Subject: [PATCH] fix(security): update Go, x/net, handlebars and the frontend base packages --- .agents/sources-of-truth.md | 2 +- .agents/standards/infrastructure.md | 2 +- backend/Dockerfile | 4 +- backend/Dockerfile.demo-seed | 2 +- backend/Dockerfile.e2e | 2 +- backend/Dockerfile.mail-fixture | 2 +- backend/go.mod | 6 +-- backend/go.sum | 4 +- backend/pkg/testutil/identifiers_test.go | 2 +- deploy/scripts/test_release_manifest.py | 48 ++++++++++++------------ docs/en/DEPLOY.md | 6 +-- docs/en/DEVELOPMENT.md | 4 +- docs/en/TESTING.md | 2 +- docs/ru/DEPLOY.md | 6 +-- docs/ru/DEVELOPMENT.md | 4 +- docs/ru/TESTING.md | 2 +- frontend/Dockerfile | 7 ++++ frontend/pnpm-lock.yaml | 13 ++++--- frontend/pnpm-workspace.yaml | 4 ++ 19 files changed, 68 insertions(+), 54 deletions(-) diff --git a/.agents/sources-of-truth.md b/.agents/sources-of-truth.md index c17a1be..18cde8d 100644 --- a/.agents/sources-of-truth.md +++ b/.agents/sources-of-truth.md @@ -6,7 +6,7 @@ Use the source that owns the fact being discussed. Read the relevant source befo - Source code shows behavior that exists in this checkout. A passing test gives evidence only for the behavior it exercises. - api/core/openapi.yml and api/ml/openapi.yml, with their referenced source files, define the public and internal HTTP contracts. Bundles and generated clients are derived output. - Backend migrations define the database schema. sqlc query files define queries that sqlc generates. -- Makefiles and checked-in tool configuration define supported project commands and options. Lockfiles preserve selected application dependency versions. Toolchain declarations define runtime versions; the Go backend uses exact version 1.26.8. Compose and Dockerfiles define image references, including intentionally moving `latest` or `alpine` tags. +- Makefiles and checked-in tool configuration define supported project commands and options. Lockfiles preserve selected application dependency versions. Toolchain declarations define runtime versions; the Go backend uses exact version 1.26.9. Compose and Dockerfiles define image references, including intentionally moving `latest` or `alpine` tags. - Compose, Nginx, and observability configuration define the local deployment scaffold. They do not prove that a remote deployment or production security review occurred. - docs/ru/ARCHITECTURE.md records product and architecture decisions. docs/en/ARCHITECTURE.md is its maintained English counterpart. These documents include planned behavior and must label it as planned. - README.md is the primary Russian entry point; README.en.md is its maintained English counterpart. Neither replaces service guides or contracts. diff --git a/.agents/standards/infrastructure.md b/.agents/standards/infrastructure.md index a0e692c..4860eb1 100644 --- a/.agents/standards/infrastructure.md +++ b/.agents/standards/infrastructure.md @@ -2,7 +2,7 @@ The local scaffold uses three independent Compose projects: core application, ML, and monitoring. Starting the core project does not start monitoring or ML. -Upstream container images use the requested moving `latest` or `alpine` tags where the image publishes them. These tags can change; read the current Compose and Dockerfile references instead of recording an old component version. Keep Go at exact version 1.26.8 in `go.mod`, toolchain declarations, and the backend build image. Application dependency lockfiles remain checked in and should not be removed when image tags float. +Upstream container images use the requested moving `latest` or `alpine` tags where the image publishes them. These tags can change; read the current Compose and Dockerfile references instead of recording an old component version. Keep Go at exact version 1.26.9 in `go.mod`, toolchain declarations, and the backend build image. Application dependency lockfiles remain checked in and should not be removed when image tags float. The core frontend container serves static assets with Nginx and proxies /api to Go. The default host binding is loopback at port 8080. This scaffold does not terminate production TLS. Grafana is also bound to loopback at port 3000. diff --git a/backend/Dockerfile b/backend/Dockerfile index 0984181..ffcacbb 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -1,12 +1,12 @@ # Base images are build arguments so that make -C deploy release-build can pin # each one to the digest it resolved; the defaults keep the agreed tags. -ARG GO_IMAGE=golang:1.26.8-alpine +ARG GO_IMAGE=golang:1.26.9-alpine ARG RUNTIME_IMAGE=gcr.io/distroless/static-debian12:nonroot FROM ${GO_IMAGE} AS build # Never download another Go toolchain: a go.mod that asks for a newer Go -# fails the build instead of silently replacing 1.26.8. +# fails the build instead of silently replacing 1.26.9. ENV GOTOOLCHAIN=local WORKDIR /src/backend diff --git a/backend/Dockerfile.demo-seed b/backend/Dockerfile.demo-seed index 377dbb8..56760d2 100644 --- a/backend/Dockerfile.demo-seed +++ b/backend/Dockerfile.demo-seed @@ -1,7 +1,7 @@ # Image of the demo seed operator command. Only the isolated demo stand # overlay (deploy/docker/docker-compose.demo.yml) builds it; the backend and # release images never contain the command. -ARG GO_IMAGE=golang:1.26.8-alpine +ARG GO_IMAGE=golang:1.26.9-alpine ARG RUNTIME_IMAGE=gcr.io/distroless/static-debian12:nonroot FROM ${GO_IMAGE} AS build diff --git a/backend/Dockerfile.e2e b/backend/Dockerfile.e2e index 299afc6..5d7efa1 100644 --- a/backend/Dockerfile.e2e +++ b/backend/Dockerfile.e2e @@ -1,6 +1,6 @@ # This image is for local browser E2E only. The release path uses # Dockerfile and never enables the e2e Go build tag. -ARG GO_IMAGE=golang:1.26.8-alpine +ARG GO_IMAGE=golang:1.26.9-alpine ARG RUNTIME_IMAGE=gcr.io/distroless/static-debian12:nonroot FROM ${GO_IMAGE} AS build diff --git a/backend/Dockerfile.mail-fixture b/backend/Dockerfile.mail-fixture index 999f0e6..389f198 100644 --- a/backend/Dockerfile.mail-fixture +++ b/backend/Dockerfile.mail-fixture @@ -1,6 +1,6 @@ # The fixture is built separately from the application and only by the local # E2E Compose overlay. -ARG GO_IMAGE=golang:1.26.8-alpine +ARG GO_IMAGE=golang:1.26.9-alpine ARG RUNTIME_IMAGE=gcr.io/distroless/static-debian12:nonroot FROM ${GO_IMAGE} AS build diff --git a/backend/go.mod b/backend/go.mod index 7c39019..ee20b6f 100644 --- a/backend/go.mod +++ b/backend/go.mod @@ -1,6 +1,6 @@ module lincodex/backend -go 1.26.8 +go 1.26.9 require ( github.com/aws/aws-sdk-go-v2 v1.47.1 @@ -30,6 +30,7 @@ require ( go.opentelemetry.io/otel v1.47.0 go.opentelemetry.io/otel/metric v1.47.0 go.opentelemetry.io/otel/trace v1.47.0 + go.yaml.in/yaml/v3 v3.0.5 golang.org/x/crypto v0.57.0 golang.org/x/sync v0.23.0 golang.org/x/text v0.42.0 @@ -380,12 +381,11 @@ require ( go.uber.org/atomic v1.12.0 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.28.0 // indirect - go.yaml.in/yaml/v3 v3.0.5 // indirect go.yaml.in/yaml/v4 v4.0.0-rc.6 // indirect golang.org/x/exp v0.0.0-20260908205506-85c1c2202aba // indirect golang.org/x/exp/typeparams v0.0.0-20260811152304-ee035b5b010f // indirect golang.org/x/mod v0.41.0 // indirect - golang.org/x/net v0.59.0 // indirect + golang.org/x/net v0.60.0 // indirect golang.org/x/sys v0.48.0 // indirect golang.org/x/term v0.46.0 // indirect golang.org/x/tools v0.50.0 // indirect diff --git a/backend/go.sum b/backend/go.sum index a274090..0336bd8 100644 --- a/backend/go.sum +++ b/backend/go.sum @@ -968,8 +968,8 @@ golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/net v0.59.0 h1:5zfYln+w5XCxwrnMMJPufRgNoXEaGxl0wo5GqPXyues= -golang.org/x/net v0.59.0/go.mod h1:2DA/G1UfVbCpQPeWTmMPGY7Cs2PkBkwu743bVX5PIVg= +golang.org/x/net v0.60.0 h1:79p50tfZlm0J9YfoDsSi639qSXNGVwEzOPLCxM2FsYU= +golang.org/x/net v0.60.0/go.mod h1:2DA/G1UfVbCpQPeWTmMPGY7Cs2PkBkwu743bVX5PIVg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= diff --git a/backend/pkg/testutil/identifiers_test.go b/backend/pkg/testutil/identifiers_test.go index c60fc45..2e10626 100644 --- a/backend/pkg/testutil/identifiers_test.go +++ b/backend/pkg/testutil/identifiers_test.go @@ -14,7 +14,7 @@ func TestFindPersonalIdentifiers(t *testing.T) { if !slices.Equal(got, want) { t.Fatalf("FindPersonalIdentifiers() = %q, want %q", got, want) } - if found := FindPersonalIdentifiers(`go_info{version="go1.26.8"} 1`); len(found) != 0 { + if found := FindPersonalIdentifiers(`go_info{version="go1.26.9"} 1`); len(found) != 0 { t.Fatalf("FindPersonalIdentifiers() reported %q in a clean text", found) } } diff --git a/deploy/scripts/test_release_manifest.py b/deploy/scripts/test_release_manifest.py index 7a1284c..fe04e6b 100644 --- a/deploy/scripts/test_release_manifest.py +++ b/deploy/scripts/test_release_manifest.py @@ -23,7 +23,7 @@ release = importlib.util.module_from_spec(SPEC) sys.modules["release_manifest"] = release SPEC.loader.exec_module(release) -AGREED_GO = "1.26.8" +AGREED_GO = "1.26.9" COMMIT = "0123456789abcdef0123456789abcdef01234567" FAKE_PASSWORD = "fake-password-7f3c9a" @@ -103,8 +103,8 @@ def inputs( dirty: bool = False, evidence_ids: dict | None = None, checks: tuple = ("smoke", "e2e"), - go_binary: str | None = "go1.26.8", - seed_go_binary: str | None = "go1.26.8", + go_binary: str | None = "go1.26.9", + seed_go_binary: str | None = "go1.26.9", seed_present: bool = True, files: dict | None = None, postgres_digests: list | None = None, @@ -130,9 +130,9 @@ def inputs( "services": { "backend": { "image_id": BACKEND_ID, - "build_args": {"GO_IMAGE": f"golang:1.26.8-alpine@{fake_id('a')}"}, + "build_args": {"GO_IMAGE": f"golang:1.26.9-alpine@{fake_id('a')}"}, "base_images": [ - {"arg": "GO_IMAGE", "reference": "golang:1.26.8-alpine", "digest": fake_id("a"), "versions": {"GOLANG_VERSION": "1.26.8"}} + {"arg": "GO_IMAGE", "reference": "golang:1.26.9-alpine", "digest": fake_id("a"), "versions": {"GOLANG_VERSION": "1.26.9"}} ], }, "frontend": { @@ -142,9 +142,9 @@ def inputs( }, "demo-seed": { "image_id": SEED_ID, - "build_args": {"GO_IMAGE": f"golang:1.26.8-alpine@{fake_id('a')}"}, + "build_args": {"GO_IMAGE": f"golang:1.26.9-alpine@{fake_id('a')}"}, "base_images": [ - {"arg": "GO_IMAGE", "reference": "golang:1.26.8-alpine", "digest": fake_id("a"), "versions": {"GOLANG_VERSION": "1.26.8"}} + {"arg": "GO_IMAGE", "reference": "golang:1.26.9-alpine", "digest": fake_id("a"), "versions": {"GOLANG_VERSION": "1.26.9"}} ], }, "ml": { @@ -157,11 +157,11 @@ def inputs( ids = CURRENT_IDS if evidence_ids is None else evidence_ids evidence = {check: evidence_doc(check, source, ids) for check in checks} go = { - "go_mod": "1.26.8", + "go_mod": "1.26.9", "toolchain_directive": None, - "dockerfile_image": "golang:1.26.8-alpine", + "dockerfile_image": "golang:1.26.9-alpine", "gotoolchain_local": True, - "demo_seed_dockerfile_image": "golang:1.26.8-alpine", + "demo_seed_dockerfile_image": "golang:1.26.9-alpine", "demo_seed_gotoolchain_local": True, "consistent": True, } @@ -224,30 +224,30 @@ class PinTest(unittest.TestCase): with tempfile.TemporaryDirectory() as directory: root = Path(directory) (root / "backend").mkdir() - (root / "backend/go.mod").write_text("module x\n\ngo 1.26.8\n\ntoolchain go1.27.0\n", encoding="utf-8") + (root / "backend/go.mod").write_text("module x\n\ngo 1.26.9\n\ntoolchain go1.27.0\n", encoding="utf-8") (root / "backend/Dockerfile").write_text( - "ARG GO_IMAGE=golang:1.26.8-alpine\nFROM ${GO_IMAGE} AS build\nENV GOTOOLCHAIN=local\n", encoding="utf-8" + "ARG GO_IMAGE=golang:1.26.9-alpine\nFROM ${GO_IMAGE} AS build\nENV GOTOOLCHAIN=local\n", encoding="utf-8" ) self.assertFalse(release.go_policy(root)["consistent"]) - (root / "backend/go.mod").write_text("module x\n\ngo 1.26.8\n", encoding="utf-8") + (root / "backend/go.mod").write_text("module x\n\ngo 1.26.9\n", encoding="utf-8") self.assertTrue(release.go_policy(root)["consistent"]) - (root / "backend/Dockerfile").write_text("ARG GO_IMAGE=golang:1.26.8-alpine\nFROM ${GO_IMAGE} AS build\n", encoding="utf-8") + (root / "backend/Dockerfile").write_text("ARG GO_IMAGE=golang:1.26.9-alpine\nFROM ${GO_IMAGE} AS build\n", encoding="utf-8") self.assertFalse(release.go_policy(root)["consistent"]) def test_demo_seed_dockerfile_must_share_the_go_pin(self) -> None: import tempfile - pinned = "ARG GO_IMAGE=golang:1.26.8-alpine\nFROM ${GO_IMAGE} AS build\nENV GOTOOLCHAIN=local\n" + pinned = "ARG GO_IMAGE=golang:1.26.9-alpine\nFROM ${GO_IMAGE} AS build\nENV GOTOOLCHAIN=local\n" with tempfile.TemporaryDirectory() as directory: root = Path(directory) (root / "backend").mkdir() - (root / "backend/go.mod").write_text("module x\n\ngo 1.26.8\n", encoding="utf-8") + (root / "backend/go.mod").write_text("module x\n\ngo 1.26.9\n", encoding="utf-8") (root / "backend/Dockerfile").write_text(pinned, encoding="utf-8") self.assertTrue(release.go_policy(root)["consistent"]) seed = root / "backend/Dockerfile.demo-seed" seed.write_text(pinned, encoding="utf-8") self.assertTrue(release.go_policy(root)["consistent"]) - seed.write_text(pinned.replace("1.26.8", "1.27.0"), encoding="utf-8") + seed.write_text(pinned.replace("1.26.9", "1.27.0"), encoding="utf-8") self.assertFalse(release.go_policy(root)["consistent"]) seed.write_text(pinned.replace("ENV GOTOOLCHAIN=local\n", ""), encoding="utf-8") self.assertFalse(release.go_policy(root)["consistent"]) @@ -260,10 +260,10 @@ class BuildInfoTest(unittest.TestCase): return b"\0" * offset + header + body def test_reads_inline_version(self) -> None: - self.assertEqual(release.go_build_version(self.blob(b"go1.26.8")), "go1.26.8") + self.assertEqual(release.go_build_version(self.blob(b"go1.26.9")), "go1.26.9") def test_ignores_unaligned_or_missing_header(self) -> None: - self.assertIsNone(release.go_build_version(self.blob(b"go1.26.8", offset=63))) + self.assertIsNone(release.go_build_version(self.blob(b"go1.26.9", offset=63))) self.assertIsNone(release.go_build_version(b"no build info")) @@ -274,8 +274,8 @@ class ManifestTest(unittest.TestCase): self.assertEqual(component(manifest, "backend")["verification"], {"status": "verified", "checks": ["e2e", "smoke"]}) self.assertEqual(component(manifest, "postgres")["image"]["repo_digest"], POSTGRES_ID) self.assertEqual(component(manifest, "postgres")["image"]["versions"], {"PG_VERSION": "18.6"}) - self.assertEqual(manifest["toolchains"]["go"]["binary"], "go1.26.8") - self.assertEqual(manifest["toolchains"]["go"]["build_image_version"], "1.26.8") + self.assertEqual(manifest["toolchains"]["go"]["binary"], "go1.26.9") + self.assertEqual(manifest["toolchains"]["go"]["build_image_version"], "1.26.9") self.assertTrue(manifest["toolchains"]["node"]["matches_version_file"]) self.assertEqual(component(manifest, "postgres")["image"]["repo_digests"], [f"postgres@{POSTGRES_ID}"]) self.assertEqual(release.structure_errors(manifest), []) @@ -308,7 +308,7 @@ class ManifestTest(unittest.TestCase): self.assertEqual(seed["image"]["restore_reference"], SEED_ID) self.assertEqual(seed["image"]["retention_reference"], "lincodex.invalid/release/demo-seed:stage-demo") self.assertEqual(seed["build"]["base_images"][0]["digest"], fake_id("a")) - self.assertEqual(manifest["toolchains"]["go"]["demo_seed_binary"], "go1.26.8") + self.assertEqual(manifest["toolchains"]["go"]["demo_seed_binary"], "go1.26.9") self.assertEqual( manifest["restore"]["demo"], { @@ -632,9 +632,9 @@ class BuildStabilityTest(unittest.TestCase): self.assertIsNone(error) self.assertTrue(written) backend_args = dict(docker.built)["backend"] - self.assertEqual(backend_args["GO_IMAGE"], f"golang:1.26.8-alpine@{fake_id('2')}") + self.assertEqual(backend_args["GO_IMAGE"], f"golang:1.26.9-alpine@{fake_id('2')}") seed_args = dict(docker.built)["demo-seed"] - self.assertEqual(seed_args["GO_IMAGE"], f"golang:1.26.8-alpine@{fake_id('2')}") + self.assertEqual(seed_args["GO_IMAGE"], f"golang:1.26.9-alpine@{fake_id('2')}") self.assertEqual(seed_args["RUNTIME_IMAGE"], f"gcr.io/distroless/static-debian12:nonroot@{fake_id('2')}") files, profile = docker.profiles["demo-seed"] self.assertEqual(profile, "demo-seed") diff --git a/docs/en/DEPLOY.md b/docs/en/DEPLOY.md index d3e5f7f..e3eb39c 100644 --- a/docs/en/DEPLOY.md +++ b/docs/en/DEPLOY.md @@ -19,7 +19,7 @@ Implemented in this build (backend API and frontend screens): - The notification inbox in both cabinets. A delivered invitation creates a notification for the candidate; the mail about it is sent only with `EMAIL_PROVIDER=resend`. - Invitations: the organization creates a draft from a search result, changes the terms with versions, and sends the invitation. The candidate sees it in the incoming list and accepts it with the consent C4, choosing the contacts, or declines it. After the acceptance the organization reads the disclosed contacts on the invitation page. The company's invitation list is still a placeholder. -Planned and not working: withdrawing an invitation and the candidate's cancellation of participation, salary raise (the API answers 501 `not_implemented`), the company's invitation list screen (a placeholder now), password reset, mail for other product notifications, resume upload and parsing, PDF, FSP integration, ML inference and semantic search, the adaptive test, sandbox practice, percentiles and calibrated grades, and the SMTP transport. +Planned and not working: withdrawing an invitation and the candidate's cancellation of participation, salary raise (the API answers 501 `not_implemented`), password reset, mail for other product notifications, resume upload and parsing, PDF, FSP integration, ML inference and semantic search, the adaptive test, sandbox practice, percentiles and calibrated grades, and the SMTP transport. ### Requirements @@ -732,7 +732,7 @@ Upstream references: [PostgreSQL image](https://github.com/docker-library/postgr These entries name the principal upstream project's license; they are not a complete inventory of every file in an image. Base OS packages and bundled dependencies may have separate terms. Before redistribution, inspect the exact image tag or digest, its notices, and an SBOM. This repository has no project-wide license. -The backend builds with Go 1.26.8; its runtime image is selected in backend/Dockerfile. Frontend and ML base images are selected in their Dockerfiles. Upstream sources include [Docker Official Images](https://github.com/docker-library), [Distroless](https://github.com/GoogleContainerTools/distroless), and [NGINX unprivileged images](https://github.com/nginxinc/docker-nginx-unprivileged); inspect exact tags and layers before distribution. +The backend builds with Go 1.26.9; its runtime image is selected in backend/Dockerfile. Frontend and ML base images are selected in their Dockerfiles. Upstream sources include [Docker Official Images](https://github.com/docker-library), [Distroless](https://github.com/GoogleContainerTools/distroless), and [NGINX unprivileged images](https://github.com/nginxinc/docker-nginx-unprivileged); inspect exact tags and layers before distribution. ## Release manifest @@ -796,7 +796,7 @@ Generating the manifest again for the same ID, source, images, evidence, and dat ### Go pin -go.mod declares `go 1.26.8` without a separate `toolchain` line, the default `GO_IMAGE` of `backend/Dockerfile` and `backend/Dockerfile.demo-seed` is `golang:1.26.8-alpine`, and both build stages set `GOTOOLCHAIN=local`, so a go.mod that asks for a newer Go fails the build instead of downloading another toolchain. `make -C deploy check` fails when these pins disagree or when a Dockerfile uses a base image that is not a pinnable build argument. The manifest also records the version read from the build information of the backend and demo seed binaries; to read it, the generator creates a container from the image without starting it, copies the binary out, and removes the container. +go.mod declares `go 1.26.9` without a separate `toolchain` line, the default `GO_IMAGE` of `backend/Dockerfile` and `backend/Dockerfile.demo-seed` is `golang:1.26.9-alpine`, and both build stages set `GOTOOLCHAIN=local`, so a go.mod that asks for a newer Go fails the build instead of downloading another toolchain. `make -C deploy check` fails when these pins disagree or when a Dockerfile uses a base image that is not a pinnable build argument. The manifest also records the version read from the build information of the backend and demo seed binaries; to read it, the generator creates a container from the image without starting it, copies the binary out, and removes the container. ### Not covered diff --git a/docs/en/DEVELOPMENT.md b/docs/en/DEVELOPMENT.md index 95d9d05..cf1cf94 100644 --- a/docs/en/DEVELOPMENT.md +++ b/docs/en/DEVELOPMENT.md @@ -6,7 +6,7 @@ This guide describes implemented components and repository commands. Current bus | Component | Version source | | --- | --- | -| Go | exact 1.26.8 in backend/go.mod, toolchain, and Go build image | +| Go | exact 1.26.9 in backend/go.mod, toolchain, and Go build image | | Node.js | frontend/.node-version | | Frontend dependencies | current stable releases in package manifests and pnpm-lock.yaml | | Python and uv | ML toolchain declarations and uv.lock | @@ -19,7 +19,7 @@ MVP implementation is ongoing. Values below are read from the named files; when | Component | Pinned version | Source | | --- | --- | --- | -| Go | 1.26.8 (`go` directive; no separate `toolchain` line) | backend/go.mod; build image `golang:1.26.8-alpine` in backend/Dockerfile | +| Go | 1.26.9 (`go` directive; no separate `toolchain` line) | backend/go.mod; build image `golang:1.26.9-alpine` in backend/Dockerfile | | Node.js | 26.11.1 | frontend/.node-version | | pnpm | 12.9.1 | `packageManager` in frontend/package.json, frontend/pnpm-lock.yaml | | React, React DOM | 19.3.0 | frontend/package.json, frontend/pnpm-lock.yaml | diff --git a/docs/en/TESTING.md b/docs/en/TESTING.md index 61707da..29183f7 100644 --- a/docs/en/TESTING.md +++ b/docs/en/TESTING.md @@ -112,7 +112,7 @@ An unsent answer is kept in `sessionStorage` of the same browser tab, under a ke ## Release manifest tests -`make -C deploy check-release` runs `deploy/scripts/test_release_manifest.py` with the Python standard library and without Docker. It fails when go.mod, the `GO_IMAGE` default, and `GOTOOLCHAIN=local` in backend/Dockerfile or backend/Dockerfile.demo-seed stop pinning Go 1.26.8, or when a service Dockerfile uses a base image that is not a pinnable `*_IMAGE` build argument, including an external image in `COPY --from` or `RUN --mount=from`. On fake image, Compose, and container data it checks that: +`make -C deploy check-release` runs `deploy/scripts/test_release_manifest.py` with the Python standard library and without Docker. It fails when go.mod, the `GO_IMAGE` default, and `GOTOOLCHAIN=local` in backend/Dockerfile or backend/Dockerfile.demo-seed stop pinning Go 1.26.9, or when a service Dockerfile uses a base image that is not a pinnable `*_IMAGE` build argument, including an external image in `COPY --from` or `RUN --mount=from`. On fake image, Compose, and container data it checks that: - the manifest copies no environment values, labels, or local paths, and two generations differ only in `generated_at`; - evidence counts only for the same tag, commit, and working tree fingerprint, and malformed evidence or build records are not used; diff --git a/docs/ru/DEPLOY.md b/docs/ru/DEPLOY.md index b8beee4..7d2b6cf 100644 --- a/docs/ru/DEPLOY.md +++ b/docs/ru/DEPLOY.md @@ -19,7 +19,7 @@ - Inbox уведомлений в обоих кабинетах. Доставленное приглашение создает уведомление кандидату; письмо о нем уходит только при `EMAIL_PROVIDER=resend`. - Приглашения: организация создает черновик из результата поиска, меняет условия с версиями и отправляет приглашение. Кандидат видит его во входящих и принимает с согласием C4, выбрав контакты, или отказывается. После принятия организация читает переданные контакты на странице приглашения. Список приглашений компании пока заготовка. -Запланировано и не работает: отзыв приглашения и отмена участия кандидатом, повышение зарплаты (API отвечает 501 `not_implemented`), экран списка приглашений компании (сейчас заготовка), сброс пароля, письма о других продуктовых уведомлениях, загрузка и разбор резюме, PDF, интеграция с ФСП, ML inference и смысловой поиск, адаптивный тест, практика в песочнице, перцентиль и откалиброванные грейды, транспорт SMTP. +Запланировано и не работает: отзыв приглашения и отмена участия кандидатом, повышение зарплаты (API отвечает 501 `not_implemented`), сброс пароля, письма о других продуктовых уведомлениях, загрузка и разбор резюме, PDF, интеграция с ФСП, ML inference и смысловой поиск, адаптивный тест, практика в песочнице, перцентиль и откалиброванные грейды, транспорт SMTP. ### Что нужно на машине @@ -734,7 +734,7 @@ Reload запускает новые workers с новым сертификат Указанная лицензия относится к основному upstream проекту и не описывает все файлы внутри образа. Базовые пакеты ОС и встроенные зависимости могут иметь отдельные условия. Перед распространением проверьте конкретный tag/digest образа, его notices и SBOM. В репозитории не назначена общая лицензия проекта. -Backend строится с Go 1.26.8; образ runtime выбран в backend/Dockerfile. Базовые образы frontend и ML описаны в соответствующих Dockerfiles. Исходники: [Docker Official Images](https://github.com/docker-library), [Distroless](https://github.com/GoogleContainerTools/distroless) и [NGINX unprivileged images](https://github.com/nginxinc/docker-nginx-unprivileged); перед распространением проверьте точные tags и слои. +Backend строится с Go 1.26.9; образ runtime выбран в backend/Dockerfile. Базовые образы frontend и ML описаны в соответствующих Dockerfiles. Исходники: [Docker Official Images](https://github.com/docker-library), [Distroless](https://github.com/GoogleContainerTools/distroless) и [NGINX unprivileged images](https://github.com/nginxinc/docker-nginx-unprivileged); перед распространением проверьте точные tags и слои. ## Манифест выпуска @@ -798,7 +798,7 @@ Backend строится с Go 1.26.8; образ runtime выбран в backen ### Go pin -go.mod объявляет `go 1.26.8` без отдельной строки `toolchain`, `GO_IMAGE` по умолчанию в `backend/Dockerfile` и `backend/Dockerfile.demo-seed` - `golang:1.26.8-alpine`, а оба этапа сборки задают `GOTOOLCHAIN=local`, поэтому go.mod с требованием более новой Go роняет сборку вместо скачивания другого toolchain. `make -C deploy check` падает, если эти значения расходятся или Dockerfile использует базовый образ не через закрепляемый build-аргумент. Манифест также записывает версию из build information бинарников backend и demo seed; для этого генератор создает контейнер из образа без запуска, копирует бинарник и удаляет контейнер. +go.mod объявляет `go 1.26.9` без отдельной строки `toolchain`, `GO_IMAGE` по умолчанию в `backend/Dockerfile` и `backend/Dockerfile.demo-seed` - `golang:1.26.9-alpine`, а оба этапа сборки задают `GOTOOLCHAIN=local`, поэтому go.mod с требованием более новой Go роняет сборку вместо скачивания другого toolchain. `make -C deploy check` падает, если эти значения расходятся или Dockerfile использует базовый образ не через закрепляемый build-аргумент. Манифест также записывает версию из build information бинарников backend и demo seed; для этого генератор создает контейнер из образа без запуска, копирует бинарник и удаляет контейнер. ### Что не покрыто diff --git a/docs/ru/DEVELOPMENT.md b/docs/ru/DEVELOPMENT.md index cb9c4e9..ae7c9aa 100644 --- a/docs/ru/DEVELOPMENT.md +++ b/docs/ru/DEVELOPMENT.md @@ -6,7 +6,7 @@ | Компонент | Источник выбранной версии | | --- | --- | -| Go | точная версия 1.26.8 в backend/go.mod, toolchain и Go build image | +| Go | точная версия 1.26.9 в backend/go.mod, toolchain и Go build image | | Node.js | frontend/.node-version | | Frontend dependencies | актуальные stable releases в package manifests и pnpm-lock.yaml | | Python и uv | версии ML toolchain и uv.lock | @@ -19,7 +19,7 @@ Frontend зависимости выбираются из актуальных s | Компонент | Закрепленная версия | Источник | | --- | --- | --- | -| Go | 1.26.8 (директива `go`; отдельной строки `toolchain` нет) | backend/go.mod; build image `golang:1.26.8-alpine` в backend/Dockerfile | +| Go | 1.26.9 (директива `go`; отдельной строки `toolchain` нет) | backend/go.mod; build image `golang:1.26.9-alpine` в backend/Dockerfile | | Node.js | 26.11.1 | frontend/.node-version | | pnpm | 12.9.1 | `packageManager` в frontend/package.json, frontend/pnpm-lock.yaml | | React, React DOM | 19.3.0 | frontend/package.json, frontend/pnpm-lock.yaml | diff --git a/docs/ru/TESTING.md b/docs/ru/TESTING.md index ef215d9..94a17b3 100644 --- a/docs/ru/TESTING.md +++ b/docs/ru/TESTING.md @@ -112,7 +112,7 @@ Playwright получает `E2E_MAIL_FIXTURE=1`, `E2E_MAILBOX_URL=http://mail-f ## Тесты манифеста выпуска -`make -C deploy check-release` запускает `deploy/scripts/test_release_manifest.py` на стандартной библиотеке Python и без Docker. Тест падает, если go.mod, значение `GO_IMAGE` по умолчанию и `GOTOOLCHAIN=local` в backend/Dockerfile или backend/Dockerfile.demo-seed перестают закреплять Go 1.26.8 или если Dockerfile сервиса использует базовый образ не через закрепляемый build-аргумент `*_IMAGE`, в том числе внешний образ в `COPY --from` или `RUN --mount=from`. На подставных данных образов, Compose и контейнеров он проверяет, что: +`make -C deploy check-release` запускает `deploy/scripts/test_release_manifest.py` на стандартной библиотеке Python и без Docker. Тест падает, если go.mod, значение `GO_IMAGE` по умолчанию и `GOTOOLCHAIN=local` в backend/Dockerfile или backend/Dockerfile.demo-seed перестают закреплять Go 1.26.9 или если Dockerfile сервиса использует базовый образ не через закрепляемый build-аргумент `*_IMAGE`, в том числе внешний образ в `COPY --from` или `RUN --mount=from`. На подставных данных образов, Compose и контейнеров он проверяет, что: - манифест не копирует значения окружения, labels и локальные пути, а две генерации различаются только `generated_at`; - evidence засчитывается только для того же тега, коммита и отпечатка рабочего дерева, а evidence и записи сборки с неверной структурой не используются; diff --git a/frontend/Dockerfile b/frontend/Dockerfile index 085ba9f..ed1ce5c 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -22,6 +22,13 @@ RUN pnpm run build FROM ${NGINX_IMAGE} +# The floating base tag can lag behind Alpine security fixes (for example +# libtiff), so the runtime packages are upgraded at build time; the image runs +# as the unprivileged user again right after. +USER root +RUN apk upgrade --no-cache +USER 101 + COPY --from=build /workspace/frontend/dist/ /usr/share/nginx/html/ COPY deploy/nginx/nginx.conf /etc/nginx/nginx.conf COPY deploy/nginx/conf.d/app.conf /etc/nginx/conf.d/default.conf diff --git a/frontend/pnpm-lock.yaml b/frontend/pnpm-lock.yaml index 095fb51..297f1ae 100644 --- a/frontend/pnpm-lock.yaml +++ b/frontend/pnpm-lock.yaml @@ -162,6 +162,9 @@ settings: autoInstallPeers: false excludeLinksFromLockfile: false +overrides: + handlebars: 4.7.10 + importers: .: @@ -1766,8 +1769,8 @@ packages: globjoin@0.1.4: resolution: {integrity: sha512-xYfnw62CKG8nLkZBfWbhWwDw02CHty86jfPcc2cr3ZfeuK9ysoVPPEUxf21bAD/rWAgk52SuBrLJlefNy8mvFg==} - handlebars@4.7.9: - resolution: {integrity: sha512-4E71E0rpOaQuJR2A3xDZ+GM1HyWYv1clR58tC8emQNeQe3RH7MAzSbat+V0wG78LQBo6m6bzSG/L4pBuCsgnUQ==} + handlebars@4.7.10: + resolution: {integrity: sha512-P5VJMVM7qgBn6vjXMw8WG9uVI+ncf2pi72j4de4yz5ZULLj2RGqLYaKOYGsgyrViQ0tePOVlN1tDCCXXtFqXKg==} engines: {node: '>=0.4.7'} hasBin: true @@ -2767,7 +2770,7 @@ snapshots: dependencies: eslint-import-resolver-node: 0.3.9(supports-color@10.2.2) eslint-module-utils: 2.12.1(@typescript-eslint/parser@8.71.0(@typescript/typescript6@6.0.2)(eslint@10.12.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2))(eslint-import-resolver-node@0.3.9(supports-color@10.2.2))(eslint-import-resolver-typescript@4.4.5(eslint@10.12.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2))(eslint@10.12.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2) - handlebars: 4.7.9 + handlebars: 4.7.10 is-core-module: 2.16.1 micromatch: 4.0.8 transitivePeerDependencies: @@ -3804,7 +3807,7 @@ snapshots: eslint: 10.12.0(jiti@2.7.0)(supports-color@10.2.2) eslint-import-resolver-node: 0.3.9(supports-color@10.2.2) eslint-module-utils: 2.12.1(@typescript-eslint/parser@8.71.0(@typescript/typescript6@6.0.2)(eslint@10.12.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2))(eslint-import-resolver-node@0.3.9(supports-color@10.2.2))(eslint-import-resolver-typescript@4.4.5(eslint@10.12.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2))(eslint@10.12.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2) - handlebars: 4.7.9 + handlebars: 4.7.10 micromatch: 4.0.8 transitivePeerDependencies: - '@typescript-eslint/parser' @@ -4025,7 +4028,7 @@ snapshots: globjoin@0.1.4: {} - handlebars@4.7.9: + handlebars@4.7.10: dependencies: minimist: 1.2.8 neo-async: 2.6.2 diff --git a/frontend/pnpm-workspace.yaml b/frontend/pnpm-workspace.yaml index 9a20b87..437a99c 100644 --- a/frontend/pnpm-workspace.yaml +++ b/frontend/pnpm-workspace.yaml @@ -17,6 +17,10 @@ minimumReleaseAgeExclude: - "@orval/solid-start@8.40.0" - "@orval/swr@8.40.0" - "@orval/zod@8.40.0" +# eslint-plugin-boundaries pins handlebars 4.7.9 exactly; this forces the +# release that fixes the template-compilation CVEs for the dev tooling. +overrides: + handlebars: 4.7.10 allowBuilds: esbuild: true unrs-resolver: false