Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: disable shell mode for git executor AAP-17778 #477

Merged
merged 8 commits into from
Nov 2, 2023

Conversation

Alex-Izquierdo
Copy link
Collaborator

Disable "shell=True" for the subprocess executor and refactor the way to prevent password leaks.
Includes:

  • Undo the "GIT_PASSWORD" environment variable. Passwords are again passed directly on the cmdline but removed from messages when catching the exception.
  • Implement a concrete exception for authentication errors.
  • Minor fix in the clone method which is a class method but returned GitRepository class instead.
  • Update and add new tests.
    Jira: https://issues.redhat.com/browse/AAP-17778

@Alex-Izquierdo Alex-Izquierdo requested a review from a team as a code owner November 2, 2023 13:12
jshimkus-rh
jshimkus-rh previously approved these changes Nov 2, 2023
hsong-rh
hsong-rh previously approved these changes Nov 2, 2023
@Alex-Izquierdo Alex-Izquierdo dismissed stale reviews from hsong-rh and jshimkus-rh via b8896e2 November 2, 2023 17:39
Dostonbek1
Dostonbek1 previously approved these changes Nov 2, 2023
Dostonbek1
Dostonbek1 previously approved these changes Nov 2, 2023
@Alex-Izquierdo Alex-Izquierdo merged commit e7cabbd into ansible:main Nov 2, 2023
2 checks passed
Dostonbek1 pushed a commit to Dostonbek1/eda-server that referenced this pull request Nov 7, 2023
@Alex-Izquierdo Alex-Izquierdo deleted the fix-cmd-injection branch November 15, 2023 12:11
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.

4 participants