Skip to content

fatal: unsafe repository ('...' is owned by someone else) and impact of CVE-2022-24765 fix for git #707

@KOLANICH

Description

@KOLANICH

Hi. Today I have noticed that editable installation of packages from root stopped working. It is because of git version with fix for CVE-2022-24765 has been released and delivered.

It writes that LookupError: setuptools-scm was unable to detect version for ....

Investigation and adding dumping resulted in pinpointing the error to .git.from_potential_worktree, where git errors with

fatal: unsafe repository ('...' is owned by someone else)

To add an exception for this directory, call:
	git config --global --add safe.directory

.

  1. I know that editable installs from root are insecure and that just adding files to such dirs allows privelege escallation.
  2. I know that pip must not execute wheel building elevated even if called from root, it should drop its rights for the time it builds wheel, and it is a flaw in pip it doesn't do that.

But those are not flaws in setuptools_scm. Let's concentrate on the flaws on setuptools_scm related to the issue.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions