Skip to content

🐛 fix(toml): require a boolean skip option - #355

Merged
gaborbernat merged 1 commit into
pytest-dev:mainfrom
gaborbernat:fix/pytest-env-skip
Nov 19, 2026
Merged

gaborbernat merged 1 commit into
pytest-dev:mainfrom
gaborbernat:fix/pytest-env-skip

Conversation

@gaborbernat

Copy link
Copy Markdown
Collaborator

A non-boolean env_files_skip_if_set in a native TOML table fell through to the INI default, allowing dotenv assignments to overwrite inherited values. The plugin now rejects that configuration. Previous behavior. Fixes #352.

The option has a reserved TOML key

_load_toml_config validates the option before reading entries or applying files. _parse_toml_config skips the reserved key. Implementation. TOML booleans.

Behavior changes

Use an unquoted true or false. A native table can no longer set an environment variable through this key. An absent option can still inherit the INI setting.

Reported by OSS Scanner, ANT-2026-H6GGI22I.

@gaborbernat gaborbernat added the bug Something isn't working label Nov 19, 2026
@gaborbernat
gaborbernat merged commit 8f7985a into pytest-dev:main Nov 19, 2026
20 checks passed
@gaborbernat
gaborbernat deleted the fix/pytest-env-skip branch November 23, 2026 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

A mistyped env_files_skip_if_set overwrites inherited variables

1 participant