Skip to content

fix(core): harden kill-process, network diagnostics, ssh key setup, and disk health - #32

Merged
ashishsinghbora merged 1 commit into
mainfrom
fix/process-network-ssh-hardware
Sep 24, 2026
Merged

ashishsinghbora merged 1 commit into
mainfrom
fix/process-network-ssh-hardware

Conversation

@ashishsinghbora

Copy link
Copy Markdown
Owner

Summary

kill-process.sh

  • Guard against terminating init (PID 1), PID 0, self ($$), and parent ($PPID).
  • Filter out $$ and $PPID from pgrep matching results.
  • Validate signals with kill -l and handle missing arguments.

network-diagnostics.sh

  • Standardize status badges: [PASS], [FAIL], [UNKNOWN], [SKIPPED].
  • Avoid false positive failures for firewall-filtered ping and gateway ports.
  • Provide a summary report with pass/fail/skip counts.

ssh-key-setup.sh

  • Automatically create a timestamped backup before overwriting any existing key.
  • Generate RSA with 4096-bit strength by default when RSA is chosen.
  • Add passphrase argument (-p / --passphrase) and enforce strict 0700/0600 file permissions.

disk-health.sh

  • Support targeted device checking via [device] argument.
  • Distinguish virtual/container devices without SMART support.
  • Detect root/sudo permissions for raw device access.

Verification

  • Tested PID 1 and self termination rejection.
  • Tested killing background child processes safely.
  • Tested SSH key generation, permission checks, overwrite refusal without force, and backup preservation.
  • Tested network diagnostics summary report.
  • Verified ShellCheck passes without warnings.
  • Verified test suite passes.

@ashishsinghbora ashishsinghbora left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code review: verified process termination safety excludes PID 1/self/parent, network diagnostics produces clean status badges, SSH key setup creates automatic backups and secures permissions, and disk health handles device targeting and VM/container environments.

@ashishsinghbora
ashishsinghbora merged commit 5c323d9 into main Sep 24, 2026
1 check passed
@ashishsinghbora
ashishsinghbora deleted the fix/process-network-ssh-hardware branch September 24, 2026 18:07
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