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.
- package/README.md +66 -60
- package/dist/cli.js +18 -18
- package/dist/commands/init.js +37 -36
- package/dist/commands/list.js +1 -1
- package/dist/commands/run.js +8 -8
- package/dist/commands/shared.js +2 -2
- package/dist/commands/status.js +3 -3
- package/dist/core/adapters/claude-code.js +12 -12
- package/dist/core/adapters/index.js +2 -2
- package/dist/core/discovery.js +8 -8
- package/dist/core/gate.js +13 -13
- package/dist/core/process.js +2 -2
- package/dist/core/project.js +5 -5
- package/dist/core/runners/ai.js +9 -9
- package/dist/core/runners/command.js +3 -3
- package/dist/core/scheduler.js +11 -10
- package/dist/core/stage-file.js +4 -4
- package/dist/core/types.js +4 -2
- package/dist/ui/format.js +1 -1
- package/dist/ui/plain.js +2 -2
- package/dist/ui/tui/App.js +13 -13
- package/package.json +2 -2
- package/presets/angular/04-security/01-secrets.md +12 -12
- package/presets/angular/04-security/02-xss-audit.md +9 -9
- package/presets/angular/04-security/03-env-audit.md +7 -7
- package/presets/angular/04-security/_group.md +1 -1
- package/presets/angular/05-code-standard.md +8 -8
- package/presets/angular/context.md +2 -2
- package/presets/nextjs/04-security/01-secrets.md +12 -12
- package/presets/nextjs/04-security/02-xss-audit.md +8 -8
- package/presets/nextjs/04-security/03-env-audit.md +7 -7
- package/presets/nextjs/04-security/_group.md +1 -1
- package/presets/nextjs/05-code-standard.md +8 -8
- package/presets/nextjs/context.md +1 -1
- package/presets/node/04-security/01-secrets.md +12 -12
- package/presets/node/04-security/02-injection-audit.md +7 -7
- package/presets/node/04-security/03-env-audit.md +7 -7
- package/presets/node/04-security/_group.md +1 -1
- package/presets/node/05-code-standard.md +8 -8
- package/presets/node/context.md +1 -1
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
---
|
|
2
2
|
fail_on: high
|
|
3
3
|
---
|
|
4
|
-
# Secrets & API
|
|
4
|
+
# Secrets & API keys
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
- API
|
|
8
|
-
-
|
|
9
|
-
-
|
|
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
|
-
|
|
12
|
-
1.
|
|
13
|
-
2.
|
|
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
|
|
17
|
-
- high:
|
|
18
|
-
- low: placeholder
|
|
19
|
-
|
|
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
|
|
8
|
-
-
|
|
9
|
-
-
|
|
10
|
-
-
|
|
11
|
-
- `[href]`/`[src]`
|
|
12
|
-
- `eval`, `new Function`, `setTimeout`
|
|
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
|
|
16
|
-
- medium:
|
|
17
|
-
- low:
|
|
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
|
-
#
|
|
4
|
+
# Environment configuration audit
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
1.
|
|
9
|
-
2.
|
|
10
|
-
3.
|
|
11
|
-
4.
|
|
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.
|
|
@@ -3,13 +3,13 @@ fail_on: medium
|
|
|
3
3
|
---
|
|
4
4
|
# Code standard
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
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
|
-
|
|
10
|
-
-
|
|
11
|
-
-
|
|
12
|
-
-
|
|
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
|
-
|
|
15
|
-
low
|
|
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
|
-
|
|
2
|
-
|
|
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
|
|
4
|
+
# Secrets & API keys
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
- API
|
|
8
|
-
-
|
|
9
|
-
-
|
|
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
|
-
|
|
12
|
-
1.
|
|
13
|
-
2.
|
|
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
|
|
17
|
-
- high:
|
|
18
|
-
- low: placeholder
|
|
19
|
-
|
|
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
|
-
|
|
8
|
-
- `dangerouslySetInnerHTML`
|
|
9
|
-
- `href`/`src`
|
|
10
|
-
-
|
|
11
|
-
- `eval`, `new Function`,
|
|
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
|
|
15
|
-
- medium:
|
|
16
|
-
- low:
|
|
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
|
-
#
|
|
4
|
+
# Environment configuration audit
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
1.
|
|
9
|
-
2.
|
|
10
|
-
3.
|
|
11
|
-
4.
|
|
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.
|
|
@@ -3,13 +3,13 @@ fail_on: medium
|
|
|
3
3
|
---
|
|
4
4
|
# Code standard
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
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
|
-
|
|
10
|
-
-
|
|
11
|
-
-
|
|
12
|
-
-
|
|
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
|
-
|
|
15
|
-
low
|
|
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
|
-
|
|
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
|
|
4
|
+
# Secrets & API keys
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
- API
|
|
8
|
-
-
|
|
9
|
-
-
|
|
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
|
-
|
|
12
|
-
1.
|
|
13
|
-
2.
|
|
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
|
|
17
|
-
- high:
|
|
18
|
-
- low: placeholder
|
|
19
|
-
|
|
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
|
-
|
|
7
|
-
-
|
|
8
|
-
- `child_process.exec`/`execSync`
|
|
9
|
-
-
|
|
10
|
-
-
|
|
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
|
|
14
|
-
- medium:
|
|
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
|
-
#
|
|
4
|
+
# Environment configuration audit
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
1.
|
|
9
|
-
2.
|
|
10
|
-
3.
|
|
11
|
-
4.
|
|
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.
|
|
@@ -3,13 +3,13 @@ fail_on: medium
|
|
|
3
3
|
---
|
|
4
4
|
# Code standard
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
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
|
-
|
|
10
|
-
-
|
|
11
|
-
-
|
|
12
|
-
-
|
|
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
|
-
|
|
15
|
-
low
|
|
14
|
+
Report at most the 15 most important findings. Use medium for violations of explicitly written conventions,
|
|
15
|
+
low for style suggestions.
|
package/presets/node/context.md
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
This project is a Node.js application/API. Ignore `node_modules/`, `dist/`, `build/`, and `coverage/`.
|