feat: improve bootstrap and README portability - #72
Merged
Conversation
This was referenced Aug 31, 2026
There was a problem hiding this comment.
Security review — PR #72
Result: No high-confidence vulnerabilities found.
Reviewed the bootstrap/stow portability changes, stow-backup-conflicts dry-run support, tests, README asset swap, and Doom Emacs config tweak against injection, authz, secrets handling, unsafe deserialization, SSRF/XSS, and supply-chain risk.
Scope reviewed
| Area | Files |
|---|---|
| Bootstrap entrypoints & shared logic | .local/scripts/bootstrap/{arch,manjaro,ubuntu,ubuntu_windows,mac,work}, base_functions, *_functions |
| Stow conflict handling | .local/scripts/stow-backup-conflicts |
| Tests | tests/test_bootstrap_stow.sh |
| Docs / config | README.md, .doom.d/config.el, Makefile |
Positive security posture (not findings)
- Explicit consent before linking —
bootstrap_stow_checkoutrequires an interactive TTY and user confirmation (bootstrap_confirm_stow) before runningstow-backup-conflictsor applying links. Unattended/non-interactive runs skip Stow entirely rather than assuming consent (--no-stowalso supported). This reduces accidental or unattended file overwrites during provisioning. - Checkout-relative sourcing — Bootstrap entrypoints resolve
DOTFILES_ROOTfromBASH_SOURCEand source helpers from the running checkout instead of$HOME/.local/scripts, avoiding a chicken-and-egg dependency on pre-stowed paths. - Profile allowlist for package install —
bootstrap_install_stowuses acasestatement over fixed profile names; theprofileargument is only ever a hardcoded literal from each entrypoint, so there is no user-controlled command injection surface. - Quoted path usage — Paths (
$dotfiles_root,$HOME,$parent_dir,$package_name) are consistently double-quoted instowinvocations andbashcalls. - README asset change — OS icons moved from external hotlinks to repo-local
.github/assets/os-icons/*.png, reducing third-party supply-chain / availability risk in rendered docs.
Uncertain / low-confidence notes (not confirmed vulnerabilities)
- Conflict path normalization (pre-existing pattern, expanded call surface) —
stow-backup-conflictsbuildssrc="$TARGET/$rel"anddest="$BACKUP_DIR/$rel"from Stow dry-run output without rejecting..segments. GNU Stow conflict lines for a normal dotfiles package should only contain package-relative paths (e.g..bashrc), so traversal outside$HOMEis unlikely in practice. Assumption: thestowbinary onPATHis trustworthy. Validation: confirm Stow never emits..-containing conflict paths for this package layout; optionally harden with a canonical-path check beforemv. DOTFILES_ROOToverride inbootstrap_repository_root()— The helper honors a pre-setDOTFILES_ROOTwhen the directory exists. Official entrypoints overwrite this fromBASH_SOURCEbefore use, so environment injection via entrypoints is not a practical vector. Direct sourcing ofbase_functionsoutside entrypoints could honor a caller-setDOTFILES_ROOT; that is intentional for tests and matches existing${DOTFILES_ROOT:-$HOME}usage elsewhere.
Areas with no issues found
- Command / SQL / template injection — No
eval, unquoted expansions into shell metacharacters, or dynamic code execution from user/PR inputs. - Secrets & logging — No credentials, tokens, or sensitive env vars added; preview output is printed, not evaluated.
- Authn/authz — N/A (local provisioning scripts, not a network service).
- SSRF / XSS — No new outbound requests; README uses static local image paths.
- Dependencies — No new third-party packages; only installs
stowvia existing OS package managers (same privilege model as the rest of bootstrap). .doom.d/config.el— Evil/Org keybinding remap only; no security impact.
Conclusion
This PR improves bootstrap safety around Stow (confirmation gate, non-interactive opt-out) and does not introduce confirmed exploitable vulnerabilities in the reviewed diff. The only residual hardening opportunity is optional path canonicalization in stow-backup-conflicts, which predates this change and is low likelihood.
Sent by Cursor Automation: Find vulnerabilities
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.


Summary
Validation
Closes #13
Related to #47 and #71. They remain open for manual Doom behavior verification and GitHub iOS rendering verification respectively.