-
Notifications
You must be signed in to change notification settings - Fork 0
feat(audit): complete Paket H hardening pass #17
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
Changes from all commits
e68cead
9f54a2d
33b49f2
b6141c0
20ac120
09ce72f
c4fc62e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -23,10 +23,18 @@ trap 'rm -f "${LOCKFILE}"' EXIT INT TERM | |
|
|
||
| # --- secrets.env (optional) --- | ||
| if [[ -f "${SECRETS_FILE}" ]]; then | ||
| set -a | ||
| # shellcheck disable=SC1090 | ||
| source "${SECRETS_FILE}" | ||
| set +a | ||
| if [[ ! -O "${SECRETS_FILE}" ]]; then | ||
| echo "WARNUNG: ${SECRETS_FILE} gehört nicht dem aktuellen Nutzer und wird nicht geladen." >&2 | ||
| else | ||
| SECRETS_PERMS=$(stat -c '%a' "${SECRETS_FILE}" 2>/dev/null || true) | ||
| if [[ -n "${SECRETS_PERMS}" ]] && (( 10#${SECRETS_PERMS} > 600 )); then | ||
| echo "WARNUNG: ${SECRETS_FILE} hat zu offene Rechte (${SECRETS_PERMS}); erwartet 600 oder restriktiver." >&2 | ||
|
Comment on lines
+30
to
+31
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
For permission modes like Useful? React with 👍 / 👎. |
||
| fi | ||
| set -a | ||
| # shellcheck disable=SC1090 | ||
| source "${SECRETS_FILE}" | ||
| set +a | ||
| fi | ||
| fi | ||
|
|
||
| # --- venv-Prüfung --- | ||
|
|
||
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.
If
config.jsonexists but contains invalid UTF-8 bytes,Path.read_text(encoding="utf-8")raisesUnicodeDecodeError, which is not ajson.JSONDecodeErrororOSError. Before this change the broad handler fell back to defaults, but now app startup viaBlitztextConfig(...)crashes instead of recovering from a corrupt hand-edited config file.Useful? React with 👍 / 👎.