check-post 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/README.md +66 -60
  2. package/dist/cli.js +18 -18
  3. package/dist/commands/init.js +37 -36
  4. package/dist/commands/list.js +1 -1
  5. package/dist/commands/run.js +8 -8
  6. package/dist/commands/shared.js +2 -2
  7. package/dist/commands/status.js +3 -3
  8. package/dist/core/adapters/claude-code.js +12 -12
  9. package/dist/core/adapters/index.js +2 -2
  10. package/dist/core/discovery.js +8 -8
  11. package/dist/core/gate.js +13 -13
  12. package/dist/core/process.js +2 -2
  13. package/dist/core/project.js +5 -5
  14. package/dist/core/runners/ai.js +9 -9
  15. package/dist/core/runners/command.js +3 -3
  16. package/dist/core/scheduler.js +11 -10
  17. package/dist/core/stage-file.js +4 -4
  18. package/dist/core/types.js +4 -2
  19. package/dist/ui/format.js +1 -1
  20. package/dist/ui/plain.js +2 -2
  21. package/dist/ui/tui/App.js +13 -13
  22. package/package.json +2 -2
  23. package/presets/angular/04-security/01-secrets.md +12 -12
  24. package/presets/angular/04-security/02-xss-audit.md +9 -9
  25. package/presets/angular/04-security/03-env-audit.md +7 -7
  26. package/presets/angular/04-security/_group.md +1 -1
  27. package/presets/angular/05-code-standard.md +8 -8
  28. package/presets/angular/context.md +2 -2
  29. package/presets/nextjs/04-security/01-secrets.md +12 -12
  30. package/presets/nextjs/04-security/02-xss-audit.md +8 -8
  31. package/presets/nextjs/04-security/03-env-audit.md +7 -7
  32. package/presets/nextjs/04-security/_group.md +1 -1
  33. package/presets/nextjs/05-code-standard.md +8 -8
  34. package/presets/nextjs/context.md +1 -1
  35. package/presets/node/04-security/01-secrets.md +12 -12
  36. package/presets/node/04-security/02-injection-audit.md +7 -7
  37. package/presets/node/04-security/03-env-audit.md +7 -7
  38. package/presets/node/04-security/_group.md +1 -1
  39. package/presets/node/05-code-standard.md +8 -8
  40. package/presets/node/context.md +1 -1
@@ -1,19 +1,19 @@
1
1
  ---
2
2
  fail_on: high
3
3
  ---
4
- # Secrets & API key
4
+ # Secrets & API keys
5
5
 
6
- Cari kredensial yang di-hardcode di source code yang ikut di-commit:
7
- - API key, token, password, private key, connection string berisi password
8
- - URL yang menyertakan kredensial (`https://user:pass@...`)
9
- - Token JWT atau bearer token yang ditulis langsung
6
+ Look for credentials hardcoded in committed source code:
7
+ - API keys, tokens, passwords, private keys, connection strings containing passwords
8
+ - URLs with embedded credentials (`https://user:pass@...`)
9
+ - JWTs or bearer tokens written inline
10
10
 
11
- Cara kerja:
12
- 1. Pakai Grep dengan pola seperti `api[_-]?key`, `secret`, `token`, `password`, `Bearer `, `-----BEGIN`, `sk_live`, `AKIA`.
13
- 2. Baca konteks setiap hasil untuk memastikan nilainya benar-benar rahasia.
11
+ How to work:
12
+ 1. Use Grep with patterns such as `api[_-]?key`, `secret`, `token`, `password`, `Bearer `, `-----BEGIN`, `sk_live`, `AKIA`.
13
+ 2. Read the context of every match to confirm the value is actually secret.
14
14
 
15
15
  Severity:
16
- - critical: secret asli yang terlihat aktif
17
- - high: kemungkinan besar secret asli
18
- - low: placeholder atau contoh (mis. `xxx`, `changeme`, `your-api-key`)
19
- Abaikan file test, mock, dan fixture kecuali isinya terlihat seperti secret asli.
16
+ - critical: a real secret that looks active
17
+ - high: very likely a real secret
18
+ - low: placeholder or example (e.g. `xxx`, `changeme`, `your-api-key`)
19
+ Ignore test, mock, and fixture files unless the value looks like a real secret.
@@ -4,14 +4,14 @@ fail_on: high
4
4
  ---
5
5
  # XSS audit (Angular)
6
6
 
7
- Angular sudah melakukan sanitasi otomatis, jadi fokus pada celah yang melewatinya:
8
- - Pemakaian `DomSanitizer.bypassSecurityTrustHtml/Url/ResourceUrl/Script/Style` dengan data yang bisa dikontrol user atau API
9
- - Binding `[innerHTML]`, `[outerHTML]`, `[srcdoc]` berisi data dari user, query param, atau API tanpa sanitasi yang jelas
10
- - Manipulasi DOM langsung: `ElementRef.nativeElement.innerHTML`, `Renderer2.setProperty(..., 'innerHTML', ...)`, `document.write`, `insertAdjacentHTML`
11
- - `[href]`/`[src]` yang dibangun dari input user (risiko `javascript:` URL)
12
- - `eval`, `new Function`, `setTimeout` dengan string
7
+ Angular sanitizes automatically, so focus on the gaps that bypass it:
8
+ - `DomSanitizer.bypassSecurityTrustHtml/Url/ResourceUrl/Script/Style` with data that users or an API can control
9
+ - `[innerHTML]`, `[outerHTML]`, `[srcdoc]` bindings with data from users, query params, or an API without clear sanitization
10
+ - Direct DOM manipulation: `ElementRef.nativeElement.innerHTML`, `Renderer2.setProperty(..., 'innerHTML', ...)`, `document.write`, `insertAdjacentHTML`
11
+ - `[href]`/`[src]` built from user input (risk of `javascript:` URLs)
12
+ - `eval`, `new Function`, `setTimeout` with a string
13
13
 
14
14
  Severity:
15
- - high: data dari user/query param/API mengalir ke salah satu sink di atas tanpa sanitasi
16
- - medium: sumber data tidak jelas
17
- - low: data statis/terkontrol penuh
15
+ - high: data from users/query params/an API flows into one of the sinks above without sanitization
16
+ - medium: the data source is unclear
17
+ - low: static or fully controlled data
@@ -1,11 +1,11 @@
1
1
  ---
2
2
  fail_on: high
3
3
  ---
4
- # Audit konfigurasi environment
4
+ # Environment configuration audit
5
5
 
6
- Jangan pernah membaca isi file env atau file rahasia; cukup gunakan nama variabel.
7
- Periksa:
8
- 1. File konfigurasi environment yang berisi rahasia tercantum di `.gitignore`.
9
- 2. Tidak ada nilai rahasia (key, token, password) yang di-hardcode sebagai fallback, mis. `process.env.X || "nilai-asli"`.
10
- 3. Variabel yang terekspos ke browser (bundle client) tidak berisi rahasia.
11
- 4. Bila ada file contoh (`.env.example` dsb.), bandingkan nama variabelnya dengan yang dipakai di kode.
6
+ Never read the contents of env files or other secret files; work with variable NAMES only.
7
+ Check that:
8
+ 1. Environment config files that hold secrets are listed in `.gitignore`.
9
+ 2. No secret value (key, token, password) is hardcoded as a fallback, e.g. `process.env.X || "real-value"`.
10
+ 3. Variables exposed to the browser (client bundle) contain no secrets.
11
+ 4. If an example file exists (`.env.example` etc.), its variable names match the ones used in code.
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  parallel: true
3
3
  ---
4
- Fokus pada keamanan. Laporkan hanya masalah yang benar-benar ada di kode, sertakan file dan baris.
4
+ Focus on security. Report only problems that actually exist in the code, with file and line.
@@ -3,13 +3,13 @@ fail_on: medium
3
3
  ---
4
4
  # Code standard
5
5
 
6
- Baca dokumen konvensi project bila ada (`AGENTS.md`, `CLAUDE.md`, `CONTRIBUTING.md`, `README.md`),
7
- lalu periksa kode di `src/` terhadap konvensi tersebut.
6
+ Read the project's convention documents if present (`AGENTS.md`, `CLAUDE.md`, `CONTRIBUTING.md`, `README.md`),
7
+ then check the code in `src/` against those conventions.
8
8
 
9
- Tambahan aturan umum:
10
- - Tidak ada tipe `any` yang tidak perlu
11
- - Tidak ada `console.log` tertinggal di kode produksi
12
- - Tidak ada kode yang dikomentari dalam blok besar
9
+ General rules on top of that:
10
+ - No unnecessary `any` types
11
+ - No leftover `console.log` in production code
12
+ - No large blocks of commented-out code
13
13
 
14
- Laporkan maksimal 15 temuan paling penting. Gunakan medium untuk pelanggaran konvensi yang tertulis eksplisit,
15
- low untuk saran gaya.
14
+ Report at most the 15 most important findings. Use medium for violations of explicitly written conventions,
15
+ low for style suggestions.
@@ -1,2 +1,2 @@
1
- Project ini adalah aplikasi Angular (standalone components, TypeScript). Template ada di file `*.html`
2
- atau properti `template`, logika di `*.ts`. Abaikan folder `node_modules/`, `dist/`, `coverage/`, dan `.angular/`.
1
+ This project is an Angular application (standalone components, TypeScript). Templates live in `*.html`
2
+ files or the `template` property, logic in `*.ts`. Ignore `node_modules/`, `dist/`, `coverage/`, and `.angular/`.
@@ -1,19 +1,19 @@
1
1
  ---
2
2
  fail_on: high
3
3
  ---
4
- # Secrets & API key
4
+ # Secrets & API keys
5
5
 
6
- Cari kredensial yang di-hardcode di source code yang ikut di-commit:
7
- - API key, token, password, private key, connection string berisi password
8
- - URL yang menyertakan kredensial (`https://user:pass@...`)
9
- - Token JWT atau bearer token yang ditulis langsung
6
+ Look for credentials hardcoded in committed source code:
7
+ - API keys, tokens, passwords, private keys, connection strings containing passwords
8
+ - URLs with embedded credentials (`https://user:pass@...`)
9
+ - JWTs or bearer tokens written inline
10
10
 
11
- Cara kerja:
12
- 1. Pakai Grep dengan pola seperti `api[_-]?key`, `secret`, `token`, `password`, `Bearer `, `-----BEGIN`, `sk_live`, `AKIA`.
13
- 2. Baca konteks setiap hasil untuk memastikan nilainya benar-benar rahasia.
11
+ How to work:
12
+ 1. Use Grep with patterns such as `api[_-]?key`, `secret`, `token`, `password`, `Bearer `, `-----BEGIN`, `sk_live`, `AKIA`.
13
+ 2. Read the context of every match to confirm the value is actually secret.
14
14
 
15
15
  Severity:
16
- - critical: secret asli yang terlihat aktif
17
- - high: kemungkinan besar secret asli
18
- - low: placeholder atau contoh (mis. `xxx`, `changeme`, `your-api-key`)
19
- Abaikan file test, mock, dan fixture kecuali isinya terlihat seperti secret asli.
16
+ - critical: a real secret that looks active
17
+ - high: very likely a real secret
18
+ - low: placeholder or example (e.g. `xxx`, `changeme`, `your-api-key`)
19
+ Ignore test, mock, and fixture files unless the value looks like a real secret.
@@ -4,13 +4,13 @@ fail_on: high
4
4
  ---
5
5
  # XSS audit (React/Next.js)
6
6
 
7
- Periksa:
8
- - `dangerouslySetInnerHTML` berisi data dari user, query string, CMS, atau API tanpa sanitasi (mis. DOMPurify)
9
- - `href`/`src` yang dibangun dari input user (risiko `javascript:` URL)
10
- - Data `searchParams`/`params` yang dirender atau dipakai di redirect tanpa validasi
11
- - `eval`, `new Function`, manipulasi `innerHTML` langsung
7
+ Check for:
8
+ - `dangerouslySetInnerHTML` with data from users, query strings, a CMS, or an API without sanitization (e.g. DOMPurify)
9
+ - `href`/`src` built from user input (risk of `javascript:` URLs)
10
+ - `searchParams`/`params` data rendered or used in redirects without validation
11
+ - `eval`, `new Function`, direct `innerHTML` manipulation
12
12
 
13
13
  Severity:
14
- - high: data tidak tepercaya mengalir ke sink tanpa sanitasi
15
- - medium: sumber data tidak jelas
16
- - low: data statis/terkontrol penuh
14
+ - high: untrusted data flows into a sink without sanitization
15
+ - medium: the data source is unclear
16
+ - low: static or fully controlled data
@@ -1,11 +1,11 @@
1
1
  ---
2
2
  fail_on: high
3
3
  ---
4
- # Audit konfigurasi environment
4
+ # Environment configuration audit
5
5
 
6
- Jangan pernah membaca isi file env atau file rahasia; cukup gunakan nama variabel.
7
- Periksa:
8
- 1. File konfigurasi environment yang berisi rahasia tercantum di `.gitignore`.
9
- 2. Tidak ada nilai rahasia (key, token, password) yang di-hardcode sebagai fallback, mis. `process.env.X || "nilai-asli"`.
10
- 3. Variabel yang terekspos ke browser (bundle client) tidak berisi rahasia.
11
- 4. Bila ada file contoh (`.env.example` dsb.), bandingkan nama variabelnya dengan yang dipakai di kode.
6
+ Never read the contents of env files or other secret files; work with variable NAMES only.
7
+ Check that:
8
+ 1. Environment config files that hold secrets are listed in `.gitignore`.
9
+ 2. No secret value (key, token, password) is hardcoded as a fallback, e.g. `process.env.X || "real-value"`.
10
+ 3. Variables exposed to the browser (client bundle) contain no secrets.
11
+ 4. If an example file exists (`.env.example` etc.), its variable names match the ones used in code.
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  parallel: true
3
3
  ---
4
- Fokus pada keamanan. Laporkan hanya masalah yang benar-benar ada di kode, sertakan file dan baris.
4
+ Focus on security. Report only problems that actually exist in the code, with file and line.
@@ -3,13 +3,13 @@ fail_on: medium
3
3
  ---
4
4
  # Code standard
5
5
 
6
- Baca dokumen konvensi project bila ada (`AGENTS.md`, `CLAUDE.md`, `CONTRIBUTING.md`, `README.md`),
7
- lalu periksa kode di `src/` terhadap konvensi tersebut.
6
+ Read the project's convention documents if present (`AGENTS.md`, `CLAUDE.md`, `CONTRIBUTING.md`, `README.md`),
7
+ then check the code in `src/` against those conventions.
8
8
 
9
- Tambahan aturan umum:
10
- - Tidak ada tipe `any` yang tidak perlu
11
- - Tidak ada `console.log` tertinggal di kode produksi
12
- - Tidak ada kode yang dikomentari dalam blok besar
9
+ General rules on top of that:
10
+ - No unnecessary `any` types
11
+ - No leftover `console.log` in production code
12
+ - No large blocks of commented-out code
13
13
 
14
- Laporkan maksimal 15 temuan paling penting. Gunakan medium untuk pelanggaran konvensi yang tertulis eksplisit,
15
- low untuk saran gaya.
14
+ Report at most the 15 most important findings. Use medium for violations of explicitly written conventions,
15
+ low for style suggestions.
@@ -1 +1 @@
1
- Project ini adalah aplikasi Next.js (React, TypeScript). Abaikan folder `node_modules/`, `.next/`, `out/`, dan `coverage/`.
1
+ This project is a Next.js application (React, TypeScript). Ignore `node_modules/`, `.next/`, `out/`, and `coverage/`.
@@ -1,19 +1,19 @@
1
1
  ---
2
2
  fail_on: high
3
3
  ---
4
- # Secrets & API key
4
+ # Secrets & API keys
5
5
 
6
- Cari kredensial yang di-hardcode di source code yang ikut di-commit:
7
- - API key, token, password, private key, connection string berisi password
8
- - URL yang menyertakan kredensial (`https://user:pass@...`)
9
- - Token JWT atau bearer token yang ditulis langsung
6
+ Look for credentials hardcoded in committed source code:
7
+ - API keys, tokens, passwords, private keys, connection strings containing passwords
8
+ - URLs with embedded credentials (`https://user:pass@...`)
9
+ - JWTs or bearer tokens written inline
10
10
 
11
- Cara kerja:
12
- 1. Pakai Grep dengan pola seperti `api[_-]?key`, `secret`, `token`, `password`, `Bearer `, `-----BEGIN`, `sk_live`, `AKIA`.
13
- 2. Baca konteks setiap hasil untuk memastikan nilainya benar-benar rahasia.
11
+ How to work:
12
+ 1. Use Grep with patterns such as `api[_-]?key`, `secret`, `token`, `password`, `Bearer `, `-----BEGIN`, `sk_live`, `AKIA`.
13
+ 2. Read the context of every match to confirm the value is actually secret.
14
14
 
15
15
  Severity:
16
- - critical: secret asli yang terlihat aktif
17
- - high: kemungkinan besar secret asli
18
- - low: placeholder atau contoh (mis. `xxx`, `changeme`, `your-api-key`)
19
- Abaikan file test, mock, dan fixture kecuali isinya terlihat seperti secret asli.
16
+ - critical: a real secret that looks active
17
+ - high: very likely a real secret
18
+ - low: placeholder or example (e.g. `xxx`, `changeme`, `your-api-key`)
19
+ Ignore test, mock, and fixture files unless the value looks like a real secret.
@@ -3,13 +3,13 @@ fail_on: high
3
3
  ---
4
4
  # Injection audit
5
5
 
6
- Periksa:
7
- - Query SQL/NoSQL yang dibangun dengan string concatenation atau template literal dari input request
8
- - `child_process.exec`/`execSync` dengan input request
9
- - Path file dari input request tanpa normalisasi (path traversal)
10
- - Endpoint tanpa validasi input atau tanpa pemeriksaan otorisasi pada data milik user lain
6
+ Check for:
7
+ - SQL/NoSQL queries built by string concatenation or template literals from request input
8
+ - `child_process.exec`/`execSync` with request input
9
+ - File paths from request input without normalization (path traversal)
10
+ - Endpoints without input validation or without authorization checks on other users' data
11
11
 
12
12
  Severity:
13
- - critical/high: input request mengalir ke sink tanpa validasi
14
- - medium: validasi ada tetapi lemah
13
+ - critical/high: request input flows into a sink without validation
14
+ - medium: validation exists but is weak
15
15
  - low: hardening
@@ -1,11 +1,11 @@
1
1
  ---
2
2
  fail_on: high
3
3
  ---
4
- # Audit konfigurasi environment
4
+ # Environment configuration audit
5
5
 
6
- Jangan pernah membaca isi file env atau file rahasia; cukup gunakan nama variabel.
7
- Periksa:
8
- 1. File konfigurasi environment yang berisi rahasia tercantum di `.gitignore`.
9
- 2. Tidak ada nilai rahasia (key, token, password) yang di-hardcode sebagai fallback, mis. `process.env.X || "nilai-asli"`.
10
- 3. Variabel yang terekspos ke browser (bundle client) tidak berisi rahasia.
11
- 4. Bila ada file contoh (`.env.example` dsb.), bandingkan nama variabelnya dengan yang dipakai di kode.
6
+ Never read the contents of env files or other secret files; work with variable NAMES only.
7
+ Check that:
8
+ 1. Environment config files that hold secrets are listed in `.gitignore`.
9
+ 2. No secret value (key, token, password) is hardcoded as a fallback, e.g. `process.env.X || "real-value"`.
10
+ 3. Variables exposed to the browser (client bundle) contain no secrets.
11
+ 4. If an example file exists (`.env.example` etc.), its variable names match the ones used in code.
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  parallel: true
3
3
  ---
4
- Fokus pada keamanan. Laporkan hanya masalah yang benar-benar ada di kode, sertakan file dan baris.
4
+ Focus on security. Report only problems that actually exist in the code, with file and line.
@@ -3,13 +3,13 @@ fail_on: medium
3
3
  ---
4
4
  # Code standard
5
5
 
6
- Baca dokumen konvensi project bila ada (`AGENTS.md`, `CLAUDE.md`, `CONTRIBUTING.md`, `README.md`),
7
- lalu periksa kode di `src/` terhadap konvensi tersebut.
6
+ Read the project's convention documents if present (`AGENTS.md`, `CLAUDE.md`, `CONTRIBUTING.md`, `README.md`),
7
+ then check the code in `src/` against those conventions.
8
8
 
9
- Tambahan aturan umum:
10
- - Tidak ada tipe `any` yang tidak perlu
11
- - Tidak ada `console.log` tertinggal di kode produksi
12
- - Tidak ada kode yang dikomentari dalam blok besar
9
+ General rules on top of that:
10
+ - No unnecessary `any` types
11
+ - No leftover `console.log` in production code
12
+ - No large blocks of commented-out code
13
13
 
14
- Laporkan maksimal 15 temuan paling penting. Gunakan medium untuk pelanggaran konvensi yang tertulis eksplisit,
15
- low untuk saran gaya.
14
+ Report at most the 15 most important findings. Use medium for violations of explicitly written conventions,
15
+ low for style suggestions.
@@ -1 +1 @@
1
- Project ini adalah aplikasi/API Node.js. Abaikan folder `node_modules/`, `dist/`, `build/`, dan `coverage/`.
1
+ This project is a Node.js application/API. Ignore `node_modules/`, `dist/`, `build/`, and `coverage/`.