Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
## toolchain, module cache, or source tree — is present in the final
## image; only the compiled binary is copied out of it below.
## ---------------------------------------------------------------------
FROM golang:1.26.6-alpine AS builder
FROM golang:1.26.9-alpine AS builder

WORKDIR /src

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ make build && ./bin/task-api # build a standalone binary

## Running with Docker

`Dockerfile` is a two-stage build: `golang:1.26.6-alpine` compiles a static (`CGO_ENABLED=0`) binary, copied into an empty `scratch` image — no shell, no libc, just the binary and a nonroot user.
`Dockerfile` is a two-stage build: `golang:1.26.9-alpine` compiles a static (`CGO_ENABLED=0`) binary, copied into an empty `scratch` image — no shell, no libc, just the binary and a nonroot user.

```bash
make docker-build # build the image
Expand Down
35 changes: 35 additions & 0 deletions docs/DECISIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -3171,3 +3171,38 @@ MinIO), decisão de shape que fica para quando alguém depender de um
e compila a MinIO inteira (~140MB de binário, dezenas de dependências) — mais
lento que um `docker pull` de imagem pronta seria, se existisse uma. Builds
seguintes reaproveitam o cache do Go que `actions/setup-go` já mantém.

## Go 1.26.9, não 1.27.2, para a GO-2026-6617 (issue #312)

A GO-2026-6617 / CVE-2026-97032 (crash de servidor HTTP/2 no `net/http`,
publicada em 2026-10-08) afeta a stdlib **< 1.26.9** e **1.27.0–1.27.1**.
`go.mod` e as duas imagens (`Dockerfile`, `web/Dockerfile`) passam de 1.26.6
para **1.26.9**. Como a CI lê a versão do `go.mod` (`go-version-file`), o
build, os testes e as imagens rodam exatamente nela.

**A opção não tomada: 1.27.2.** É a única versão que exclui as duas linhas
vulneráveis — um piso de 1.26.9 ainda é satisfeito por 1.27.0/1.27.1, que não
têm correção, e foi por isso que o `usher` subiu para 1.27.2 (usher#139).
Aqui ela custaria o gate de lint inteiro: nenhuma release do `staticcheck`
(v0.8.1 é a última) nem o `master` do go-tools leem o export data do Go 1.27
("export data version 5 is greater than maximum supported version 4"), e o
`gosec` v2.28.0 também não. Em 1.26.9, os quatro gates — `staticcheck` (com e
sem `-tags=integration`), `gosec`, `govulncheck` e `go test -race` — passam
sem mudança, com o código de saída conferido.

**Resíduo aceito:** alguém compilando localmente com Go 1.27.0 ou 1.27.1
satisfaz o piso e gera um binário vulnerável. Os artefatos que este repositório
de fato produz (imagens e CI) não. Reabrir quando o `staticcheck` suportar Go
1.27: aí o piso vai para 1.27.2.

**Exposição:** baixa. Nenhum dos binários serve TLS nem h2c (o `tls.Config`
em `cmd/api/main.go` é de cliente), e o `net/http` só fala HTTP/2 sobre TLS
por padrão.

**Visto de passagem, para quando o gosec subir:** o `gosec` do `master`
(`d2b649e`) aponta G703 (path traversal por taint) em `cmd/web/main.go`, no
`os.Stat(fsPath)` do `spaHandler`. É falso positivo: o caminho passa por
`path.Clean` sobre um path enraizado e por `pathEscapesDir`, como o comentário
da função e `TestSPAHandler_PathTraversal_AttemptStillResolvesInsideDist` já
documentam. Vai precisar de um `#nosec G703` com essa justificativa quando a
versão do gosec for atualizada.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/JonasBorgesLM/task-api

go 1.26.6
go 1.26.9

require (
github.com/JonasBorgesLM/bastion v0.2.1
Expand Down
2 changes: 1 addition & 1 deletion web/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ RUN npm run build
## server either serves the files in /dist or it does not, and that is
## already visible from what index.html itself renders.
## ---------------------------------------------------------------------
FROM golang:1.26.6-alpine AS go-builder
FROM golang:1.26.9-alpine AS go-builder

WORKDIR /src

Expand Down
Loading