Skip to content

Fix Fail2Ban deploy bootstrap and Dependabot alert #9 - #89

Merged
stevologic merged 1 commit into
mainfrom
codex/fix-deploy-fail2ban-alert-9
Jul 21, 2026
Merged

stevologic merged 1 commit into
mainfrom
codex/fix-deploy-fail2ban-alert-9

Conversation

@stevologic

Copy link
Copy Markdown
Owner

Summary

  • make Compose Fail2Ban an explicit DEPLOY_COMPOSE_FAIL2BAN=true deploy option
  • leave host Fail2Ban ownership with the droplet setup workflow when the option is disabled
  • prevent host/Compose jail conflicts and reject Compose mode with host Caddy
  • defer Compose Fail2Ban startup when an older checkout does not contain the service yet
  • update transitive brace-expansion from 1.1.15 to patched 1.1.16 for Dependabot alert Add PHP and Ruby unsafe-deserialization recipes to Classic Vulnerable Defaults #9 / GHSA-3jxr-9vmj-r5cp
  • add regression coverage for the deployment mode and patched dependency lock

Root causes

deploy.sh unconditionally invoked the host Caddy jail installer after checkout, so servers without the host fail2ban package rolled back even though Compose Fail2Ban was intended to be optional. A first deployment also needs to tolerate the service being absent from the pre-update checkout.

The npm lockfile resolved minimatch's transitive brace-expansion dependency to 1.1.15. That release is vulnerable to exponential CPU consumption from consecutive non-expanding brace groups.

Security impact

The lockfile-only dependency update preserves the existing minimatch API while moving the affected 1.x dependency to the first patched release. The advisory proof input completes in approximately 1 ms after the update, and npm audit reports zero vulnerabilities.

Validation

  • npm ci
  • advisory proof input via node against installed brace-expansion 1.1.16
  • npm audit --audit-level=high
  • node --test tests/test_dependabot_config.js
  • npm run build
  • npm run check:performance
  • python -m unittest discover -s tests -p 'test_*.py' — 288 passed, 27 environment-dependent skips
  • python -m unittest tests.test_deploy_script tests.test_caddy_404_ban
  • docker compose --profile caddy --profile fail2ban config --quiet
  • git diff --check

Deployment note

Because the currently installed deploy.sh fails before it can deploy its own replacement, the first post-merge run should execute the corrected script from origin/main with DEPLOY_REPO_DIR pointing at the checkout. Subsequent scheduled runs can use the normal checkout script.

@stevologic
stevologic marked this pull request as ready for review July 21, 2026 07:49
@stevologic
stevologic enabled auto-merge (squash) July 21, 2026 07:49
@stevologic
stevologic merged commit 05ed2a1 into main Jul 21, 2026
8 checks passed
@stevologic
stevologic deleted the codex/fix-deploy-fail2ban-alert-9 branch July 21, 2026 07:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant