Skip to content

Commit

Permalink
Merge pull request #87 from beccatripp/security-heading-70
Browse files Browse the repository at this point in the history
Security-heading-70
  • Loading branch information
hollandjg authored Jun 11, 2024
2 parents d709b6b + c4dfdc5 commit 5dfdbcc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions git-text-content.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ When there are more than one common ancestors that can be used for a three-way m

— Linus Torvalds[61]
octopus: This is the default when merging more than two heads.
Data structures[edit]
## Data structures

Git's primitives are not inherently a source-code management system. Torvalds explains:[62]

In many ways you can just see git as a filesystem—it's content-addressable, and it has a notion of versioning, but I really designed it coming at the problem from the viewpoint of a filesystem person (hey, kernels is what I do), and I actually have absolutely zero interest in creating a traditional SCM system.
Expand Down Expand Up @@ -187,7 +188,8 @@ The master branch is created by default with git init [107] and is often used as
Pushed commits should usually not be overwritten, but should rather be reverted[111] (a commit is made on top which reverses the changes to an earlier commit). This prevents shared new commits based on shared commits from being invalid because the commit on which they are based does not exist in the remote. If the commits contain sensitive information, they should be removed, which involves a more complex procedure to rewrite history.
The git-flow[112] workflow and naming conventions are often adopted to distinguish feature specific unstable histories (feature/*), unstable shared histories (develop), production ready histories (main), and emergency patches to released products (hotfix).
Pull requests are not a feature of git, but are commonly provided by git cloud services. A pull request is a request by one user to merge a branch of their repository fork into another repository sharing the same history (called the upstream remote).[113] The underlying function of a pull request is no different than that of an administrator of a repository pulling changes from another remote (the repository that is the source of the pull request). However, the pull request itself is a ticket managed by the hosting server which initiates scripts to perform these actions; it is not a feature of git SCM.
Security[edit]
## Security

Git does not provide access-control mechanisms, but was designed for operation with other tools that specialize in access control.[114]

On 17 December 2014, an exploit was found affecting the Windows and macOS versions of the Git client. An attacker could perform arbitrary code execution on a target computer with Git installed by creating a malicious Git tree (directory) named .git (a directory in Git repositories that stores all the data of the repository) in a different case (such as .GIT or .Git, needed because Git does not allow the all-lowercase version of .git to be created manually) with malicious files in the .git/hooks subdirectory (a folder with executable files that Git runs) on a repository that the attacker made or on a repository that the attacker can modify. If a Windows or Mac user pulls (downloads) a version of the repository with the malicious directory, then switches to that directory, the .git directory will be overwritten (due to the case-insensitive trait of the Windows and Mac filesystems) and the malicious executable files in .git/hooks may be run, which results in the attacker's commands being executed. An attacker could also modify the .git/config configuration file, which allows the attacker to create malicious Git aliases (aliases for Git commands or external commands) or modify extant aliases to execute malicious commands when run. The vulnerability was patched in version 2.2.1 of Git, released on 17 December 2014, and announced the next day.[115][116]
Expand Down

0 comments on commit 5dfdbcc

Please sign in to comment.