Skip to content

refactor: init secret_key - #1294

Merged
xuwei-fit2cloud merged 1 commit into
mainfrom
pr@main_fix_secret_key
Jul 27, 2026
Merged

refactor: init secret_key#1294
xuwei-fit2cloud merged 1 commit into
mainfrom
pr@main_fix_secret_key

Conversation

@xuwei-fit2cloud

Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI review requested due to automatic review settings July 27, 2026 06:19
@xuwei-fit2cloud
xuwei-fit2cloud merged commit 815435e into main Jul 27, 2026
3 of 4 checks passed
@xuwei-fit2cloud
xuwei-fit2cloud deleted the pr@main_fix_secret_key branch July 27, 2026 06:19

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR removes a hard-coded SQLBot secret key and introduces installer-side secret key initialization/rotation so deployments get a unique, persistent key (and can automatically rotate a known-compromised one).

Changes:

  • Add prepare_secret_key to the installer to validate/generate a 64-char secret key and auto-rotate a known-compromised key.
  • Update installer/install.conf to leave SQLBOT_SECRET_KEY empty by default (installer generates and persists it).
  • Update docker-compose.yaml to require SECRET_KEY to be set via environment interpolation rather than embedding a default key.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
installer/install.sh Generates/validates/persists SQLBOT_SECRET_KEY, rotates a compromised key, and avoids running main when sourced.
installer/install.conf Removes the default secret key value; documents installer-generated persistence behavior.
docker-compose.yaml Removes hard-coded SECRET_KEY and requires users to set a unique value via .env/environment.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

2 participants