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

Validate repository directory ownership (v1.3) #6268

Merged
merged 9 commits into from
Apr 12, 2022

Conversation

ethomson
Copy link
Member

Backport of #6266 to the v1.3 branch.

GitHub is removing support for the unauthenticated git protocol; test
with the https protocol.
Provide individual file ownership checks for both the current user and
the system user, as well as a combined current user and system user
check.
Ensure that the repository directory is owned by the current user; this
prevents us from opening configuration files that may have been created
by an attacker.
Provide a mock for file ownership for testability.
Test that we prevent opening directories that are not owned by
ourselves.
Pull the global configuration loader out of the symlink check so that it
can be re-used.
Obey the `safe.directory` configuration variable if it is set in the
global or system configuration. (Do not try to load this from the
repository configuration - to avoid malicious repositories that then
mark themselves as safe.)
Introduce the `GIT_OPT_SET_OWNER_VALIDATION` option, so that users can
disable repository ownership validation.
@ethomson ethomson merged commit a9eac6a into maint/v1.3 Apr 12, 2022
@ethomson ethomson deleted the ethomson/ownership_13 branch April 12, 2022 18:22
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.

None yet

1 participant