fix: bound certbot execution - #22
Conversation
There was a problem hiding this comment.
๐ก Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cb39f64c37
โน๏ธ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with ๐.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| run_with_timeout sudo snap install --classic certbot | ||
| apt_get install python3-certbot-nginx -y | ||
| sudo certbot --nginx -d $WEBSITE_NAME --noninteractive --agree-tos --email $ADMIN_EMAIL --redirect | ||
| run_with_timeout sudo certbot --nginx -d "$WEBSITE_NAME" --noninteractive --agree-tos --email "$ADMIN_EMAIL" --redirect |
There was a problem hiding this comment.
For SSL-enabled installs where Certbot hangs past COMMAND_TIMEOUT_SECONDS, timeout --help reports that it exits with status 124 after killing the command, but this script does not enable set -e or check the return value here. That means the new bounded Certbot path can time out and still continue to reload nginx and print SSL/HTTPS is enabled!, leaving the install in a misleading partially configured state instead of failing clearly.
Useful? React with ๐ย / ๐.
Summary
run_with_timeoutCOMMAND_TIMEOUT_SECONDSDependency
Stacked on PR #21 / branch
fix/initialize-odoo-databaseto keep the hardening series reviewable one slice at a time.Test Plan
python3 -m unittest tests/test_installer_features.py -vbash -n odoo_install.shscripts/validate.shgit diff --check