ai-saas-guard 0.35.0 → 0.35.1

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 CHANGED
@@ -31,7 +31,19 @@
31
31
 
32
32
  AI-built SaaS can look ready before it is ready: login works, checkout opens, the dashboard loads, and tests are green. The launch risk is usually hidden in trust-boundary code that decides who gets access, who pays, what data they can see, and whether failures are visible.
33
33
 
34
- Start with the 30-second copy-paste demo: `npx ai-saas-guard@latest demo --summary`. No signup, no code upload, no LLM call. See the [terminal screenshot](docs/demo-terminal-screenshot.svg), [saved output](docs/demo-terminal-output.txt), [compare with alternatives](docs/launch-gate-positioning.md), and the [30-second cold-start review](docs/cold-start-review.md).
34
+ Start with the 30-second copy-paste demo: `npx ai-saas-guard@latest demo --summary`. No signup, no code upload, no LLM call. See the saved output and [compare with alternatives](docs/launch-gate-positioning.md). Then run the same launch gate against your repo in about three minutes:
35
+
36
+ ```bash
37
+ npx ai-saas-guard@latest scan --root /path/to/your-saas --summary
38
+ ```
39
+
40
+ The output is meant to answer three practical questions before you invite users:
41
+
42
+ - **Can a real user get access they should not have?** Check auth, tenant ownership, Supabase RLS, and Stripe entitlement paths first.
43
+ - **Can the app claim success when something failed?** Check swallowed errors, fake success responses, hardcoded fallback data, and skipped tests.
44
+ - **Can launch infrastructure do too much damage?** Check exposed env vars, overpowered workflows, MCP tools, deploy gaps, and missing request evidence.
45
+
46
+ See the [terminal screenshot](docs/demo-terminal-screenshot.svg), [saved output](docs/demo-terminal-output.txt), and the [30-second cold-start review](docs/cold-start-review.md).
35
47
 
36
48
  These are the failures that hurt after real users arrive:
37
49
 
@@ -46,6 +58,18 @@ These are the failures that hurt after real users arrive:
46
58
 
47
59
  `ai-saas-guard` gives you a short local review queue for those risks. It does not prove the app is secure, certify a release, or replace human review. It tells founders, solo builders, small teams, and reviewers what deserves attention first.
48
60
 
61
+ ## What To Do With The Result
62
+
63
+ Treat the report as a launch review queue, not a scorecard. Fix or manually prove the highest trust-boundary findings before spending time on low-severity hygiene.
64
+
65
+ | If you see | Do this first |
66
+ | --- | --- |
67
+ | Critical/high auth, billing, RLS, tenant, webhook, or silent-success findings | Reproduce the manual proof step in staging and confirm the path fails closed |
68
+ | Medium deploy, env, request ID, MCP, or Actions hygiene findings | Decide whether the launch path needs the control now or can be tracked after critical paths are closed |
69
+ | Low/info hints | Clean them up after the user-access, payment, and data-access paths are understood |
70
+
71
+ For a realistic risky app, scan [examples/case-study-ai-saas](examples/case-study-ai-saas) or read [docs/case-study-ai-saas.md](docs/case-study-ai-saas.md).
72
+
49
73
  ## 30-Second Copy-Paste Demo
50
74
 
51
75
  No signup, no code upload, no LLM call:
@@ -207,18 +231,19 @@ The CLI is published on npm as `ai-saas-guard`, and the GitHub Action is availab
207
231
  | Area | Status |
208
232
  | --- | --- |
209
233
  | Public GitHub repository | Available |
210
- | npm CLI | `ai-saas-guard@0.35.0` |
211
- | GitHub Action | `zr9959/ai-saas-guard@v0` or fixed tag `v0.35.0` |
234
+ | npm CLI | `ai-saas-guard@0.35.1` |
235
+ | GitHub Action | `zr9959/ai-saas-guard@v0` or fixed tag `v0.35.1` |
212
236
  | Outputs | Short summary, terminal, JSON, SARIF, and PR-focused markdown |
213
237
  | Project config | `.ai-saas-guard.json` rule toggles, severity overrides, suppressions, and fail thresholds |
214
238
  | Privacy model | Local-first, read-only scan commands, no LLM calls, no code upload |
215
- | Versioned Action tags | `v0.35.0`, `v0` |
216
- | Current release | `0.35.0` adds a hosted GitHub App limited-trial gate, read-only checkout scan gate, three usage paths, a realistic AI SaaS case-study fixture, and a local scan resource budget helper |
239
+ | Versioned Action tags | `v0.35.1`, `v0` |
240
+ | Current release | `0.35.1` updates the case-study fixture to a patched Next.js release so GitHub Dependabot no longer reports known Next.js advisories for the packaged example |
217
241
  | npm publishing | Trusted Publisher/OIDC, no long-lived publish token |
218
242
  | Repository trust hardening | Strict branch protection, Dependabot, CodeQL, fast-check fuzzing, signed release provenance assets, private vulnerability reporting, secret scanning, and push protection |
219
243
  | Cloudflare hosted ingress | Deployed at `https://ai-saas-guard-hosted.zr9959.workers.dev`; signed GitHub App webhook delivery and compact Check Run smoke now pass in staging |
220
244
  | Hosted GitHub App staging | Private App `ai-saas-guard-hosted` (`3834787`) installed on `zr9959/ai-saas-guard`; hosted operations evidence is in [docs/hosted-operations-evidence.md](docs/hosted-operations-evidence.md) |
221
245
  | OpenSSF Best Practices | Passing badge, project `12955`; `.bestpractices.json` remains the conservative evidence record |
246
+ | Next roadmap | v0.36.0 plan is tracked in [docs/v0.36-roadmap.md](docs/v0.36-roadmap.md) |
222
247
 
223
248
  ## Example Finding
224
249
 
@@ -390,7 +415,7 @@ Use `suppressions` for narrower false-positive handling when one rule is noisy o
390
415
 
391
416
  ## GitHub Action
392
417
 
393
- The repo includes a composite Action. Use `v0` for the latest compatible pre-1.0 Action, a specific release tag such as `v0.35.0` for controlled upgrades, or pin a reviewed commit SHA for stricter supply-chain control:
418
+ The repo includes a composite Action. Use `v0` for the latest compatible pre-1.0 Action, a specific release tag such as `v0.35.1` for controlled upgrades, or pin a reviewed commit SHA for stricter supply-chain control:
394
419
 
395
420
  ```yaml
396
421
  name: ai-saas-guard
@@ -41,8 +41,32 @@ AI 构建的 SaaS 很容易“看起来已经能上线”:能登录、能打
41
41
  - Next/Vercel 生产环境缺 env 文档、security headers、request ID 或成本风险提示
42
42
  - AI 生成的大 PR 把 auth、billing、data、deploy 或测试改动藏在“普通改动”里
43
43
 
44
+ 先用 30 秒 demo 看输出:`npx ai-saas-guard@latest demo --summary`。不用注册、不上传代码、不调用 LLM。然后用大约 3 分钟扫自己的仓库:
45
+
46
+ ```bash
47
+ npx ai-saas-guard@latest scan --root /path/to/your-saas --summary
48
+ ```
49
+
50
+ 输出会先回答三个上线前最实际的问题:
51
+
52
+ - **真实用户会不会拿到不该有的权限?** 先看 auth、tenant ownership、Supabase RLS 和 Stripe entitlement。
53
+ - **服务失败时会不会假装成功?** 先看 swallowed error、fake success、hardcoded fallback data 和跳过的测试。
54
+ - **上线基础设施是不是权限太大?** 再看 env 暴露、过宽 workflow、MCP tool、deploy gap 和 request evidence。
55
+
44
56
  `ai-saas-guard` 是面向这个时刻的本地优先、review-first 上线预检工具。它不会证明你的应用绝对安全,也不是渗透测试、认证或完整安全审计。它的目标是给 founder、独立开发者、小团队和 reviewer 一份短而有证据的清单,告诉你上线或合并 PR 前最该先看哪里。
45
57
 
58
+ ## 看到结果后该怎么处理
59
+
60
+ 把报告当成上线 review 队列,而不是分数。先处理或人工验证最高风险的信任边界 finding,再处理低级别 hygiene。
61
+
62
+ | 如果看到 | 先做什么 |
63
+ | --- | --- |
64
+ | Critical/high 的 auth、billing、RLS、tenant、webhook 或 silent-success finding | 在 staging 复现 manual proof,确认风险路径会 fail closed |
65
+ | Medium 的 deploy、env、request ID、MCP 或 Actions hygiene finding | 判断这个上线路径现在是否必须补控制,还是可以在 critical 路径关闭后跟进 |
66
+ | Low/info 提示 | 等 user access、payment、data access 路径都清楚后再清理 |
67
+
68
+ 想看一个更像真实项目的风险样例,可以扫描 [examples/case-study-ai-saas](../examples/case-study-ai-saas) 或阅读 [case-study-ai-saas.md](case-study-ai-saas.md)。
69
+
46
70
  ## 30 秒复制粘贴 demo
47
71
 
48
72
  不需要注册、不上传代码、不调用 LLM:
@@ -187,23 +211,24 @@ node dist/cli.js scan --root /path/to/your-saas
187
211
 
188
212
  这个仓库是公开 GitHub 仓库。
189
213
 
190
- CLI 已发布到 npm:`ai-saas-guard@0.35.0`。GitHub Action 支持 `v0` 浮动标签,也支持固定版本标签,例如 `v0.35.0`。
214
+ CLI 已发布到 npm:`ai-saas-guard@0.35.1`。GitHub Action 支持 `v0` 浮动标签,也支持固定版本标签,例如 `v0.35.1`。
191
215
 
192
216
  | 模块 | 状态 |
193
217
  | --- | --- |
194
218
  | 公开 GitHub 仓库 | 已可用 |
195
- | npm CLI | `ai-saas-guard@0.35.0` |
196
- | GitHub Action | `zr9959/ai-saas-guard@v0` 或固定标签 `v0.35.0` |
219
+ | npm CLI | `ai-saas-guard@0.35.1` |
220
+ | GitHub Action | `zr9959/ai-saas-guard@v0` 或固定标签 `v0.35.1` |
197
221
  | 输出格式 | 短 summary、Terminal、JSON、SARIF 和 PR markdown |
198
222
  | 项目配置 | `.ai-saas-guard.json` 支持规则开关、severity 覆盖、suppressions 和 fail threshold |
199
223
  | 隐私模型 | 本地优先、只读扫描、不调用 LLM、不上传代码 |
200
- | 当前版本 | `0.35.0` 新增 hosted GitHub App limited-trial gate、read-only checkout scan gate、三种使用路径、真实 AI SaaS case-study fixture 和本地扫描资源预算 helper |
201
- | Action 标签 | `v0.35.0`、`v0` |
224
+ | 当前版本 | `0.35.1` case-study fixture 升级到已修补的 Next.js 版本,避免 GitHub Dependabot 对包内示例继续报告已知 Next.js advisories |
225
+ | Action 标签 | `v0.35.1`、`v0` |
202
226
  | npm 发布 | GitHub Actions Trusted Publisher/OIDC,无需长期 npm token |
203
227
  | 仓库可信度加固 | 严格 branch protection、Dependabot、CodeQL、fast-check fuzzing、signed release provenance assets、private vulnerability reporting、secret scanning 和 push protection |
204
228
  | Cloudflare hosted ingress | 已部署到 `https://ai-saas-guard-hosted.zr9959.workers.dev`;签名 GitHub App webhook delivery 和 compact Check Run staging smoke 已通过 |
205
229
  | Hosted GitHub App staging | 私有 App `ai-saas-guard-hosted`(`3834787`)已安装到 `zr9959/ai-saas-guard`;hosted operations evidence 见 [docs/hosted-operations-evidence.md](hosted-operations-evidence.md) |
206
230
  | OpenSSF Best Practices | 已获得 passing badge,项目 `12955`;`.bestpractices.json` 继续作为保守证据记录 |
231
+ | 下一版路线 | v0.36.0 计划见 [v0.36-roadmap.md](v0.36-roadmap.md) |
207
232
 
208
233
  ## 主要命令
209
234
 
@@ -5,11 +5,11 @@
5
5
  ## Current State
6
6
 
7
7
  - Package name: `ai-saas-guard`
8
- - Current published version: `0.35.0`
8
+ - Current published version: `0.35.1`
9
9
  - Next source candidate: none
10
10
  - npm registry state: published at <https://www.npmjs.com/package/ai-saas-guard>
11
11
  - First npm-published version: `0.1.1`
12
- - GitHub Release: `v0.35.0`
12
+ - GitHub Release: `v0.35.1`
13
13
  - Publish workflow: `.github/workflows/npm-publish.yml`
14
14
  - Trusted Publisher: GitHub Actions, `zr9959/ai-saas-guard`, workflow `npm-publish.yml`, allowed action `npm publish`
15
15
  - Long-lived npm publish token: not required
@@ -18,7 +18,7 @@
18
18
 
19
19
  Use GitHub Actions with npm Trusted Publisher/OIDC:
20
20
 
21
- 1. Create and review a release tag such as `v0.35.0`.
21
+ 1. Create and review a release tag such as `v0.35.1`.
22
22
  2. Publish from the GitHub Release or run the `Publish npm` workflow manually with `ref` set to that tag.
23
23
  3. Keep `permissions.id-token: write` in the workflow so npm can exchange the GitHub Actions OIDC identity for a short-lived publish credential.
24
24
  4. Run `npm publish --access public` from the workflow. Trusted publishing automatically generates provenance for this public package from this public repository.
@@ -0,0 +1,38 @@
1
+ # v0.36.0 Roadmap
2
+
3
+ This is the next practical release plan after v0.35.0. It keeps the product focused on a local-first launch gate for AI-built SaaS apps.
4
+
5
+ ## Goals
6
+
7
+ - Make the first real scan easier to understand for a founder or reviewer.
8
+ - Improve report usefulness without turning the tool into a general pentest, certification, or CI analytics platform.
9
+ - Keep the CLI deterministic, local-first, read-only, and free of LLM calls.
10
+
11
+ ## Planned Work
12
+
13
+ 1. **Markdown report polish**
14
+ - Tighten the top summary, manual proof steps, and fix-direction wording.
15
+ - Make CI artifacts easier to read without opening JSON or SARIF.
16
+
17
+ 2. **PR comment readiness**
18
+ - Prepare a compact PR summary format suitable for GitHub Action artifacts and future Check Runs.
19
+ - Keep it deterministic and file-evidence based.
20
+
21
+ 3. **Risk sorting clarity**
22
+ - Explain why auth, billing, tenant data, webhook, RLS, and silent-success findings are ranked above cosmetic changes.
23
+ - Keep the ranking simple and inspectable.
24
+
25
+ 4. **Fixture coverage**
26
+ - Expand the case-study fixture only where it demonstrates real launch-risk patterns.
27
+ - Keep positive and negative examples small enough to review quickly.
28
+
29
+ 5. **Resource guardrails**
30
+ - Continue measuring large-repo scan limits, ignored directories, output size, and cleanup behavior.
31
+ - Avoid background services or persistent local processes for normal CLI use.
32
+
33
+ ## Non-Goals
34
+
35
+ - No code upload.
36
+ - No LLM review.
37
+ - No hosted scanner claims until the hosted GitHub App path is fully gated and documented.
38
+ - No pentest, full audit, or certification positioning.
@@ -6,7 +6,7 @@
6
6
  "test": "node --test"
7
7
  },
8
8
  "dependencies": {
9
- "next": "15.0.0",
9
+ "next": "15.5.18",
10
10
  "stripe": "17.0.0"
11
11
  }
12
12
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai-saas-guard",
3
- "version": "0.35.0",
3
+ "version": "0.35.1",
4
4
  "description": "Local-first CLI that catches launch blockers in AI-built Next.js/Supabase/Stripe SaaS apps.",
5
5
  "readmeFilename": "README.md",
6
6
  "type": "module",