fedora-modularity / libmodulemd

C Library for manipulating module metadata files
MIT License
31 stars 52 forks source link

CI: Mark $GITHUB_WORKSPACE directory safe for git #596

Closed ppisar closed 2 years ago

ppisar commented 2 years ago

git addressed CVE-2022-24765 by refusing to process a git repository configuration file if the repository is owned by a different user.

That broke CI on GitHub which uses a different user for checking out and for running the tests. actions/checkout worked around it for itself, but it reverts safe.directory git settings on exit.

Hence this patch fixes it by explicitly setting git option safe.directory when a packit, which calls git, is called.

https://github.com/github-actions-x/commit/issues/30