canship 0.1.0 → 0.1.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 +1 -1
- package/README.zh-CN.md +1 -1
- package/dist/cli.js +15 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -16,7 +16,7 @@ Node.js 18 or later is required. Git is optional; only commit-history checks req
|
|
|
16
16
|
|
|
17
17
|
| Check | Risk | Severity |
|
|
18
18
|
|---|---|---|
|
|
19
|
-
| Hardcoded credentials | A scanned file contains a recognised OpenAI, Anthropic, AWS, Stripe, GitHub, Slack, SendGrid, private-key, or database credential | P0 |
|
|
19
|
+
| Hardcoded credentials | A scanned file contains a recognised OpenAI, Anthropic, AWS, Stripe, GitHub, npm, Slack, SendGrid, private-key, or database credential | P0 |
|
|
20
20
|
| Private values in public environment variables | The value may be included in browser-delivered code | P0 |
|
|
21
21
|
| Supabase `service_role` key reachable from client code | A `service_role` key can bypass Row Level Security (RLS) policies | P0 |
|
|
22
22
|
| Git-tracked `.env` files | Recognised credentials remain in repository history; substantial unrecognised values may also produce a lower-confidence finding | P0 |
|
package/README.zh-CN.md
CHANGED
|
@@ -16,7 +16,7 @@ npx canship
|
|
|
16
16
|
|
|
17
17
|
| 检查项 | 风险 | 级别 |
|
|
18
18
|
|---|---|---|
|
|
19
|
-
| 硬编码凭据 | 当前扫描文件中包含已识别的 OpenAI、Anthropic、AWS、Stripe、GitHub、Slack、SendGrid、私钥或数据库连接凭据 | P0 |
|
|
19
|
+
| 硬编码凭据 | 当前扫描文件中包含已识别的 OpenAI、Anthropic、AWS、Stripe、GitHub、npm、Slack、SendGrid、私钥或数据库连接凭据 | P0 |
|
|
20
20
|
| 公开环境变量中的私密值 | 私密值可能被打包进浏览器代码 | P0 |
|
|
21
21
|
| 客户端可访问 Supabase `service_role` key | `service_role` 可绕过 Row Level Security(RLS)策略 | P0 |
|
|
22
22
|
| Git 跟踪的 `.env` 文件 | 已识别凭据会留在仓库历史中;未识别但内容仍像真实配置的文件也可能产生低置信度结果 | P0 |
|
package/dist/cli.js
CHANGED
|
@@ -44,6 +44,20 @@ var SECRET_PATTERNS = [
|
|
|
44
44
|
impact: "Grants access to your repositories \u2014 including private ones, and the ability to push code.",
|
|
45
45
|
rotateAt: "https://github.com/settings/tokens"
|
|
46
46
|
},
|
|
47
|
+
{
|
|
48
|
+
id: "npm-token",
|
|
49
|
+
name: "npm access token",
|
|
50
|
+
// Shape only, though npm encodes a CRC32 of the token into its last six
|
|
51
|
+
// characters and this could verify it. The github-token entry above uses
|
|
52
|
+
// the same scheme and does not verify it either, for the reason that
|
|
53
|
+
// settles it: if the algorithm ever changes, a checksum test turns a real
|
|
54
|
+
// leaked token into a silent pass. A false positive costs a glance. This
|
|
55
|
+
// particular false negative costs the account, and every account that
|
|
56
|
+
// installs anything published from it afterwards.
|
|
57
|
+
pattern: /\bnpm_[A-Za-z0-9]{36}\b/g,
|
|
58
|
+
impact: "Publishes packages under your account. Anyone who installs one afterwards runs whatever that version contains.",
|
|
59
|
+
rotateAt: "https://docs.npmjs.com/creating-and-viewing-access-tokens"
|
|
60
|
+
},
|
|
47
61
|
{
|
|
48
62
|
id: "google-api-key",
|
|
49
63
|
name: "Google API key",
|
|
@@ -3671,7 +3685,7 @@ function renderHtml(result, opts) {
|
|
|
3671
3685
|
}
|
|
3672
3686
|
|
|
3673
3687
|
// src/cli.ts
|
|
3674
|
-
var VERSION = true ? "0.1.
|
|
3688
|
+
var VERSION = true ? "0.1.1" : "0.0.0-dev";
|
|
3675
3689
|
function argumentError(message) {
|
|
3676
3690
|
process.stderr.write(`canship: ${cleanForOutput(message)}
|
|
3677
3691
|
`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "canship",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Static scanner for exposed credentials and open access rules in JS/TS front-end projects. Scans local files without executing project code or making network requests.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"security",
|