plumber-linter 1.4.1 → 1.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.
Files changed (3) hide show
  1. package/README.md +303 -239
  2. package/bin/plumber.js +1375 -1375
  3. package/package.json +51 -51
package/README.md CHANGED
@@ -1,239 +1,303 @@
1
- # Plumber
2
-
3
- CI/CD pipeline linter that flags hardcoded secrets, leaked credentials, and dead code — with fixes in plain English, plus SARIF output for GitHub code scanning and workflow YAML scanning for GitHub Actions.
4
-
5
- [![npm version](https://img.shields.io/npm/v/plumber-linter.svg)](https://www.npmjs.com/package/plumber-linter)
6
- [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/parasraju/plumber/blob/main/LICENSE)
7
-
8
- Plumber inspects codebases and git repositories in milliseconds without requiring an LLM. It enforces quality and security gates in CI/CD pipelines and git pre-commit hooks, exiting with non-zero status when critical or high-severity issues are found.
9
-
10
- ---
11
-
12
- ## Installation
13
-
14
- ```bash
15
- # Local project dependency
16
- npm install --save-dev plumber-linter
17
-
18
- # Global installation
19
- npm install -g plumber-linter
20
- ```
21
-
22
- ---
23
-
24
- ## Quick Start
25
-
26
- Run instantly with `npx` (no install required):
27
-
28
- ```bash
29
- # Scan current repository
30
- npx plumber-linter scan .
31
-
32
- # Enforce quality gate in CI (exit 1 on HIGH or CRITICAL issues)
33
- npx plumber-linter scan . --fail-on high
34
-
35
- # Export report as Markdown, JSON, or SARIF 2.1.0
36
- npx plumber-linter scan . --format md
37
- npx plumber-linter scan . --format json
38
- npx plumber-linter scan . --format sarif
39
-
40
- # View all 31 inspection rules
41
- npx plumber-linter rules
42
- ```
43
-
44
- ### In GitHub Actions
45
-
46
- ```yaml
47
- - name: Run Plumber Linter
48
- run: npx plumber-linter scan . --fail-on high
49
- ```
50
-
51
- ### In GitLab CI
52
-
53
- ```yaml
54
- plumber-lint:
55
- image: node:18
56
- script:
57
- - npx plumber-linter scan . --fail-on high
58
- ```
59
-
60
- ### Git Pre-Commit Hook
61
-
62
- Install a pre-commit hook that blocks commits containing secrets, `.env` files, or dead code:
63
-
64
- ```bash
65
- # Install hook (blocks staged secrets and issues >= HIGH)
66
- npx plumber-linter install-hook --fail-on high
67
-
68
- # Uninstall hook
69
- npx plumber-linter uninstall-hook
70
- ```
71
-
72
- ### SARIF output for GitHub code scanning
73
-
74
- `plumber scan . --format sarif` writes SARIF 2.1.0 JSON to stdout. The file contains one run for `plumber-linter` 1.4.1, every inspection rule (id, name, description, and the plain-English fix in `help.text`), and one result per finding. Each result's `message.text` repeats that finding's explanation and fix. Paths are relative to the scanned directory, and the line is included when the engine recorded one.
75
-
76
- ```bash
77
- npx plumber-linter scan . --format sarif > results.sarif
78
- ```
79
-
80
- Upload `results.sarif` with GitHub's `upload-sarif` action. The action name, the `sarif_file` input, and the `security-events: write` permission below are taken from GitHub's [Uploading a SARIF file to GitHub](https://docs.github.com/en/code-security/how-tos/find-and-fix-code-vulnerabilities/integrate-with-existing-tools/upload-sarif-file) guide. `partialFingerprints` is left unset; that same action calculates it when the repository contains both the SARIF file and the scanned source.
81
-
82
- ```yaml
83
- name: Plumber code scanning
84
- on:
85
- push:
86
- jobs:
87
- plumber:
88
- runs-on: ubuntu-latest
89
- permissions:
90
- security-events: write
91
- actions: read
92
- contents: read
93
- steps:
94
- - name: Checkout repository
95
- uses: actions/checkout@v6
96
- - name: Run Plumber
97
- run: npx plumber-linter scan . --format sarif > results.sarif
98
- - name: Upload SARIF file
99
- uses: github/codeql-action/upload-sarif@v4
100
- with:
101
- sarif_file: results.sarif
102
- ```
103
-
104
- ### Workflow YAML scanning — scan .github/workflows/*.yml
105
-
106
- Workflow YAML scanning checks GitHub Actions files under `.github/workflows` with the same `scan` command. Use it to scan GitHub Actions workflows for structural risks. A repository with no workflow files is unchanged: no new findings and no YAML errors.
107
-
108
- ```bash
109
- npx plumber-linter scan .
110
- npx plumber-linter scan .github/workflows/review.yml
111
- ```
112
-
113
- - `sec/pull-request-target` — flags a `pull_request_target` workflow that checks out untrusted PR code or grants write permissions (`CRITICAL`).
114
- - `sec/expression-injection` — flags `${{ github.event.* }}`, `${{ github.head_ref }}`, or another attacker-controlled context interpolated into a `run:` command (`CRITICAL`).
115
- - `pipe/action-unpinned` — flags a `uses:` step that references a third-party action by branch or version tag instead of a full commit SHA (`MEDIUM`).
116
- - `sec/job-permissions` — flags a job that pushes, releases, or deploys with no `permissions:` block, or with `contents: write` where a narrower scope would do (`HIGH`).
117
- - `sec/secret-to-untrusted` — flags a secret in `env:` or an argument of a step that runs a third-party action (`HIGH`).
118
-
119
- `.github/workflows/review.yml`:
120
-
121
- ```yaml
122
- name: review
123
- on:
124
- pull_request_target:
125
- jobs:
126
- build:
127
- runs-on: ubuntu-latest
128
- steps:
129
- - uses: actions/checkout@v4
130
- with:
131
- ref: ${{ github.event.pull_request.head.sha }}
132
- ```
133
-
134
- ```text
135
- [FILE] .github/workflows/review.yml
136
- L10 [CRITICAL] Untrusted pull_request_target Checkout or Write Permission
137
- Found: ref: ${{ github.event.pull_request.head.sha }}
138
- Fix: Use pull_request, or check out the base ref read-only with no secrets.
139
- ```
140
-
141
- ---
142
-
143
- ## What It Checks
144
-
145
- ### 1. Leaked Secrets & API Keys (`leak/api-key`, `leak/hardcoded-secret`)
146
- Detects exposed OpenAI (`sk-...`), GitHub (`ghp_...`), AWS (`AKIA...`), Slack tokens, and database credentials.
147
- - **Vulnerable:** `const client = new OpenAI({ apiKey: "sk-live1234567890abcdef1234567890" });`
148
- - **Fixed:** `const client = new OpenAI({ apiKey: process.env.OPENAI_API_KEY });`
149
-
150
- ### 2. Committed Environment Files (`leak/committed-env`)
151
- Prevents committing `.env` files containing live secrets to version control.
152
- - **Vulnerable:** `.env` committed with production credentials.
153
- - **Fixed:** Add `.env` to `.gitignore` and commit `.env.example` with blank placeholders.
154
-
155
- ### 3. Swallowed Exceptions (`clog/swallowed-error`)
156
- Flags silent failure blocks that swallow exceptions and hide failures in CI/CD pipelines.
157
- - **Vulnerable:** `try { doWork(); } catch (err) {}`
158
- - **Fixed:** `try { doWork(); } catch (err) { logger.error(err); throw err; }`
159
-
160
- ### 4. Unreachable Dead Code (`clog/dead-code`)
161
- Detects unreachable statements following returns or inside constant-false branches.
162
- - **Vulnerable:** `return result; console.log("Done");`
163
- - **Fixed:** Delete unreachable statement (or run `npx plumber-linter clean . --write`).
164
-
165
- ### 5. AI-Elided Code Snippets (`clog/elided-code`)
166
- Flags lazy AI elision comments like `// ... existing code ...` left behind in source files.
167
- - **Vulnerable:** `// ... existing code ...`
168
- - **Fixed:** Restore the full function or component implementation.
169
-
170
- ### 6. Non-Semantic / Inaccessible Elements (`joint/clickable-div`)
171
- Identifies non-semantic clickable elements lacking accessible keyboard and screen-reader controls.
172
- - **Vulnerable:** `<div onClick={handleClick}>Submit</div>`
173
- - **Fixed:** `<button type="button" onClick={handleClick}>Submit</button>`
174
-
175
- ### 7. Hallucinated / Undeclared Dependencies (`pipe/phantom-import`)
176
- Spots hallucinated library imports invented by LLMs or packages missing from project manifests.
177
- - **Vulnerable:** `import { useFeature } from "next-auth-v5-helpers";`
178
- - **Fixed:** Use standard verified libraries and declare dependencies in manifests.
179
-
180
- ### 8. CI/CD Supply-Chain & Pipeline Rules (v1.2.0)
181
- - `pipe/docker-unpinned` — Flags unpinned Docker images (missing tag or `:latest`) in CI jobs or Dockerfiles (`MEDIUM`).
182
- - `sec/curl-pipe-shell` — Flags `curl ... | bash` / `wget ... | sh` remote script execution in run steps (`CRITICAL`).
183
- - `sec/permissions-write-all` — Flags overly broad workflow permissions (`permissions: write-all` or top-level `contents: write`) (`HIGH`).
184
- - `leak/slack-webhook` — Flags hardcoded Slack or tokenized webhook URLs in workflow and source files (`CRITICAL`).
185
- - `pipe/npm-unpinned` — Flags `npm install` steps in CI without `--save-exact` or `npm ci` lockfile enforcement (`MEDIUM`).
186
-
187
- ---
188
-
189
- ## Example Output
190
-
191
- ```text
192
- ================================================================
193
- PLUMBER INSPECTION REPORT: my-service
194
- Health Score: 87.4/100 | Grade: B | Files: 18
195
- Issues Detected: 2
196
- ================================================================
197
-
198
- [FILE] src/config.ts
199
- L14 [CRITICAL] Leaked OpenAI / Model API Key
200
- Found: const key = "sk-live9876543210..."
201
- Fix: Move secret to environment variable (.env).
202
-
203
- [FILE] src/pipeline.ts
204
- L58 [HIGH] Swallowed Exception (Silent Failure)
205
- Found: catch (e) {}
206
- Fix: Log the error or properly re-raise/handle it.
207
-
208
- ================================================================
209
-
210
- [FAILED] Found issues at or above severity: HIGH
211
- ```
212
-
213
- ---
214
-
215
- ## Links
216
-
217
- - **npm Package:** [https://www.npmjs.com/package/plumber-linter](https://www.npmjs.com/package/plumber-linter)
218
- - **Website & Documentation:** [https://plumber-7dv.pages.dev/](https://plumber-7dv.pages.dev/)
219
- - **GitHub Repository:** [https://github.com/parasraju/plumber](https://github.com/parasraju/plumber)
220
-
221
- ---
222
-
223
- ## Changelog
224
-
225
- ## 1.4.1
226
- `plumber scan` skips symlinks, including dangling links such as a `README.md` that points at a missing file, instead of crashing.
227
-
228
- ## 1.4.0
229
- Workflow YAML scanning (plumber scan on .github/workflows/*.yml) — 5 workflow rules (audit-gated, see Step 1).
230
-
231
- ## 1.3.0
232
- SARIF output (`--format sarif`) for GitHub code scanning.
233
-
234
- ## 1.2.0
235
- - `pipe/docker-unpinned`: Flag unpinned Docker images (no tag or `:latest`) in CI jobs and Dockerfiles (`MEDIUM`).
236
- - `sec/curl-pipe-shell`: Flag `curl | bash` and `wget | sh` remote script execution in CI run steps (`CRITICAL`).
237
- - `sec/permissions-write-all`: Flag overly broad workflow write permissions (`permissions: write-all`, `contents: write`) (`HIGH`).
238
- - `leak/slack-webhook`: Flag hardcoded Slack and tokenized webhook URLs in workflows and code (`CRITICAL`).
239
- - `pipe/npm-unpinned`: Flag `npm install` in CI steps without `--save-exact` or `npm ci` lockfile enforcement (`MEDIUM`).
1
+ # Plumber
2
+
3
+ CI/CD pipeline linter that flags hardcoded secrets, leaked credentials, and dead code — with fixes in plain English, plus SARIF output for GitHub code scanning and workflow YAML scanning for GitHub Actions.
4
+
5
+ [![npm version](https://img.shields.io/npm/v/plumber-linter.svg)](https://www.npmjs.com/package/plumber-linter)
6
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/parasraju/plumber/blob/main/LICENSE)
7
+ [![npm downloads](https://img.shields.io/npm/dm/plumber-linter.svg)](https://www.npmjs.com/package/plumber-linter)
8
+ [![Node.js](https://img.shields.io/node/v/plumber-linter.svg)](https://www.npmjs.com/package/plumber-linter)
9
+ [![CI](https://img.shields.io/github/actions/workflow/status/parasraju/plumber/plumber.yml?branch=main)](https://github.com/parasraju/plumber/actions/workflows/plumber.yml)
10
+
11
+ Plumber inspects codebases and git repositories in milliseconds without requiring an LLM. It enforces quality and security gates in CI/CD pipelines and git pre-commit hooks, exiting with non-zero status when critical or high-severity issues are found.
12
+
13
+ ---
14
+
15
+ ## Installation
16
+
17
+ ```bash
18
+ # Local project dependency
19
+ npm install --save-dev plumber-linter
20
+
21
+ # Global installation
22
+ npm install -g plumber-linter
23
+ ```
24
+
25
+ ---
26
+
27
+ ## Quick Start
28
+
29
+ Run instantly with `npx` (no install required):
30
+
31
+ ```bash
32
+ # Scan current repository
33
+ npx plumber-linter scan .
34
+
35
+ # Enforce quality gate in CI (exit 1 on HIGH or CRITICAL issues)
36
+ npx plumber-linter scan . --fail-on high
37
+
38
+ # Export report as Markdown, JSON, or SARIF 2.1.0
39
+ npx plumber-linter scan . --format md
40
+ npx plumber-linter scan . --format json
41
+ npx plumber-linter scan . --format sarif
42
+
43
+ # View all 31 inspection rules
44
+ npx plumber-linter rules
45
+ ```
46
+
47
+ ### In GitHub Actions
48
+
49
+ ```yaml
50
+ - name: Run Plumber Linter
51
+ run: npx plumber-linter scan . --fail-on high
52
+ ```
53
+
54
+ ### In GitLab CI
55
+
56
+ ```yaml
57
+ plumber-lint:
58
+ image: node:18
59
+ script:
60
+ - npx plumber-linter scan . --fail-on high
61
+ ```
62
+
63
+ ### Git Pre-Commit Hook
64
+
65
+ Install a pre-commit hook that blocks commits containing secrets, `.env` files, or dead code:
66
+
67
+ ```bash
68
+ # Install hook (blocks staged secrets and issues >= HIGH)
69
+ npx plumber-linter install-hook --fail-on high
70
+
71
+ # Uninstall hook
72
+ npx plumber-linter uninstall-hook
73
+ ```
74
+
75
+ ### SARIF output for GitHub code scanning
76
+
77
+ `plumber scan . --format sarif` writes SARIF 2.1.0 JSON to stdout. The file contains one run for `plumber-linter` 1.4.2, every inspection rule (id, name, description, and the plain-English fix in `help.text`), and one result per finding. Each result's `message.text` repeats that finding's explanation and fix. Paths are relative to the scanned directory, and the line is included when the engine recorded one.
78
+
79
+ ```bash
80
+ npx plumber-linter scan . --format sarif > results.sarif
81
+ ```
82
+
83
+ Upload `results.sarif` with GitHub's `upload-sarif` action. The action name, the `sarif_file` input, and the `security-events: write` permission below are taken from GitHub's [Uploading a SARIF file to GitHub](https://docs.github.com/en/code-security/how-tos/find-and-fix-code-vulnerabilities/integrate-with-existing-tools/upload-sarif-file) guide. `partialFingerprints` is left unset; that same action calculates it when the repository contains both the SARIF file and the scanned source.
84
+
85
+ ```yaml
86
+ name: Plumber code scanning
87
+ on:
88
+ push:
89
+ jobs:
90
+ plumber:
91
+ runs-on: ubuntu-latest
92
+ permissions:
93
+ security-events: write
94
+ actions: read
95
+ contents: read
96
+ steps:
97
+ - name: Checkout repository
98
+ uses: actions/checkout@v6
99
+ - name: Run Plumber
100
+ run: npx plumber-linter scan . --format sarif > results.sarif
101
+ - name: Upload SARIF file
102
+ uses: github/codeql-action/upload-sarif@v4
103
+ with:
104
+ sarif_file: results.sarif
105
+ ```
106
+
107
+ ### Workflow YAML scanning — scan .github/workflows/*.yml
108
+
109
+ Workflow YAML scanning checks GitHub Actions files under `.github/workflows` with the same `scan` command. Use it to scan GitHub Actions workflows for structural risks. A repository with no workflow files is unchanged: no new findings and no YAML errors.
110
+
111
+ ```bash
112
+ npx plumber-linter scan .
113
+ npx plumber-linter scan .github/workflows/review.yml
114
+ ```
115
+
116
+ - `sec/pull-request-target` — flags a `pull_request_target` workflow that checks out untrusted PR code or grants write permissions (`CRITICAL`).
117
+ - `sec/expression-injection` — flags `${{ github.event.* }}`, `${{ github.head_ref }}`, or another attacker-controlled context interpolated into a `run:` command (`CRITICAL`).
118
+ - `pipe/action-unpinned` — flags a `uses:` step that references a third-party action by branch or version tag instead of a full commit SHA (`MEDIUM`).
119
+ - `sec/job-permissions` — flags a job that pushes, releases, or deploys with no `permissions:` block, or with `contents: write` where a narrower scope would do (`HIGH`).
120
+ - `sec/secret-to-untrusted` — flags a secret in `env:` or an argument of a step that runs a third-party action (`HIGH`).
121
+
122
+ `.github/workflows/review.yml`:
123
+
124
+ ```yaml
125
+ name: review
126
+ on:
127
+ pull_request_target:
128
+ jobs:
129
+ build:
130
+ runs-on: ubuntu-latest
131
+ steps:
132
+ - uses: actions/checkout@v4
133
+ with:
134
+ ref: ${{ github.event.pull_request.head.sha }}
135
+ ```
136
+
137
+ ```text
138
+ [FILE] .github/workflows/review.yml
139
+ L10 [CRITICAL] Untrusted pull_request_target Checkout or Write Permission
140
+ Found: ref: ${{ github.event.pull_request.head.sha }}
141
+ Fix: Use pull_request, or check out the base ref read-only with no secrets.
142
+ ```
143
+
144
+ ---
145
+
146
+ ## Before / after — what plumber catches
147
+
148
+ Use this github actions workflow security example as the ci cd pipeline linter before after for one deploy job. The job commits an API key, sets permissions to write-all, and tags a third-party action.
149
+
150
+ The file in this repo is `packages/cli/examples/.github/workflows/deploy-before.yml`.
151
+
152
+ ```yaml
153
+ name: deploy
154
+ on: push
155
+ permissions: write-all
156
+ jobs:
157
+ publish:
158
+ runs-on: ubuntu-latest
159
+ steps:
160
+ - uses: example/action@v1
161
+ env:
162
+ OPENAI_API_KEY: sk-live1234567890abcdef1234567890
163
+ ```
164
+
165
+ ```bash
166
+ node packages/cli/bin/plumber.js scan packages/cli/examples/.github/workflows/deploy-before.yml
167
+ ```
168
+
169
+ ```text
170
+ [FILE] deploy-before.yml
171
+ L10 [CRITICAL] Leaked OpenAI / Model API Key
172
+ Found: OPENAI_API_KEY: sk-live1234567890abcdef1234567890
173
+ Fix: Extract secret to .env file immediately.
174
+ L3 [HIGH] Overly Broad Workflow Write Permissions
175
+ Found: permissions: write-all
176
+ Fix: Use least-privilege permissions (e.g., permissions: { contents: read }).
177
+ L8 [MEDIUM] Unpinned Third-Party Action
178
+ Found: - uses: example/action@v1
179
+ Fix: Pin the action to a full commit SHA.
180
+ ```
181
+
182
+ The fixed workflow pins that action to a 40-character SHA, moves the key to `${{ secrets.OPENAI_API_KEY }}`, and sets permissions to `contents: read`.
183
+
184
+ ```yaml
185
+ name: deploy
186
+ on: push
187
+ permissions:
188
+ contents: read
189
+ jobs:
190
+ publish:
191
+ runs-on: ubuntu-latest
192
+ steps:
193
+ - uses: example/action@0123456789abcdef0123456789abcdef01234567
194
+ - name: publish
195
+ env:
196
+ OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
197
+ run: echo "$OPENAI_API_KEY"
198
+ ```
199
+
200
+ A second scan of the fixed workflow exits 0 and reports no findings.
201
+
202
+ ---
203
+
204
+ ## What It Checks
205
+
206
+ ### 1. Leaked Secrets & API Keys (`leak/api-key`, `leak/hardcoded-secret`)
207
+ Detects exposed OpenAI (`sk-...`), GitHub (`ghp_...`), AWS (`AKIA...`), Slack tokens, and database credentials.
208
+ - **Vulnerable:** `const client = new OpenAI({ apiKey: "sk-live1234567890abcdef1234567890" });`
209
+ - **Fixed:** `const client = new OpenAI({ apiKey: process.env.OPENAI_API_KEY });`
210
+
211
+ ### 2. Committed Environment Files (`leak/committed-env`)
212
+ Prevents committing `.env` files containing live secrets to version control.
213
+ - **Vulnerable:** `.env` committed with production credentials.
214
+ - **Fixed:** Add `.env` to `.gitignore` and commit `.env.example` with blank placeholders.
215
+
216
+ ### 3. Swallowed Exceptions (`clog/swallowed-error`)
217
+ Flags silent failure blocks that swallow exceptions and hide failures in CI/CD pipelines.
218
+ - **Vulnerable:** `try { doWork(); } catch (err) {}`
219
+ - **Fixed:** `try { doWork(); } catch (err) { logger.error(err); throw err; }`
220
+
221
+ ### 4. Unreachable Dead Code (`clog/dead-code`)
222
+ Detects unreachable statements following returns or inside constant-false branches.
223
+ - **Vulnerable:** `return result; console.log("Done");`
224
+ - **Fixed:** Delete unreachable statement (or run `npx plumber-linter clean . --write`).
225
+
226
+ ### 5. AI-Elided Code Snippets (`clog/elided-code`)
227
+ Flags lazy AI elision comments like `// ... existing code ...` left behind in source files.
228
+ - **Vulnerable:** `// ... existing code ...`
229
+ - **Fixed:** Restore the full function or component implementation.
230
+
231
+ ### 6. Non-Semantic / Inaccessible Elements (`joint/clickable-div`)
232
+ Identifies non-semantic clickable elements lacking accessible keyboard and screen-reader controls.
233
+ - **Vulnerable:** `<div onClick={handleClick}>Submit</div>`
234
+ - **Fixed:** `<button type="button" onClick={handleClick}>Submit</button>`
235
+
236
+ ### 7. Hallucinated / Undeclared Dependencies (`pipe/phantom-import`)
237
+ Spots hallucinated library imports invented by LLMs or packages missing from project manifests.
238
+ - **Vulnerable:** `import { useFeature } from "next-auth-v5-helpers";`
239
+ - **Fixed:** Use standard verified libraries and declare dependencies in manifests.
240
+
241
+ ### 8. CI/CD Supply-Chain & Pipeline Rules (v1.2.0)
242
+ - `pipe/docker-unpinned` — Flags unpinned Docker images (missing tag or `:latest`) in CI jobs or Dockerfiles (`MEDIUM`).
243
+ - `sec/curl-pipe-shell` — Flags `curl ... | bash` / `wget ... | sh` remote script execution in run steps (`CRITICAL`).
244
+ - `sec/permissions-write-all` — Flags overly broad workflow permissions (`permissions: write-all` or top-level `contents: write`) (`HIGH`).
245
+ - `leak/slack-webhook` — Flags hardcoded Slack or tokenized webhook URLs in workflow and source files (`CRITICAL`).
246
+ - `pipe/npm-unpinned` — Flags `npm install` steps in CI without `--save-exact` or `npm ci` lockfile enforcement (`MEDIUM`).
247
+
248
+ ---
249
+
250
+ ## Example Output
251
+
252
+ ```text
253
+ ================================================================
254
+ PLUMBER INSPECTION REPORT: my-service
255
+ Health Score: 87.4/100 | Grade: B | Files: 18
256
+ Issues Detected: 2
257
+ ================================================================
258
+
259
+ [FILE] src/config.ts
260
+ L14 [CRITICAL] Leaked OpenAI / Model API Key
261
+ Found: const key = "sk-live9876543210..."
262
+ Fix: Move secret to environment variable (.env).
263
+
264
+ [FILE] src/pipeline.ts
265
+ L58 [HIGH] Swallowed Exception (Silent Failure)
266
+ Found: catch (e) {}
267
+ Fix: Log the error or properly re-raise/handle it.
268
+
269
+ ================================================================
270
+
271
+ [FAILED] Found issues at or above severity: HIGH
272
+ ```
273
+
274
+ ---
275
+
276
+ ## Links
277
+
278
+ - **npm Package:** [https://www.npmjs.com/package/plumber-linter](https://www.npmjs.com/package/plumber-linter)
279
+ - **Website & Documentation:** [https://plumber-7dv.pages.dev/](https://plumber-7dv.pages.dev/)
280
+ - **GitHub Repository:** [https://github.com/parasraju/plumber](https://github.com/parasraju/plumber)
281
+
282
+ ---
283
+
284
+ ## Changelog
285
+
286
+ ## 1.4.2
287
+ README adds a before/after GitHub Actions workflow scan and badges for monthly npm downloads, the Node.js engine, and the CI workflow on main.
288
+
289
+ ## 1.4.1
290
+ `plumber scan` skips symlinks, including dangling links such as a `README.md` that points at a missing file, instead of crashing.
291
+
292
+ ## 1.4.0
293
+ Workflow YAML scanning (plumber scan on .github/workflows/*.yml) — 5 workflow rules (audit-gated, see Step 1).
294
+
295
+ ## 1.3.0
296
+ SARIF output (`--format sarif`) for GitHub code scanning.
297
+
298
+ ## 1.2.0
299
+ - `pipe/docker-unpinned`: Flag unpinned Docker images (no tag or `:latest`) in CI jobs and Dockerfiles (`MEDIUM`).
300
+ - `sec/curl-pipe-shell`: Flag `curl | bash` and `wget | sh` remote script execution in CI run steps (`CRITICAL`).
301
+ - `sec/permissions-write-all`: Flag overly broad workflow write permissions (`permissions: write-all`, `contents: write`) (`HIGH`).
302
+ - `leak/slack-webhook`: Flag hardcoded Slack and tokenized webhook URLs in workflows and code (`CRITICAL`).
303
+ - `pipe/npm-unpinned`: Flag `npm install` in CI steps without `--save-exact` or `npm ci` lockfile enforcement (`MEDIUM`).