Highlights
This patch release fixes a security issue in the default secrets source, a regression from 2.14.2 that dropped nested secrets on Kubernetes, and a CliApp.serialize round-trip bug with CliUnknownArgs.
Security
SecretsSettingsSourceno longer follows symlinks that resolve outsidesecrets_dir(#1138, fixes #1137). A secret file that is a symbolic link to a file outsidesecrets_dirwas read into the matching field, so anyone who could place a link insecrets_dircould make the application load any file it can read. This is the plain-source counterpart of GHSA-4xgf-cpjx-pc3j, whose fix in 2.14.2 covered onlyNestedSecretsSettingsSource. Links that stay insidesecrets_dir, such as the Kubernetes secret volume layout (passwdlinking to..data/passwd), still work.
Behavior changes
- A secret file that resolves outside
secrets_diris now skipped with a warning instead of being read (#1138). If you deliberately point secret files at targets elsewhere on disk, move or copy the targets intosecrets_dir, or pointsecrets_dirat the directory that holds them. NestedSecretsSettingsSourceskips hidden entries (names starting with.) again, as it did before 2.14.2, and stops with aSettingsErrorafter 10,000 entries (#1070).
Bug fixes
Secrets
- With
secrets_nested_subdir=True, a directory reached through a second symlink is loaded again (#1070, fixes #1061). Since 2.14.2, only the name that sorted first was walked, so the standard Kubernetes secret volume layout (dblinking to..data/db) silently lost its nested secrets. - A symlink loop inside
secrets_diris skipped instead of aborting the load withRuntimeErroron Python 3.11 and 3.12 (#1070, #1138).
CLI
CliApp.serializekeeps each level'sCliUnknownArgsbefore that level's subcommand token (#1050, fixes #1048). They were emitted after the last subcommand, so parsing the output again moved a parent's unknown args onto the subcommand.
All changes
What's Changed
- Fix CliApp.serialize moving a parent unknown args into the subcommand by @XXXXXQ-0206 in #1050
- Load nested secrets reached through a second directory link by @digit50 in #1070
- Prevent SecretsSettingsSource from following symlinks outside secrets_dir by @twotnguyen in #1138
New Contributors
- @XXXXXQ-0206 made their first contribution in #1050
- @twotnguyen made their first contribution in #1138
Full Changelog: v2.16.2...v2.16.3