awslabs / awslabs/git-secrets

[FR] Add option to exclude files/directories

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

Description

I use git-crypt to keep secrets unencrypted in the working tree but encrypted in the commit history. This means that `git secrets --scan` will show files that get encrypted on commit, which I'd like to exclude from the scan. I don't want to stop using `--scan` entirely, though, because I also don't want to accidentally add secrets to files that are not managed by git-crypt, commit them, and catch them only at `--scan-history` time.

Being able to exclude specific files or directories from the secrets scan would be nice.

Contributor guide

Open the contributing guide

Research direction

Start by tracing the `git secrets --scan` command and how it selects files for scanning. Define how users specify excluded files or directories, then verify that excluded git-crypt-managed paths are skipped while other files remain scanned; also check that `--scan-history` behavior is unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
shell
Domain
cli, security
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 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.