@biffo/cli 0.351.0 → 0.353.0
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/_skeletons/plugin-template/scripts/js-dependency-audit-classification.test.sh +13 -0
- package/_skeletons/plugin-template/scripts/js-dependency-audit.sh +10 -4
- package/_skeletons/sibling-template/scripts/js-dependency-audit-classification.test.sh +13 -0
- package/_skeletons/sibling-template/scripts/js-dependency-audit.sh +10 -4
- package/package.json +1 -1
- package/scripts/verify.sh +7 -1
|
@@ -129,6 +129,12 @@ cat > "$STUB_DIR/output-vuln-a-b.json" <<'JSON'
|
|
|
129
129
|
{"metadata":{"vulnerabilities":{"critical":0,"high":2,"moderate":0,"low":0},"totalDependencies":5},"advisories":{"1":{"severity":"high","github_advisory_id":"GHSA-test-0001","module_name":"vuln-pkg-a","findings":[{"version":"1.2.3","paths":[]}]},"2":{"severity":"high","github_advisory_id":"GHSA-test-0002","module_name":"vuln-pkg-b","findings":[{"version":"2.0.0","paths":[]}]}}}
|
|
130
130
|
JSON
|
|
131
131
|
|
|
132
|
+
# pnpm `auditConfig.ignoreGhsas` shape: advisories emptied, metadata still
|
|
133
|
+
# counting the ignored high advisory.
|
|
134
|
+
cat > "$STUB_DIR/output-ignored.json" <<'JSON'
|
|
135
|
+
{"metadata":{"vulnerabilities":{"critical":0,"high":1,"moderate":0,"low":0},"totalDependencies":5},"advisories":{}}
|
|
136
|
+
JSON
|
|
137
|
+
|
|
132
138
|
# --- repo scaffolding --------------------------------------------------------
|
|
133
139
|
# One workspace-level pnpm-lock.yaml so discovery finds exactly one tree,
|
|
134
140
|
# matching the real incident (the workspace root, not a vendored tree).
|
|
@@ -294,6 +300,13 @@ _init_repo "clean" "clean"
|
|
|
294
300
|
_run dev
|
|
295
301
|
_assert_exit "clean run unaffected" 0
|
|
296
302
|
|
|
303
|
+
# 8. pnpm ignoreGhsas: metadata still counts the ignored advisory but
|
|
304
|
+
# .advisories is empty -- must not block.
|
|
305
|
+
_init_repo "ignored" "ignored"
|
|
306
|
+
_run dev
|
|
307
|
+
_assert_exit "ignoreGhsas-suppressed advisory does not block" 0
|
|
308
|
+
_assert_output_contains "ignored case reports 0 high" "0 critical, 0 high"
|
|
309
|
+
|
|
297
310
|
echo
|
|
298
311
|
if [ "$FAILURES" -eq 0 ]; then
|
|
299
312
|
echo "js-dependency-audit-classification.test.sh: all checks passed."
|
|
@@ -258,10 +258,16 @@ audit_dir() {
|
|
|
258
258
|
fi
|
|
259
259
|
|
|
260
260
|
if printf '%s' "$out" | jq -e '.metadata.vulnerabilities' >/dev/null 2>&1; then
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
261
|
+
# Tally from the advisories that REMAIN in the output when present:
|
|
262
|
+
# pnpm applies `auditConfig.ignoreGhsas` to `.advisories` but leaves
|
|
263
|
+
# `.metadata.vulnerabilities` counting the ignored ones, so trusting the
|
|
264
|
+
# metadata reports suppressed (unfixable) advisories as blocking.
|
|
265
|
+
# Fall back to the metadata when no advisories object is emitted.
|
|
266
|
+
_cnt() { printf '%s' "$out" | jq --arg s "$1" 'if (.advisories|type)=="object" then [.advisories[]|select(.severity==$s)]|length else (.metadata.vulnerabilities[$s] // 0) end'; }
|
|
267
|
+
high="$(_cnt high)"
|
|
268
|
+
crit="$(_cnt critical)"
|
|
269
|
+
mod="$(_cnt moderate)"
|
|
270
|
+
low="$(_cnt low)"
|
|
265
271
|
total="$(printf '%s' "$out" | jq '.metadata.totalDependencies // 0')"
|
|
266
272
|
if [ "$((high + crit))" -gt 0 ]; then
|
|
267
273
|
# Classify each qualifying (high/critical) advisory against the base
|
|
@@ -129,6 +129,12 @@ cat > "$STUB_DIR/output-vuln-a-b.json" <<'JSON'
|
|
|
129
129
|
{"metadata":{"vulnerabilities":{"critical":0,"high":2,"moderate":0,"low":0},"totalDependencies":5},"advisories":{"1":{"severity":"high","github_advisory_id":"GHSA-test-0001","module_name":"vuln-pkg-a","findings":[{"version":"1.2.3","paths":[]}]},"2":{"severity":"high","github_advisory_id":"GHSA-test-0002","module_name":"vuln-pkg-b","findings":[{"version":"2.0.0","paths":[]}]}}}
|
|
130
130
|
JSON
|
|
131
131
|
|
|
132
|
+
# pnpm `auditConfig.ignoreGhsas` shape: advisories emptied, metadata still
|
|
133
|
+
# counting the ignored high advisory.
|
|
134
|
+
cat > "$STUB_DIR/output-ignored.json" <<'JSON'
|
|
135
|
+
{"metadata":{"vulnerabilities":{"critical":0,"high":1,"moderate":0,"low":0},"totalDependencies":5},"advisories":{}}
|
|
136
|
+
JSON
|
|
137
|
+
|
|
132
138
|
# --- repo scaffolding --------------------------------------------------------
|
|
133
139
|
# One workspace-level pnpm-lock.yaml so discovery finds exactly one tree,
|
|
134
140
|
# matching the real incident (the workspace root, not a vendored tree).
|
|
@@ -294,6 +300,13 @@ _init_repo "clean" "clean"
|
|
|
294
300
|
_run dev
|
|
295
301
|
_assert_exit "clean run unaffected" 0
|
|
296
302
|
|
|
303
|
+
# 8. pnpm ignoreGhsas: metadata still counts the ignored advisory but
|
|
304
|
+
# .advisories is empty -- must not block.
|
|
305
|
+
_init_repo "ignored" "ignored"
|
|
306
|
+
_run dev
|
|
307
|
+
_assert_exit "ignoreGhsas-suppressed advisory does not block" 0
|
|
308
|
+
_assert_output_contains "ignored case reports 0 high" "0 critical, 0 high"
|
|
309
|
+
|
|
297
310
|
echo
|
|
298
311
|
if [ "$FAILURES" -eq 0 ]; then
|
|
299
312
|
echo "js-dependency-audit-classification.test.sh: all checks passed."
|
|
@@ -258,10 +258,16 @@ audit_dir() {
|
|
|
258
258
|
fi
|
|
259
259
|
|
|
260
260
|
if printf '%s' "$out" | jq -e '.metadata.vulnerabilities' >/dev/null 2>&1; then
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
261
|
+
# Tally from the advisories that REMAIN in the output when present:
|
|
262
|
+
# pnpm applies `auditConfig.ignoreGhsas` to `.advisories` but leaves
|
|
263
|
+
# `.metadata.vulnerabilities` counting the ignored ones, so trusting the
|
|
264
|
+
# metadata reports suppressed (unfixable) advisories as blocking.
|
|
265
|
+
# Fall back to the metadata when no advisories object is emitted.
|
|
266
|
+
_cnt() { printf '%s' "$out" | jq --arg s "$1" 'if (.advisories|type)=="object" then [.advisories[]|select(.severity==$s)]|length else (.metadata.vulnerabilities[$s] // 0) end'; }
|
|
267
|
+
high="$(_cnt high)"
|
|
268
|
+
crit="$(_cnt critical)"
|
|
269
|
+
mod="$(_cnt moderate)"
|
|
270
|
+
low="$(_cnt low)"
|
|
265
271
|
total="$(printf '%s' "$out" | jq '.metadata.totalDependencies // 0')"
|
|
266
272
|
if [ "$((high + crit))" -gt 0 ]; then
|
|
267
273
|
# Classify each qualifying (high/critical) advisory against the base
|
package/package.json
CHANGED
package/scripts/verify.sh
CHANGED
|
@@ -891,7 +891,13 @@ fi
|
|
|
891
891
|
# lane growing 310 -> 946 tests in four days outruns any constant. The other
|
|
892
892
|
# half is below -- the lane now runs CONCURRENTLY where it safely can, which is
|
|
893
893
|
# what actually bends the curve.
|
|
894
|
-
|
|
894
|
+
#
|
|
895
|
+
# Raised again to 480s: the lane timed out at the 240s budget with 215 modules
|
|
896
|
+
# and no failing tests in the partial output, blocking the pre-push gate
|
|
897
|
+
# (tabsii-com/tabsii-platform#1464). Same doubling as above; this was not
|
|
898
|
+
# re-measured against a live Postgres, so re-measure and tighten this comment
|
|
899
|
+
# when the lane next runs to completion.
|
|
900
|
+
PG_TEST_BUDGET_SECONDS="${BIFFO_VERIFY_PG_BUDGET:-480}"
|
|
895
901
|
PG_TEST_DSN="${BIFFO_TEST_PG_DSN:-${TABSII_TEST_PG_DSN:-}}"
|
|
896
902
|
|
|
897
903
|
# `.claude/worktrees` is excluded alongside `.worktrees`, and finding out why
|