-
Notifications
You must be signed in to change notification settings - Fork 5
Mark the repo as safe for Git #55
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
Conversation
This relates to actions/checkout#760 Some tests need git to be functional (eg pre-commit checks) and since CVE-2022-24765 git checks directory ownership. Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @abompard. Interesting stuff. I guess this should be OK, but I made an inline style-only suggestion.
And it seems there is a problem when the example project is mounted as a volume inside the container. |
The example project has:
And that point to a nonexistent directory when mounted in the container. Apparently can be overridden by e.g. |
Trying that. |
I hit the problem we are trying to fix here in one of my projects so I'm gonna test this PR and we can merge it then. |
This is a little bit tricky to reproduce. What I had to do locally is to add a user inside the running container, change ownership of the The problem is with the levels of git config files:
We cannot use --local because we might have that file mounted from outside of the container and we don't want to change it. We cannot use --global because the $HOME variable is not available in tox without explicit passenv=HOME and therefore git cannot find the |
I can theoretically test this in github actions if I:
Do you think it's worth the effort? |
No. |
And do you think this is ready to be merged? |
I can confirm that the fix solved the problem with pre-commit in one of my projects. Thanks @abompard for making it simpler for us by providing all the information. |
This relates to actions/checkout#760
Some tests need git to be functional (eg pre-commit checks) and since CVE-2022-24765 git checks directory ownership.