19 Commits
Author SHA1 Message Date
Tosone fb4ae986d1 build(deps): bump go and web dependencies
Update Go modules and web packages to their latest available patch and
minor releases.

Go:
- github.com/aws/aws-sdk-go-v2 v1.47.3 -> v1.47.4
- github.com/aws/aws-sdk-go-v2/config v1.33.9 -> v1.33.11
- github.com/aws/aws-sdk-go-v2/service/s3 v1.114.3 -> v1.114.5
- github.com/aws/smithy-go v1.28.5 -> v1.28.6
- github.com/go-redsync/redsync/v4 v4.18.0 -> v4.18.1
- github.com/tencentyun/cos-go-sdk-v5 v0.7.75 -> v0.7.76
- transitive: aws-sdk-go-v2 internals, eventstream, credentials, sso,
  ssooidc, sts and signin

Web:
- @base-ui/react 1.8.0 -> 1.9.0
- @tanstack/react-query 5.104.1 -> 5.105.0
- axios 1.20.0 -> 1.21.0
- cron-parser 5.10.1 -> 5.10.2
- human-format 1.2.1 -> 1.4.0
- lucide-react 1.52.0 -> 1.62.0
- react / react-dom 19.3.0 -> 19.3.1
- shadcn 4.21.3 -> 4.23.0
- zod 4.6.5 -> 4.6.7
- zustand 5.0.15 -> 5.0.16
- @types/node 26.6.4 -> 26.6.5
- autoprefixer 10.6.1 -> 10.6.2
- oxlint 1.87.0 -> 1.90.0
- postcss 8.5.29 -> 8.5.32
- postcss-import 17.0.0 -> 17.0.1
- vite 8.3.3 -> 8.3.5

Verification:
- go mod tidy
- go build -tags "netgo,timetzdata,exclude_graphdriver_btrfs,containers_image_openpgp" ./...
- go vet -tags "netgo,timetzdata,exclude_graphdriver_btrfs,containers_image_openpgp" ./...
- bun run lint
- bun run build
2026-10-27 22:55:34 +08:00
Tosone 187f5c4d97 refactor(server)!: remove the embedded MCP server
Sigma shipped three overlapping ways to operate a remote server: the
embedded MCP server, sigma-cli, and the sigma-api-operator skill. All
three wrapped the same HTTP API, yet each covered a different subset:
user CRUD existed only in the CLI, system-* only in MCP, and builders,
daemons, webhooks, validators, code repositories and tokens were
reachable only through raw HTTP. MCP was disabled by default and still
carried 1246 lines of production code plus 606 lines of tests to
maintain that partially overlapping surface.

Keep two surfaces instead: sigma-cli for execution and the skill for
API discovery.

- delete pkg/server/mcp and its mcp-go dependency, which also drops the
  jsonschema-go, jsonschema/v6 and uritemplate/v3 transitives
- drop ConfigurationMCP, its defaults and the authz/audit skipper
  bypasses that existed only to let the MCP endpoint bypass both
- remove the mcp section from conf/config*.yaml, docs/configuration.md,
  and the Helm chart values and configmap
- replace docs/mcp.md with docs/cli.md covering sigma-cli login, global
  flags, per-resource commands, jq composition and agent usage
- make sigma-cli the preferred path in the sigma-api-operator skill and
  rebuild its examples around the resources the CLI does not wrap yet,
  using the paths and request schemas from swagger.yaml

Lint was already red on dev for an unrelated reason: golangci-lint
v2.13.0 vendors golang.org/x/tools v0.49.0, which only decodes export
data version 4, so every import of a Go 1.27.2 standard library package
failed typecheck with "export data version 5 is greater than maximum
supported version 4". Bump to v2.15.0 (x/tools v0.52.0) and fix the two
modernize findings it reports for Go 1.27's strings.CutLast.

- .github/workflows/lint.yml: golangci-lint v2.13.0 -> v2.15.0, and
  document the export data constraint next to the pin
- pkg/authz/resolver.go, pkg/logger/logger.go: replace LastIndex slicing
  with strings.CutLast
- bump github.com/docker/cli v29.9.0 -> v29.9.1

BREAKING CHANGE: the `mcp` configuration section and the /api/v1/mcp
endpoint are gone. Use sigma-cli or the REST API for automation.

Verification:
- go build -tags "netgo,timetzdata,exclude_graphdriver_btrfs,containers_image_openpgp" ./...
- go vet -tags "netgo,timetzdata,exclude_graphdriver_btrfs,containers_image_openpgp" ./...
- golangci-lint v2.15.0 run --build-tags "netgo,timetzdata,exclude_graphdriver_btrfs,containers_image_openpgp" ./... (0 issues)
- golangci-lint config verify
- go test -tags "netgo,timetzdata,exclude_graphdriver_btrfs,containers_image_openpgp" ./pkg/authz/... ./pkg/logger/... ./cmd/cli/... ./pkg/app/... ./pkg/background/build/...
- go test -run TestConfiguration -tags "netgo,timetzdata,exclude_graphdriver_btrfs,containers_image_openpgp" ./pkg/config/...
- go mod tidy
- make swagen
- helm template sigma ./deploy/sigma
- bun run docs:build
- make build
- make build-cli
2026-10-21 19:33:07 +08:00
Tosone 940ab15dd4 build(deps): bump grype, syft, buildkit and other dependencies
Update direct Go module dependencies to their latest patch/minor
releases, including security and bug fixes across registry,
scanning, storage and build backends. Align the grype, syft,
buildkit, cosign and swagger-ui versions pinned in the Dockerfile
with their upstream releases.

Direct upgrades:
- github.com/alicebob/miniredis/v2 v2.39.0 -> v2.40.0
- github.com/anchore/grype v0.120.0 -> v0.121.0
- github.com/anchore/syft v1.54.0 -> v1.55.0
- github.com/aws/aws-sdk-go-v2 v1.47.1 -> v1.47.3
- github.com/aws/aws-sdk-go-v2/config v1.33.6 -> v1.33.9
- github.com/aws/aws-sdk-go-v2/service/s3 v1.114.0 -> v1.114.3
- github.com/aws/smithy-go v1.28.2 -> v1.28.5
- github.com/docker/cli v29.8.2+incompatible -> v29.9.2+incompatible
- github.com/mark3labs/mcp-go v1.1.1 -> v1.2.1
- github.com/moby/buildkit v0.33.1 -> v0.34.1
- github.com/pressly/goose/v3 v3.28.0 -> v3.29.0
- github.com/prometheus/client_golang v1.24.1 -> v1.25.0
- github.com/sigstore/cosign/v3 v3.1.3 -> v3.1.4
- go.podman.io/podman/v6 v6.1.3 -> v6.1.4
- golang.org/x/crypto v0.57.0 -> v0.58.0
- golang.org/x/net v0.59.0 -> v0.61.0
- golang.org/x/sync v0.23.0 -> v0.24.0
- turso.tech/database/tursogo v0.8.2 -> v0.8.3

Dockerfile:
- build/Dockerfile: SYFT_VERSION 1.54.0 -> 1.55.0, GRYPE_VERSION
  0.120.0 -> 0.121.0, COSIGN_VERSION v3.1.3 -> v3.1.4,
  SWAGGER_UI_VERSION 5.33.1 -> 5.33.2, BUILDKIT_VERSION
  v0.33.1-rootless -> v0.34.1-rootless

Notable transitive bumps: grpc 1.83.2 -> 1.84.0, prometheus/common
0.70.1 -> 0.72.0, sigstore/sigstore 1.10.8 -> v1.11.1,
sigstore/sigstore-go v1.2.2 -> v1.3.0, rekor v1.5.3 -> v1.5.4,
go-openapi v0.x -> v1.0.0 across analysis/spec/validate,
google.golang.org/api v0.294.0 -> v0.301.0,
klauspost/compress 1.20.0 -> 1.20.1, and the podman buildah/storage
modules.

cloud.google.com/go/auth resolves to the pseudo-version
v0.24.1-0.20261001053825-dbc26066f70a because the cosign KMS/GCS
dependency chain requires a commit that has no tagged release yet.

Verification:
- go build -tags "netgo,timetzdata,exclude_graphdriver_btrfs,containers_image_openpgp" ./...
- go vet -tags "netgo,timetzdata,exclude_graphdriver_btrfs,containers_image_openpgp" ./...
- golangci-lint v2.15.0 run --build-tags "netgo,timetzdata,exclude_graphdriver_btrfs,containers_image_openpgp" (0 issues)
- go mod tidy
2026-10-21 19:32:35 +08:00
Tosone 7c2c45884a build(deps): bump go and web dependencies
Update Go modules and web packages to their latest available versions.

Go:
- github.com/go-git/go-git/v6 v6.0.0-alpha.5 -> v6.0.0-beta.1
- github.com/redis/go-redis/v9 and redisotel v9.22.0 -> v9.23.0
- github.com/tidwall/gjson v1.19.0 -> v1.20.0
- turso.tech/database/tursogo v0.8.1 -> v0.8.2
- transitive: go-billy/v6 beta.1, ProtonMail/go-crypto 1.5.2,
  pjbgf/sha1cd 0.7.0, go.uber.org/atomic 1.12.0

Web:
- @fontsource-variable/nunito 5.3.0 (new)
- @vitejs/plugin-react 5.2.0 -> 6.1.2
- @tanstack/react-query 5.104.0 -> 5.104.1
- cron-parser 4.9.0 -> 5.10.1
- lucide-react 1.49.0 -> 1.52.0
- shadcn 4.21.1 -> 4.21.3
- vite 8.3.2 -> 8.3.3
- oxlint 1.86.0 -> 1.87.0
- postcss 8.5.28 -> 8.5.29
- postcss-import 16.2.0 -> 17.0.0
- postcss-nesting 13.0.2 -> 14.0.3
- @types/node 25.9.9 -> 26.6.4

Adapt to the cron-parser v5 API, where the default `parseExpression`
export was replaced by the named `CronExpressionParser.parse`.

Verification:
- go mod tidy
- go build -tags "netgo,timetzdata,exclude_graphdriver_btrfs,containers_image_openpgp" ./...
- go vet -tags "netgo,timetzdata,exclude_graphdriver_btrfs,containers_image_openpgp" ./...
- bun run lint
- bun run build
2026-10-06 23:28:41 +08:00
Tosone c5851c81d2 build(deps): bump grype, otel and other dependencies
Upgrade github.com/anchore/grype to v0.120.0, github.com/aws/smithy-go to
v1.28.2, github.com/lmittmann/tint to v1.2.1, and the go.opentelemetry.io
modules (otel, otel/sdk, otel/trace, otlptracegrpc, otlptracehttp, otelgin,
otelhttp) to v1.47.0/v0.72.0, together with the transitive bumps they pull
in. Install tzdata in the alpine runtime image so named timezones are
available at runtime.

Verification:
- go build -tags "netgo,timetzdata,exclude_graphdriver_btrfs,containers_image_openpgp" ./...
2026-10-04 19:59:22 +08:00
Tosone 01e1c6f94f build(deps): bump cosign to v3.1.3
Update github.com/sigstore/cosign from v2.6.5 to v3.1.3 and switch the
import path in the signing bootstrap to the v3 module. go.sum also picks
up the transitive lib/pq and go.step.sm/crypto bumps.

Verification:
- go build -tags "netgo,timetzdata,exclude_graphdriver_btrfs,containers_image_openpgp" ./...
- go vet -tags "..." ./pkg/app/bootstrap/...
2026-10-04 16:43:15 +08:00
Tosone 3958a6b61d docs(swagger): align handler API annotations with implementation
Fix and complete Swagger annotations for the HTTP handlers so the
generated OpenAPI spec matches the registered routes and request
types:

- Correct path parameter types from number/int64 to string, since all
  resource IDs are UUID strings.
- Fix wrong router paths and methods (builders, coderepos, tags,
  webhooks, users, validators) and add missing path parameters.
- Fix request/response schema references (builder runner list, oauth2
  callback, webhook get/log) and a few summary/description typos.
- Add annotations for previously undocumented endpoints: artifacts,
  analytics, builder runner actions, and user self/signup/recovery.
- Rename the users and coderepos path parameters to user_id/repo_id and
  align the route registrations and request struct tags accordingly;
  mark BuilderRunnerItem.Log as swaggertype string so swag can parse it.
- Regenerate tools/skill/sigma-api-operator/swagger.yaml. The
  distribution handlers are intentionally left undocumented.

Verification:
- go test -tags "netgo,timetzdata,exclude_graphdriver_btrfs,containers_image_openpgp" ./pkg/server/handlers/users/ ./pkg/server/handlers/coderepos/ -run TestInitialize -count=1
- go tool swag fmt && go tool swag init --output tools/skill/sigma-api-operator --outputTypes yaml
- go build -tags "netgo,timetzdata,exclude_graphdriver_btrfs,containers_image_openpgp" ./pkg/server/handlers/... ./pkg/api/...
- gofmt -l pkg/server/handlers pkg/api
2026-10-03 21:51:37 +08:00
Tosone 9d0affcd12 build(ci): pin govulncheck and add a non-blocking scan workflow
Add golang.org/x/vuln/cmd/govulncheck to the go.mod tool set and run it
in a dedicated workflow with the project build tags. The report is
written to GITHUB_STEP_SUMMARY and the step is non-blocking so findings
are reported without failing CI.

Verification:
- go tool govulncheck -tags "netgo,timetzdata,exclude_graphdriver_btrfs,containers_image_openpgp" ./...
2026-10-03 16:20:36 +08:00
Tosone 217cec5829 build(deps): bump go and web dependencies
- Update go.mod/go.sum (grype, syft, aws-sdk-go-v2, distribution,
  gin contrib, validator and others).
- Update web/package.json and web/bun.lock (shikijs, react-router-dom,
  lucide-react, oxlint, esbuild, vite and others).
- Ignore the local `.delta/` directory in .gitignore.
2026-10-02 23:36:56 +08:00
Tosone 2009156bf5 ci: replace Minio with rs3 and make E2E CI run
Run the self-hosted rs3 service instead of Minio in test.yml and swap the
local helper script, Makefile helm values, and AGENTS.md notes accordingly.

Fix the E2E workflow (refs #426): it only triggered on the `main` branch,
which does not exist in this repository, so the job never ran. Trigger it
on `dev` for both push and pull_request like test.yml, build the image via
the consolidated `make docker-build`, bump the checkout/setup-go actions,
drop the hosted-toolcache cleanup, and refresh the E2E tooling to k6
v2.3.0 and skopeo v1.24.1.

Repair the image startup path as well: start nginx with an explicit
/etc/nginx/nginx.conf and a /dev/stderr error log so the non-root user does
not touch the compiled-in log path, create /etc/sigma with mode 0755 before
copying config.yaml (COPY --chmod made the directory non-traversable), and
disable redis in the shipped default config since cache, locker and work
queue are inmemory.
2026-09-26 19:42:46 +08:00
Tosone b10d58b948 build(deps): bump go dependencies and build tool versions
- build/Dockerfile: swagger-ui 5.33.0, syft 1.51.1, grype 0.118.0
- go.mod: aws-sdk-go-v2 config/credentials/kms/sts, docker/cli 29.8.1,
  mark3labs/mcp-go 1.1.0, go.podman.io/* 6.1.2, gorm postgres driver 1.6.3
- add mise.toml pinning the Go and Bun toolchain versions

Verification: go mod verify; go build -tags
"netgo,timetzdata,exclude_graphdriver_btrfs,containers_image_openpgp" ./...
2026-09-16 20:04:43 +08:00
Tosone d2470bb310 build(deps): bump Go and web dependencies
Update direct and indirect Go module versions, including aws-sdk-go-v2,
goose, ClickHouse, Azure SDK and golang.org/x/exp, and refresh the web
toolchain (react 19.3, vite 8.3, typescript 7, shadcn, tailwind).

Switch the web Vite `@` alias from `__dirname` to `import.meta.dirname`
to align with the ESM config runtime.

Verification: not run (dependency-only change).
2026-09-12 17:16:41 +08:00
Tosone 720022de3e refactor(mocks): generate mocks into source packages
Move generated mocks out of the `mocks/` subpackages and into the
source packages as `*_mocks.go` files for `pkg/distribution/clients`
and `pkg/service/password`, updating the go:generate directives to
emit `-package=clients` / `-package=password`. Update the import in
`pkg/service/users/users_test.go` to reference the new location.

Also:
- add `go.uber.org/mock/mockgen` to the tool directives and refresh
  module dependencies
- bump CI service images (mysql 9, postgres 18-alpine) and drop the
  removed mocks packages from the coverage exclusion list
- clean up .gitignore and ignore local tool artifacts (.pi/,
  skills-lock.json)

Verification:
- go vet -tags "netgo,timetzdata,exclude_graphdriver_btrfs,containers_image_openpgp" ./pkg/service/users/ ./pkg/service/password/ ./pkg/distribution/clients/
- go test -tags "netgo,timetzdata,exclude_graphdriver_btrfs,containers_image_openpgp" ./pkg/service/users/
2026-09-11 00:19:17 +08:00
Tosone 7594514d8b build: bump dependencies
- miniredis v2.38.0 -> v2.39.0
- aws-sdk-go-v2 v1.45.1 -> v1.46.0 (config, s3, and transitive sub-packages)
- docker/cli v29.7.2 -> v29.8.0
- gin-contrib/cors v1.7.7 -> v1.7.8, pprof v1.5.4 -> v1.5.5
- go-playground/validator v10.30.3 -> v10.30.4
- go-sql-driver/mysql v1.10.0 -> v1.10.1
- pgx/v5 v5.10.0 -> v5.11.0
- mcp-go v0.58.0 -> v1.0.0
- moby/buildkit v0.32.2 -> v0.33.0
- podman/v6 v6.1.0 -> v6.1.1
- golang.org/x/crypto, net, oauth2, sync (and transitive x/* packages)
- resty.dev/v3 v3.0.0-rc.3 -> v3.0.0-rc.4
- distribution-spec/specs-go refresh
- plus assorted transitive dependency bumps

Verification: go.sum regenerated to match go.mod
2026-09-09 21:59:31 +08:00
Tosone 4934a7061a build(deps): update all indirect and direct go module versions
Update all direct and indirect Go module dependencies to their latest compatible versions, including security patches and feature updates across the codebase.
2026-08-28 11:09:57 +08:00
Tosone d847d3b27d refactor(web): migrate to shadcn/ui and update tooling stack
Complete migration from legacy React toastify/headlessui to shadcn/ui components, update Tailwind CSS setup, add path aliases, and replace old icon libraries with lucide-react. Also update dependencies to modern versions and clean up unused files and styles.
2026-08-24 11:39:02 +08:00
Tosone c118f1872c chore: upgrade to go 1.27 and update dependencies
Update go version from 1.26 to 1.27 across all workflows, dockerfile, and project configs. Switch uuid usage to stdlib package instead of external google/uuid. Bump traefik, bun, and various golang/x dependencies versions. Clean up unused direct uuid dependency.

Verification:
go test ./pkg/utils/uuid/...
2026-08-20 14:28:59 +08:00
Tosone 54162226ac chore: update compose stack and dependency compatibility
Switch the Docker Compose stack from MySQL and Minio to PostgreSQL and rs3,
with the compose-specific configuration updated to use PostgreSQL and the rs3
S3 endpoint.

Adapt code for upgraded resty and GitLab client APIs, including the renamed
response parsing option and int64 pagination and ID fields.

Also refresh agent guidance and the Chinese README automation notes.

Verification:
docker compose -f compose.yml config
ruby -e 'require "yaml"; YAML.load_file("conf/config-compose.yaml"); YAML.load_file("compose.yml"); puts "yaml ok"'
go test -tags "netgo,timetzdata,exclude_graphdriver_btrfs,containers_image_openpgp" ./pkg/config ./pkg/service/token
go test -tags "netgo,timetzdata,exclude_graphdriver_btrfs,containers_image_openpgp" ./pkg/builder ./pkg/distribution/clients ./pkg/background/daemon/webhook
go test -tags "netgo,timetzdata,exclude_graphdriver_btrfs,containers_image_openpgp" ./pkg/background/daemon/coderepo
make build
2026-08-01 20:32:51 +08:00
Tosone c4ecfa80d9 chore: initial commit 2026-08-01 20:32:49 +08:00