Skip to content

feat: persiapan event Koding (panduan host, CI, perbaikan keamanan) - #83

Open
Ardelyo wants to merge 4 commits into
mainfrom
claude/koding-event-host-setup-ikq7nz
Open

Ardelyo wants to merge 4 commits into
mainfrom
claude/koding-event-host-setup-ikq7nz

Conversation

@Ardelyo

@Ardelyo Ardelyo commented Oct 26, 2026

Copy link
Copy Markdown
Collaborator

📋 Deskripsi

Menyiapkan repo untuk event bug hunt divisi Koding.

  • docs/HOST_KODING.md: review repo, setup host, skema bayaran dan tracking
  • docs/EVENT_KODING_PLAN.md: timeline, daftar issue awal, teks aturan dan pengumuman
  • .github/workflows/ci.yml: typecheck dan build di setiap PR
  • Template issue bug Koding dan pembaruan template PR
  • Perbaikan XSS: lib/sanitize.ts (DOMPurify) dipakai di semua dangerouslySetInnerHTML
  • Perketat sandbox iframe: hapus allow-same-origin dari semua preview
  • Perbaiki error tsc di MediaUploader.tsx, hapus file log sampah, npm audit fix
  • Migration supabase/migrations/20261026_harden_profiles_and_works.sql (belum dijalankan)

🧪 Cara Verifikasi

  • npx tsc --noEmit dan npm run build lolos.
  • Buat karya teks berisi '<img src=x onerror=alert(1)>': alert tidak boleh muncul.
  • Di preview kode, localStorage.getItem('x') harus melempar SecurityError.
  • Migration: jalankan di Supabase staging dulu. Sebagai user biasa, update({role:'admin'}) pada profil sendiri harus gagal.

✅ Catatan

  • Preview kode di Karya/Profile/Studio perlu dicek manual setelah allow-same-origin dihapus (p5 dan JS biasa seharusnya tetap jalan).
  • Sisa npm audit berasal dari DOMPurify bawaan Monaco dan react-router; butuh upgrade terpisah.
  • Branch protection (S4) harus diatur manual di GitHub Settings.

Generated by Claude Code

Fix MediaUploader type error and remove stray build logs.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0194NK5MvdH5XFFWJQH1bph9
… templates

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0194NK5MvdH5XFFWJQH1bph9
…files RLS

- add lib/sanitize.ts (DOMPurify) and use it for all dangerouslySetInnerHTML
- drop allow-same-origin from preview iframes
- add migration protecting profiles.role/is_approved and works.author_id
- npm audit fix; update PR template and event plan

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0194NK5MvdH5XFFWJQH1bph9
…udit script, event tracking

- AuthProvider: fix stale closure refetching profile on every token refresh, avoid awaiting inside onAuthStateChange
- only allow http(s) for profile website links; encode username in avatar URL
- validate type/size and use UUID names for CreationStudio uploads; remove debug logs
- profiles trigger also blocks admin/is_approved on INSERT
- add audit_log migration, supabase/audit/rls_audit.sql, security headers in vercel.json
- add scripts/event-report.mjs + workflow for contributor/reward tracking
- add docs/KONTROL_DAN_TRACKING_EVENT.md

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0194NK5MvdH5XFFWJQH1bph9

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants