René's URL Explorer Experiment


Title: Keep the source database URL off the command line of psql and pg_dump by shipmill-romamo[bot] · Pull Request #370 · cloudfall-dev/cloudfall · GitHub

Open Graph Title: Keep the source database URL off the command line of psql and pg_dump by shipmill-romamo[bot] · Pull Request #370 · cloudfall-dev/cloudfall

X Title: Keep the source database URL off the command line of psql and pg_dump by shipmill-romamo[bot] · Pull Request #370 · cloudfall-dev/cloudfall

Description: Plan Serves: quality bar Files: engine/tests/test_data_migration_source_url.py, engine/tests/test_data_migration_role.py, engine/ansible/roles/cloudfall_data_migration/filter_plugins/pg_service.py, engine/ansible/roles/cloudfall_data_migration/tasks/main.yml, engine/ansible/roles/cloudfall_data_migration/defaults/main.yml, engine/ansible/roles/cloudfall_data_migration/meta/argument_specs.yml, docs/neon-migration-guide.md, changelog.d/355-pg-url-off-argv.md Order: the failing tests first (a static read of every task of the role for a command line that could carry the URL, unit tests of the URL-to-service-file conversion, and a local run of the staging and a source query with a stand-in psql), then the filter plugin, the role's staging, environment and cleanup, and the docs Proof: engine/tests/test_data_migration_source_url.py and the updated engine/tests/test_data_migration_role.py Summary The data copy passed the source URL to psql and pg_dump as --dbname "$(cat )" in four tasks, so the password sat in their argv, readable in /proc//cmdline by every local user for as long as the copy ran. The role turns the URL, on the controller, into a 0600 libpq service file on the target host (/root/.cloudfall-data-source.pgservice, owned by root, the user the clients run as) and names it to the clients through PGSERVICEFILE and PGSERVICE in the environment of each of the four source tasks only; the target-side tasks keep their peer-authenticated --dbname and don't see the service The URL itself is no longer staged on the host: only the service file is, and the block's always removes it, on failure too, as it removed the URL file before A role filter plugin (cloudfall_pg_service) parses the URL as libpq parses a connection URI: percent-encoded user, password, host and database, comma-separated host lists, bracketed IPv6 hosts, and query parameters such as sslmode (with ssl=true read as sslmode=require, as libpq does). It refuses what a service file can't hold or libpq wouldn't read (another scheme, a #, a bad percent-encoding, a line break, trailing whitespace, a parameter set twice, a nested service) before anything is staged, and no message quotes any part of the URL Every task that reads the URL file is no_log; the refusal is an assert on the problem string alone, so the reason still shows The four source tasks move from shell to command with argv (ansible-lint asks for it once no shell expansion is left), so schema and extension names are now single arguments with no shell quoting docs/neon-migration-guide.md says the connection is staged as a service file and which password characters to percent-encode Test notes New: engine/tests/test_data_migration_source_url.py Unit tests of the conversion: password with :, @, / and %, sslmode, IPv6, host lists, an empty password, a socket directory; and eleven refused URLs whose messages hold no part of the URL A static test over every task of the role: no shell/command task references the URL file, a lookup, $(, the service file or a password; the four source tasks carry no --dbname and do carry the service environment; every leaf task that reads the URL file is no_log A real ansible-playbook run on localhost of the check, the staging, the row-count query (with a stand-in psql recording its argv, environment and the file's mode) and the cleanup: the password is in the 0600 file and nowhere in argv or in -vvv output, and the file is gone afterwards; a bad URL stops before any file is written, with its reason and without the URL These fail on main: the source tasks there are shell with $(cat ...), and the staging tasks don't exist Updated: engine/tests/test_data_migration_role.py reads the dump, preflight and row-count commands as argv lists instead of shell strings; the expectations are otherwise unchanged Ran: uv run ruff check ., uv run mypy, uv run ansible-lint engine/ansible (with ANSIBLE_CONFIG=engine/ansible/ansible.cfg, as CI does), and uv run pytest on engine/tests/test_data_migration_source_url.py, engine/tests/test_data_migration_role.py, engine/tests/test_postgresql_owner_role.py, engine/tests/test_component_hosts.py, sdk/tests/test_data_migration.py, sdk/tests/test_data_copy_preflight.py (118 passed) Not run: a real copy against PostgreSQL; the Converge workflow does not run a data copy, so the service file has not met a real libpq in CI. The full suite is left to CI Fixes #355 🤖 Generated with Claude Code

Open Graph Description: Plan Serves: quality bar Files: engine/tests/test_data_migration_source_url.py, engine/tests/test_data_migration_role.py, engine/ansible/roles/cloudfall_data_migration/filter_plugins/pg_service.py...

X Description: Plan Serves: quality bar Files: engine/tests/test_data_migration_source_url.py, engine/tests/test_data_migration_role.py, engine/ansible/roles/cloudfall_data_migration/filter_plugins/pg_service.py...

Opengraph URL: https://github.com/cloudfall-dev/cloudfall/pull/370

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.114.3

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:c17a7949-3a77-e9e8-303d-30c06566c642
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idB9DC:1F7B:E7F539:134C56A:6B055952
html-safe-nonce6b13159b0928a1c04f8ba0078fa19febf51bd37c16510f2d1e8e113a4c254e75
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCOURDOjFGN0I6RTdGNTM5OjEzNEM1NkE6NkIwNTU5NTIiLCJ2aXNpdG9yX2lkIjoiMTE4NzM1Mzk0NTY4MTc3OTAyNiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac7a32d0f481bea0595c6634b15851a7f0050ae3a3eed3bebebb73a710003ed55b
hovercard-subject-tagpull_request:5324783933
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/cloudfall-dev/cloudfall/pull/370/files
twitter:imagehttps://avatars.githubusercontent.com/u/5600783?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/5600783?s=400&v=4
og:image:altPlan Serves: quality bar Files: engine/tests/test_data_migration_source_url.py, engine/tests/test_data_migration_role.py, engine/ansible/roles/cloudfall_data_migration/filter_plugins/pg_service.py...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Nonea79a02b7e7546ea306864e922ed2103ef4c04fac63168e11c2b2d4d816793080
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/cloudfall-dev/cloudfall git https://github.com/cloudfall-dev/cloudfall.git
octolytics-dimension-user_id339512759
octolytics-dimension-user_logincloudfall-dev
octolytics-dimension-repository_id1360999777
octolytics-dimension-repository_nwocloudfall-dev/cloudfall
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id1360999777
octolytics-dimension-repository_network_root_nwocloudfall-dev/cloudfall
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release10dff83edfd4f3617a7792a152d44991587b434c
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/cloudfall-dev/cloudfall/pull/370/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcloudfall-dev%2Fcloudfall%2Fpull%2F370%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcloudfall-dev%2Fcloudfall%2Fpull%2F370%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=cloudfall-dev%2Fcloudfall
Reloadhttps://github.com/cloudfall-dev/cloudfall/pull/370/files
Reloadhttps://github.com/cloudfall-dev/cloudfall/pull/370/files
Reloadhttps://github.com/cloudfall-dev/cloudfall/pull/370/files
cloudfall-devhttps://github.com/cloudfall-dev
cloudfallhttps://github.com/cloudfall-dev/cloudfall
Codehttps://github.com/cloudfall-dev/cloudfall
Issues78 (78)https://github.com/cloudfall-dev/cloudfall/issues
Pull requests10 (10)https://github.com/cloudfall-dev/cloudfall/pulls
Discussionshttps://github.com/cloudfall-dev/cloudfall/discussions
Actionshttps://github.com/cloudfall-dev/cloudfall/actions
Security and qualityhttps://github.com/cloudfall-dev/cloudfall/security
Insightshttps://github.com/cloudfall-dev/cloudfall/insights
Sign up for GitHub https://github.com/signup?return_to=%2Fcloudfall-dev%2Fcloudfall%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fcloudfall-dev%2Fcloudfall%2Fissues%2Fnew%2Fchoose
shipmill-romamohttps://github.com/apps/shipmill-romamo
mainhttps://github.com/cloudfall-dev/cloudfall/tree/main
fix/355-pg-url-off-argvhttps://github.com/cloudfall-dev/cloudfall/tree/fix/355-pg-url-off-argv
Conversation 1 https://github.com/cloudfall-dev/cloudfall/pull/370
Commits 3 https://github.com/cloudfall-dev/cloudfall/pull/370/commits
Checks 2 https://github.com/cloudfall-dev/cloudfall/pull/370/checks
Files changed 8 https://github.com/cloudfall-dev/cloudfall/pull/370/files
Keep the source database URL off the command line of psql and pg_dump https://github.com/cloudfall-dev/cloudfall/pull/370/files#top
Show all changes 3 commits https://github.com/cloudfall-dev/cloudfall/pull/370/files
e8fe7e7 Keep the source database URL off the command line of psql and pg_dump shipmill-romamo[bot] Nov 15, 2026 https://github.com/cloudfall-dev/cloudfall/pull/370/commits/e8fe7e709f8c6be3d1427241a7ebe27301ce3e13
19fb2c0 Read the source URL's user info as libpq does shipmill-romamo[bot] Nov 15, 2026 https://github.com/cloudfall-dev/cloudfall/pull/370/commits/19fb2c0b9e68f3af04e92ab597a3abf869c34790
7427f9f Mark the newly refused source URLs as Breaking in the changelog shipmill-romamo[bot] Nov 15, 2026 https://github.com/cloudfall-dev/cloudfall/pull/370/commits/7427f9f58e87a1a121ab53c5e8b7b3de95cda0b9
Clear filters https://github.com/cloudfall-dev/cloudfall/pull/370/files
Please reload this pagehttps://github.com/cloudfall-dev/cloudfall/pull/370/files
Please reload this pagehttps://github.com/cloudfall-dev/cloudfall/pull/370/files
355-pg-url-off-argv.md https://github.com/cloudfall-dev/cloudfall/pull/370/files#diff-8952d46bd421fa920bf127ef3a20fd717f33850805807ba48e826e9c0daaca8c
neon-migration-guide.md https://github.com/cloudfall-dev/cloudfall/pull/370/files#diff-42b2d04a8e6b9be9ec5000fbd64deb2e729475a4a6df9d40f411847c4389e1b3
main.yml https://github.com/cloudfall-dev/cloudfall/pull/370/files#diff-c2cd1ecff4eb8bf0c0b514f61c851c888945f83ad7a9debc7ad8abf517b10e16
pg_service.py https://github.com/cloudfall-dev/cloudfall/pull/370/files#diff-b0a8d90c26c727232578e5d925ee1f95e0eb4ba078e6ccff213f510371f89c79
argument_specs.yml https://github.com/cloudfall-dev/cloudfall/pull/370/files#diff-eb76cf1a03882791eee1509326bd8eeb41cb030c058c195e6efe986cf0aa5881
main.yml https://github.com/cloudfall-dev/cloudfall/pull/370/files#diff-0ac67bf03bdde553c079ee1c53ed226e3666d32cb39a594b2330e46f0d270880
test_data_migration_role.py https://github.com/cloudfall-dev/cloudfall/pull/370/files#diff-56b1b2e85bd63c611408b5047d9febdd513402cd5c6cc42cafaa323ddce3a6a2
test_data_migration_source_url.py https://github.com/cloudfall-dev/cloudfall/pull/370/files#diff-a33d2aae2fdb63e7b5bc554bf3996ffb172434dbd33bb22382fe38594661b045
changelog.d/355-pg-url-off-argv.mdhttps://github.com/cloudfall-dev/cloudfall/pull/370/files#diff-8952d46bd421fa920bf127ef3a20fd717f33850805807ba48e826e9c0daaca8c
View file https://github.com/cloudfall-dev/cloudfall/blob/7427f9f58e87a1a121ab53c5e8b7b3de95cda0b9/changelog.d/355-pg-url-off-argv.md
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/cloudfall-dev/cloudfall/pull/370/{{ revealButtonHref }}
docs/neon-migration-guide.mdhttps://github.com/cloudfall-dev/cloudfall/pull/370/files#diff-42b2d04a8e6b9be9ec5000fbd64deb2e729475a4a6df9d40f411847c4389e1b3
View file https://github.com/cloudfall-dev/cloudfall/blob/7427f9f58e87a1a121ab53c5e8b7b3de95cda0b9/docs/neon-migration-guide.md
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/cloudfall-dev/cloudfall/pull/370/{{ revealButtonHref }}
https://github.com/cloudfall-dev/cloudfall/pull/370/files#diff-42b2d04a8e6b9be9ec5000fbd64deb2e729475a4a6df9d40f411847c4389e1b3
https://github.com/cloudfall-dev/cloudfall/pull/370/files#diff-42b2d04a8e6b9be9ec5000fbd64deb2e729475a4a6df9d40f411847c4389e1b3
https://github.com/cloudfall-dev/cloudfall/pull/370/files#diff-42b2d04a8e6b9be9ec5000fbd64deb2e729475a4a6df9d40f411847c4389e1b3
engine/ansible/roles/cloudfall_data_migration/defaults/main.ymlhttps://github.com/cloudfall-dev/cloudfall/pull/370/files#diff-c2cd1ecff4eb8bf0c0b514f61c851c888945f83ad7a9debc7ad8abf517b10e16
View file https://github.com/cloudfall-dev/cloudfall/blob/7427f9f58e87a1a121ab53c5e8b7b3de95cda0b9/engine/ansible/roles/cloudfall_data_migration/defaults/main.yml
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/cloudfall-dev/cloudfall/pull/370/{{ revealButtonHref }}
https://github.com/cloudfall-dev/cloudfall/pull/370/files#diff-c2cd1ecff4eb8bf0c0b514f61c851c888945f83ad7a9debc7ad8abf517b10e16
engine/ansible/roles/cloudfall_data_migration/filter_plugins/pg_service.pyhttps://github.com/cloudfall-dev/cloudfall/pull/370/files#diff-b0a8d90c26c727232578e5d925ee1f95e0eb4ba078e6ccff213f510371f89c79
View file https://github.com/cloudfall-dev/cloudfall/blob/7427f9f58e87a1a121ab53c5e8b7b3de95cda0b9/engine/ansible/roles/cloudfall_data_migration/filter_plugins/pg_service.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/cloudfall-dev/cloudfall/pull/370/{{ revealButtonHref }}
engine/ansible/roles/cloudfall_data_migration/meta/argument_specs.ymlhttps://github.com/cloudfall-dev/cloudfall/pull/370/files#diff-eb76cf1a03882791eee1509326bd8eeb41cb030c058c195e6efe986cf0aa5881
View file https://github.com/cloudfall-dev/cloudfall/blob/7427f9f58e87a1a121ab53c5e8b7b3de95cda0b9/engine/ansible/roles/cloudfall_data_migration/meta/argument_specs.yml
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/cloudfall-dev/cloudfall/pull/370/{{ revealButtonHref }}
https://github.com/cloudfall-dev/cloudfall/pull/370/files#diff-eb76cf1a03882791eee1509326bd8eeb41cb030c058c195e6efe986cf0aa5881
https://github.com/cloudfall-dev/cloudfall/pull/370/files#diff-eb76cf1a03882791eee1509326bd8eeb41cb030c058c195e6efe986cf0aa5881
https://github.com/cloudfall-dev/cloudfall/pull/370/files#diff-eb76cf1a03882791eee1509326bd8eeb41cb030c058c195e6efe986cf0aa5881
Please reload this pagehttps://github.com/cloudfall-dev/cloudfall/pull/370/files
Please reload this pagehttps://github.com/cloudfall-dev/cloudfall/pull/370/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlno-cache

Viewport: width=device-width


URLs of crawlers that visited me.