Commit Graph

16 Commits (e4c68b28941f629723b0b237ceda96799c0e08d5)

Author SHA1 Message Date
a2nr e4c68b2894 feat(security): implement anonymous access with rate limiting and secure proxy, harden authentication and implement session protection
Implements multiple layers of security to address high-risk session
   and authentication vulnerabilities identified in the security review:

   - Allow code compilation (C, Python, Arduino) for anonymous users.
   - Enforce a 1-request-per-2-minutes rate limit for anonymous IPs.
   - Implement a global anonymous compilation queue with 20 concurrent slots.
   - Proxy Velxio (Arduino) compilation through Flask to prevent API hijacking.
   - Exempt authenticated users (tokens/cookies) from all rate limits.
   - Fix networking and DNS resolution in podman-compose.
   - Fix Svelte a11y warnings and trailing slash routing issues.
   - Cookie Security: Added dynamic 'secure' flag support via COOKIE_SECURE
     env variable for HTTPS/Tailscale Funnel compatibility.
   - Rate Limiting: Integrated Flask-Limiter on /login (50 req/min) to
     prevent API abuse while accommodating shared school networks (NAT).
   - Tarpitting: Added 1.5s artificial delay on failed logins to neutralize
     automated brute-force tools without blocking legitimate users.
   - Session Invalidation: Implemented an in-memory token blacklist on
     logout to ensure session tokens cannot be reused.
   - Documentation: Updated technical docs and proposal status to reflect
     the current security architecture.

   Ref: @elemes/proposal.md (Poin 6.1, 6.2, 6.3)
2026-04-22 12:57:54 +07:00
a2nr a41711fb54 security: implement gVisor sandboxing and harden API endpoints
- Menambahkan service 'compiler-worker' terpisah untuk isolasi eksekusi kode C/Python.
   - Mengintegrasikan gVisor (runsc) pada worker untuk mencegah RCE pada level kernel.
   - Menggunakan Gunicorn (4 workers) pada compiler-worker untuk mendukung concurrency.
   - Menambahkan otentikasi token wajib pada endpoint /compile dan laporan progres.
   - Memperketat CORS policy menggunakan environment variable ORIGIN.
   - Menerapkan secure_filename pada rute pelajaran untuk mencegah Path Traversal.
   - Mengubah volume mounting backend utama menjadi Read-Only (:ro) untuk perlindungan data.
   - Memperbarui proposal.md dan .env.example dengan standar keamanan terbaru.
2026-04-21 15:13:16 +07:00
a2nr 6d5c27f93f feat(help): add interactive student tutorial with video and integrated help page
- Create student tutorial documentation in Markdown with updated asset paths
 - Add backend routes to serve rendered help content and assets via JSON API
 - Implement frontend /help route using SvelteKit for professional rendering
 - Add "Bantuan" link to the navigation bar with custom styling
 - Generate tutorial screenshots and a demo video with virtual cursor and subtitles
 - Configure Tailscale and Vite proxies to support the new help routing
 - Add automated video generation scripts and assets
2026-04-20 13:43:45 +07:00
a2nr d2b6d62b28 refactor to make it better 2026-03-25 09:39:51 +07:00
a2nr d59eae3bd0 update cara menampilkan available leasson tergantung dari home.md, menampilkan tombol review code apabila leasson telah complete 2026-01-18 22:40:31 +07:00
a2nr 767678bb51 add code check uaing static analys with ---KEY_TEXT--- in content 2026-01-18 06:44:46 +07:00
a2nr f5b33c458d update tampilan progress report 2026-01-17 18:58:16 +07:00
a2nr 4939c4edd5 update multi language programing (currently c and python) 2026-01-14 10:35:20 +07:00
a2nr 9156bdc436 update custom many title 2026-01-13 07:42:55 +07:00
a2nr 3ef0f533b3 bug fix many thing 2026-01-12 12:03:23 +07:00
a2nr 371aca319a update with tailscale and fix font loading error 2026-01-11 20:22:30 +07:00
a2nr fee6fdec2b update example 2026-01-06 21:38:54 +07:00
a2nr 9f24dc58a0 fix content folder error 2026-01-04 16:52:30 +07:00
a2nr 632652914c Set up LMS-C as submodule with external content directory 2026-01-04 13:27:06 +07:00
a2nr 3223a95f3e tambah fitur token 2026-01-02 08:45:32 +07:00
a2nr 65b24b496a init 2026-01-02 06:18:48 +07:00