Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions confession-cli/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# confession-cli

Confession 的命令列工具,可在專案中快速初始化 `.confession` 並觸發掃描。

## 安裝

```bash
npm i -g confession-cli
```

## 指令

```bash
confession init
confession scan
confession list --status open
confession status
```

## 可用參數

- `confession scan --api <baseUrl>`:指定 API 位址(預設讀取 `.confession/config.json`)
- `confession scan --depth quick|standard|deep`:覆寫掃描深度

Copilot AI Mar 8, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The README documents confession scan --depth quick|standard|deep as an override, but the current CLI implementation only treats quick and deep as explicit overrides (passing --depth standard is ignored and falls back to config). Please align the documentation with actual behavior, or update the CLI to accept standard explicitly.

Suggested change
- `confession scan --depth quick|standard|deep`:覆寫掃描深度
- `confession scan --depth quick|deep`:覆寫掃描深度(standard 將依照設定檔預設值)

Copilot uses AI. Check for mistakes.
- `confession list --status <open|fixed|ignored>`
- `confession list --severity <critical|high|medium|low|info>`
- `confession list --search <keyword>`

## 專案根目錄解析

- 優先使用 `CONFESSION_PROJECT_ROOT`
- 未設定時使用 `process.cwd()`
31 changes: 29 additions & 2 deletions confession-cli/package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,40 @@
{
"name": "confession-cli",
"version": "0.1.0",
"description": "Confession CLI",
"description": "CLI for Confession security scanner",
"keywords": [
"confession",
"security",
"vulnerability",
"scanner",
"cli"
],
"homepage": "https://github.com/BlackishGreen33/Confession/tree/main/confession-cli",
"bugs": {
"url": "https://github.com/BlackishGreen33/Confession/issues"
},
"repository": {
"type": "git",
"url": "git+https://github.com/BlackishGreen33/Confession.git"
},
"engines": {
"node": ">=18"
},
"license": "MIT",
"bin": {
"confession": "bin/confession.js"
},
"files": [
"bin",
"dist",
"README.md"
],
"publishConfig": {
"access": "public"
},
"scripts": {
"lint": "eslint .",
"build": "node -e \"const fs=require('fs');fs.mkdirSync('dist',{recursive:true});fs.copyFileSync('bin/confession.js','dist/confession.js')\""
"build": "node -e \"const fs=require('fs');fs.mkdirSync('dist',{recursive:true});fs.copyFileSync('bin/confession.js','dist/confession.js')\"",
"prepublishOnly": "pnpm build"

Copilot AI Mar 8, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

prepublishOnly is invoking pnpm build. When publishing via npm publish (or in environments without pnpm/corepack enabled), this can fail because pnpm may not be available. Prefer calling the local script via npm run build (or inline the node build command) so the publish step doesn’t depend on pnpm being installed globally.

Suggested change
"prepublishOnly": "pnpm build"
"prepublishOnly": "npm run build"

Copilot uses AI. Check for mistakes.
}
}