@biffo/cli 0.184.3 → 0.184.4
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.
|
@@ -41,7 +41,15 @@
|
|
|
41
41
|
# BIFFO_VERIFY_PYTEST=1 where the suite is fast.
|
|
42
42
|
# - app/portal build -- a full Next build.
|
|
43
43
|
# - dependency audits, pip-audit, pnpm audit -- network.
|
|
44
|
-
# - gitleaks -- scans history,
|
|
44
|
+
# - gitleaks HISTORY pass -- genuinely scans git history, which a pre-push gate
|
|
45
|
+
# cannot usefully anticipate.
|
|
46
|
+
#
|
|
47
|
+
# The gitleaks WORKING-TREE pass is no longer excluded (#897). The old reason
|
|
48
|
+
# here read "gitleaks -- scans history, not the working tree", which was false:
|
|
49
|
+
# ci.yml runs two passes, and the second is `gitleaks detect --no-git`, i.e.
|
|
50
|
+
# exactly the working tree, which is what a pre-push gate is for. An exclusion
|
|
51
|
+
# must describe what the CI step actually DOES -- the same defect as the bandit
|
|
52
|
+
# exclusion that claimed "the finding gate is the upload step" (#855).
|
|
45
53
|
#
|
|
46
54
|
# cli/src/lib/verify-parity.test.ts fails if the template's CI grows a check
|
|
47
55
|
# that is neither here nor in that written exclusion list.
|
|
@@ -420,6 +428,41 @@ else
|
|
|
420
428
|
skip biffo-guards "no scripts/biffo.sh in this repo"
|
|
421
429
|
fi
|
|
422
430
|
|
|
431
|
+
# The append-only corpus guard (#778). CI runs it in Release Guards, and it was
|
|
432
|
+
# invisible to the parity test until #897 widened the harvester -- it is neither
|
|
433
|
+
# `pnpm`, `uv`, `terraform` nor `sh scripts/`, so the guard whose property is
|
|
434
|
+
# "every CI check is in the gate or explicitly excluded" could not see it at all.
|
|
435
|
+
# Measured 0.06s here, which is cheaper than every other check in this file.
|
|
436
|
+
if [ -f scripts/practices-monotonic.mjs ]; then
|
|
437
|
+
ci_has "practices-monotonic" && run_check corpus-append-only node scripts/practices-monotonic.mjs
|
|
438
|
+
fi
|
|
439
|
+
|
|
440
|
+
# gitleaks, WORKING-TREE pass only (#897). `--no-git` is what CI's second pass
|
|
441
|
+
# runs, and it is the half a pre-push gate can meaningfully do.
|
|
442
|
+
#
|
|
443
|
+
# Not installed is reported, never assumed clean. A secret scanner that silently
|
|
444
|
+
# does nothing and lets the gate print `verify passed` is the precise failure this
|
|
445
|
+
# whole file exists to prevent, and it would be worse here than elsewhere: the
|
|
446
|
+
# thing not being checked is credentials.
|
|
447
|
+
if ci_has "gitleaks"; then
|
|
448
|
+
# The installation check gates EXECUTION only, never `--list`.
|
|
449
|
+
#
|
|
450
|
+
# `--list` reports what THIS REPO requires, deliberately independent of what the
|
|
451
|
+
# machine happens to have (see the --list contract at the top of this file), and
|
|
452
|
+
# verify-parity.test.ts reads `--list`. A first cut wrapped the whole branch in
|
|
453
|
+
# `command -v gitleaks`, which made the listed check set machine-dependent: on a
|
|
454
|
+
# machine without gitleaks the parity test then reported the gate as missing a
|
|
455
|
+
# check it does declare. The parity test caught it.
|
|
456
|
+
#
|
|
457
|
+
# `terraform-fmt` above has the same shape and is only unexposed because
|
|
458
|
+
# terraform happens to be installed here. Recorded, not fixed in this change.
|
|
459
|
+
if [ -n "$LIST" ] || command -v gitleaks >/dev/null 2>&1; then
|
|
460
|
+
run_check gitleaks gitleaks detect --no-git --redact --exit-code=2
|
|
461
|
+
else
|
|
462
|
+
skip gitleaks "gitleaks not installed - CI still runs both passes"
|
|
463
|
+
fi
|
|
464
|
+
fi
|
|
465
|
+
|
|
423
466
|
# JS, cheapest first; `test` last because it is slowest and the most likely to
|
|
424
467
|
# be interrupted by an impatient reader.
|
|
425
468
|
JS_DIRS=$(js_dirs)
|
|
@@ -41,7 +41,15 @@
|
|
|
41
41
|
# BIFFO_VERIFY_PYTEST=1 where the suite is fast.
|
|
42
42
|
# - app/portal build -- a full Next build.
|
|
43
43
|
# - dependency audits, pip-audit, pnpm audit -- network.
|
|
44
|
-
# - gitleaks -- scans history,
|
|
44
|
+
# - gitleaks HISTORY pass -- genuinely scans git history, which a pre-push gate
|
|
45
|
+
# cannot usefully anticipate.
|
|
46
|
+
#
|
|
47
|
+
# The gitleaks WORKING-TREE pass is no longer excluded (#897). The old reason
|
|
48
|
+
# here read "gitleaks -- scans history, not the working tree", which was false:
|
|
49
|
+
# ci.yml runs two passes, and the second is `gitleaks detect --no-git`, i.e.
|
|
50
|
+
# exactly the working tree, which is what a pre-push gate is for. An exclusion
|
|
51
|
+
# must describe what the CI step actually DOES -- the same defect as the bandit
|
|
52
|
+
# exclusion that claimed "the finding gate is the upload step" (#855).
|
|
45
53
|
#
|
|
46
54
|
# cli/src/lib/verify-parity.test.ts fails if the template's CI grows a check
|
|
47
55
|
# that is neither here nor in that written exclusion list.
|
|
@@ -420,6 +428,41 @@ else
|
|
|
420
428
|
skip biffo-guards "no scripts/biffo.sh in this repo"
|
|
421
429
|
fi
|
|
422
430
|
|
|
431
|
+
# The append-only corpus guard (#778). CI runs it in Release Guards, and it was
|
|
432
|
+
# invisible to the parity test until #897 widened the harvester -- it is neither
|
|
433
|
+
# `pnpm`, `uv`, `terraform` nor `sh scripts/`, so the guard whose property is
|
|
434
|
+
# "every CI check is in the gate or explicitly excluded" could not see it at all.
|
|
435
|
+
# Measured 0.06s here, which is cheaper than every other check in this file.
|
|
436
|
+
if [ -f scripts/practices-monotonic.mjs ]; then
|
|
437
|
+
ci_has "practices-monotonic" && run_check corpus-append-only node scripts/practices-monotonic.mjs
|
|
438
|
+
fi
|
|
439
|
+
|
|
440
|
+
# gitleaks, WORKING-TREE pass only (#897). `--no-git` is what CI's second pass
|
|
441
|
+
# runs, and it is the half a pre-push gate can meaningfully do.
|
|
442
|
+
#
|
|
443
|
+
# Not installed is reported, never assumed clean. A secret scanner that silently
|
|
444
|
+
# does nothing and lets the gate print `verify passed` is the precise failure this
|
|
445
|
+
# whole file exists to prevent, and it would be worse here than elsewhere: the
|
|
446
|
+
# thing not being checked is credentials.
|
|
447
|
+
if ci_has "gitleaks"; then
|
|
448
|
+
# The installation check gates EXECUTION only, never `--list`.
|
|
449
|
+
#
|
|
450
|
+
# `--list` reports what THIS REPO requires, deliberately independent of what the
|
|
451
|
+
# machine happens to have (see the --list contract at the top of this file), and
|
|
452
|
+
# verify-parity.test.ts reads `--list`. A first cut wrapped the whole branch in
|
|
453
|
+
# `command -v gitleaks`, which made the listed check set machine-dependent: on a
|
|
454
|
+
# machine without gitleaks the parity test then reported the gate as missing a
|
|
455
|
+
# check it does declare. The parity test caught it.
|
|
456
|
+
#
|
|
457
|
+
# `terraform-fmt` above has the same shape and is only unexposed because
|
|
458
|
+
# terraform happens to be installed here. Recorded, not fixed in this change.
|
|
459
|
+
if [ -n "$LIST" ] || command -v gitleaks >/dev/null 2>&1; then
|
|
460
|
+
run_check gitleaks gitleaks detect --no-git --redact --exit-code=2
|
|
461
|
+
else
|
|
462
|
+
skip gitleaks "gitleaks not installed - CI still runs both passes"
|
|
463
|
+
fi
|
|
464
|
+
fi
|
|
465
|
+
|
|
423
466
|
# JS, cheapest first; `test` last because it is slowest and the most likely to
|
|
424
467
|
# be interrupted by an impatient reader.
|
|
425
468
|
JS_DIRS=$(js_dirs)
|