Skip to content

Hardening v1.2: input validation, menu registry, portability#2

Merged
WhiteMuush merged 11 commits into
mainfrom
improve/hardening-v1.2
Jun 17, 2026
Merged

Hardening v1.2: input validation, menu registry, portability#2
WhiteMuush merged 11 commits into
mainfrom
improve/hardening-v1.2

Conversation

@WhiteMuush

Copy link
Copy Markdown
Owner

Summary

Hardening and refactor pass. Ten focused commits, each verified with bash -n and the CI smoke check (source chain + expected functions).

Security / correctness

  • Input validation: new helpers in lib/core.sh (fys_is_port, fys_is_port_spec, fys_is_ipv4, fys_is_hostname, fys_is_host, fys_is_cidr, fys_is_host_or_cidr) plus a prompt_valid wrapper that re-prompts on bad input. Every module now validates targets, ports, CIDR ranges and domains instead of passing raw/empty values to tools.
  • Bash 4+ guard: fail fast with a clear message on the stock macOS Bash 3.2, since mapfile/|& are used throughout.
  • CI pin: ludeeus/action-shellcheck pinned to 2.0.0 instead of master.

Architecture

  • Single tool registry (FEEDYOURSPIDER_TOOLS): the menu renderer and the dispatcher both derive from one list, removing the previous dual source of truth.
  • run_custom_args helper: deduplicates the repeated per-module custom-args branches.

UX

  • SIGINT trap: Ctrl+C interrupts the running tool and returns to the menu instead of killing the launcher.
  • NO_COLOR environment variable honored.

Docs / housekeeping

  • CONTRIBUTING.md, CODE_OF_CONDUCT.md, SECURITY.md moved into .github/ to keep the repo root clean (GitHub still auto-detects them); cross-links fixed.
  • Added docs/CHANGELOG.md; version bumped 1.1.0 -> 1.2.0.

Test

  • bash -n on every *.sh.
  • CI smoke equivalent: full source chain + all expected functions present.
  • Validation helpers unit-tested against 19 valid/invalid cases under Bash.

🤖 Generated with Claude Code

@WhiteMuush WhiteMuush merged commit d8d8d37 into main Jun 17, 2026
3 checks passed
@WhiteMuush WhiteMuush deleted the improve/hardening-v1.2 branch June 17, 2026 10:22
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