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

Ensure that the source dir is marked safe for newer versions of git #50

Merged
merged 1 commit into from
Jul 17, 2023

Conversation

bluesliverx
Copy link
Contributor

Description

Newer versions of git can complain about an unsafe /source dir if the owner of the directory is different than the current owner. See https://github.blog/2022-04-12-git-security-vulnerability-announced/#cve-2022-24765 for more info. This is not applicable to buildrunner invocations since they are run in docker images specified by the user. Therefore we always mark the git directory as safe before any commands are executed. This may not catch ALL cases where it is needed (i.e. entrypoint of the image triggers the issue), but it should cover a majority of cases. Any other cases will need to be handled by the user in their images by using the same (or similar) git config command.

Related Issue

Motivation and Context

See the description above for context.

How Has This Been Tested?

A functional test file was added that triggers the behavior. Without the fix, it fails, with the fix, it succeeds.

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@bluesliverx bluesliverx merged commit ff32b8a into adobe:main Jul 17, 2023
7 checks passed
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.

2 participants