trufflehog/pkg
ahrav 570cec7565
[refactor] - Refactor Archive Handling Logic (#2703)
* Remove specialized handler and archive struct and restructure handlers pkg.

* Refactor RPM archive handlers to use a library instead of shelling out

* make rpm handling context aware

* update test

* Refactor AR/deb archive handler to use an existing library instead of shelling out

* Update tests

* add max size check

* add filename and size to context kvp

* move skip file check and is binary check before opening file

* fix test

* preserve existing funcitonality of not handling non-archive files in HandleFile

* Adjust check for rpm/deb archive type

* add additional deb mime type

* update comment

* Remove specialized handler and archive struct and restructure handlers pkg.

* Refactor RPM archive handlers to use a library instead of shelling out

* make rpm handling context aware

* update test

* Refactor AR/deb archive handler to use an existing library instead of shelling out

* Update tests

* add max size check

* add filename and size to context kvp

* move skip file check and is binary check before opening file

* fix test

* preserve existing funcitonality of not handling non-archive files in HandleFile

* Adjust check for rpm/deb archive type

* add additional deb mime type

* update comment

* go mod tidy

* update go mod

* go mod tidy

* add comment

* update max depth check to >

* go mod tidy

* rename

* [refactor] - Refactor Archive Handling Logic - Part 4: Non-Archive Data Handling and Cleanup (#2704)

* Handle non-archive data within the DefaultHandler

* make structs and methods private

* Remove non-archive data handling within sources

* Handle non-archive data within the DefaultHandler

* rebase

* Remove non-archive data handling within sources

* add gzip

* move diskbuffered rereader setup into handler pkg

* remove DiskBuffereReader creation logic within sources

* move rewind closer

* reduce log verbosity

* make defaultBufferSize a const

* use correct reader

* address comments

* update test

* [feat] - Add Prometheus Metrics for File Handlers (#2705)

* add metrics for file handling

* add metrics for errors

* add metrics for file handling

* add metrics for errors

* fix tests

* add metrics for max archive depth and skipped files

* update error

* skip symlinks and dirs

* update err

* fix err assignment

* add metrics for file handling

* add metrics for errors

* fix tests

* rebase

* add metrics for errors

* add metrics for max archive depth and skipped files

* update error

* skip symlinks and dirs

* update err

* fix err assignment

* rebase

* remove

* update metric to ms

* update comments

* address comments

* reduce indentations

* add metrics for archive depth

* [bug] - Enhanced Archive Handling to Address Interface Constraints (#2710)

* add metrics for file handling

* add metrics for errors

* add metrics for file handling

* add metrics for errors

* fix tests

* add metrics for max archive depth and skipped files

* update error

* skip symlinks and dirs

* update err

* Address incompatible reader to openArchive

* remove nil check

* fix err assignment

* wrap compReader with DiskbufferReader

* add metrics for file handling

* add metrics for errors

* fix tests

* rebase

* add metrics for errors

* add metrics for max archive depth and skipped files

* update error

* skip symlinks and dirs

* update err

* fix err assignment

* rebase

* remove

* update metric to ms

* update comments

* address comments

* reduce indentations

* replace diskbuffereader with bufferedfilereader

* updtes

* add metric back

* [bug] -  Fix bug and simplify git cat-file command execution and output handling (#2719)

* add metrics for file handling

* add metrics for errors

* add metrics for file handling

* add metrics for errors

* fix tests

* add metrics for max archive depth and skipped files

* update error

* skip symlinks and dirs

* update err

* Address incompatible reader to openArchive

* remove nil check

* fix err assignment

* Allow git cat-file blob to complete before trying to handle the file

* wrap compReader with DiskbufferReader

* Allow git cat-file blob to complete before trying to handle the file

* updates

* revert stuff

* update test

* remove

* add metrics for file handling

* add metrics for errors

* fix tests

* rebase

* add metrics for errors

* add metrics for max archive depth and skipped files

* update error

* skip symlinks and dirs

* update err

* fix err assignment

* rebase

* remove

* update metric to ms

* update comments

* address comments

* reduce indentations

* inline
2024-05-10 11:36:06 -07:00
..
cache Extend memory cache (#2275) 2024-01-11 08:20:37 -08:00
cleantemp Wrap temp deletion err #2277 2024-01-08 12:48:58 -05:00
common test(common/http): fix panic (#2817) 2024-05-09 18:17:14 -07:00
config [chore] - fix import name clashes (#2143) 2023-12-01 06:53:15 -08:00
context pkg: fix function names in comment (#2761) 2024-04-29 11:21:26 -05:00
custom_detectors Expose detector-specific false positive logic (#2743) 2024-04-30 16:10:26 -04:00
decoders [bug] - Add ASCII validation check for base64 decoding (#2671) 2024-04-04 16:59:13 -07:00
detectors Use custom fp logic for private keys (#2793) 2024-05-06 14:41:00 -07:00
engine address linter (#2783) 2024-05-08 13:58:50 -07:00
gitparse feat(git): scan commit metadata (#2754) 2024-04-29 16:58:45 -04:00
giturl [chore] - update docs for pre-commit (#2280) 2024-01-09 15:41:27 -08:00
handlers [refactor] - Refactor Archive Handling Logic (#2703) 2024-05-10 11:36:06 -07:00
log [THOG-643] Implement independent log level controls (#733) 2022-08-26 15:27:09 -05:00
output Make connection issues less jarring (#2730) 2024-04-23 14:29:38 -07:00
pb Add webhook source protos (#2789) 2024-05-06 19:43:10 -04:00
protoyaml Add custom detectors configuration parsing (#927) 2022-11-21 15:10:38 -06:00
readers [bug] - Improve BufferedFileReader Close Behavior (#2768) 2024-04-30 08:50:16 -07:00
sanitizer Initial CLI w/ partially implemented Git source and demo detector (#1) 2022-01-13 12:02:24 -08:00
sources [refactor] - Refactor Archive Handling Logic (#2703) 2024-05-10 11:36:06 -07:00
sourcestest [chore] Add SourceUnitEnumChunker filesystem tests (#1873) 2023-10-16 10:42:18 -07:00
tui [chore] Replace "Trufflehog" with "TruffleHog" (#2584) 2024-03-18 11:01:25 -07:00
updater [chore] Remove logrus from trufflehog (#1095) 2023-02-14 17:00:07 -06:00
version Automatically update trufflehog (#121) 2022-04-03 11:51:56 -07:00
writers [bug] - Improve BufferedFileReader Close Behavior (#2768) 2024-04-30 08:50:16 -07:00