Commit graph

54 commits

Author SHA1 Message Date
senke
ce3b92a0c1 ci: fix duplicate env block in staging-validation workflow
Merge SSL env vars into existing env block instead of creating a
duplicate (YAML doesn't allow duplicate top-level keys).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-09 14:51:10 +02:00
senke
a3f4ac6b70 fix: sync E2E tests with seed data + i18n fix
- Update E2E test credentials to match actual seed users
  (user@veza.music, artist@veza.music, admin@veza.music, mod@veza.music)
- Fix hardcoded "Suggested Accounts" in SuggestionsWidget with i18n key
- Replace hardcoded amelie_dubois references with CONFIG.users.creator
- Refactor auth, player, upload E2E tests for reliability
- Add tmt test plans and scripts for CI integration
- Simplify CI workflow

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02 19:42:03 +02:00
senke
dfeff836ce feat(ui): add SUMI design system components, seasonal hooks, and i18n updates
Add SumiButton and SumiCanvas components with lavis ink wash aesthetic.
Add useSeason and useTimeOfDay hooks for time-aware UI tinting.
Update storybook config, UI components, locales (en/es/fr), and dependencies.
Add Chromatic CI workflow.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 19:15:54 +02:00
senke
9cd0da0046 fix(v0.12.6): apply all pentest remediations — 36 findings across 36 files
CRITICAL fixes:
- Race condition (TOCTOU) in payout/refund with SELECT FOR UPDATE (CRITICAL-001/002)
- IDOR on analytics endpoint — ownership check enforced (CRITICAL-003)
- CSWSH on all WebSocket endpoints — origin whitelist (CRITICAL-004)
- Mass assignment on user self-update — strip privileged fields (CRITICAL-005)

HIGH fixes:
- Path traversal in marketplace upload — UUID filenames (HIGH-001)
- IP spoofing — use Gin trusted proxy c.ClientIP() (HIGH-002)
- Popularity metrics (followers, likes) set to json:"-" (HIGH-003)
- bcrypt cost hardened to 12 everywhere (HIGH-004)
- Refresh token lock made mandatory (HIGH-005)
- Stream token replay prevention with access_count (HIGH-006)
- Subscription trial race condition fixed (HIGH-007)
- License download expiration check (HIGH-008)
- Webhook amount validation (HIGH-009)
- pprof endpoint removed from production (HIGH-010)

MEDIUM fixes:
- WebSocket message size limit 64KB (MEDIUM-010)
- HSTS header in nginx production (MEDIUM-001)
- CORS origin restricted in nginx-rtmp (MEDIUM-002)
- Docker alpine pinned to 3.21 (MEDIUM-003/004)
- Redis authentication enforced (MEDIUM-005)
- GDPR account deletion expanded (MEDIUM-006)
- .gitignore hardened (MEDIUM-007)

LOW/INFO fixes:
- GitHub Actions SHA pinning on all workflows (LOW-001)
- .env.example security documentation (INFO-001)
- Production CORS set to HTTPS (LOW-002)

All tests pass. Go and Rust compile clean.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-14 00:44:46 +01:00
senke
5088239337 feat(v0.14.0): validation runtime & staging pipeline
- TASK-STAG-001: staging-validation.yml workflow (deploy + all checks)
- TASK-STAG-002: k6 staging performance validation (p95<100ms, stream<500ms)
- TASK-STAG-003: Lighthouse CI config (perf>=85, a11y>=90, CWV thresholds)
- TASK-STAG-004: staging-stability-check.sh (5xx rate monitoring)
- TASK-STAG-005: GDPR E2E integration test (export + deletion + anonymization)
- TASK-STAG-006: bundle size check integrated in validation pipeline

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 16:09:43 +01:00
senke
0aa77d2bd9 feat(v0.12.9): ethical bias tests, discovery algorithm docs, CI coverage gates
Some checks failed
Backend API CI / test-unit (push) Failing after 0s
Backend API CI / test-integration (push) Failing after 0s
TASK-ETH-001: 4 discovery bias tests (genre/tag browse, emerging artist visibility,
  metrics not exposed in JSON). Verifies chronological ordering regardless of play count.
TASK-ETH-002: 4 search fairness tests (artist 0 plays discoverable, zero-play tracks
  not filtered, default sort is chronological, no popularity bias in default ranking).
TASK-ETH-003: veza-docs/DISCOVERY_ALGORITHM.md — documents all 6 discovery mechanisms,
  ethical constraints, and forbidden patterns per ORIGIN specs.
TASK-COV-001: CI coverage gates — Go >= 70% (backend-ci.yml), Rust >= 50% (rust-ci.yml
  with cargo-tarpaulin). Extended Go test scope to core/ and middleware/.
TASK-COV-002: Coverage badge JSON artifact on main push (shields.io compatible).

All 8 ethical tests PASS. Build clean.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 08:19:41 +01:00
senke
c0e2fe2e12 fix(v0.12.6.1): remediate remaining 15 MEDIUM + LOW pentest findings
MEDIUM-002: Remove manual X-Forwarded-For parsing in metrics_protection.go,
  use c.ClientIP() only (respects SetTrustedProxies)
MEDIUM-003: Pin ClamAV Docker image to 1.4 across all compose files
MEDIUM-004: Add clampLimit(100) to 15+ handlers that parsed limit directly
MEDIUM-006: Remove unsafe-eval from CSP script-src on Swagger routes
MEDIUM-007: Pin all GitHub Actions to SHA in 11 workflow files
MEDIUM-008: Replace rabbitmq:3-management-alpine with rabbitmq:3-alpine in prod
MEDIUM-009: Add trial-already-used check in subscription service
MEDIUM-010: Add 60s periodic token re-validation to WebSocket connections
MEDIUM-011: Mask email in auth handler logs with maskEmail() helper
MEDIUM-012: Add k-anonymity threshold (k=5) to playback analytics stats
LOW-001: Align frontend password policy to 12 chars (matching backend)
LOW-003: Replace deprecated dotenv with dotenvy crate in Rust stream server
LOW-004: Enable xpack.security in Elasticsearch dev/local compose files
LOW-005: Accept context.Context in CleanupExpiredSessions instead of Background()
LOW-002: Noted — Hyperswitch version update deferred (requires payment integration tests)

29/30 findings remediated. 1 noted (LOW-002).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 06:13:38 +01:00
senke
22f0c04b3f stabilisation commit: while implementing v0.10.5 2026-03-09 19:36:33 +01:00
senke
2ed2bb9dcf v0.9.4 2026-03-05 23:03:43 +01:00
senke
72d40990c5 feat(v0.923): API contract tests, OpenAPI generation, CI type sync check
Some checks failed
Backend API CI / test-unit (push) Failing after 0s
Backend API CI / test-integration (push) Failing after 0s
Frontend CI / test (push) Failing after 0s
Storybook Audit / Build & audit Storybook (push) Failing after 0s
2026-02-27 20:23:10 +01:00
senke
f9120c322b release(v0.903): Vault - ORDER BY whitelist, rate limiter, VERSION sync, chat-server cleanup, Go 1.24
Some checks failed
Backend API CI / test-unit (push) Failing after 0s
Backend API CI / test-integration (push) Failing after 0s
Frontend CI / test (push) Failing after 0s
Storybook Audit / Build & audit Storybook (push) Failing after 0s
Stream Server CI / test (push) Failing after 0s
- ORDER BY dynamiques : whitelist explicite, fallback created_at DESC
- Login/register soumis au rate limiter global
- VERSION sync + check CI
- Nettoyage références veza-chat-server
- Go 1.24 partout (Dockerfile, workflows)
- TODO/FIXME/HACK convertis en issues ou résolus
2026-02-27 09:43:25 +01:00
senke
279a10d317 chore(cleanup): remove veza-chat-server directory and all operational references
Chat functionality is now fully handled by the Go backend (since v0.502).
Remove the deprecated Rust chat server and all its references from:
- CI/CD workflows (ci.yml, cd.yml, rust-ci.yml, chat-ci.yml)
- Monitoring & proxy config (prometheus, caddy, haproxy)
- Incus deployment scripts and documentation
- Monorepo config (package.json, dependabot, GH templates)
2026-02-22 21:13:00 +01:00
senke
43309327e6 feat(v0.501): Sprint 5 -- integration, tests, and cleanup
- INT-01: Add E2E streaming tests (upload -> HLS auth)
- INT-02: Add E2E cloud tests (CRUD auth, public gear)
- INT-03: Split track/handler.go into 4 focused sub-handlers
- INT-04: Create migration squash script + MIGRATIONS.md
- INT-05: Add Trivy container image scanning CI workflow
- INT-06: Replace production console.log with structured logger
2026-02-22 18:40:07 +01:00
senke
de92bf6029 feat(ci): add CodeQL SAST scanning for Go and TypeScript
INF-06: New sast.yml workflow runs CodeQL analysis on push to main
and PRs for Go and JavaScript/TypeScript.
2026-02-22 17:35:50 +01:00
senke
68069df6e4 feat(ci): add clippy lint step for Rust services
INF-05: New rust-ci.yml runs cargo clippy with -D warnings for both
chat-server and stream-server.
2026-02-22 17:35:46 +01:00
senke
13c21ac114 feat(ci): add go vet and gofmt check to backend CI
INF-04: Backend CI now runs go vet and gofmt to catch issues early.
2026-02-22 17:35:42 +01:00
senke
66149ff2f7 fix(ci): add lint, typecheck and build steps to frontend CI
INF-03: frontend-ci.yml now runs eslint, tsc --noEmit, and vite build.
Audit level aligned to critical.
2026-02-22 17:35:39 +01:00
senke
d64512ec66 fix(ci): move hardcoded E2E credentials to GitHub Secrets
SEC-10: Replaced hardcoded TEST_PASSWORD, JWT_SECRET, DATABASE_URL
password, and RABBITMQ_URL with GitHub Secrets references. Secrets
to create: E2E_TEST_PASSWORD, E2E_JWT_SECRET, E2E_RABBITMQ_URL,
E2E_DB_PASSWORD.
2026-02-22 17:32:52 +01:00
senke
d3245b2e4b fix(build): unify Go version to 1.24 across Dockerfile and CI
SEC-09: go.mod declares Go 1.24.0 but Dockerfile.production used 1.23
and backend-ci.yml used 1.23. Aligned both to 1.24.
2026-02-22 17:32:17 +01:00
senke
eb82e02c83 fix(ci): repair CD pipeline -- use vars.* instead of secrets.* in if conditions, target Dockerfile.production 2026-02-22 17:23:43 +01:00
senke
286be8ba1d chore(v0.102): consolidate remaining changes — docs, frontend, backend
Some checks failed
Backend API CI / test-unit (push) Failing after 0s
Backend API CI / test-integration (push) Failing after 0s
Frontend CI / test (push) Failing after 0s
Storybook Audit / Build & audit Storybook (push) Failing after 0s
- docs: SCOPE_CONTROL, CONTRIBUTING, README, .github templates
- frontend: DeveloperDashboardView, Player components, MSW handlers, auth, reactQuerySync
- backend: playback_analytics, playlist_service, testutils, integration README

Excluded (artifacts): .auth, playwright-report, test-results, storybook_audit_detailed.json
2026-02-20 13:02:12 +01:00
senke
c0bcb711df fix(e2e): align CI Go version to 1.24 for v0.101
fix(web): resolve lint errors for v0.101
- eslint: add ignores (e2e, scripts, playwright-report, generated types)
- eslint: add browser globals, disable react-hooks in stories
- fix empty catch blocks (Cart, MarketplacePage, RolesPage, SettingsPage)
- fix PlayerExpanded: move useEffect before early return
- fix TrackHistory.test: rename type import to avoid no-redeclare
2026-02-19 16:27:10 +01:00
senke
b103a09a25 chore: consolidate CI, E2E, backend and frontend updates
- CI: workflows updates (cd, ci), remove playwright.yml
- E2E: global-setup, auth/playlists/profile specs
- Remove playwright-report and test-results artifacts from tracking
- Backend: auth, handlers, services, workers, migrations
- Frontend: components, features, vite config
- Add e2e-results.json to gitignore
- Docs: REMEDIATION_PROGRESS, audit archive
- Rust: chat-server, stream-server updates
2026-02-17 16:43:21 +01:00
senke
59e1f3514e fix(ci): add E2E test user seed and fix smoke/auth specs
- Add create_test_user step in CI e2e job (e2e@test.com)
- Add TEST_EMAIL and TEST_PASSWORD to Playwright env for consistency
- Add form visibility waits in smoke.spec.ts (align with auth.spec.ts)
- Ensures login form is visible before fillField to avoid flaky failures
2026-02-17 15:05:10 +01:00
senke
0118172b40 fix(e2e): set VITE_API_URL for E2E to use Vite proxy in CI 2026-02-16 10:52:56 +01:00
senke
28f6885492 chore: align Go version in CI with go.mod (1.24) 2026-02-16 10:23:47 +01:00
senke
fef7e7fc7c feat(loadtests): audit 3.2 — tests de charge k6 complets
- loadtests: centraliser scripts (backend, stream, chat)
- backend: health, auth, tracks, uploads, playlists, marketplace
- stream: http health, healthz, readyz
- chat: WebSocket load (register -> login -> chat token -> WS)
- ci: workflow nightly load-test-nightly.yml
- docs: README loadtests
- make: load-test-smoke, load-test-backend, load-test-all
- fix: veza-backend-api Makefile load-test (scripts/load_test_uploads.js -> loadtests)
2026-02-15 15:22:48 +01:00
senke
03f626c9e8 fix(audit-1.8,1.9): implement OAuth user lookup, add cargo audit to CI
- 1.8: Implement GetUserByOAuthID in database.go via federated_identities join
- 1.8: Use OAuth ID lookup first in oauth_service getOrCreateUser
- 1.9: Add cargo audit step to chat-ci.yml and stream-ci.yml

Refs: AUDIT_TECHNIQUE_INTEGRAL_2026_02_15.md items 1.8, 1.9
2026-02-15 14:22:27 +01:00
senke
c2296ac1c6 test(e2e): add post-deploy smoke tests
- Add smoke-post-deploy.spec.ts for health checks
- Add playwright.config.smoke.ts (no webServer)
- Add smoke-post-deploy job to cd.yml (runs when STAGING_URL set)
- Document procedure in e2e/README.md
2026-02-14 22:45:10 +01:00
senke
83a9a3537c chore: add Turborepo for monorepo orchestration
- Add turbo devDependency and packageManager to root
- Create turbo.json with build, test, lint pipeline
- Add package.json to veza-backend-api, veza-chat-server, veza-stream-server
- Extend workspaces to include Go and Rust services
- Migrate CI to use turbo run for build, test, lint
2026-02-14 22:38:32 +01:00
senke
92f432fb9e chore: consolidate pending changes (Hyperswitch, PostCard, dashboard, stream server, etc.) 2026-02-14 21:45:15 +01:00
senke
7b3356eb6b ci(backend): add coverage report generation and upload 2026-02-14 20:21:28 +01:00
senke
0d31772d66 ci: add gitleaks secret scanning 2026-02-14 20:21:19 +01:00
senke
e99447027c ci(backend): run Go tests without -short, add test DB service 2026-02-14 20:20:54 +01:00
senke
c681b97e1f feat(cd): add cosign image signing and SBOM generation 2026-02-14 18:22:46 +01:00
senke
ae586f6134 Phase 2 stabilisation: code mort, Modal→Dialog, feature flags, tests, router split, Rust legacy
Bloc A - Code mort:
- Suppression Studio (components, views, features)
- Suppression gamification + services mock (projectService, storageService, gamificationService)
- Mise à jour Sidebar, Navbar, locales

Bloc B - Frontend:
- Suppression modal.tsx deprecated, Modal.stories (doublon Dialog)
- Feature flags: PLAYLIST_SEARCH, PLAYLIST_RECOMMENDATIONS, ROLE_MANAGEMENT = true
- Suppression 19 tests orphelins, retrait exclusions vitest.config

Bloc C - Backend:
- Extraction routes_auth.go depuis router.go

Bloc D - Rust:
- Suppression security_legacy.rs (code mort, patterns déjà dans security/)
2026-02-14 17:23:32 +01:00
senke
8f1ccd8a56 fix(ci): correct Rust service paths and reactivate CD pipeline
- Fix chat-ci.yml and stream-ci.yml to reference veza-chat-server/
  and veza-stream-server/ instead of non-existent apps/ paths
- Add veza-common/ to CI triggers so shared library changes are tested
- Reactivate CD pipeline with Docker registry push and Kubernetes
  deployment steps (gated on secrets availability)
- Standardize Redis dependency to v0.32 across both Rust services

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 22:44:56 +01:00
senke
ff5d6736f8 ci: add Dependabot configuration for automated dependency updates
Configure weekly automated dependency update PRs for all ecosystems:

- gomod: /veza-backend-api (Go modules)
- cargo: /veza-chat-server, /veza-stream-server (Rust crates)
- npm: /apps/web (frontend packages)
- github-actions: / (CI action versions)

Each ecosystem gets appropriate labels for easy triage.

Addresses audit finding A06: no automated dependency update mechanism.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-11 23:26:18 +01:00
senke
ba232c2f56 ci: add cargo clippy lint step to chat and stream CI workflows
Add clippy with -D warnings (deny all warnings) to both Rust CI
pipelines. The production-deploy workflow already had clippy.

This ensures lint issues are caught before merge for both services.

Addresses audit finding D15: clippy not present in all Rust workflows.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-11 23:25:57 +01:00
senke
40db0b4c43 fix(ci): upgrade deprecated actions, fix Go version
production-deploy.yml:
- Replace actions-rs/toolchain@v1 with dtolnay/rust-toolchain@stable
- Upgrade actions/cache@v3 -> @v4
- Upgrade github/codeql-action/upload-sarif@v2 -> @v3
- Upgrade actions/upload-artifact@v3 -> @v4

backend-ci.yml:
- Upgrade Go 1.22 -> 1.23 to match go.mod (1.23.8)

Addresses audit findings A08: deprecated actions and outdated Go version.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-11 23:14:50 +01:00
senke
a7b5cdc55f fix(ci): remove remaining || true and || echo in secondary workflows
- cd.yml: remove || echo soft failures on Docker builds for chat-server
  and stream-server. Build must fail if Dockerfile is missing in CD.
- vulnerability-scan.yml: remove || true from govulncheck command.
  The step-level continue-on-error: true already handles failure
  gracefully for the report-only govulncheck step.

Addresses audit findings D3, A08: 3 residual || true / || echo patterns.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-11 23:14:21 +01:00
senke
49bc0c1443 ci: upgrade remaining GitHub Actions and remove || true patterns
- backend-ci.yml: remove || true from govulncheck
- frontend-ci.yml: remove || true from npm audit
- cd.yml: upgrade checkout@v3 -> v4, buildx-action@v2 -> v3
- chat-ci.yml: replace actions-rs/toolchain@v1 with dtolnay/rust-toolchain@stable
- stream-ci.yml: replace actions-rs/toolchain@v1 with dtolnay/rust-toolchain@stable

Zero remaining `|| true` patterns across all 11 workflow files.
Zero remaining deprecated action references.

Completes CI hardening started in C1.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-11 22:54:35 +01:00
senke
af4893e684 fix(ci): harden CI pipeline -- remove || true, fix versions
- Remove all `|| true` from govulncheck, cargo audit, npm audit,
  lint, and format check steps (was masking real failures)
- Remove `continue-on-error: true` from stream-server build step
- Fix Go version mismatch: CI 1.21 -> 1.23 (matches go.mod 1.23.8)
- Upgrade Node.js from 18 to 20 (current LTS)
- Replace deprecated actions-rs/toolchain@v1 with dtolnay/rust-toolchain@stable
- Upgrade all GitHub Actions to v4/v5 (checkout, setup-go, setup-node, cache)
- Make gofmt check fail properly on unformatted files

Addresses audit findings: A05 (Security Misconfiguration), A08 (Software
& Data Integrity), debt item 5 (CI || true everywhere).

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-11 22:39:40 +01:00
senke
8a0f008345 chore: playwright workflow, docs, rapports audit, visual-tests, tmt unit
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-11 22:19:34 +01:00
senke
41eacaf97d ci: add npm audit and govulncheck to main CI (P3.4)
- Add govulncheck to backend-go job
- Add npm audit --audit-level=high to frontend job
- Both use || true to avoid blocking CI on existing vulns

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-11 22:15:22 +01:00
senke
bbbe557eca ci: add npm audit, govulncheck, cargo audit to CI
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-11 21:33:27 +01:00
senke
d45662ea22 ci(storybook): add audit workflow and exit 1 on audit failures 2026-02-05 13:39:53 +01:00
senke
49a1e9a5c0 aesthetic-improvements: add automated contrast testing for WCAG compliance
- Created contrast utility (apps/web/src/utils/contrast.ts)
  - getRelativeLuminance() - calculates WCAG relative luminance
  - getContrastRatio() - calculates contrast ratio between colors
  - meetsWCAGAA() / meetsWCAGAAA() - validates WCAG standards
  - parseRGB() - parses RGB strings from CSS variables
- Created contrast test suite (apps/web/src/__tests__/contrast.test.ts)
  - Tests all design system color combinations
  - Validates primary text (white) on all backgrounds
  - Validates secondary text (dim) on all backgrounds
  - Validates text with opacity variants
  - All combinations must meet WCAG AA (4.5:1)
- Added contrast test step to CI workflow
- Prevents contrast ratio regressions
- Action 11.1.1.5 complete
2026-01-16 10:26:20 +01:00
senke
ce30e69330 api-contracts: add caching for generated types in CI
- Completed Action 1.1.2.4: Added cache step for generated types
- Cache keyed on openapi.yaml hash for automatic invalidation
- Speeds up CI by avoiding regeneration when spec unchanged
2026-01-11 16:31:48 +01:00
senke
1d3de01f41 api-contracts: add type generation to CI/CD workflow
- Completed Action 1.1.2.3: Added type generation step to frontend CI
- Step runs before Type Check to ensure types are up-to-date
- CI will fail if generated types don't match OpenAPI spec
- Added chmod to ensure script is executable in CI environment
2026-01-11 16:31:43 +01:00