Commit Graph
10 Commits
Author SHA1 Message Date
Mustansir Muzaffar c1c5570dd4 support multiple ocr providers 2026-04-06 12:47:36 +05:00
Miccah ce3f2aeb62 Add support for defining sources via a config file (#4172)
* Add config.proto

* Make protos

* Add ConfigurableSource implementation

* Parse config protoyaml into configured sources

* Refactor setting postman keywords into a helper method on the engine

* Add scan subcommand and plumb it all together

* Refactor ConfigurableSource to ConfiguredSource

* Export AhoCorasickCoreKeywords and return the set

* Disallow source configurations for non-scan subcommands

* Fix stdin scan compilation errors

* Rename command to multi-scan

* Add config file documentation

* Add more documentation for ConfiguredSource

* Replace initFunc closure with an embedded anonymous struct

* Assign directly to refs

* Fix typo
2025-06-06 07:46:31 -07:00
shangchenglumetro c4aab3fb51 chore: fix some comments (#3098) 2024-07-25 10:37:13 -07:00
ahrav 52ffab1034 [chore] - fix import name clashes (#2143)
* fix import name clashes

* fix missing var
2023-12-01 06:53:15 -08: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
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
Miccah dfc5a9f5db [chore] Log possible duplicate detectors (#1266)
* [chore] Log possible duplicate detectors

* Fix typos
2023-04-18 10:36:00 -05:00
Miccahandsteeeve e6846ede54 Support filtering detectors by version (#1150)
* Adjust types to use DetectorID struct

* Parse versions with detector include and exclude input

* Update detectors filter to use version

Co-authored-by: steeeve <steve@trufflesec.com>

* Implement Versioner for github, gitlab, and npm detectors

Co-authored-by: steeeve <steve@trufflesec.com>

---------

Co-authored-by: steeeve <steve@trufflesec.com>
2023-03-02 16:33:56 -06:00
Miccah dd39848709 Add ability to include and exclude detectors (#1106)
* Add ability to include and exclude detectors

* Trim space before checking for empty items

* Explicitly check for integer overflow

* Use strconv.ParseInt instead of strconv.Atoi

* Address comments
2023-02-27 16:46:45 -06:00
Miccah f5b83ee2a5 Add configuration parsing and custom detectors to engine (#968)
* Add configuration parsing for custom detectors

* Error on empty filename
2022-12-20 10:14:49 -06:00