Skip to content

Fix ansible --become argument injection - #636

Open
sfc-gh-ikryvanos wants to merge 1 commit into
mainfrom
ikryvanos/ansible-become-user-injection
Open

Fix ansible --become argument injection#636
sfc-gh-ikryvanos wants to merge 1 commit into
mainfrom
ikryvanos/ansible-become-user-injection

Conversation

@sfc-gh-ikryvanos

Copy link
Copy Markdown
Collaborator

--become is a boolean flag, so appending the user as a separate argument left it as an extra positional (a second playbook path). Pass the user as a single --become-user= token, validate it with a strict regex (bare account name, no slash, no leading dash), and terminate option parsing with "--" before the playbook path.

--become is a boolean flag, so appending the user as a separate argument left
it as an extra positional (a second playbook path). Pass the user as a single
--become-user=<user> token, validate it with a strict regex (bare account name,
no slash, no leading dash), and terminate option parsing with "--" before the
playbook path.

Co-authored-by: Cursor <cursoragent@cursor.com>
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