Skip to content

🔒 fix(expand): redact field lookup errors - #354

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

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

Conversation

@gaborbernat

@gaborbernat gaborbernat commented Nov 19, 2026 •

Copy link
Copy Markdown
Collaborator

A failed template lookup could put configuration text in ordinary test output. The plugin now reports the affected entry. Previous error handling. This addresses draft advisory ANT-2026-3ZPMZ8RN.

Field lookup raises distinct exceptions

_expand_value handles field lookup and formatting errors at the same boundary. Implementation. Python field lookup.

Behavior changes

Malformed templates stop collection with exit status 4. The diagnostic names the entry and omits the field text.

Reported by OSS Scanner, ANT-2026-3ZPMZ8RN.

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