-
-
Notifications
You must be signed in to change notification settings - Fork 38
fix-forward #2816 (tsk-teaogm S2-21b): restore linkwarden DATABASE_URL (false SQLite premise) and chmod 0600 the generated docker-compose.yml that now carries the real secret #2821
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| ### Security | ||
| - DockerInstaller now substitutes the per-app `{secret_key}` placeholder in | ||
| `install.env` values (not just `config_files` content), so Linkwarden's | ||
| `NEXTAUTH_SECRET` is a stable 64-hex-char secret persisted in | ||
| `<app_dir>/.secret_key` instead of the shipped default. Previously every host | ||
| ran Linkwarden with the publicly-known session-signing secret `changeme`, | ||
| allowing session forgery. | ||
| - Linkwarden manifest restores the required `DATABASE_URL: "postgresql://postgres:postgres@localhost:5432/linkwarden"`. | ||
| Database is now explicitly declared in the manifest to match upstream Linkwarden. | ||
| - Generated docker-compose.yaml and config files are now written with permissions 0o600 | ||
| to protect any secret substitutions (previous default umask 0o644 exposed secrets | ||
| in the live session-signing key). Applies to all files written by | ||
| `_write_config_files` and `install` that contain a `{secret_key}` substitution. | ||
|
|
||
| ### Fixed | ||
| - Fix-forward #2816: restore linkwarden DATABASE_URL (false SQLite premise) and chmod 0600 the generated docker-compose.yml that now carries the real secret |
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔒 Security & Privacy | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: jaylfc/taOS
Length of output: 14029
🤖 get_repo_knowledge executed:
get_repo_knowledge jaylfc/taOS /tmp/coderabbit-repo-knowledge/jaylfc-taos-a13cd95b/learnings /tmp/coderabbit-repo-knowledge/jaylfc-taos-a13cd95b/conventionsLength of output: 5023
Sensitive Data Exposure (CWE-732): Incorrect Permission Assignment for Critical Resource
Exploitability: Difficult
Set the restrictive mode before writing secret content.
All three sites write content before enforcing
0o600. Useos.open(..., 0o600)for.secret_key, and callos.fchmod(fd, 0o600)beforeos.fdopen()writes each generated file. Otherwise, a local account that can access the app directory can race-readNEXTAUTH_SECRETand forge sessions.📍 Affects 1 file
tinyagentos/installers/docker_installer.py#L39-L40(this comment)tinyagentos/installers/docker_installer.py#L106-L109tinyagentos/installers/docker_installer.py#L208-L211🤖 Prompt for AI Agents