14 Commits
Author SHA1 Message Date
Willie 13330867ce fix(security): bump Go to 1.26.10 for CVE-2026-111943 (#604)
Go 1.26.10 and 1.27.3 make crypto/x509 reject chains that pass through
the compromised eMudhra intermediate CAs. Go 1.25 has no backport, so
binaries built from go.mod 1.25.5 would still trust forged certificates
from those intermediates on systems whose trust store has not been
updated. skillshare makes HTTPS requests for upgrade, update checks,
search and registry lookups, so release binaries need the fix.

Move go.mod, mise.toml, the three Docker images and the sandbox docs to
1.26.10. CI and release builds follow go.mod through go-version-file.
2026-10-22 13:34:41 +08:00
Willie 1fe668ec54 ci(release): add reviewed version PRs and manual publication
Create Release Please PRs, synchronize release metadata, and test the exact merge commit before tagging and building an unpublished draft.

Verify release artifacts before manual publication and keep Homebrew and Docker distribution tied to the approved version. Document explicit version overrides and squash-merge behavior in the release skills and runbook.

Validation: make check, 12 release helper tests, actionlint, and an isolated six-platform GoReleaser build with artifact verification.
2026-10-02 01:53:47 +08:00
Willie dc3a2b8b1f chore(toolchain): update frontend dependencies and pnpm
Refresh the UI build stack and align local, container, and release workflows on pnpm 12.6.0. Record the approved esbuild install script and repair UI dependencies on initialized devcontainer starts.
2026-09-30 00:12:18 +08:00
Willie 29bde9af3d fix: address review findings 2026-07-30 01:34:52 +08:00
Willie 0115c8b42f fix(docker): pin air to v1.67.0 for Go 1.25 toolchain
air v1.67.3 raised its go directive to 1.26.0, which the sandbox image
cannot satisfy: it runs golang:1.25.5 with GOTOOLCHAIN=local, so the
toolchain is never auto-upgraded and `go install air@latest` fails the
docker-sandbox CI jobs. v1.67.0 is the last release on go 1.25.
2026-07-28 09:32:42 +08:00
Willie 474bf3e4c1 feat(devcontainer): standalone lifecycle without VS Code dependency
`make devc` now builds, initialises, and enters the devcontainer in one
step — no VS Code required. A unified `scripts/devc.sh` replaces the old
`devcontainer_shell.sh` with full lifecycle subcommands (up/shell/down/
restart/reset/status).

Key changes:
- Dockerfile Stage 2 copies node+pnpm from ui-builder (removes need for
  devcontainer feature, benefits sandbox playground too)
- profile.d scripts moved from setup.sh → start-dev.sh so they survive
  container recreation (down → up) without re-running full setup
- Volume-based sentinel (~/.devcontainer-initialized) lets devc.sh skip
  setup.sh when volumes persist, cutting restart to ~2s
- Go toolchain PATH added to profile.d (login shell was losing it)
- Makefile/mise.toml gain devc-up/-down/-restart/-reset/-status targets
- Website docs updated with terminal-first flow and CLI path in diagrams
2026-03-03 16:08:11 +08:00
Willie c5d32111f7 dev: overhaul devcontainer experience with persistence and enhanced tooling
Improve the sandbox development environment to support "new user" simulation
while maintaining a high-quality developer experience.

Changes:
- Persistence: Redirect HOME to /home/developer and add a persistent volume
  to preserve shell history, gh auth state, and isolated environments.
- Tooling: Pre-install GitHub CLI (gh), air (hot-reload), and delve (dlv)
  in the sandbox Dockerfile.
- Isolated Envs:
    - Update ssenv to store environments in persistent $HOME/.ss-envs.
    - Add --init flag to ssnew/ssenv to auto-run 'ss init -g' in new envs.
    - Add visual PS1 indicator when an isolated environment is active.
- DX Refinements:
    - Add a centralized 'help' command (aliased to override bash built-in).
    - Fix ANSI color rendering in help script.
    - Robust PROJECT_ROOT redirection in skillshare wrapper script.
    - Support /home/developer in setup.sh environment checks.
2026-02-25 07:02:54 +08:00
Willie 5c44acd7d1 test: add red team E2E script for supply-chain security validation
Repeatable bash-based test exercising all audit patterns (CRITICAL→INFO),
update gate rollback, content hash integrity, and batch blast radius.

- scripts/red_team_test.sh: main entry (setup + 4 phases + summary)
- scripts/red_team/: split phases + shared helpers
- Makefile/mise.toml: add `test-redteam` target
- docker/sandbox/Dockerfile: add jq for JSON assertions
2026-02-23 04:18:01 +08:00
Willie 1b5056d0ea refactor(docker): unify versions, consolidate init scripts, add sandbox-logs
- Add `make sandbox-logs` / `mise run sandbox:logs` convenience target
- Unify Docker build versions via ARG: Node 24, pnpm 10.28.0, Go 1.25.5
- Extract shared demo content to scripts/create-demo-content.sh, slim down
  setup.sh and sandbox_playground_up.sh from ~150 duplicated lines each
- Move devcontainer scripts (ui, ui-p, docs) to .devcontainer/bin/
  (source-controlled, survives make clean) with auto mode-switching
2026-02-20 12:22:02 +08:00
Willie 41e822d979 feat: remove go:embed, serve UI exclusively via runtime download
Replace the embedded SPA (go:embed + build tags) with runtime download
from GitHub Releases. The binary no longer bundles UI assets — they are
downloaded on first `skillshare ui` launch and cached at
~/.cache/skillshare/ui/<version>/.

- Delete embed.go / embed_dev.go; add spa_disk.go with placeholder handler
- Simplify ensureUIAvailable(): cache check before dev-mode fallback
- Pre-download UI assets in `skillshare upgrade` (best-effort)
- Remove Node stages from production and CI Dockerfiles
- Keep Node stage in sandbox for playground UI cache pre-population
- Remove ui-embed-check CI job and -tags dev build flag
- Update Makefile, mise.toml, GoReleaser, release workflow
2026-02-16 02:58:22 +08:00
Willie c4a0c64911 feat(docker): add graceful shutdown, security hardening, production/CI images, and dev profile
Server improvements:
- Graceful shutdown with SIGTERM/SIGINT (10s grace period)
- HTTP timeouts (ReadHeader 5s, Read 15s, Write 30s, Idle 60s)
- Health endpoint now returns version and uptime

Compose security hardening:
- read_only filesystem, cap_drop ALL, no-new-privileges
- Resource limits (2 CPU / 2G memory), tmpfs for /tmp
- Playground healthcheck via /api/health

New Docker images:
- docker/production/ — lightweight debian-slim with tini, non-root user, healthcheck
- docker/ci/ — minimal image for skill validation in pipelines
- .github/workflows/docker-publish.yml — multi-arch GHCR publishing on tag push

Script improvements:
- DRY: test_docker.sh --online flag replaces duplicate test_docker_online.sh
- _sandbox_common.sh: Compose v2 version check with install suggestions
- .dockerignore: exclude website/, .github/, editor files

New targets:
- sandbox-status, dev-docker-up/down, docker-build, docker-build-multiarch

Docs updated: CLAUDE.md, README.md, website docker guide with use cases
2026-02-13 15:29:52 +08:00
Willie 503ee8af24 refactor: DRY up Docker sandbox scripts with shared entrypoint and boilerplate
- Add docker/sandbox/entrypoint.sh to auto-copy /ui-dist → internal/server/dist/
  when missing, fixing the gitignore regression for all Docker workflows
- Add scripts/_sandbox_common.sh with shared SCRIPT_DIR, PROJECT_ROOT,
  COMPOSE_FILE, and require_docker() function
- Refactor all 5 sandbox scripts to source _sandbox_common.sh
- Use YAML extension fields (x-sandbox-common) in docker-compose.sandbox.yml
  to eliminate duplicated service config
- Break sandbox_playground_up.sh one-liner into readable steps, add
  skillshare-ui alias and init hint
- Change test.sh to use `make build` for placeholder consistency
2026-02-08 16:32:28 +08:00
Willie 092fb14f8a feat: add web dashboard with embedded React SPA (skillshare ui)
Single-binary web UI for visual skill management — React 19 + Vite
frontend embedded via go:embed, Go net/http REST API backend (30+
endpoints). Includes dashboard, skills browser, targets, sync, collect,
search, install, config editor, backup/restore, and git sync pages.

Also adds Bitbucket/GitLab URL parsing for install, git operations
library, skill version checking, CI frontend build steps, Docker
sandbox support, and website docs for the ui command.
2026-02-08 05:08:30 +08:00
Willie 080e29e0ff feat: add docker sandbox test/playground workflows and docs 2026-02-07 21:55:20 +08:00