Skip to content

Made cf-remote install --demo generate a random password and salt#180

Open
olehermanse wants to merge 3 commits intocfengine:masterfrom
olehermanse:master
Open

Made cf-remote install --demo generate a random password and salt#180
olehermanse wants to merge 3 commits intocfengine:masterfrom
olehermanse:master

Conversation

@olehermanse
Copy link
Copy Markdown
Member

No description provided.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: Ole Herman Schumacher Elgesem <ole.elgesem@northern.tech>
Signed-off-by: Ole Herman Schumacher Elgesem <ole.elgesem@northern.tech>
Signed-off-by: Ole Herman Schumacher Elgesem <ole.elgesem@northern.tech>
Comment thread cf_remote/demo.py
'/var/cfengine/bin/psql cfsettings -f "{}"'.format(query),
)
safe_host = strip_user(host).replace("/", "_").replace(":", "_")
rendered_path = os.path.join(cf_remote_dir(), "demo-{}.sql".format(safe_host))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This could cause a race condition when running parallel executions of cf-remote install --demo. Consider using tempfile.mkdtemp. This file should probably also be written with perms 0600.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants