Repository navigation
Wait for PostgreSQL readiness and recover failed setup - #1
Draft
pauljccode wants to merge 361 commits into
Draft
pauljccode wants to merge 361 commits into
pauljccode wants to merge 361 commits into
Conversation
Use pg_ctl wait mode and its exit status before creating database users. A running postmaster alone does not establish connection readiness. Keep process-based startup to avoid the Windows captured-pipe hang. Stop initialization when startup fails, and cover readiness waiting, startup failure, argument handling and initialization ordering in RSpec.
…ue to its NAT. This kills an idel shell session after 3 minutes, reproduced on a 13.1 target. Solution is to enable TCP keepalives, best I can tell there is no framework advance optiosn here we can reuse, so the module does it manually. MEterpreter sessiosn already sends idle pings so we only need this for sehll sessions.
Co-authored-by: Diego Ledda <diego_ledda@rapid7.com>
Co-authored-by: Diego Ledda <diego_ledda@rapid7.com>
…ighlty differently. tweak the loader to correctly reconstitute teh larger payload in thsi situation
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Add error handling for version parsing in Langflow exploit. Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Handle version parsing errors with a rescue block. Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Separate Bundler caches by runtime to prevent native gems built with PHP libraries from being restored into Java or Python jobs. Wait for automatic Git maintenance before Bundler clones its local cache, avoiding concurrent commit-graph changes during hardlink checks.
The module docs for ibm_bigfix_sites_packages_enum (DOWNLOAD), cisco_smart_install (SLEEP), wp_registrationmagic_sqli (COUNT) and archmigrate (IGNORE_SYSTEM) stated defaults that differ from the modules' register_options. synology_forget_passwd_user_enum documented a USER_LIST option; the module registers USER_FILE. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ENH: auxiliary module for Flowise Authentication Bypass CVE-2025-58434
…mentation Update test lab documentation
Update the development runtime, Docker image and Windows setup instructions to the patched Ruby release. Refresh setup-ruby version manifests while retaining floating CI patch selectors.
…bootstrap Fixes unauth boostrap
…-10-23 Upgrade Framework Ruby runtime to 3.3.13
…fines Add rubocop rule for redeclaring pre-existing options
Add SPIP password change IDOR privilege escalation module
…b-workflows-on-file-changes Run additional github workflows on file changes
…ble_calling_cleanup Removes redundant callings of cleanup
Add Portainer authenticated Docker API root RCE
…ows-aarch64-dll-generator Add a Windows AArch64 PE DLL generator
Replace deprecated Rex UDP sendto with send in TFTP library and modules
Make BofLoader Decent
…nt_rce Add Exploit Module for GitLab RCE via CI Lint [CVE-2026-97229]
…ion-defaults Fix option defaults and names in five module docs
Apply authentication before startup and retain initialization state until configuration and migrations finish. Resume owned incomplete clusters using their saved settings, without claiming unmarked data. Propagate provisioning and migration failures and preserve existing data on retry. Cover readiness, locking and recovery behavior.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
msfdb initcan provision users before PostgreSQL is ready. If startup times out, a laterinitcan mistake the unfinished database for a completed installation and skip provisioning.Wait for PostgreSQL readiness using
pg_ctl -w -t 60, apply authentication rules before startup, and track initialization through migration completion. Retry interrupted setup using saved settings without deleting existing data; leave incompleteinitdboutput and directories without initialization markers for inspection.Production migrations fail without a Rails key or permission to write their schema dump into the installation. Give the migration subprocess a temporary key when
SECRET_KEY_BASEis unset and discard its schema dump. Preserve rapid7#18442's Windows fix by leaving startup output uncaptured.Verification
SPEC_HELPER_LOAD_METASPLOIT=false bundle exec rspec spec/lib/msfdb_helpers/pg_ctl_spec.rb; expect 21 examples and no failures.msfdb init --component database --use-defaults, thenmsfconsole -qx 'db_status; exit'; expect successful initialization and a connection.msfdb init; it should recognize the completed database without provisioning again.Test evidence
The 21 helper specs pass on macOS and Windows. Recovery, fresh and repeated initialization also pass against installed runtimes, with 164 migrations verified by SQL and the installed schema unchanged.
All ten package jobs passed with Ruby 3.4.12 on macOS 14 arm64, macOS 15 x86_64, Windows Server 2022 and Linux. They build
809e1587plus migration correction711d40bband verify its source digests. ARMv7 covers build and package health only.AI Usage Disclosure
Codex assisted with implementation, tests, investigation and this description.
Upstream: rapid7#21964.