awslabs / awslabs/git-secrets

Support for mirrorred repositories

Open
#207 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Shell
Stars
13.4k
Forks
1.3k
PR merge metrics
No merged PRs in 30d

Description

When trying to scan a git repository checked out using `git clone --mirror`, the tool fails with an error:

```fatal: this operation must be run in a work tree```

To duplicate, try the following:
```
git clone --mirror https://github.com/awslabs/git-secrets.git
cd git-secrets.git/
git secrets --scan
```

Contributor guide

Open the contributing guide

Research direction

Reproduce the failure by running `git clone --mirror` on the example repository, then `git secrets --scan` from the mirrored checkout. Trace the command entry point and how it invokes Git, and verify that scanning a mirror completes without the work-tree error while normal repositories still work.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, shell
Domain
cli, security
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.