Skip to content

Check positional-only argument names#325

Closed
Neroli-realy wants to merge 1 commit into
zopefoundation:masterfrom
Neroli-realy:validating-arg-names
Closed

Check positional-only argument names#325
Neroli-realy wants to merge 1 commit into
zopefoundation:masterfrom
Neroli-realy:validating-arg-names

Conversation

@Neroli-realy

@Neroli-realy Neroli-realy commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Argument name validation skips positional-only parameters.

check_function_argument_names checks regular args, *args, **kwargs, and keyword-only args for forbidden underscore names, but not positional-only ones (before /).

check_function_argument_names() validated regular, *args, **kwargs and
keyword-only parameter names against the leading-underscore rule, but
omitted positional-only parameters (those before '/'). A positional-only
parameter could therefore be given a protected/injected name and a
default value, shadowing an injected guard hook (_getattr_, _getitem_,
_write_, _print_) so that generated guard calls resolve to an
attacker-controlled local instead of the safe policy hook.
@Neroli-realy

Copy link
Copy Markdown
Contributor Author

Closing this. Continuing through coordinated disclosure.

@Neroli-realy Neroli-realy deleted the validating-arg-names branch June 16, 2026 08:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant