Skip to content

🔒 fix(config): redact rejected option values - #353

Merged
gaborbernat merged 2 commits into
pytest-dev:mainfrom
gaborbernat:fix/pytest-env-type
Nov 19, 2026
Merged

gaborbernat merged 2 commits into
pytest-dev:mainfrom
gaborbernat:fix/pytest-env-type

Conversation

@gaborbernat

@gaborbernat gaborbernat commented Nov 19, 2026 •

Copy link
Copy Markdown
Collaborator

A rejected pytest option could put configuration values in ordinary test output. The plugin now reports the option name and expected type. Previous error handling. This addresses draft advisory ANT-2026-359WQ8C1.

Option validation can include the rejected data

_get_option converts validation failures at the three option reads to a short pytest usage error. Implementation. pytest option validation.

Behavior changes

Invalid env, env_files, and env_files_skip_if_set options stop collection. The diagnostic omits the rejected data.

Reported by OSS Scanner, ANT-2026-359WQ8C1.

@gaborbernat gaborbernat added bug Something isn't working security Security fix labels Nov 19, 2026
@gaborbernat
gaborbernat merged commit 702e450 into pytest-dev:main Nov 19, 2026
19 checks passed
@gaborbernat
gaborbernat deleted the fix/pytest-env-type 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 security Security fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant