Harden the primary log sink#195
Merged
Merged
Conversation
7 tasks
codeforester
force-pushed
the
bug/192-20260725-primary-log-sink-hardening
branch
from
July 25, 2026 23:04
cd96d13 to
a0f3559
Compare
10 tasks
codeforester
marked this pull request as ready for review
July 25, 2026 23:07
codeforester
added a commit
that referenced
this pull request
Jul 25, 2026
## Summary - add one standalone logging smoke script that runs under any supported Bash and can assert an exact interpreter version - exercise default INFO output, dependency category isolation, dotted-category inheritance, `log_is_enabled`, DEBUG persistence, mode `0600`, file logging, UTC timestamps, and VERBOSE compatibility - run the smoke in normal local validation - add a dedicated Ubuntu job using the Docker Official Bash 4.2.53 image pinned to its immutable linux/amd64 manifest digest - isolate the compatibility container with a read-only repository, no network, dropped capabilities, `no-new-privileges`, a PID limit, and a bounded tmpfs ## Issue Closes #193 ## Validation - `tests/bash-42-logging-smoke.sh` — passed on local Bash 5.3.15 - `tests/bash-42-logging-smoke.sh 5 3 15` — exact-version assertion path passed - `./tests/validate.sh` — 321 BATS tests plus the logging smoke passed - `tests/lint-warnings.sh` - workflow YAML parsed successfully - `git diff --check` ## Notes - This PR is stacked on #195; its base branch is `bug/192-20260725-primary-log-sink-hardening`. - The local Docker daemon was unavailable, so the new GitHub Actions job is the exact Bash 4.2.53 runtime proof. - The pinned image is `docker.io/library/bash@sha256:0931edd3941d0603cb3d5da1cb298cf3eb6a579e09e094c3e34e2d5e9df8cddc`. - The complete BATS suite remains on hosted macOS and Ubuntu runners; the minimal 4.2 image runs only the focused compatibility contract. - No changelog entry is needed for this CI-only change. - `VERSION` remains unchanged; this work is targeted to the `v1.4.0` milestone. ## Checklist - [x] Branch name follows `<category>/<issue>-<YYYYMMDD>-<slug>`. - [x] Pull request is scoped to one issue, unless a documented multi-issue exception applies. - [x] Pull request body explains what changed and how it was validated. - [x] Relevant project checks pass. - [x] Documentation is updated when behavior or user-facing commands change. - [x] CHANGELOG is updated when the change is notable and release-worthy. - [x] Pull request includes `Fixes #<issue>` or `Closes #<issue>` when merge should close the issue.
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
log_is_enablednon-mutating while rejecting missing-parent,non-regular, symlink, non-owned, and unwritable targets
mode
0600before appendingpath for the remainder of the process
Issue
Closes #192
Validation
bats lib/bash/std/tests/lib_std.bats— 159 tests passed locally, with oneenvironment-specific process-listing skip
./tests/validate.sh— 321 tests passedshellcheck --severity=warning lib/bash/std/lib_std.shgit diff --checkNotes
security/191-20260725-safe-argv-logging.log_is_enableddoes not create or chmod a path; the final setup and appendremain best-effort across filesystem races and I/O failures.
out of scope.
VERSIONremains unchanged; this work is targeted to thev1.4.0milestone.
Checklist
<category>/<issue>-<YYYYMMDD>-<slug>.Fixes #<issue>orCloses #<issue>when merge should close the issue.