fixyoursecret 0.4.0 → 0.4.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/CHANGELOG.md CHANGED
@@ -2,6 +2,25 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## [0.4.2] - 2026-03-26
6
+
7
+ ### Fixed
8
+ - Release automation now forces Trusted Publisher OIDC mode in GitHub Actions by unsetting token auth in publish step.
9
+ - Prevents npm auth-token fallback issues (`E404`) when publishing from tag workflow.
10
+
11
+ ## [0.4.1] - 2026-03-26
12
+
13
+ ### Improved
14
+ - Tightened residual generic-noise filtering for large real-world corpora:
15
+ - better `.test/.spec` context detection
16
+ - stronger URL/base64/tutorial-data suppression for generic detector paths
17
+ - additional non-production placeholder filtering for provider fixtures
18
+ - Reduced quick 500-corpus findings from 117 to 51 while preserving quality gates.
19
+
20
+ ### CI/Release
21
+ - Switched release workflow to Trusted Publisher OIDC mode for npm publish.
22
+ - Kept tag-based automated publish via `.github/workflows/release-publish.yml`.
23
+
5
24
  ## [0.4.0] - 2026-03-26
6
25
 
7
26
  ### Added
package/README.md CHANGED
@@ -227,6 +227,10 @@ Workflow file included:
227
227
 
228
228
  It runs tests, benchmark gate, scan, and uploads SARIF.
229
229
 
230
+ Automated npm release workflow:
231
+ - [./.github/workflows/release-publish.yml](./.github/workflows/release-publish.yml)
232
+ - Triggered by pushing version tags like `v0.4.1`
233
+
230
234
  ---
231
235
 
232
236
  ## Publish
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "fixyoursecret",
3
- "version": "0.4.0",
3
+ "version": "0.4.2",
4
4
  "description": "CLI tool to detect leaked secrets, frontend exposure, and generate safe fixes.",
5
5
  "type": "module",
6
6
  "bin": {
7
- "fixyoursecret": "bin/index.js",
8
- "secretlint": "bin/index.js"
7
+ "fixyoursecret": "./bin/index.js",
8
+ "secretlint": "./bin/index.js"
9
9
  },
10
10
  "files": [
11
11
  "bin/",
package/utils/verifier.js CHANGED
@@ -74,8 +74,12 @@ export function shouldSkipAsNonSecret(match, snippet = "", filePath = "", hints
74
74
  const lowerSnippet = snippet.toLowerCase();
75
75
  const lowerPath = filePath.toLowerCase();
76
76
  const value = String(match.value || "");
77
- const isNonProdPath = ["/test/", "/tests/", "/__tests__/", "/fixtures/", "/docs/", "/examples/", "/spec/"]
78
- .some((segment) => lowerPath.includes(segment));
77
+ const isNonProdPath = (
78
+ ["/test/", "/tests/", "/__tests__/", "/fixtures/", "/docs/", "/examples/", "/spec/"]
79
+ .some((segment) => lowerPath.includes(segment)) ||
80
+ /\.test\.[a-z0-9]+$/i.test(lowerPath) ||
81
+ /\.spec\.[a-z0-9]+$/i.test(lowerPath)
82
+ );
79
83
 
80
84
  const builtinHints = ["example", "dummy", "fake", "sample", "not_secret", "replace_in_runtime_only", "docs_only"];
81
85
  const allHints = [...builtinHints, ...hints.map((h) => String(h).toLowerCase())];
@@ -114,6 +118,7 @@ export function shouldSkipAsNonSecret(match, snippet = "", filePath = "", hints
114
118
  }
115
119
 
116
120
  if (match.rule === "generic-high-entropy") {
121
+ if (/(?:https?:\/\/|url:|href=|source:|fileName:|filename:|data:image|base64)/.test(lowerSnippet)) return true;
117
122
  const genericNoiseHints = [
118
123
  "canvasrenderingcontext2d",
119
124
  "axios parameter creator",
@@ -132,11 +137,27 @@ export function shouldSkipAsNonSecret(match, snippet = "", filePath = "", hints
132
137
  "anthropiccontext1m",
133
138
  "bigint64arraybytes_per_element",
134
139
  "claude-sonnet",
135
- "gemini-"
140
+ "gemini-",
141
+ "oauth/callback?code=",
142
+ "audio-16khz-16bit",
143
+ "i18next-browser-languagedetector",
144
+ "msapplication-square70x70logo",
145
+ "apps.googleusercontent.com",
146
+ "downloaded-logs-",
147
+ "webkiformboundary",
148
+ "gpt-4o-realtime-preview"
136
149
  ];
137
150
  if (genericNoiseHints.some((hint) => lowerSnippet.includes(hint))) return true;
138
151
  }
139
152
 
153
+ if (
154
+ match.rule === "private-key-block" &&
155
+ isNonProdPath &&
156
+ /(?:example|dummy|placeholder|mock|do not share|xxxxx|\.{3})/.test(lowerSnippet)
157
+ ) {
158
+ return true;
159
+ }
160
+
140
161
  return false;
141
162
  }
142
163