vibeqm-check 0.4.8 → 0.4.10
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/dist/src/checks/basics.js +3 -1
- package/dist/src/checks/level3.js +17 -1
- package/dist/src/fixes.js +21 -1
- package/dist/src/types.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -145,7 +145,7 @@ that caused it. The report appears on the run's summary page.
|
|
|
145
145
|
```yaml
|
|
146
146
|
- uses: actions/checkout@v4
|
|
147
147
|
with: { fetch-depth: 0 } # the checks sample history
|
|
148
|
-
- uses: vibeqm/vibeqm-check@v0.4.
|
|
148
|
+
- uses: vibeqm/vibeqm-check@v0.4.10
|
|
149
149
|
with: { min-level: 2 } # optional: fail the run below this level
|
|
150
150
|
```
|
|
151
151
|
|
|
@@ -444,7 +444,9 @@ export function devApartFromProd(root) {
|
|
|
444
444
|
return r(2, gate, shownEnvs.length && confirm.length ? "met" : "not-met", ev);
|
|
445
445
|
}
|
|
446
446
|
// The dashes are counted ({5}) so this file does not hold a key header and flag itself.
|
|
447
|
-
|
|
447
|
+
// A key prefix must start a token: "risk-what-government-contractors-need-to-know" in a URL
|
|
448
|
+
// is not an sk- key. The key shapes themselves stay as broad as before.
|
|
449
|
+
const SECRET = /-{5}BEGIN (RSA |EC |OPENSSH |)PRIVATE KEY-{5}|(?<![A-Za-z0-9_-])(?:AKIA[0-9A-Z]{16}|ghp_[A-Za-z0-9]{36}|sk-[A-Za-z0-9_-]{32,}|xox[baprs]-[A-Za-z0-9-]{10,})/;
|
|
448
450
|
const LOCKS = {
|
|
449
451
|
"package.json": ["package-lock.json", "yarn.lock", "pnpm-lock.yaml", "bun.lockb", "bun.lock"],
|
|
450
452
|
"pyproject.toml": ["poetry.lock", "uv.lock", "pdm.lock", "requirements.txt"],
|
|
@@ -177,6 +177,20 @@ export function dataBoundary(root) {
|
|
|
177
177
|
return r3(gate, "met", `${relative(root, hit)} mentions the data boundary (check it lists what may go to which AI company)`);
|
|
178
178
|
return r3(gate, existsSync(vibeqm(root)) ? "not-met" : "not-visible", "no written data boundary: which code and data may go to which AI company");
|
|
179
179
|
}
|
|
180
|
+
export function aiBudget(root) {
|
|
181
|
+
const gate = "AI budget";
|
|
182
|
+
const re = /\b(AI|model|token|API|LLM)\b[^\n]{0,80}\bbudget\b|\bbudget\b[^\n]{0,80}\b(AI|model|token|API|LLM)\b/i;
|
|
183
|
+
const named = mdFiles(vibeqm(root)).filter((p) => re.test(readFileSync(p, "utf8")));
|
|
184
|
+
// A heading is not a budget: the file must state a limit and who is told when it is reached.
|
|
185
|
+
const limit = /\d[^\n]{0,40}\b(a month|per month|monthly|per task|a task|per day|a day)\b|\b(monthly|per-task|daily)\b[^\n]{0,40}\d/i;
|
|
186
|
+
const told = /\b(told|notif\w*|alert\w*|email\w*|warn\w*)\b/i;
|
|
187
|
+
const hit = named.find((p) => limit.test(readFileSync(p, "utf8")) && told.test(readFileSync(p, "utf8")));
|
|
188
|
+
if (hit)
|
|
189
|
+
return r3(gate, "met", `${relative(root, hit)} states an AI budget with its limit and who is told (check where the limit is enforced)`);
|
|
190
|
+
if (named.length)
|
|
191
|
+
return r3(gate, "not-met", `${relative(root, named[0])} mentions an AI budget but not both the limit (an amount a month or a task) and who is told when it is reached`);
|
|
192
|
+
return r3(gate, existsSync(vibeqm(root)) ? "not-met" : "not-visible", "no AI budget: a monthly or per-task limit, where it is enforced, and who is told when it is reached");
|
|
193
|
+
}
|
|
180
194
|
const notVisible = (gate, need) => (_root) => r3(gate, "not-visible", need);
|
|
181
195
|
export const level3 = [
|
|
182
196
|
oneWrittenStandard,
|
|
@@ -191,7 +205,9 @@ export const level3 = [
|
|
|
191
205
|
lessonsRecorded,
|
|
192
206
|
notVisible("Gates proven", "needs a record of each automated Level 2–3 check catching a planted fault; attach proof"),
|
|
193
207
|
dataBoundary,
|
|
194
|
-
|
|
208
|
+
aiBudget,
|
|
209
|
+
notVisible("Guardrail changes approved", "every change to rules files, hooks, CI configuration and agent settings needs a person's approval; attach proof"),
|
|
210
|
+
notVisible("Agent plug-ins and tools", "outside plug-ins, tool servers and skills must be pinned (to a commit hash or checksum where the source offers one) and added as high-risk changes; attach proof"),
|
|
195
211
|
notVisible("Parallel agents and rollback", "agents on separate branches through the same checks, and a tried rollback; attach proof"),
|
|
196
212
|
notVisible("Generated-code licensing", "a license check on new code; attach proof"),
|
|
197
213
|
notVisible("Reviewer proven", "the AI peer reviewer's model and version need a record of catching a planted-fault set (at least five known-bad changes, including a weakened test and a prompt-injection case), kept where the agent can't edit it; attach proof"),
|
package/dist/src/fixes.js
CHANGED
|
@@ -25,6 +25,8 @@ const NEEDS = {
|
|
|
25
25
|
"Critical rules enforced": "answer",
|
|
26
26
|
"Risk classes and peer review by risk": "answer",
|
|
27
27
|
"Data boundary": "answer",
|
|
28
|
+
"AI budget": "answer",
|
|
29
|
+
"Guardrail changes approved": "host",
|
|
28
30
|
"Reviewer proven": "answer",
|
|
29
31
|
"Service-bound items (applicability)": "answer",
|
|
30
32
|
};
|
|
@@ -412,10 +414,28 @@ const FIXES = {
|
|
|
412
414
|
verify: RERUN,
|
|
413
415
|
minutes: 15,
|
|
414
416
|
}),
|
|
417
|
+
"AI budget": () => ({
|
|
418
|
+
why: "Autonomy without a spending limit is an open tab with an AI company.",
|
|
419
|
+
steps: [
|
|
420
|
+
"Ask the person for the budget: a monthly or per-task limit on AI spending, where it is enforced (the provider's spending cap, a key's limit, a plan) and who is told when it is reached.",
|
|
421
|
+
"Write it in `VibeQM/` (the standard, or `VibeQM/AI_BUDGET.md`).",
|
|
422
|
+
],
|
|
423
|
+
verify: RERUN,
|
|
424
|
+
minutes: 10,
|
|
425
|
+
}),
|
|
426
|
+
"Guardrail changes approved": () => ({
|
|
427
|
+
why: "An agent that can rewrite its own rules, hooks or CI can switch off the checks that hold it.",
|
|
428
|
+
steps: [
|
|
429
|
+
"Require a person's approval for changes to the rules files, `.githooks/`, `.github/workflows/` and agent settings: a CODEOWNERS entry with required review, or for one person an ask rule on those paths in the agent's settings.",
|
|
430
|
+
"Record it in `vqm-proof.json` (gate \"Guardrail changes approved\"), with a recent change that went through it.",
|
|
431
|
+
],
|
|
432
|
+
verify: RERUN,
|
|
433
|
+
minutes: 15,
|
|
434
|
+
}),
|
|
415
435
|
"Agent plug-ins and tools": () => ({
|
|
416
436
|
why: "Plug-ins and tool servers run with the agent's permissions; they are dependencies.",
|
|
417
437
|
steps: [
|
|
418
|
-
"List the MCP servers, plug-ins and outside skills in use (`.mcp.json`, settings), pin
|
|
438
|
+
"List the MCP servers, plug-ins and outside skills in use (`.mcp.json`, settings), pin them to a commit hash or checksum where the source offers one (a version tag can be moved), else an exact version, and note who approved each.",
|
|
419
439
|
"Record the list in `vqm-proof.json` (gate \"Agent plug-ins and tools\").",
|
|
420
440
|
],
|
|
421
441
|
verify: RERUN,
|
package/dist/src/types.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/** The VibeQM framework version these checks follow; a claim names it (VQM_SPEC §13). */
|
|
2
|
-
export const FRAMEWORK_VERSION = "0.4.
|
|
2
|
+
export const FRAMEWORK_VERSION = "0.4.8";
|
package/package.json
CHANGED