ai-saas-guard 0.26.0 → 0.26.2
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 +38 -44
- package/README.zh-CN.md +36 -42
- package/dist/hosted/app.js +8 -1
- package/dist/hosted/contracts.js +1 -1
- package/dist/hosted/production-adapters.js +8 -1
- package/dist/scanners/gitDiff.js +14 -3
- package/docs/github-action.md +1 -1
- package/docs/npm-publishing.md +3 -3
- package/docs/project-handoff.md +1 -1
- package/docs/repository-trust-hardening.md +2 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
<h1 align="center">ai-saas-guard</h1>
|
|
2
2
|
|
|
3
3
|
<p align="center">
|
|
4
|
-
<strong>You used AI to build your SaaS. Now
|
|
4
|
+
<strong>You used AI to build your SaaS. Now find the launch risks before users do.</strong>
|
|
5
5
|
</p>
|
|
6
6
|
|
|
7
7
|
<p align="center">
|
|
8
|
-
ai-saas-guard
|
|
8
|
+
ai-saas-guard is a local-first launch gate for AI-built SaaS apps. It focuses on auth, billing, data access, secrets, MCP, and deploy decisions, plus CI and fake-success paths, so you know what to review before launch or merge. It runs locally, reads your repo only, and does not upload code.
|
|
9
9
|
</p>
|
|
10
10
|
|
|
11
11
|
<p align="center">
|
|
12
|
-
It is not a pentest. It is a practical review
|
|
12
|
+
It is not a pentest. It is a practical, evidence-first review queue for the code that can break launch.
|
|
13
13
|
</p>
|
|
14
14
|
|
|
15
15
|
<p align="center">
|
|
@@ -27,40 +27,41 @@
|
|
|
27
27
|
|
|
28
28
|
---
|
|
29
29
|
|
|
30
|
-
## The Problem
|
|
30
|
+
## The Launch Problem
|
|
31
31
|
|
|
32
|
-
AI can
|
|
32
|
+
AI can make a SaaS look finished while the real launch blockers sit in trust-boundary code. These are the failures that hurt after real users arrive:
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
- one customer can see or change another customer's data
|
|
35
|
+
- Stripe grants access from an unsigned, duplicated, missing, or failed webhook path
|
|
36
|
+
- provider errors get swallowed and the app returns fake success or demo data
|
|
37
|
+
- a secret leaks through env config or `NEXT_PUBLIC_*`
|
|
38
|
+
- an MCP tool, GitHub workflow, or deploy job has more power than the launch needs
|
|
39
|
+
- a Next/Vercel deploy is missing production env docs, security headers, request IDs, or cost-risk hints
|
|
40
|
+
- a large AI PR hides auth, billing, data, deploy, or test changes inside harmless-looking work
|
|
35
41
|
|
|
36
|
-
-
|
|
37
|
-
- Can a Stripe webhook grant access twice, miss a failed payment, or trust an unsigned request?
|
|
38
|
-
- Did a public environment variable expose a secret?
|
|
39
|
-
- Did an MCP tool get shell, database, or broad filesystem access?
|
|
40
|
-
- Did AI-generated error handling return fake success or demo data after a real provider failed?
|
|
41
|
-
- Will the Next/Vercel deploy have the headers, env docs, logging, and request behavior needed for launch?
|
|
42
|
-
- Did a pull request hide auth, billing, or deploy changes inside a large AI-generated diff?
|
|
43
|
-
|
|
44
|
-
`ai-saas-guard` is a local-first, review-first preflight for that moment. It does not try to prove your app is secure. It is not a pentest, certification, or full audit. It gives founders, solo builders, small teams, and reviewers a short, evidence-backed list of what to check before launch or merge.
|
|
42
|
+
`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.
|
|
45
43
|
|
|
46
44
|
## What You Get
|
|
47
45
|
|
|
48
|
-
|
|
46
|
+
One command returns a launch-readiness report with:
|
|
49
47
|
|
|
50
|
-
-
|
|
51
|
-
- severity and file evidence
|
|
52
|
-
- why the
|
|
53
|
-
-
|
|
54
|
-
-
|
|
48
|
+
- risky files sorted before cosmetic files
|
|
49
|
+
- rule ID, severity, and file evidence
|
|
50
|
+
- why the finding matters for an AI-built SaaS launch
|
|
51
|
+
- manual verification steps you can actually run
|
|
52
|
+
- practical fix direction, not generic advice
|
|
53
|
+
- terminal, JSON, SARIF, and PR markdown output for local review or CI
|
|
55
54
|
|
|
56
|
-
|
|
55
|
+
## Problems It Helps You Catch
|
|
57
56
|
|
|
58
|
-
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
-
|
|
63
|
-
|
|
57
|
+
| Launch question | What ai-saas-guard checks |
|
|
58
|
+
| --- | --- |
|
|
59
|
+
| Can users only access their own data? | Supabase RLS, tenant/owner predicates, storage policies, API ownership hints, two-account verification guidance |
|
|
60
|
+
| Will billing change access correctly? | Stripe webhook signature, raw body, idempotency, entitlement paths, failure/cancel/update/refund coverage |
|
|
61
|
+
| Will broken integrations fail visibly? | Silent-success fallbacks, swallowed errors, hardcoded success responses, production mock/demo data, skipped or placeholder tests |
|
|
62
|
+
| Will production behave like local? | Next/Vercel headers, env docs, public env inventory, image/request amplification hints, request ID logging |
|
|
63
|
+
| Are tools and CI overpowered? | MCP side-effect classes, local policy/receipt templates, GitHub Actions permissions, concurrency, checkout depth, action pinning |
|
|
64
|
+
| Can reviewers trust the PR? | `pr-risk` ranking for auth, billing, RLS, deploy, API, storage, tests, silent-success paths, missing spec context, and large AI diffs |
|
|
64
65
|
|
|
65
66
|
## Current Status
|
|
66
67
|
|
|
@@ -71,24 +72,17 @@ The CLI is published on npm as `ai-saas-guard`, and the GitHub Action is availab
|
|
|
71
72
|
| Area | Status |
|
|
72
73
|
| --- | --- |
|
|
73
74
|
| Public GitHub repository | Available |
|
|
74
|
-
| npm CLI |
|
|
75
|
-
|
|
|
76
|
-
| JSON
|
|
77
|
-
|
|
|
78
|
-
|
|
|
79
|
-
| Versioned Action tags | `v0.26.
|
|
80
|
-
|
|
|
81
|
-
| Current release | `0.26.0` launch-risk expansion |
|
|
75
|
+
| npm CLI | `ai-saas-guard@0.26.2` |
|
|
76
|
+
| GitHub Action | `zr9959/ai-saas-guard@v0` or fixed tag `v0.26.2` |
|
|
77
|
+
| Outputs | Terminal, JSON, SARIF, and PR-focused markdown |
|
|
78
|
+
| Project config | `.ai-saas-guard.json` rule toggles, severity overrides, suppressions, and fail thresholds |
|
|
79
|
+
| Privacy model | Local-first, read-only scan commands, no LLM calls, no code upload |
|
|
80
|
+
| Versioned Action tags | `v0.26.2`, `v0` |
|
|
81
|
+
| Current release | `0.26.2` README positioning, TypeScript 6, and dependency policy cleanup |
|
|
82
82
|
| npm publishing | Trusted Publisher/OIDC, no long-lived publish token |
|
|
83
83
|
| Repository trust hardening | Strict branch protection, Dependabot, CodeQL, fast-check fuzzing, signed release provenance assets, private vulnerability reporting, secret scanning, and push protection |
|
|
84
|
-
| Runtime hardening | Per-file and total text scan caps, escaped markdown evidence, 1 MiB hosted webhook payload cap, stricter hosted deployment blockers |
|
|
85
|
-
| Hosted production adapters | GitHub App JWT signing, installation-token request planning, bounded worker execution, and terminal-state cleanup planning |
|
|
86
|
-
| Hosted app skeleton | Node/container HTTP ingress, health route, worker tick, in-memory provider adapters, and deployment plan validation |
|
|
87
|
-
| Hosted staging deployment planner | Provider binding, staging release-gate evidence, Node/container deployment composition, and GitHub App promotion gating |
|
|
88
|
-
| Hosted staging harness | File-backed webhook replay, queue/report/Check Run artifacts, worker cleanup verification, and local release-gate evidence fixtures |
|
|
89
84
|
| Cloudflare hosted ingress | Deployed at `https://ai-saas-guard-hosted.zr9959.workers.dev`; Worker health and Check Run publisher configuration are live, but end-to-end GitHub App webhook delivery is still blocked pending private App settings verification |
|
|
90
|
-
| Hosted operations evidence
|
|
91
|
-
| Hosted GitHub App staging | Private App `ai-saas-guard-hosted` (`3834787`) installed on `zr9959/ai-saas-guard` with contents read, pull requests read, metadata read, and checks write |
|
|
85
|
+
| 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) |
|
|
92
86
|
| OpenSSF Best Practices | Passing badge, project `12955`; `.bestpractices.json` remains the conservative evidence record |
|
|
93
87
|
|
|
94
88
|
## Quick Start
|
|
@@ -299,7 +293,7 @@ Use `suppressions` for narrower false-positive handling when one rule is noisy o
|
|
|
299
293
|
|
|
300
294
|
## GitHub Action
|
|
301
295
|
|
|
302
|
-
The repo includes a composite Action. Use `v0` for the latest compatible pre-1.0 Action, a specific release tag such as `v0.26.
|
|
296
|
+
The repo includes a composite Action. Use `v0` for the latest compatible pre-1.0 Action, a specific release tag such as `v0.26.2` for controlled upgrades, or pin a reviewed commit SHA for stricter supply-chain control:
|
|
303
297
|
|
|
304
298
|
```yaml
|
|
305
299
|
name: ai-saas-guard
|
package/README.zh-CN.md
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
<h1 align="center">ai-saas-guard</h1>
|
|
2
2
|
|
|
3
3
|
<p align="center">
|
|
4
|
-
<strong>你用 AI 把 SaaS
|
|
4
|
+
<strong>你用 AI 把 SaaS 做出来了。现在要在用户发现之前,先找到上线风险。</strong>
|
|
5
5
|
</p>
|
|
6
6
|
|
|
7
7
|
<p align="center">
|
|
8
|
-
ai-saas-guard
|
|
8
|
+
ai-saas-guard 是面向 AI 构建的 SaaS 的本地优先上线 gate。它会优先指出 auth、billing、data access、secrets、MCP、deploy、CI 和“假成功”路径里最值得人工 review 的改动,让你在上线前知道该先看哪里。它本地运行、只读仓库、不上传代码。
|
|
9
9
|
</p>
|
|
10
10
|
|
|
11
11
|
<p align="center">
|
|
12
|
-
|
|
12
|
+
它不是渗透测试,而是一份证据优先的 review 队列,帮你先看最容易出事的代码。
|
|
13
13
|
</p>
|
|
14
14
|
|
|
15
15
|
<p align="center">
|
|
@@ -28,66 +28,60 @@
|
|
|
28
28
|
|
|
29
29
|
## 它解决什么问题
|
|
30
30
|
|
|
31
|
-
AI 能很快把一个 SaaS
|
|
31
|
+
AI 能很快把一个 SaaS 做到“看起来能用”。真正危险的是上线后才暴露的信任边界问题:
|
|
32
32
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
-
|
|
36
|
-
-
|
|
37
|
-
-
|
|
38
|
-
-
|
|
39
|
-
- AI
|
|
40
|
-
- Next/Vercel 上线前是不是缺 security headers、env 文档、请求日志或高请求量风险提示?
|
|
41
|
-
- AI 生成的大 PR 里,是不是把 auth、billing 或 deploy 改动藏在 UI 调整中?
|
|
33
|
+
- 一个用户能看到或修改另一个客户的数据
|
|
34
|
+
- Stripe webhook 因为未签名、重复、漏处理失败事件而错误开通权限
|
|
35
|
+
- 真实服务失败后,AI 生成的代码仍然返回“成功”或 demo 数据
|
|
36
|
+
- secret 被 env 配置或 `NEXT_PUBLIC_*` 暴露出去
|
|
37
|
+
- MCP 工具、GitHub workflow 或 deploy job 拿到了过大的权限
|
|
38
|
+
- Next/Vercel 生产环境缺 env 文档、security headers、request ID 或成本风险提示
|
|
39
|
+
- AI 生成的大 PR 把 auth、billing、data、deploy 或测试改动藏在“普通改动”里
|
|
42
40
|
|
|
43
41
|
`ai-saas-guard` 是面向这个时刻的本地优先、review-first 上线预检工具。它不会证明你的应用绝对安全,也不是渗透测试、认证或完整安全审计。它的目标是给 founder、独立开发者、小团队和 reviewer 一份短而有证据的清单,告诉你上线或合并 PR 前最该先看哪里。
|
|
44
42
|
|
|
45
43
|
## 你会得到什么
|
|
46
44
|
|
|
47
|
-
|
|
45
|
+
一个命令会返回一份上线前 review 队列:
|
|
48
46
|
|
|
49
|
-
-
|
|
50
|
-
- severity 和文件证据
|
|
51
|
-
-
|
|
52
|
-
-
|
|
53
|
-
-
|
|
47
|
+
- 先看高风险文件,再看 UI 或普通重构
|
|
48
|
+
- 每个 finding 都有 rule ID、severity 和文件证据
|
|
49
|
+
- 说明它为什么会影响 AI 构建的 SaaS 上线
|
|
50
|
+
- 给出可以人工复现的验证步骤
|
|
51
|
+
- 给出实际修复方向,不只是一句泛泛建议
|
|
52
|
+
- 支持 terminal、JSON、SARIF 和 PR markdown,方便本地或 CI 使用
|
|
54
53
|
|
|
55
|
-
|
|
54
|
+
## 它能帮你抓住哪些问题
|
|
56
55
|
|
|
57
|
-
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
-
|
|
62
|
-
|
|
56
|
+
| 上线问题 | ai-saas-guard 会检查什么 |
|
|
57
|
+
| --- | --- |
|
|
58
|
+
| 用户是否只能访问自己的数据? | Supabase RLS、tenant/owner predicate、storage policy、API ownership 提示、双账号验证建议 |
|
|
59
|
+
| 付费权限是否会正确开通和撤销? | Stripe webhook 签名、raw body、幂等、entitlement 路径、失败/取消/更新/退款覆盖 |
|
|
60
|
+
| 集成失败时会不会明显失败? | silent-success fallback、吞错、hardcoded success、production mock/demo data、跳过或占位测试 |
|
|
61
|
+
| 生产环境是否真的等于本地成功? | Next/Vercel headers、env 文档、public env 盘点、image/request 放大风险、request ID logging |
|
|
62
|
+
| 工具和 CI 权限是不是过大? | MCP side-effect 分类、本地 policy/receipt 模板、GitHub Actions 权限、concurrency、checkout depth、Action pinning |
|
|
63
|
+
| reviewer 能不能看懂 AI PR? | `pr-risk` 对 auth、billing、RLS、deploy、API、storage、测试、silent-success、缺 spec context 和大型 diff 排序 |
|
|
63
64
|
|
|
64
65
|
## 当前状态
|
|
65
66
|
|
|
66
67
|
这个仓库是公开 GitHub 仓库。
|
|
67
68
|
|
|
68
|
-
CLI 已发布到 npm:`ai-saas-guard@0.26.
|
|
69
|
+
CLI 已发布到 npm:`ai-saas-guard@0.26.2`。GitHub Action 支持 `v0` 浮动标签,也支持固定版本标签,例如 `v0.26.2`。
|
|
69
70
|
|
|
70
71
|
| 模块 | 状态 |
|
|
71
72
|
| --- | --- |
|
|
72
73
|
| 公开 GitHub 仓库 | 已可用 |
|
|
73
|
-
| npm CLI |
|
|
74
|
-
|
|
|
75
|
-
|
|
|
76
|
-
|
|
|
77
|
-
|
|
|
78
|
-
|
|
|
79
|
-
|
|
|
80
|
-
| Action 标签 | `v0.26.0`、`v0` |
|
|
74
|
+
| npm CLI | `ai-saas-guard@0.26.2` |
|
|
75
|
+
| GitHub Action | `zr9959/ai-saas-guard@v0` 或固定标签 `v0.26.2` |
|
|
76
|
+
| 输出格式 | Terminal、JSON、SARIF 和 PR markdown |
|
|
77
|
+
| 项目配置 | `.ai-saas-guard.json` 支持规则开关、severity 覆盖、suppressions 和 fail threshold |
|
|
78
|
+
| 隐私模型 | 本地优先、只读扫描、不调用 LLM、不上传代码 |
|
|
79
|
+
| 当前版本 | `0.26.2` README 定位、TypeScript 6 和依赖策略清理 |
|
|
80
|
+
| Action 标签 | `v0.26.2`、`v0` |
|
|
81
81
|
| npm 发布 | GitHub Actions Trusted Publisher/OIDC,无需长期 npm token |
|
|
82
82
|
| 仓库可信度加固 | 严格 branch protection、Dependabot、CodeQL、fast-check fuzzing、signed release provenance assets、private vulnerability reporting、secret scanning 和 push protection |
|
|
83
|
-
| 运行时加固 | 单文件和总扫描文本预算、markdown evidence 转义、1 MiB hosted webhook payload 上限、更严格的 hosted deployment 阻断 |
|
|
84
|
-
| Hosted production adapters | GitHub App JWT 签名、installation-token 请求规划、有边界的 worker 执行和终态 cleanup 规划 |
|
|
85
|
-
| Hosted app skeleton | Node/container HTTP ingress、health route、worker tick、in-memory provider adapters 和 deployment plan 校验 |
|
|
86
|
-
| Hosted staging deployment planner | provider binding、staging release-gate evidence、Node/container deployment 组合和 GitHub App promotion gating |
|
|
87
|
-
| Hosted staging harness | 本地 file-backed webhook replay、queue/report/Check Run artifact、worker cleanup 校验和 release-gate evidence fixture |
|
|
88
83
|
| Cloudflare hosted ingress | 已部署到 `https://ai-saas-guard-hosted.zr9959.workers.dev`;Worker health 和 Check Run publisher 配置已在线,但端到端 GitHub App webhook delivery 仍需要验证私有 App 设置 |
|
|
89
|
-
| Hosted operations evidence
|
|
90
|
-
| Hosted GitHub App staging | 私有 App `ai-saas-guard-hosted`(`3834787`)已安装到 `zr9959/ai-saas-guard`,权限为 contents read、pull requests read、metadata read、checks write |
|
|
84
|
+
| Hosted GitHub App staging | 私有 App `ai-saas-guard-hosted`(`3834787`)已安装到 `zr9959/ai-saas-guard`;hosted operations evidence 见 [docs/hosted-operations-evidence.md](docs/hosted-operations-evidence.md) |
|
|
91
85
|
| OpenSSF Best Practices | 已获得 passing badge,项目 `12955`;`.bestpractices.json` 继续作为保守证据记录 |
|
|
92
86
|
|
|
93
87
|
## 快速开始
|
package/dist/hosted/app.js
CHANGED
|
@@ -261,7 +261,7 @@ function isValidSecretRef(value) {
|
|
|
261
261
|
return /^secret:[A-Za-z0-9._:/@-]+$/.test(value);
|
|
262
262
|
}
|
|
263
263
|
function normalizePublicBaseUrl(publicBaseUrl) {
|
|
264
|
-
return publicBaseUrl.trim()
|
|
264
|
+
return trimTrailingSlashes(publicBaseUrl.trim());
|
|
265
265
|
}
|
|
266
266
|
function isSafePublicHttpsUrl(value) {
|
|
267
267
|
try {
|
|
@@ -279,6 +279,13 @@ function isUnsafeHostedHostname(hostname) {
|
|
|
279
279
|
isUnsafeIpv4Hostname(normalized) ||
|
|
280
280
|
isUnsafeIpv6Hostname(normalized));
|
|
281
281
|
}
|
|
282
|
+
function trimTrailingSlashes(value) {
|
|
283
|
+
let end = value.length;
|
|
284
|
+
while (end > 0 && value[end - 1] === "/") {
|
|
285
|
+
end -= 1;
|
|
286
|
+
}
|
|
287
|
+
return value.slice(0, end);
|
|
288
|
+
}
|
|
282
289
|
function normalizeHostname(hostname) {
|
|
283
290
|
const lower = hostname.toLowerCase().replace(/\.$/, "");
|
|
284
291
|
return lower.startsWith("[") && lower.endsWith("]") ? lower.slice(1, -1) : lower;
|
package/dist/hosted/contracts.js
CHANGED
|
@@ -1156,7 +1156,7 @@ function getHostedCheckRunFiles(report) {
|
|
|
1156
1156
|
return [...new Set(report.evidence.map((finding) => finding.file))].slice(0, 10);
|
|
1157
1157
|
}
|
|
1158
1158
|
function escapeMarkdownTableCell(value) {
|
|
1159
|
-
return value.
|
|
1159
|
+
return value.replaceAll("\\", "\\\\").replaceAll("|", "\\|").replaceAll("\r", " ").replaceAll("\n", " ");
|
|
1160
1160
|
}
|
|
1161
1161
|
function capitalize(value) {
|
|
1162
1162
|
return `${value.charAt(0).toUpperCase()}${value.slice(1)}`;
|
|
@@ -190,7 +190,14 @@ function safeApiUrlBlockedReasons(apiBaseUrl) {
|
|
|
190
190
|
}
|
|
191
191
|
function normalizeApiBaseUrl(apiBaseUrl) {
|
|
192
192
|
const value = apiBaseUrl?.trim() || "https://api.github.com";
|
|
193
|
-
return value
|
|
193
|
+
return trimTrailingSlashes(value);
|
|
194
|
+
}
|
|
195
|
+
function trimTrailingSlashes(value) {
|
|
196
|
+
let end = value.length;
|
|
197
|
+
while (end > 0 && value[end - 1] === "/") {
|
|
198
|
+
end -= 1;
|
|
199
|
+
}
|
|
200
|
+
return value.slice(0, end);
|
|
194
201
|
}
|
|
195
202
|
function permissionsForPurpose(purpose) {
|
|
196
203
|
if (purpose === "worker_checkout") {
|
package/dist/scanners/gitDiff.js
CHANGED
|
@@ -166,12 +166,12 @@ function parseDiffFiles(diffText) {
|
|
|
166
166
|
const files = [];
|
|
167
167
|
let current;
|
|
168
168
|
for (const line of diffText.split(/\r?\n/)) {
|
|
169
|
-
const
|
|
170
|
-
if (
|
|
169
|
+
const filePath = parseDiffHeaderPath(line);
|
|
170
|
+
if (filePath) {
|
|
171
171
|
if (current)
|
|
172
172
|
files.push(finalizeDiffFile(current));
|
|
173
173
|
current = {
|
|
174
|
-
path:
|
|
174
|
+
path: filePath,
|
|
175
175
|
score: 0,
|
|
176
176
|
categories: [],
|
|
177
177
|
added: 0,
|
|
@@ -192,6 +192,17 @@ function parseDiffFiles(diffText) {
|
|
|
192
192
|
files.push(finalizeDiffFile(current));
|
|
193
193
|
return files;
|
|
194
194
|
}
|
|
195
|
+
function parseDiffHeaderPath(line) {
|
|
196
|
+
const prefix = "diff --git a/";
|
|
197
|
+
if (!line.startsWith(prefix))
|
|
198
|
+
return undefined;
|
|
199
|
+
const separator = " b/";
|
|
200
|
+
const separatorIndex = line.lastIndexOf(separator);
|
|
201
|
+
if (separatorIndex === -1)
|
|
202
|
+
return undefined;
|
|
203
|
+
const path = line.slice(separatorIndex + separator.length);
|
|
204
|
+
return path || undefined;
|
|
205
|
+
}
|
|
195
206
|
function finalizeDiffFile(file) {
|
|
196
207
|
const changedLines = file.lines
|
|
197
208
|
.filter((line) => (line.startsWith("+") && !line.startsWith("+++")) || (line.startsWith("-") && !line.startsWith("---")))
|
package/docs/github-action.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
`ai-saas-guard` ships as a composite GitHub Action for pull request and code scanning workflows.
|
|
4
4
|
|
|
5
|
-
Use `zr9959/ai-saas-guard@v0` for the latest compatible pre-1.0 Action. Use a specific tag such as `v0.26.
|
|
5
|
+
Use `zr9959/ai-saas-guard@v0` for the latest compatible pre-1.0 Action. Use a specific tag such as `v0.26.2` or a reviewed commit SHA when reproducibility is more important than automatic minor updates.
|
|
6
6
|
|
|
7
7
|
## PR Summary
|
|
8
8
|
|
package/docs/npm-publishing.md
CHANGED
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
## Current State
|
|
6
6
|
|
|
7
7
|
- Package name: `ai-saas-guard`
|
|
8
|
-
- Current published version: `0.26.
|
|
8
|
+
- Current published version: `0.26.2`
|
|
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.26.
|
|
12
|
+
- GitHub Release: `v0.26.2`
|
|
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.26.
|
|
21
|
+
1. Create and review a release tag such as `v0.26.2`.
|
|
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.
|
package/docs/project-handoff.md
CHANGED
|
@@ -160,7 +160,7 @@ OpenSSF Best Practices:
|
|
|
160
160
|
Publishing:
|
|
161
161
|
|
|
162
162
|
- npm package: `ai-saas-guard`
|
|
163
|
-
- Current published release line: `v0.26.
|
|
163
|
+
- Current published release line: `v0.26.2`
|
|
164
164
|
- Next source candidate: none
|
|
165
165
|
- Publish workflow: `.github/workflows/npm-publish.yml`
|
|
166
166
|
- Trusted Publisher: GitHub Actions for `zr9959/ai-saas-guard`, workflow `npm-publish.yml`
|
|
@@ -40,6 +40,8 @@ It covers:
|
|
|
40
40
|
|
|
41
41
|
The schedule is weekly with cooldown windows and a small open pull request limit. This keeps update noise low while still surfacing security and maintenance updates.
|
|
42
42
|
|
|
43
|
+
The npm update policy ignores semver-major `@types/node` bumps while the package supports Node.js 20. This avoids accidentally type-checking against newer Node-only APIs that the published CLI does not promise to support.
|
|
44
|
+
|
|
43
45
|
Dependabot security updates and vulnerability alerts are enabled in repository settings.
|
|
44
46
|
|
|
45
47
|
## CodeQL
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ai-saas-guard",
|
|
3
|
-
"version": "0.26.
|
|
3
|
+
"version": "0.26.2",
|
|
4
4
|
"description": "Repo-local launch-readiness scanner for AI-built SaaS apps.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"homepage": "https://github.com/zr9959/ai-saas-guard#readme",
|
|
@@ -87,6 +87,6 @@
|
|
|
87
87
|
"devDependencies": {
|
|
88
88
|
"@types/node": "^20",
|
|
89
89
|
"fast-check": "^4.8.0",
|
|
90
|
-
"typescript": "^
|
|
90
|
+
"typescript": "^6"
|
|
91
91
|
}
|
|
92
92
|
}
|