Questions tagged [git]
A popular distributed revision control system. Built for speed, data integrity and with support for distributed, non-linear workflows.
105
questions
-1
votes
1
answer
97
views
How does github save files?
If I create a malicious .pdf file and upload it to github, this file can be exploited when processed in a program, right?
What about a .MD file where there is only text? I guess that it can also be ...
2
votes
0
answers
58
views
Why are certain hashes missing from the .git objects folder?
I'm currently attempting to pentest a web application created by a relation, who wanted me to find vulnerabilities and to let him know what exploits would be possible with said vulnerabilities.
I have ...
2
votes
0
answers
136
views
Is git-crypt or transcrypt more secure?
I'm looking at using either git-crypt or transcrypt to "transparently" encrypt a few secret files in a private github repository, using a symmetric key.
Separate from the debate of whether ...
0
votes
2
answers
117
views
Is git sparse-checkout secure?
I'm a software developer and our entire code of the project is stored in a single git repository. A small part of this now needs to be made available to a customer. He does not need to push to the ...
2
votes
1
answer
144
views
Git Remote Code Execution vulnerabilities as of January 17, 2023
GitHub Blog: https://github.blog/2023-01-17-git-security-vulnerabilities-announced-2
Git has 3 new Remote Code Execution vulnerabilities.
It's said in the blog that Git was already patched by version ...
0
votes
0
answers
27
views
enforcing version integrity on git repos
I'm working through a tabletop on code control and the question of ransomware came up. I figure someone has solved this.
Git is naturally resistant to ransomware - if someone's local copy of code gets ...
18
votes
2
answers
3k
views
Is this expect.php file (in all the git repositories of my web server) malicious? [closed]
Whenever I create a remote repository on my web server there seems to be a file called expect.php or options.php with the following code in it:
<?php
function visit_cookie() {
$h = $_COOKIE;
...
1
vote
1
answer
88
views
Git pre receive hook and fragments left behind
Quite a common use of a git pre-receive hook is to scan for sensitive information and then block from entering the repository. It appears from looking at examples, that conventionally, you are given ...
0
votes
1
answer
216
views
Do git commit signatures reveal key uid if different from git email?
I have a gpg key linked to my identity and real email address. I also use github with their private email functionality "[email protected]", which I set as my git email. ...
0
votes
0
answers
556
views
Can't sign commit with yubikey, GPG missing something
I don't know much about how yubikeys work, but I'm trying to sign a commit with one of them and I don't even know how to debug the problem. I got:
gpg --list-keys
/home/lz/.gnupg/pubring.kbx
----------...
0
votes
1
answer
273
views
Can you alter a Git repository without anyone noticing it?
Consider this scenario:
You have a central Git repository online (e.g. on Github, GitLab, etc.)
User1 and User2 have access to that repository
User1 is malicious and changes some files in a past ...
0
votes
3
answers
1k
views
Employee uploaded proprietary private repository on his github public account
A newly joined software engineer in our organization uploaded one of company's proprietary git repository on his personal Github public account, likely without nefarious intent.
How do I ensure this ...
1
vote
0
answers
22
views
Can I trust a hash commit for integrity of the entire repository? [duplicate]
Sometimes there's no tar release for some repo in github, and the download as zip button only generates a random zip with random hash. So, in my Dockerfile, I want to clone a repo but be able to check ...
1
vote
2
answers
440
views
which principles for ssh key algo selection I should use for git-mainly operations?
which rules I should choose for ssh algo selection, provided it will be used near 100% for git operations? I'm going to use it with git on linux laptops, often used on public wifi.
currently I have:
...
3
votes
1
answer
368
views
Git Signing commits in a private repo
Linus mentioned in 2009 that "Signing each commit is totally stupid".
Has the common view evolved on this subject since then ? Doesn't it protect against someone usurping your identity to ...
2
votes
2
answers
445
views
How to detect weak SSH keys affected by CVE-2021-41117
Recently, GitLab[1] and GitKraken[2] notified users about a vulnerability in GitKraken version v in range 7.6.0<=v<=8.0.0. Those versions are affected by CVE-2021-41117[3] and therefore, ...
0
votes
1
answer
2k
views
Using Github's Public IP Address as Remote URL
My company distributes software that runs on locally installed Ubuntu Virtual Machines. To update the software, we pull our latest code down from Github.
Some IT departments have github blocked on ...
1
vote
1
answer
145
views
Keeping a whitelist of GPG keys on git server
Why don’t git servers (gitlab, github, etc…) allow for a whitelist of public GPG keys allowed to sign commits? For example, Alice owns a GPG key with fingerprint 0A1B2C3D while Bob’s is 4E5F0A0B.
They ...
4
votes
1
answer
1k
views
Are there any negative consequences if you change your ssh config for a host with `UpdateHostKeys no`?
I recently came across a question on stackoverflow.com regarding gitlab.com and ssh config. The solution apparently is to update your ssh config with the following:
Host gitlab.com
UpdateHostKeys ...
1
vote
0
answers
283
views
What are the best practices pertaining to signing your git commits on GitHub?
On GitHub, anyone can push a commit with your name and email. To combat this, you can gpg sign your commits.
However, in the scenario that the private key is exposed, the only option GitHub offers is ...
32
votes
3
answers
8k
views
Is it safe to share .git folder of a public repo?
Say I cloned a repo, then maybe worked on it a bit. Then I reverted/pushed all changes, so my friend has all the repo files. Is it safe for me to send him the .git folder? Is there any private ...
47
votes
3
answers
6k
views
Security implications of stolen .git/objects/ files
As a security in-charge, I just noticed that one of our production web apps was attacked by some hackers. The attacker accessed the .git/objects/ files.
I already modified .htaccess to make .git and ...
1
vote
1
answer
293
views
file-integrity monitoring tools for PCI compliance
A former employer of mine has reached out to me to assist them with PCI certification (I guess I'll be getting a 1099-NEC from them next year as a result). Here's the point I'm at in the questionnaire:...
2
votes
1
answer
467
views
When I sign a git commit, what is my signature actually based on?
I'm curious about what data actually gets signed when I sign a git commit or tag? Is it simply the commit message and metadata?
How could I manually duplicate the signature, use gpg instead of git?
1
vote
1
answer
142
views
How does one tighten up their git repo security for Powershell?
Back when I was a Java developer, we used to use build.properties or build.xml to store sensitive information outside of the VCS and just add the file with whatever passwords would go in it after ...
5
votes
2
answers
999
views
How can the authenticity of releases on GitHub and GitLab be ensured? Can their hashsums change?
To help ensure authenticity of packages some projects on GitHub and on GitLab add hashsums to the descriptions of the release on the Releases page.
Sometimes, at least here, the hashsum are made part ...
1
vote
0
answers
88
views
New Win10 and Old YubiKey4; trying to configure GPG Sign for existing key
I have been using a YubiKey 4 to sign git commits for a few years on Ubuntu.
I am setting up a new Windows10 machine and want to use the same signing key from Windows; however I cannot seem to point ...
0
votes
1
answer
327
views
git reflog is showing plain text password used as a secret texts or files in Jenkins
We are using Jenkins Freestyle Project to push the changes on the remote server. We are executing shell script on remote host using ssh for it. To pull the changes on the remote server, we are using ...
-1
votes
1
answer
2k
views
Source of RegEx examples of Secret Detection patterns in repositories?
Where can I find RegEx that can pattern match common secret strings?
I have a product that scans repos and commits and in case a developer tries to commit a secret (i.e. passwords, keys). It scans for ...
1
vote
1
answer
691
views
how to anonymously contribute to Github [closed]
I have noticed how important has it become to anonymously contribute to github. I have just created a new account with protonmail and removed my actual account from my Macbook. I still have the public ...
0
votes
1
answer
117
views
Can we detect risk signals or potential vulnerabilities in git meta-data?
I'm wondering whether git commit metadata can shred light on potential risk signals or vulnerabilities.
Henry Hinnefeld has investigated this, here but this seems to be a way of detecting ...
2
votes
1
answer
477
views
What are the security risks if my server with github ssh access key is hacked?
I connect to my github repo using ssh keys which I have whitelisted in GitHub. I do pull/push to this repo from my linux server which is hosted in AWS.
If a hacker gains access to this AWS server, ...
6
votes
1
answer
3k
views
Recover lost GPG public key
I sign my Git commits with a GPG key which I stored on an old computer. I lost this key so I created a new one to sign my commits with. It has not been compromised so I do not wish to revoke it.
...
0
votes
1
answer
564
views
How to store encrypted notes in a public git repository?
I save my notes in a git repository in plaintext (markdown). Currently, the remote repository is another computer in my appartment. I am thinking about moving this remote repository to a remote server....
0
votes
2
answers
603
views
Github private repo safe from scrapers?
I have a question about the security of private repo's on Github. Assume you use HTTPS authenticated against SAML SSO to fetch and push changes to remote. Could an outside adversary scrape the files ...
1
vote
0
answers
94
views
Risk of committing IdentityFile name for OpenSSH configuration to public repository
What is the risk of committing the IdentityFile line for each of my Host entries in my ~/.ssh/config to my public dotfiles repository? Would providing such information make it any easier for an ...
4
votes
1
answer
1k
views
How secure is a git commit hash (sha1)?
Consider the following scenario:
Someone, using a good version of git, issues a git clone followed by a git checkout of some commit hash (the 40 character hexadecimal).
To clarify, assume Bob does ...
7
votes
1
answer
885
views
What guarantees does GPG-signing a git commit provide?
It's pretty clear that GPG signing and GitHub ssh keys serve different purposes
But what is the use of GPG signing commits? Is it just that you know that commit abcd1234 was signed by Alice's key? Is ...
4
votes
1
answer
249
views
Do Git Commit signatures prevent repository modification?
Git commit signatures seems the signature signs the commit message, but I can't find much information on what the signatures actually solve, and don't understand the git architecture.
If I have a ...
2
votes
0
answers
197
views
Storing users' private keys to clone git repositories on their behalf
Let's say I have a multi-user application deployed in a customer's data center that needs to clone/update git repositories - both "interactively" when a user is creating a new project (which consists ...
1
vote
0
answers
114
views
CVE vulnerable apps repository [closed]
According to your experience, do you know if a repository of vulnerable apps indexed by CVE exists?
Exploit-DB offers vulnerable apps, i.e. for:
https://www.exploit-db.com/exploits/46962
it is ...
7
votes
1
answer
2k
views
Am I actually seeing a Man-in-the-Middle when pushing to GitHub?
When I attempt git push origin, I get the following error:
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@...
5
votes
1
answer
733
views
What could an attacker do on a server where Source Control Management (SCM) files are accessible?
I'm testing some servers with OpenVAS and I run into some SCM files that are remotely accessible:
.git/config
.git//info/exclude
.git/description
.git/HEAD that contains refs/heads/master
and
.git/...
3
votes
1
answer
316
views
Providing access to Git repo behind a Firewall using Certs/Keys for Authentication
We have a Git repo sitting behind a firewall. As I see it, there are two ways of authenticating/accessing the Git repo:
Add a Reverse HTTP Proxy in the DMZ that communicates with the Git repo. This ...
2
votes
2
answers
342
views
Confused about GitHub's GPG key association and authenticity
I'm not sure I understand GPG, and something on GitHub has left me wondering.
In git, a GPG private key can then be used to sign commits, which allows someone who is in possession of the public key ...
1
vote
1
answer
730
views
How can a git repository be sanitized efficiently and effectively?
A git repository will contain information on every previous commit and all the information in that commit.
That means that if you have a git repository that contained any information such as secret ...
1
vote
0
answers
118
views
git credential cache and store
I just noticed we can use git credential in order to cache our username and password so we do not need to do it everytime especially if it's on server as usually for me I would add ssh for local ...
1
vote
0
answers
115
views
Secure scanning of git repositories
Is it possible to scan files on a 3rd party gitlab installation before they are downloaded ?
In the scenario I'm thinking about colleagues are worried about the potential for malware to be attached ...
1
vote
1
answer
184
views
How can I improve the security of my protected branches in GitHub/GitLab?
Many online Git hosting services (such as GitHub and GitLab) allow you to 'protect' certain branches so that only project administrators can modify them.
The purpose of this is to allow non-admin ...
1
vote
2
answers
402
views
Automatic push on commit (on bitbucket repository)
I have a website which commits to a git local repository all the changes done.
I need to automatically push them directly from the web server to a remote Bitbucket repository.
The authentication ...