Skip to content

fix(ci): adopt canonical hypatia-scan.yml (env.HOME/scanner-layout + … #586

fix(ci): adopt canonical hypatia-scan.yml (env.HOME/scanner-layout + …

fix(ci): adopt canonical hypatia-scan.yml (env.HOME/scanner-layout + … #586

Workflow file for this run

# SPDX-License-Identifier: MPL-2.0
name: NPM/Bun Blocker
on: [push, pull_request]
permissions:
contents: read
jobs:
check:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Block npm/bun (recursive)
run: |
LOCKFILES=$(find . -name "package-lock.json" -not -path "./.git/*" -not -path "*/node_modules/*" 2>/dev/null || true)
BUN_LOCK=$(find . -name "bun.lockb" -not -path "./.git/*" 2>/dev/null || true)
NODE_MODS=$(find . -name "node_modules" -type d -not -path "./.git/*" 2>/dev/null || true)
NPMRC=$(find . -name ".npmrc" -not -path "./.git/*" 2>/dev/null || true)
FAIL=0
if [ -n "$LOCKFILES" ]; then
echo "❌ package-lock.json detected (use Deno instead of npm):"
printf '%s\n' "$LOCKFILES"
FAIL=1
fi
if [ -n "$BUN_LOCK" ]; then
echo "❌ bun.lockb detected (banned):"
printf '%s\n' "$BUN_LOCK"
FAIL=1
fi
if [ -n "$NODE_MODS" ]; then
echo "❌ node_modules/ detected (no runtime npm install):"
printf '%s\n' "$NODE_MODS"
FAIL=1
fi
if [ -n "$NPMRC" ]; then
echo "❌ .npmrc detected:"
printf '%s\n' "$NPMRC"
FAIL=1
fi
if [ "$FAIL" -eq 1 ]; then exit 1; fi
echo "✅ No npm/bun violations"