Zachary Rice
870194be13
fix errors when using protect and an external git diff tool ( #1318 )
2023-12-23 15:52:41 -06:00
Zachary Rice
179c607541
rename filesystem to directory ( #1317 )
2023-12-22 11:08:00 -06:00
Liron Biam
8de8938ad4
Enhance Secret Descriptions ( #1300 )
...
* Enhance secret descriptions in gitleaks.toml
* adjust the rule configuration descriptions
* missing spaces in gitleaks.toml
2023-11-29 17:03:11 -06:00
Zachary Rice
ca7aa14542
Small refactor detect and sources ( #1297 )
2023-11-22 10:37:29 -06:00
Oleksandr Redko
01e60c81e6
chore(config): refactor to go generate; simplify configRules init ( #1295 )
2023-11-21 19:52:50 -06:00
Zach
54f5f04a1f
forgot symlinks
2023-11-19 11:32:10 -06:00
Zachary Rice
221d5c40e7
pretty apparent 'protect' and 'detect' should be merged into one command ( #1294 )
2023-11-19 11:21:40 -06:00
128b50f67b
style: sort the stopwords ( #1289 )
...
* style: sort the stopwords
* run cmd
---------
Co-authored-by: Nick Nungester <nick.nungester@acaglobal.com >
Co-authored-by: Zach <zricer@protonmail.com >
2023-11-18 12:28:17 -06:00
Zachary Rice
dab7d0292a
dont crash on 100gb files pls ( #1292 )
v8.18.1
2023-11-17 14:56:02 -06:00
Zachary Rice
e63b657bcf
remove secretgroup from default config ( #1288 )
...
* remove secretgroup from default config
* update test data and AWS
* leave secretgroup
2023-11-10 12:53:07 -06:00
Baruch Odem (Rothkoff)
20fcf5009f
feat: Hashicorp Terraform fields for password ( #1237 )
...
* Hashicorp Terraform fields for password
Fixes #1236
* fix duplicate description
* set caseInsensitive
2023-11-09 14:31:16 -06:00
Eng Zer Jun
b49667786e
perf: avoid allocations with (*regexp.Regexp).MatchString ( #1283 )
...
We should use `(*regexp.Regexp).MatchString` instead of
`(*regexp.Regexp).Match([]byte(...))` when matching string to avoid
unnecessary `[]byte` conversions and reduce allocations.
Example benchmark:
var pathRegex = regexp.MustCompile(".*.yaml")
func BenchmarkMatch(b *testing.B) {
for i := 0; i < b.N; i++ {
if match := pathRegex.Match([]byte("./config/deploy.yaml")); !match {
b.Fail()
}
}
}
func BenchmarkMatchString(b *testing.B) {
for i := 0; i < b.N; i++ {
if match := pathRegex.MatchString("./config/deploy.yaml"); !match {
b.Fail()
}
}
}
goos: linux
goarch: amd64
pkg: github.com/zricethezav/gitleaks/v8/detect
cpu: AMD Ryzen 7 PRO 4750U with Radeon Graphics
BenchmarkMatch-16 2167712 657.9 ns/op 24 B/op 1 allocs/op
BenchmarkMatchString-16 3275372 324.8 ns/op 0 B/op 0 allocs/op
PASS
ok github.com/zricethezav/gitleaks/v8/detect 3.436s
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com >
2023-10-28 16:31:43 -05:00
wayne-snyk
a3ab4e8ac5
refactor: more explicit rules ( #1280 )
2023-10-23 14:11:37 -05:00
Norman Soetbeer
bd9a25a379
bugfix: reduce false positives for stripe tokens by using word boundaries in regex ( #1278 )
2023-10-15 21:41:38 -05:00
Yeonghae Choi
6d0d8b5068
add Infracost API rule ( #1273 )
2023-10-08 20:44:02 -05:00
Oleksandr Redko
2959fc072c
refactor: simplify test asserts ( #1271 )
2023-10-03 10:38:08 -05:00
Zachary Rice
d37b38f2ee
Update Makefile
2023-09-22 09:29:19 -05:00
Oleksandr Redko
14b1ca9fd9
refactor: change detect tests to t.Fatal instead of log.Fatal ( #1270 )
2023-09-20 13:46:35 -05:00
Brandon Welsch
d9f86d6123
feat(rules): Add detection for Scalingo API Token ( #1262 )
...
* feat(rules): Add detection for Scalingo API Token
* fix(rules): Add boundary on both ends of Scalingo API Token regex to avoid falve positives
2023-09-04 10:20:56 -05:00
Richard Gomez
ed34259e9c
feat(jwt): detect base64-encoded tokens ( #1256 )
2023-08-30 10:39:10 -05:00
Savely Krasovsky
0d5e46fecb
feat: add --ignore-gitleaks-allow cmd flag ( #1260 )
...
* feat: add --ignore-gitleaks-allow cmd flag
* typo: fix
2023-08-30 09:34:59 -05:00
Zachary Rice
a82ac29976
switch out libs ( #1259 )
2023-08-29 12:01:36 -05:00
Savely Krasovsky
0b84afa0fa
fix: no-color option should also affect zerolog output ( #1242 )
2023-08-29 11:17:29 -05:00
Gian Miguel Del Mundo
8976539177
Fixed lineEnd indexing if the match is the whole line ( #1223 )
2023-08-29 11:09:47 -05:00
Frank and Zachary Rice
30c6117aaa
feat: Add optional redaction value, default 100 ( #1229 )
...
This commit introduces an optional value for the --redact flag, allowing
users to specify the extent of redaction for secrets. The valid range of
values is from 0 (no redaction) to 100 (full redaction).
If no value is provided, the default redaction value is set to 100,
resulting in complete redaction by replacing the secret with the term
'REDACTED'. This preserves the original behavior of the --redact flag.
Co-authored-by: Zachary Rice <zachary.rice@trufflesec.com >
2023-08-29 11:03:23 -05:00
Richard Gomez
e9135cf0b5
fix(jwt): longer segment lengths ( #1214 )
2023-08-29 10:54:09 -05:00
Jasper Boeijenga
f65f9157ff
Added yarn.lock file to default allowlist paths ( #1258 )
2023-08-29 10:41:03 -05:00
Zachary Rice
abfd0f3fdc
Update README.md
2023-08-28 13:10:03 -05:00
Richard Gomez
18283bb48e
feat(rules): make case insensitivity optional ( #1215 )
2023-08-24 10:41:52 -05:00
Richard Gomez
9fb36b242d
feat(rules): detect Hugging Face access tokens ( #1204 )
2023-08-24 10:38:19 -05:00
Matjaž Domen Pečan
db4bc0fe76
Resolve #1170 - Enable selection of a single rule ( #1183 )
...
* Gitleaks issue #1170 - Feature request to add a flag to enable a subset of rules on the command line.
* Added documentation.
2023-08-24 09:56:17 -05:00
Warren Parad
3cbcda20d2
Update authress.go to include alternate form account dash (-) ( #1224 )
2023-08-24 09:28:39 -05:00
Oleksandr Redko
46c627212c
refactor: remove unnecessary removing temp files in tests ( #1255 )
2023-08-24 09:16:00 -05:00
Oleksandr Redko
963a6976d1
refactor: use os.ReadFile instead of os.Open + io.ReadAll ( #1254 )
2023-08-23 16:08:38 -05:00
Richard Gomez
163ec21120
fix(sumologic): improve patterns ( #1218 )
...
This fixes #1149 .
2023-08-23 10:15:20 -05:00
Savely Krasovsky
45266551ba
refactor: fix #722 properly ( #1250 )
...
* refactor: fix #722 properly
* fix(deps): update go-gitdiff to v0.9.0
* refactor: second attempt
* refactor: better git package api
* fix: add comments
v8.18.0
2023-08-22 14:00:33 -05:00
Richard Gomez
b1a2ce7296
fix(plaid): include entropy in go definition ( #1252 )
2023-08-21 09:06:26 -05:00
Richard Gomez
34e67229e6
feat(config): update template logic ( #1201 )
2023-08-17 12:42:07 -05:00
Samuel Mortenson
61513d6772
Add entropy check to plaid client/secret ID rules ( #1213 )
2023-08-17 12:41:14 -05:00
Baruch Odem (Rothkoff)
f0dcd4d9cf
feat: add JFrog API and Identity keys ( #1233 )
...
* first commit
* feat: add JFrog API and Identity key
2023-07-17 07:27:15 -05:00
Richard Gomez
06db3b91d7
chore(config): fix inconsistent generated values ( #1200 )
2023-06-16 11:27:53 -05:00
Zachary Rice
7804d652c0
Revert "Initial set of Azure secrets for #539 ( #1079 )" ( #1197 )
...
This reverts commit 7911ac60d7 .
v8.17.0
2023-06-15 07:44:13 -05:00
Dimitri Vasdekis and Jesse Houwing
7911ac60d7
Initial set of Azure secrets for #539 ( #1079 )
...
* Initial secret set
* Covered off all rule types in comments
* Finished Azure and Ansible rules
* About to run go run main.go
* Fixed some rules, but tests need work
* Initial secret set for Azure
Needs work - many tests fail
* Fix remaining Azure secrets - but couldn't get XML to work
* Update .gitignore
Co-authored-by: Jesse Houwing <jesse.houwing@gmail.com >
---------
Co-authored-by: Jesse Houwing <jesse.houwing@gmail.com >
2023-06-15 07:23:08 -05:00
Richard Gomez
463d24618f
feat(slack): update token regex ( #1161 )
2023-06-15 07:17:01 -05:00
eyalatox
86197b0848
add tags support for csv and sarif formats ( #1176 )
...
* add tags support for csv and sarif formats
* add tests
2023-06-15 07:16:23 -05:00
Ian Moroney
3f894cbafc
Fixed docker run command in README.md ( #1194 )
...
The docker run command was missing `ghcr.io/` in the image name, which resulted in an error:
Unable to find image 'gitleaks/gitleaks:latest' locally
docker: Error response from daemon: pull access denied for gitleaks/gitleaks, repository does not exist or may require 'docker login': denied: requested access to the resource is denied.
2023-06-15 07:15:57 -05:00
Richard Gomez and Richard Gomez
7f53b033fe
feat: add warning for quoted --log-opts values ( #1160 )
...
Co-authored-by: Richard Gomez <richard@rbcrt.com >
2023-06-14 09:26:24 -05:00
Becojo
7dc9ba40a7
Add detection for OpenAI API keys ( #1148 )
...
* Add detection for OpenAI API keys
* Remove `sk-` keyword
2023-06-14 09:02:37 -05:00
sergiomarotco
c101fa88d2
Add some useless files ( #1193 )
...
These files do not contain secrets
2023-06-13 20:12:19 -05:00
Zach
257c703add
add tests for commits
2023-06-13 16:07:19 -05:00