diff --git a/CHANGELOG.md b/CHANGELOG.md index e78418a..c48e960 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,18 @@ and versions are tracked in the repo-root `VERSION` file. ## [Unreleased] +### Fixed + +- Hardened file-section processing, allowed-dirty-path checks, temporary + directory normalization, launcher symlink resolution, and pass-by-name output + handling for the v1.5.0 hardening train. + +### Documentation + +- Aligned the public Bash API documentation with implementation behavior, + including list removal argument order, TTY detection, assertion semantics, + temporary output arguments, and fatal function assertions. + ## [1.4.0] - 2026-07-25 ### Added diff --git a/lib/bash/list/README.md b/lib/bash/list/README.md index 2567cf0..85215cd 100644 --- a/lib/bash/list/README.md +++ b/lib/bash/list/README.md @@ -13,7 +13,7 @@ helpers are available. Append one or more values to a named indexed array. - `list_prepend [value...]` Prepend one or more values to a named indexed array. -- `list_remove ` +- `list_remove ` Remove all exact matches from a named indexed array. - `list_contains ` Predicate that checks whether a named indexed array contains a value. diff --git a/lib/bash/std/README.md b/lib/bash/std/README.md index 49a0b17..a842722 100644 --- a/lib/bash/std/README.md +++ b/lib/bash/std/README.md @@ -54,13 +54,19 @@ Functions that return a value through a variable name mutate that caller-owned variable only after validating it. Unless noted otherwise, predicates return zero for success and nonzero for a false or invalid condition. +Required arguments are shown with angle brackets, optional arguments with square +brackets, and variadic arguments with `...`. Callers should pass only the +documented arguments. Public helpers that write through caller-supplied +variable or array names reserve the `__` prefix for library-internal state; +such output names are rejected before caller state is changed. + ### Runtime and Imports - `base_bash_libs_require_version `: exits with a diagnostic when the loaded package version is older than the requested dotted numeric version. - `check_bash_version`: returns zero for Bash 4.2 or newer and reports the required version otherwise. -- `is_interactive`: returns zero when stdin and stderr are interactive TTYs. +- `is_interactive`: returns zero when stdin is attached to an interactive TTY. - `import `: sources a relative path from `__SCRIPT_DIR__` or an absolute path; exits when the library cannot be sourced. - `get_my_source_dir `: stores the caller script directory in a @@ -122,8 +128,8 @@ zero for success and nonzero for a false or invalid condition. - `std_register_cleanup_path `, `std_unregister_cleanup_path `: add or remove safe paths from exit cleanup; invalid paths are rejected. -- `std_make_temp_file [--keep] [result_var] [prefix]` and - `std_make_temp_dir [--keep] [result_var] [prefix]`: create a temporary path, +- `std_make_temp_file [--keep] [prefix]` and + `std_make_temp_dir [--keep] [prefix]`: create a temporary path, store it in the caller variable, and register it for cleanup unless `--keep` is used. @@ -132,15 +138,17 @@ zero for success and nonzero for a false or invalid condition. - `std_command_path `: stores the resolved executable path or returns nonzero when the command is unavailable. - `std_function_exists `: returns zero when a Bash function exists. -- `assert_function_exists `: returns nonzero and logs missing - functions. +- `assert_function_exists `: exits through `fatal_error` when one or + more required functions are missing or invalid. Use `std_function_exists` for + a non-fatal predicate. - `assert_variable_name `: validates Bash variable names. - `assert_indexed_array ` and `assert_associative_array `: validate caller-owned array declarations. - `assert_not_null `: validates that named variables are set and non-empty without treating values as variable names accidentally. -- `assert_integer ` and `assert_integer_range `: - validate decimal integers and inclusive bounds. +- `assert_integer ` and + `assert_integer_range `: validate the values of named + variables as decimal integers and enforce inclusive bounds. - `assert_arg_count [max]`: validates exact or ranged positional argument counts. - `assert_command_exists `, `assert_file_exists `,