mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-12-01 21:44:23 +01:00
updating readme and comments
This commit is contained in:
1 parent
2810eccc82
commit
e7fbcf5333
2 files changed
+6
-3
No files matched your search
@@ -64,6 +64,7 @@ Application Options:
|
||||
--password= Password for git repo
|
||||
--access-token= Access token for git repo
|
||||
--commit= sha of commit to audit
|
||||
--files-at-commit= sha of commit to audit all files at commit
|
||||
--threads= Maximum number of threads gitleaks spawns
|
||||
--ssh-key= path to ssh key used for auth
|
||||
--uncommitted run gitleaks on uncommitted code
|
||||
@@ -90,7 +91,6 @@ Application Options:
|
||||
|
||||
Help Options:
|
||||
-h, --help Show this help message
|
||||
|
||||
```
|
||||
|
||||
### Docker usage examples
|
||||
|
||||
+5
-2
@@ -257,6 +257,9 @@ func InspectString(content string, c *object.Commit, repo *Repo, filename string
|
||||
|
||||
type commitInspector func(c *object.Commit, repo *Repo) error
|
||||
|
||||
// inspectCommit accepts a commit hash, repo, and commit inspecting function. A new commit
|
||||
// object will be created from the hash which will be passed into either inspectCommitPatches
|
||||
// or inspectFilesAtCommit depending on the options set.
|
||||
func inspectCommit(hash string, repo *Repo, f commitInspector) error {
|
||||
h := plumbing.NewHash(hash)
|
||||
c, err := repo.CommitObject(h)
|
||||
@@ -301,8 +304,8 @@ func inspectCommitPatches(c *object.Commit, repo *Repo) error {
|
||||
})
|
||||
}
|
||||
|
||||
// inspectFilesAtCommit accepts a commit object and a repo. This function is only called when the --commit=
|
||||
// option has been set. That option tells gitleaks to look only at a single commit and check the contents
|
||||
// inspectFilesAtCommit accepts a commit object and a repo. This function is only called when the --files-at-commit=
|
||||
// option has been set. That option tells gitleaks to look only at ALL the files at a commit and check the contents
|
||||
// of said commit. Similar to inspectPatch(), if the files contained in the commit are a binaries or if they are
|
||||
// whitelisted then those files will be skipped.
|
||||
func inspectFilesAtCommit(c *object.Commit, repo *Repo) error {
|
||||
|
||||
Reference in new issue
Block a user