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

Git safe.directory — next steps #984

Closed
2 tasks
0x2b3bfa0 opened this issue Apr 22, 2022 · 1 comment · Fixed by #986
Closed
2 tasks

Git safe.directory — next steps #984

0x2b3bfa0 opened this issue Apr 22, 2022 · 1 comment · Fixed by #986
Assignees
Labels
ci-github cml-ci Subcommand icebox p2-nice-to-have Low priority technical-debt Refactoring, linting & tidying

Comments

@0x2b3bfa0
Copy link
Member

0x2b3bfa0 commented Apr 22, 2022

This issue is a follow–up of #974 (review) and some of the surrounding comments.

Security

TL;DR CVE-2022-24765 — the vulnerability safe.directory prevents — doesn't quite apply to GitHub Actions workflows. I still have to edit this section and include an extended explanation, but I'm too lazy and have more important things in the backlog.

Tests

We may want to add some tests for this, although our current test suite is not versatile enough to do it cleanly.

Improvements

  • Create an ephemeral ~/.gitconfig for every cml run and delete it afterwards, instead of permanently modifying the user's global configuration. See Enforce safe directory actions/checkout#762 for an implementation example.
  • Make changes permanent only when running cml ci (similar to what we do now)

Resolution

If your job pushes to git or something after checkout, that will continue to fail. We need to figure out how to address this at an ecosystem level, outside of the checkout action.actions/checkout#762 (comment)

GitHub acknowledges that git operations other than actions/checkout are still broken. There is still hope of this issue being fixed upstream in the mid term.

References

Issue and fix on iterative/cml

Issue and fix on actions/checkout

Git release highlights

Vulnerability

@0x2b3bfa0 0x2b3bfa0 added technical-debt Refactoring, linting & tidying ci-github p2-nice-to-have Low priority cml-ci Subcommand labels Apr 22, 2022
@0x2b3bfa0 0x2b3bfa0 linked a pull request Apr 23, 2022 that will close this issue
@0x2b3bfa0 0x2b3bfa0 changed the title safe.directory follow–up Git safe.directory — next steps Apr 25, 2022
@0x2b3bfa0
Copy link
Member Author

Existing behavior is good enough, closing as completed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci-github cml-ci Subcommand icebox p2-nice-to-have Low priority technical-debt Refactoring, linting & tidying
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant