bill-rich
542732aef6
Assume ASCII and include valid BE and LE bytes
2023-06-08 17:13:05 -07:00
Miccah Castorina
cdc9198050
Use heuristic to choose the most likely UTF-16 decoded string
2023-06-05 08:51:07 -05:00
Dustin Decker
5358ed776b
fix mockaroo fps ( #1370 )
...
* fix mockaroo fps
* fix test
2023-05-30 20:58:41 -07:00
Dustin Decker
c8944825de
Surface missing git as an error during initialization ( #1362 )
2023-05-26 15:23:08 -07:00
Tim Strazzere
cbfbf5335e
Add Data member to ResultsMetadata struct. ( #1358 )
...
When a Result is emitted, it should include
the `chunk.Data []byte` so that we can utilize
the blob of data which caused the result.
This makes it so something catching the results
does not have to maintain a collection of chunks
to correlate the two together.
2023-05-24 09:21:41 -07:00
Brendan Shaklovitz
3ab864aca9
Make OpenAI regex more specific ( #1345 )
2023-05-22 07:39:18 -07:00
ahrav
1da7720912
Replace context.TODO. ( #1349 )
2023-05-19 11:09:51 -07:00
ahrav
0c386220dd
[chore] - Use correct detector proto ( #1347 )
...
* Use correct detector proto.
* sort imports.
2023-05-18 15:12:38 -07:00
trufflesteeeve
1a81709726
Check to see if StructuredData exists before attempting to print it ( #1346 )
2023-05-18 17:42:19 -04:00
Brendan Shaklovitz
195f9f0798
Add Base64URLSafe decoder ( #1292 )
...
* Add Base64URLSafe decoder
* Add decoder that can decode base64 strings with '_' and '-' instead of
of '+' and '/'.
* Combine url-safe b64 decoder into b64 decoder
2023-05-18 08:30:47 -07:00
RuchitaKshirsagarTR
f831b62a3f
Update generic.go ( #1343 )
...
Generic API keys like shown in the example below is getting excluded:
api_key=9e107d9d372bb6826bd81d3542a419d6 because of following regex patterns:
\b[A-Fa-f0-9]{32}\b
\b[A-Fa-f0-9x]{6,99}\b
The base64 decoding logic is getting hit and NOT returning an error, and thus it continues thinking it is base64 decoded.
2023-05-17 13:30:40 -07:00
ahrav
31844b12e3
[oc-313] - Add GitHub metrics ( #1324 )
...
* Normalize repos during enumeration.
* fix test.
* Add benchmark.
* Add benchmark.
* Add more realistic benchmark values.
* add gist mocks.
* Remove old normalize fxn.
* abstract away the repo cache.
* update test.
* increase repo count.
* increase page limnit to 100.
* move callee fxns below caller for Chunks.
* Add context to normalize.
* remove extra logic in normalize repo.
* Delete new.txt
* Delete old.txt
* Handle errors in a thread safe manner.
* fix test.'
* fix test.
* handle repos that are included by users.
* Abstract include ignore logic within repoCache.
* Add better comment around repoCache.
* Rename params.
* remove commented out code.
* use repos instead of items.
* remove commented out code.
* Use ++ instead of atomic increment.
* update to use logger var.
* use cache pkg.
* Use separate file for repo logic.
* Address comments.
* fix test.
* make less sucky test.
* Update test.
* Add logs for duration and repo size.
* fix integration test.
* address comment.
2023-05-16 08:45:28 -07:00
Brendan Shaklovitz
88b4a283c4
Add extra data and structured data to plain output ( #1316 )
...
* Add extra data and structured data to plain output
* Remove duplicate ExtraData output
2023-05-16 08:14:42 -07:00
Dustin Decker
4250773e92
GitHub basic auth ( #1337 )
2023-05-15 22:04:42 -07:00
ahrav
e81b908e07
Add buildkitev2 detector for newer tokens. ( #1341 )
2023-05-15 12:58:36 -07:00
ahrav
6db770fbe5
use md5 hash for checking if key exists. ( #1257 )
2023-05-15 10:04:14 -07:00
ahrav
948828ba8c
[chore] - move objectManager interface ( #1332 )
...
* Relocate the objectManager interface to the consumer package as per Go
best practices.
* address comment.
2023-05-15 09:30:26 -07:00
vickygoel
4c04bbbe85
added pulumi cloud Access token detector ( #1295 )
...
* added pulumi cloud Access token detector
* removed accidentally committed tokens
* added the databricks token detection
* made recommended changes
* added supabase management api token
* nuget api key detector
* added aiven.io token detector
* added prefect.io api key detector
* update protos.
---------
Co-authored-by: Developer <garg47294+1@gmail.com >
Co-authored-by: Ahrav Dutta <ahravdutta02@gmail.com >
2023-05-11 09:08:48 -07:00
Brendan Shaklovitz
584db86031
Support line numbers in filesystem source ( #1297 )
2023-05-09 08:02:34 -07:00
Brendan Shaklovitz
fad34d4dc6
git worktree scanning fix for #827 ( #1315 )
...
* Fix worktree scan by setting EnableDotGitCommonDir
* Change `PlainOpenOptions` to set `EnableDotGitCommonDir` to true.
In every current usage of this function, it is on an already-cloned
repository, so it should always be valid to have this set. By doing
so, it should fix some issues with worktrees.
* Remove unused go.mod replace directives
* Remove replace directives for libraries that are not in use.
2023-05-09 08:00:47 -07:00
Brendan Shaklovitz
e3213fbdeb
Do extraction after decompression ( #1320 )
...
* Fix error where some files do not get properly scanned due to order of
extraction / decompression steps. Doing decompression first ensures
that a compressed archive (e.g., gzipped zip file), is handled
correctly.
2023-05-09 07:56:08 -07:00
Bill Rich
f2924f3061
Make sure context lines are properly handled ( #1331 )
...
* Make sure context lines are properly handled
* Fix git test to account for context change
2023-05-05 12:51:27 -07:00
Miccah
6699ccd2b5
Generate protos ( #1329 )
2023-05-04 12:26:41 -05:00
Brendan Shaklovitz
87f3f27dab
Fix SquareApp detector type return value ( #1322 )
...
* Change SquareApp detector type to report as SquareApp instead of
Square.
2023-05-04 10:25:20 -07:00
ahrav
deb0f63d25
Update regex. ( #1328 )
2023-05-04 10:23:13 -07:00
ahrav
030c093392
Fix how we scan orgs ( #1327 )
...
* Fix how we scan orgs.
* fix integration test.
2023-05-04 08:07:11 -07:00
Brendan Shaklovitz
be4147a24e
Output git timestamps as UTC times ( #1323 )
2023-05-03 11:47:00 -05:00
ahrav
323c093818
Normalize GitHub repos during enumeration ( #1269 )
...
* Normalize repos during enumeration.
* fix test.
* Add benchmark.
* Add benchmark.
* Add more realistic benchmark values.
* add gist mocks.
* Remove old normalize fxn.
* abstract away the repo cache.
* update test.
* increase repo count.
* increase page limnit to 100.
* move callee fxns below caller for Chunks.
* Add context to normalize.
* remove extra logic in normalize repo.
* Delete new.txt
* Delete old.txt
* Handle errors in a thread safe manner.
* fix test.'
* fix test.
* handle repos that are included by users.
* Abstract include ignore logic within repoCache.
* Add better comment around repoCache.
* Rename params.
* remove commented out code.
* use repos instead of items.
* remove commented out code.
* Use ++ instead of atomic increment.
* update to use logger var.
* use cache pkg.
* Address comments.
* fix test.
* make less sucky test.
* Update test.
2023-05-03 08:35:53 -07:00
ahrav
9cb91a6e4f
Extend cache interface ( #1318 )
...
* Extend cache interface.
* update test.
2023-05-03 08:21:00 -07:00
ahrav
714c480931
Add log to track git log size ( #1325 )
...
* Add log to track git log size.
* Add calc for large commits and last commit.
2023-05-02 16:36:39 -07:00
Jason Solis
c13c56283d
add tineswebhook detector ( #1304 )
2023-05-01 07:48:58 -07:00
ahrav
67972683ea
[chore] - format log msg ( #1299 )
...
* format log msg.
* snake.
* lowercase repo.
2023-04-27 17:14:00 -07:00
ahrav
a2266b4e28
add additional logging ( #1298 )
...
* add additional logging.
* update test.
* remove continue.
* address comments.
2023-04-27 16:48:04 -07:00
Miccah
b1675194ca
Implement EndpointCustomizer ( #1291 )
...
* Implement EndpointCustomizer
Add the EndpointCustomizer interface and EndpointSetter convenience struct,
implement EndpointCustomizer for github and gitlab detectors, and add
parsing, verification, and applying user-supplied configuration.
* Check error from SetEndpoints
* Rename variable for clarity
2023-04-27 12:23:50 -05:00
Brendan Shaklovitz
10902f802a
Add max object size flag for s3 bucket scanning ( #1294 )
...
Co-authored-by: Dustin Decker <dustin@trufflesec.com >
2023-04-26 15:39:43 -07:00
Aman Sakhuja
2a3f8942ee
Fixed contentfulpersonalaccesstoken regex ( #1199 )
2023-04-26 14:32:36 -07:00
Shabbir B
d1cbc54fc6
Updated BrowserStack detector endpoint ( #1290 )
...
Updated endpoint
2023-04-26 08:59:24 -07:00
Miccah
5a86c18302
Fix include and exclude detector logic ( #1267 )
...
* Fix include and exclude detector logic
* Fix test
* Add more clarifying comments
2023-04-26 10:49:54 -05:00
ahrav
622700b6ec
update proto to allow for ignoring projects. ( #1289 )
2023-04-26 07:30:43 -07:00
ahrav
15ed428e28
update jira detector. ( #1288 )
2023-04-25 17:26:51 -07:00
Shabbir B
6f801f64c7
Added a new detector for percy.io ( #1284 )
...
* Feature: Added a new detector for percy.io
* Updated variable name
---------
Co-authored-by: ahrav <ahravdutta02@gmail.com >
2023-04-25 13:18:34 -07:00
Dustin Decker
3485a6dab1
improve sqlserver detection and testing ( #1285 )
...
* improve sqlserver detection and testing
* add data source keyword
2023-04-25 11:00:37 -07:00
ahrav
34f5db64ae
Small optimizations for the base64 decoder ( #1278 )
...
* Small optimizations.
* remove unnecessary timer reset.
* remove blank lines.
* remove test file.
* Move b64 character mapping creation to init.
2023-04-24 11:27:07 -07:00
ahrav
800ac30ea0
optimize base64 decoder. ( #1277 )
2023-04-20 20:36:46 -07:00
ahrav
abdff53d5d
optimize utf-8 decoder ( #1275 )
...
* optimize utf-8 decoder.
* remove string conversion.
2023-04-20 16:52:34 -07:00
Yassine Ilmi
a002ba9a75
Add RawV2 Results to the JSON Output ( #1273 )
...
* Add RawV2 to JSON Output
* Adding RawV2 results to Azure, Datadog and GCP Detectors
2023-04-20 16:31:53 -07:00
ahrav
cec1543894
Add utf16 decoder proto. ( #1276 )
2023-04-20 15:25:36 -07:00
Dustin Decker
e217e2fbfd
Ensure multipart credentials are deduplicated correctly ( #1271 )
...
* Ensure multipart credentials are deduplicated correctly
* update tests
2023-04-20 15:07:59 -07:00
ahrav
4116a24b1c
Add utf16 decoder ( #1274 )
...
* Add utf16 decoder.
* Add test for utf-8.
* Remove else if.
* optimize to use a single loop.
2023-04-20 15:07:49 -07:00
Bill Rich
a6902ae9cb
Add configurable detectors ( #1139 )
...
* JDBC detector ignore patterns
* Remove newline
---------
Co-authored-by: Bill Rich <bill.rich@trufflesec.com >
2023-04-20 11:44:28 -07:00