ouchbill 0.1.0 → 0.2.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/LICENSE +28 -8
- package/README.md +225 -253
- package/dist/THIRD_PARTY_NOTICES.txt +1 -1
- package/dist/ouchbill-online.mjs +4 -4
- package/dist/ouchbill.mjs +120 -120
- package/package.json +8 -3
package/LICENSE
CHANGED
|
@@ -1,14 +1,34 @@
|
|
|
1
1
|
Copyright (c) 2026 Drevan. All rights reserved.
|
|
2
2
|
|
|
3
|
+
OuchBill free-use licence, version 1 (2026-12-06)
|
|
4
|
+
|
|
3
5
|
This software, including its source code, its built bundles (dist/) and its data tables,
|
|
4
|
-
is proprietary to Drevan and is not open source.
|
|
6
|
+
is proprietary to Drevan and is not open source. Drevan gives you the rights below. Everything
|
|
7
|
+
not given here is reserved.
|
|
8
|
+
|
|
9
|
+
1. What you may do, free of charge:
|
|
10
|
+
- install and run this software, on any number of machines, for any purpose, including
|
|
11
|
+
commercial work, client work and continuous integration (CI) systems;
|
|
12
|
+
- use, share and publish the output it produces (reports, findings, badges), including
|
|
13
|
+
inside your own products and documents.
|
|
14
|
+
|
|
15
|
+
2. What you may not do without Drevan's written agreement:
|
|
16
|
+
- copy, modify, merge, translate or make works derived from the software;
|
|
17
|
+
- publish, redistribute, sublicense, sell or rent the software, in whole or in part, except
|
|
18
|
+
by pointing people to the official package;
|
|
19
|
+
- reverse engineer, decompile or de-minify it, or try to recover its source code, except
|
|
20
|
+
where the law allows this and cannot be limited by contract;
|
|
21
|
+
- extract its data tables to build or feed another product or service;
|
|
22
|
+
- remove or change this licence or the copyright notices.
|
|
5
23
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
writing. Running a copy that Drevan provided to you is permitted only on the terms under
|
|
9
|
-
which Drevan provided it.
|
|
24
|
+
3. Drevan may stop offering the software or change these terms for later versions. A version
|
|
25
|
+
you already received stays under the terms it came with.
|
|
10
26
|
|
|
11
|
-
Third-party components that are bundled into dist/ keep their own licences. Their notices
|
|
12
|
-
are in dist/THIRD_PARTY_NOTICES.txt.
|
|
27
|
+
4. Third-party components that are bundled into dist/ keep their own licences. Their notices
|
|
28
|
+
are in dist/THIRD_PARTY_NOTICES.txt.
|
|
13
29
|
|
|
14
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
30
|
+
5. No warranty. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
31
|
+
IMPLIED, INCLUDING FITNESS FOR A PARTICULAR PURPOSE. To the extent the law allows, Drevan
|
|
32
|
+
is not liable for any damages arising from its use, including costs from API keys,
|
|
33
|
+
provider bills or missed deadlines the software did or did not report. Checking your
|
|
34
|
+
providers' own dashboards remains your responsibility.
|
package/README.md
CHANGED
|
@@ -1,253 +1,225 @@
|
|
|
1
|
-
# ouchbill
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
##
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
|
134
|
-
|
|
135
|
-
| `
|
|
136
|
-
| `
|
|
137
|
-
| `
|
|
138
|
-
| `
|
|
139
|
-
|
|
|
140
|
-
|
|
|
141
|
-
|
|
|
142
|
-
|
|
|
143
|
-
|
|
|
144
|
-
|
|
|
145
|
-
| `
|
|
146
|
-
|
|
|
147
|
-
|
|
|
148
|
-
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
##
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
```
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
on:
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
`"
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
A
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
|
203
|
-
|
|
204
|
-
|
|
|
205
|
-
|
|
|
206
|
-
|
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
patterns are not copied into this package. They are imported from the OuchBill web app's sources
|
|
227
|
-
(`apps/web/src/data/providers.ts`, `apps/web/src/lib/patterns.ts`) and bundled into
|
|
228
|
-
`dist/ouchbill.mjs` at build time, so the CLI, the website and the site scanner never disagree. A
|
|
229
|
-
test fails when the committed bundle no longer matches those sources.
|
|
230
|
-
|
|
231
|
-
## Develop
|
|
232
|
-
|
|
233
|
-
```
|
|
234
|
-
cd packages/cli
|
|
235
|
-
npm ci
|
|
236
|
-
npm test # typecheck + vitest
|
|
237
|
-
npm run build # rebuild dist/ouchbill.mjs after changing src or the shared catalog
|
|
238
|
-
```
|
|
239
|
-
|
|
240
|
-
Test fixtures contain no keys. Tests plant obviously fake keys (`…OUCHBILLFAKE…`) in temp folders
|
|
241
|
-
at runtime.
|
|
242
|
-
|
|
243
|
-
## Licence
|
|
244
|
-
|
|
245
|
-
Proprietary. Copyright (c) 2026 Drevan. All rights reserved. See [LICENSE](LICENSE). Bundled third-party
|
|
246
|
-
components keep their own licences: `dist/THIRD_PARTY_NOTICES.txt`.
|
|
247
|
-
|
|
248
|
-
## `usage` and `detect` (local, offline)
|
|
249
|
-
|
|
250
|
-
- `ouchbill usage` reads Claude Code (`~/.claude/projects/**/*.jsonl`, or `CLAUDE_CONFIG_DIR`), Codex CLI (`~/.codex/sessions`, or `CODEX_HOME`) and Gemini CLI (`~/.gemini/tmp/*/chats`) logs on this machine and prints tokens per model for today, this week (from Monday) and this month. Any money shown is an **estimate at list price** from a bundled table with a source URL and checked date (`src/pricing.ts`), in integer micro-dollars. A model not in the table has an unknown cost, never zero. It is not your bill.
|
|
251
|
-
- `ouchbill detect` reports which logins already exist: AWS CLI profile names, whether gcloud has an active account, whether a Vercel login file exists, and the Claude, Codex and Gemini CLIs. It never opens credentials or token files and prints no secret or account value.
|
|
252
|
-
|
|
253
|
-
Neither command makes a network call, and neither accepts `--fresh` or `--online`.
|
|
1
|
+
# ouchbill
|
|
2
|
+
|
|
3
|
+
**What in your project will break or bill you next.** One command finds AI models your provider is retiring,
|
|
4
|
+
runtimes reaching end of life, API keys committed to the repo, and paid services with no spending cap. A second
|
|
5
|
+
command tells you which API keys in your `.env` still work and how much each has left.
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npx ouchbill check . # what breaks, what leaks, what can bill you, most urgent first
|
|
9
|
+
npx ouchbill keys . # which API keys in .env work, and how much credit each has left
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
Node 20+. No install, no sign-up, no account, no telemetry. Zero runtime dependencies.
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## What you see
|
|
17
|
+
|
|
18
|
+
```
|
|
19
|
+
OUCHBILL 0.2.0 · my-app · 5934 files read
|
|
20
|
+
AI model dates checked 6 Dec (today)
|
|
21
|
+
|
|
22
|
+
6 NOW 10 PLAN 1 LATER
|
|
23
|
+
2 things already failing; 10 key-shaped values to rotate.
|
|
24
|
+
Since your last run (2 days ago): ✔ 2 fixed
|
|
25
|
+
|
|
26
|
+
BREAKING already failing or within 30 days
|
|
27
|
+
✖ NOW claude-sonnet-4-20250514 stopped working 174 days ago 15 Jun
|
|
28
|
+
llm/claude_provider.py:22
|
|
29
|
+
→ Switch to claude-sonnet-5-5
|
|
30
|
+
|
|
31
|
+
LEAKED KEYS AND SECURITY 4 issues
|
|
32
|
+
✖ NOW 2 OpenAI key-shaped values in the repo
|
|
33
|
+
.env.example:23, .env.example:57
|
|
34
|
+
→ Rotate this key at the provider now, then load it from an environment variable
|
|
35
|
+
|
|
36
|
+
SPEND 3 pay-per-use services in this project
|
|
37
|
+
OpenAI API ▲ no cap set · hard cap available
|
|
38
|
+
...
|
|
39
|
+
|
|
40
|
+
Start here: Switch to claude-sonnet-5-5
|
|
41
|
+
Next date to watch: gpt-4o-mini-2024-07-18 on 14 Jan 2027. Run ouchbill again before then.
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
In a terminal it is in colour. In CI, pipes and AI agents it prints plain text, or JSON with `--json`.
|
|
45
|
+
|
|
46
|
+
## What it checks
|
|
47
|
+
|
|
48
|
+
| | What | Example |
|
|
49
|
+
|---|---|---|
|
|
50
|
+
| **Breaks** | AI model ids in your code that the provider retires, with date, days left and the replacement | `gpt-4o-mini-2024-07-18` stops working 14 Jan |
|
|
51
|
+
| **Breaks** | Runtimes, frameworks, databases and GitHub Actions versions reaching end of life | Node.js 18, Python 3.9, `actions/checkout@v3` |
|
|
52
|
+
| **Leaks** | API keys in the repo or the build output (shown masked, never tested) | `sk-proj-…a1B2` in `src/config.ts:4` |
|
|
53
|
+
| **Leaks** | AI-stack mistakes: LLM keys exposed to the browser, risky agent and MCP configs, unsafe GitHub Actions, prompt-injection sinks | `NEXT_PUBLIC_OPENAI_API_KEY` |
|
|
54
|
+
| **Bills** | Pay-per-use services the project uses, and whether each provider offers a hard spending cap | OpenAI: hard cap available, none declared |
|
|
55
|
+
| **Balance** | `ouchbill keys`: whether each key in `.env` works and how much credit or quota it has left | OpenRouter: $1.50 left of $10 |
|
|
56
|
+
|
|
57
|
+
## Commands
|
|
58
|
+
|
|
59
|
+
| Command | What it does | Network |
|
|
60
|
+
|---|---|---|
|
|
61
|
+
| `ouchbill check [dir]` | The full check, most urgent first | Reads the latest provider dates (below). `--offline` for none |
|
|
62
|
+
| `ouchbill keys [dir]` | Checks the keys in your `.env` files, after asking you | Each key to its own provider only |
|
|
63
|
+
| `ouchbill usage` | Your AI coding tokens today, this week, this month (Claude Code, Codex, Gemini CLI) | None |
|
|
64
|
+
| `ouchbill detect` | Which cloud and AI logins exist on this machine; never reads a secret | None |
|
|
65
|
+
| `ouchbill scan [path]` | Only the key scan, e.g. on build output | None |
|
|
66
|
+
| `ouchbill statusline` | Claude Code status line: your 5-hour and 7-day limits and when they reset | None |
|
|
67
|
+
|
|
68
|
+
## Safety: what it sends, and to whom
|
|
69
|
+
|
|
70
|
+
ouchbill was built for people who don't want their keys or code to leave their machine. Every point below is
|
|
71
|
+
enforced by an automated test, not only written down.
|
|
72
|
+
|
|
73
|
+
**`check`, `scan`, `usage`, `detect`, `statusline`**
|
|
74
|
+
- Never upload your code, file names, paths or findings anywhere.
|
|
75
|
+
- `check` downloads one signed file of provider dates from the public npm registry (package `ouchbill-data`).
|
|
76
|
+
The request carries nothing about your project (npm sees your IP address, as with any download). The file is verified with an Ed25519 signature built
|
|
77
|
+
into ouchbill; a file that fails the check, has expired, or is older than the dates already bundled is refused,
|
|
78
|
+
and the bundled dates are used. A failed download never changes the result or the exit code.
|
|
79
|
+
- `--offline` or `OUCHBILL_OFFLINE=1` makes no network request at all. A test proves the network code is never
|
|
80
|
+
even loaded in that case.
|
|
81
|
+
- `check` reads env var **names** only. It never opens `.env` files.
|
|
82
|
+
|
|
83
|
+
**`keys`** (the only command that reads `.env` values)
|
|
84
|
+
- Lists every key it found, **masked**, and **asks before sending anything**. Without a terminal it needs `--yes`.
|
|
85
|
+
- Each key goes **only to its own provider**, over https, to a fixed address built into ouchbill:
|
|
86
|
+
`api.openai.com`, `api.anthropic.com`, `openrouter.ai`, `api.deepseek.com`, `api.elevenlabs.io`,
|
|
87
|
+
`api.groq.com`, `api.mistral.ai`, `generativelanguage.googleapis.com`, `api.deepgram.com`, `api.x.ai`,
|
|
88
|
+
`api.together.xyz`, `api.twilio.com`. Any other address is refused before the request is made.
|
|
89
|
+
- Redirects are refused. Only free, read-only calls: list models, or read the key's own limit or balance.
|
|
90
|
+
Nothing that generates text, spends credit or changes your account. Admin keys are not used.
|
|
91
|
+
- A key whose provider is unclear (for example a bare `sk-…` under `API_KEY`) is **never sent**.
|
|
92
|
+
- Never sends a key to OuchBill, never stores it, never writes it to disk, never prints it. Output shows the
|
|
93
|
+
masked form only, and from the provider's reply only numbers, currency codes, dates and fixed words.
|
|
94
|
+
- Refuses to run if TLS certificate checks are switched off (`NODE_TLS_REJECT_UNAUTHORIZED=0`).
|
|
95
|
+
- Skips `.env` files that are links, so a repo cannot point it at files outside the project.
|
|
96
|
+
- Not available through the MCP server, so an AI assistant cannot send your keys anywhere through it.
|
|
97
|
+
|
|
98
|
+
**Always**
|
|
99
|
+
- No telemetry, no analytics, no account.
|
|
100
|
+
- Zero runtime dependencies: the package is two self-contained files, so there is no dependency tree to poison.
|
|
101
|
+
|
|
102
|
+
## For AI coding agents
|
|
103
|
+
|
|
104
|
+
ouchbill is safe for an agent to run on a user's project without asking:
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
npx ouchbill@0.2.0 check . --json # structured result, schemaVersion 1
|
|
108
|
+
npx ouchbill@0.2.0 check . --json --offline # same, with no network request at all
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
- It only reads files. It never runs code from the repo and never changes a file (unless you pass `--report` or
|
|
112
|
+
`--sarif`, which write only the file you name, inside the project or the current folder).
|
|
113
|
+
- Text from the repo (paths, names) is quoted and marked as data in the output, so a planted file cannot pass
|
|
114
|
+
instructions to you through ouchbill.
|
|
115
|
+
- `--json` gives `ranked`: one entry per problem, with `severity`, `title`, `where` (file and line), `why`,
|
|
116
|
+
numbered `fix` steps, `replacement` and `source`.
|
|
117
|
+
- Exit codes: `0` nothing failing, `1` a key in the repo or a `--fail-on-*` threshold met, `2` bad input.
|
|
118
|
+
|
|
119
|
+
**Do not run `ouchbill keys` for the user without asking them first, and never with `--yes` on their behalf.**
|
|
120
|
+
It sends the user's keys to their providers. Suggest the command and let the user run it.
|
|
121
|
+
|
|
122
|
+
## In CI
|
|
123
|
+
|
|
124
|
+
```yaml
|
|
125
|
+
- run: npx ouchbill@0.2.0 check . --fail-on-retiring=30 --fail-on-eol=30 --sarif ouchbill.sarif
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
Fails the build when a model in the code retires within 30 days, a runtime reaches end of life, or a key is
|
|
129
|
+
committed. Upload the SARIF file to GitHub code scanning to see findings inline on pull requests.
|
|
130
|
+
|
|
131
|
+
## Options
|
|
132
|
+
|
|
133
|
+
| Option | |
|
|
134
|
+
|---|---|
|
|
135
|
+
| `--json` | Machine-readable output (`schemaVersion: 1`) |
|
|
136
|
+
| `--offline` | `check`: no network request; use the bundled dates (also `OUCHBILL_OFFLINE=1`) |
|
|
137
|
+
| `--plain` | No colour, even in a terminal. Colour also follows `NO_COLOR` and `FORCE_COLOR` |
|
|
138
|
+
| `--yes` | `keys`: check without the prompt (scripts only) |
|
|
139
|
+
| `--report <file.html>` | A self-contained HTML report with fix steps for every item. No scripts, works offline |
|
|
140
|
+
| `--sarif <file.sarif>` | SARIF 2.1.0 for GitHub code scanning |
|
|
141
|
+
| `--fail-on-retiring[=N]` | Exit 1 when a model in the code stops working within N days (default 30) |
|
|
142
|
+
| `--fail-on-eol[=N]` | Exit 1 when a pinned runtime, action, framework or database ends within N days (default 30) |
|
|
143
|
+
| `--fail-on-severity=L` | Exit 1 on a security finding at `critical` or `high` or above |
|
|
144
|
+
| `--fail-on-uncapped` | Exit 1 when a pay-per-use service has no cap declared in `.ouchbill.json` |
|
|
145
|
+
| `--online` | Also check TLS certificate and domain expiry for up to 10 production hosts in the repo. Prints every host before connecting |
|
|
146
|
+
| `--fail-on-expiry[=N]` | With `--online`: exit 1 when a certificate or domain expires within N days |
|
|
147
|
+
| `--scan <path>` / `--exclude <path>` | Add or skip a path. Excluded paths are still scanned for keys |
|
|
148
|
+
| `--badge-breaks` | A "breaks in 90 days: N" badge for your README (counts only) |
|
|
149
|
+
|
|
150
|
+
## Which providers `keys` can read
|
|
151
|
+
|
|
152
|
+
| Provider | What you see |
|
|
153
|
+
|---|---|
|
|
154
|
+
| OpenRouter | Credit left of the key's limit, and usage |
|
|
155
|
+
| DeepSeek | Account balance |
|
|
156
|
+
| ElevenLabs | Characters left this period, and the reset date |
|
|
157
|
+
| Twilio | Account balance (needs `TWILIO_ACCOUNT_SID` next to the token) |
|
|
158
|
+
| Deepgram | Credit left (only with an owner or admin key; otherwise "works") |
|
|
159
|
+
| OpenAI, Anthropic, Groq, Mistral, Gemini, Together, xAI | Whether the key works, and a link to the billing page. These providers don't let an ordinary key read the balance |
|
|
160
|
+
|
|
161
|
+
---
|
|
162
|
+
|
|
163
|
+
## Details
|
|
164
|
+
|
|
165
|
+
### Declaring your caps: `.ouchbill.json`
|
|
166
|
+
|
|
167
|
+
ouchbill cannot see your provider dashboards, so "cap available" never means "cap on". Say what you set:
|
|
168
|
+
|
|
169
|
+
```json
|
|
170
|
+
{
|
|
171
|
+
"caps": {
|
|
172
|
+
"openai": { "status": "on", "checkedOn": "2026-11-15", "note": "org limit + project limits" },
|
|
173
|
+
"azure": { "status": "accepted", "reason": "PAYG has no hard cap; budget alerts at 50/80/100%" }
|
|
174
|
+
},
|
|
175
|
+
"exclude": ["test/fixtures"]
|
|
176
|
+
}
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
- `"on"` needs `checkedOn`: the date someone looked at the provider's setting.
|
|
180
|
+
- `"accepted"` needs a `reason`: you know there is no hard cap and chose to run without one.
|
|
181
|
+
- `"on"` counts only where the catalog confirms the provider has a stop (`yes` or `partial`).
|
|
182
|
+
Where the catalog says **no** hard cap, or the cap is **unknown**, `"on"` is reported as
|
|
183
|
+
"declared, not counted" and still fails `--fail-on-uncapped`. Budgets that only send alerts are
|
|
184
|
+
not caps. If you accept running without a confirmed cap, say so with `"accepted"` and a reason.
|
|
185
|
+
- Provider ids come from `ouchbill providers`. An unknown id is an error, so a typo can't pass CI.
|
|
186
|
+
- A config file that contains anything key-shaped is refused (exit 2).
|
|
187
|
+
|
|
188
|
+
### AI-stack security rules
|
|
189
|
+
|
|
190
|
+
| Id | Severity | What |
|
|
191
|
+
|---|---|---|
|
|
192
|
+
| `secret:<provider>` | critical | A key-shaped value in the repo or build output (now also Perplexity, Fireworks, Hugging Face org tokens, OuchBill data feed keys (`obt_`), and Mistral, Cohere, Together, DeepSeek, ElevenLabs keys written next to their env var name). Masked, never tested. Also read: committed env files (keys only), text with NUL bytes and UTF-16 without a byte-order mark. |
|
|
193
|
+
| `exposed:public-env-llm-key` | critical | An LLM key name with a browser-public prefix: `NEXT_PUBLIC_`, `VITE_`, `EXPO_PUBLIC_`, `REACT_APP_`. |
|
|
194
|
+
| `exposed:llm-sdk-in-client` | critical | An LLM SDK imported in browser code (`"use client"` files, `*.client.*`, Vue/Svelte components, `public/`, browser bundles), or `dangerouslyAllowBrowser: true`. |
|
|
195
|
+
| `exposed:key-in-client-code` | critical | A key-shaped value in browser code or a browser bundle (also reported as `secret:`). |
|
|
196
|
+
| `agent:pipe-to-shell` | critical | A hook, status line or MCP start command that pipes `curl`/`wget` into a shell or interpreter, by program name (`sh`, `/bin/sh`, `env bash`, `sudo bash`, `python`, `node` …), or gives one `$(curl …)`. |
|
|
197
|
+
| `actions:pr-target-checkout` | critical | `pull_request_target` with a checkout of the pull request head. |
|
|
198
|
+
| `agent:mcp-plaintext-secret` | high | A literal secret in an MCP server's `env` or `headers`. |
|
|
199
|
+
| `agent:bypass-permissions` | high | `bypassPermissions`, `--dangerously-skip-permissions` or a `dangerously…: true` key. |
|
|
200
|
+
| `agent:wildcard-allow` | high | An allow rule of `Bash`, `Bash(*)`, `Bash(:*)` or `*`, or one that allows a shell, an interpreter with inline code or a wrapper with any arguments (`Bash(sh:*)`, `Bash(bash -c:*)`, `Bash(node:*)`, `Bash(env:*)`). |
|
|
201
|
+
| `agent:auto-approve-mcp` | high | `enableAllProjectMcpServers: true`: every server in the project's `.mcp.json` starts without a prompt. |
|
|
202
|
+
| `agent:mcp-plain-http` | high | A remote MCP server on `http://` (loopback is fine). |
|
|
203
|
+
| `actions:template-injection` | high | `${{ github.event.* }}` or `github.head_ref` inside `run:` (numbers, SHAs and maintainer-set fields excepted), in block or flow style, quoted keys and multi-line values. |
|
|
204
|
+
| `actions:write-all` | high | `permissions: write-all`. |
|
|
205
|
+
| `agent:mcp-unpinned-package` | medium | An MCP server started with `npx`/`bunx`/`pnpm dlx`/`uvx` and no exact version, or `@latest`. |
|
|
206
|
+
| `actions:unpinned-third-party` | medium | A third-party action (or `docker://` image) not pinned to a full SHA (digest). |
|
|
207
|
+
| `actions:no-permissions` | medium | A workflow with no `permissions:` block (reusable `workflow_call`-only workflows excepted). |
|
|
208
|
+
| `injection:input-in-prompt` | medium, to check | Request input joined into a prompt string in a file that calls an LLM. |
|
|
209
|
+
| `injection:output-to-sink` | medium, to check | Model output on the same line as `eval`, a shell call, raw SQL or raw HTML. |
|
|
210
|
+
| `actions:unpinned-first-party` | low | `actions/*` or `github/*` not pinned to a full SHA. |
|
|
211
|
+
| `actions:persist-credentials` | low | `actions/checkout` without `persist-credentials: false`. |
|
|
212
|
+
|
|
213
|
+
"To check" findings are heuristics and are never critical. Every rule reads text in linear time.
|
|
214
|
+
|
|
215
|
+
### Where the dates come from
|
|
216
|
+
|
|
217
|
+
Each model retirement and end-of-life date is copied from the provider's own page (OpenAI, Anthropic and Google
|
|
218
|
+
deprecation pages, endoflife.date and others). Every finding carries its source link and the date it was checked.
|
|
219
|
+
"Unknown" is never shown as "fine", and ouchbill never says your bill is safe.
|
|
220
|
+
|
|
221
|
+
## Licence
|
|
222
|
+
|
|
223
|
+
Free to use, including for commercial work and in CI. Not open source: copying, modifying, redistributing or
|
|
224
|
+
reverse engineering it is not allowed. Copyright (c) 2026 Drevan. See [LICENSE](LICENSE). Bundled third-party
|
|
225
|
+
components keep their own licences: `dist/THIRD_PARTY_NOTICES.txt`.
|