From cd508a14a28988f1d92416a554d71fa9cb1f4d11 Mon Sep 17 00:00:00 2001 From: Casey Tran Date: Fri, 27 Mar 2026 18:34:11 -0500 Subject: [PATCH 1/2] Split out detector types into separate proto file --- CODEOWNERS | 21 +- pkg/config/detectors.go | 26 +- pkg/config/detectors_test.go | 12 +- pkg/custom_detectors/custom_detectors.go | 8 +- pkg/custom_detectors/custom_detectors_test.go | 16 +- pkg/detectors/abstract/abstract.go | 11 +- .../abstract/abstract_integration_test.go | 10 +- pkg/detectors/abuseipdb/abuseipdb.go | 8 +- .../abuseipdb/abuseipdb_integration_test.go | 10 +- pkg/detectors/abyssale/abyssale.go | 8 +- .../abyssale/abyssale_integration_test.go | 10 +- pkg/detectors/accuweather/v1/accuweather.go | 8 +- .../v1/accuweather_integration_test.go | 10 +- .../v2/accuweather_integration_test.go | 10 +- pkg/detectors/adafruitio/adafruitio.go | 8 +- .../adafruitio/adafruitio_integration_test.go | 10 +- pkg/detectors/adobeio/adobeio.go | 8 +- .../adobeio/adobeio_integration_test.go | 6 +- pkg/detectors/adzuna/adzuna.go | 8 +- .../adzuna/adzuna_integration_test.go | 10 +- pkg/detectors/aeroworkflow/aeroworkflow.go | 8 +- .../aeroworkflow_integration_test.go | 10 +- pkg/detectors/agora/agora.go | 8 +- pkg/detectors/agora/agora_integration_test.go | 14 +- pkg/detectors/aha/aha.go | 8 +- pkg/detectors/aha/aha_integration_test.go | 10 +- .../airbrakeprojectkey/airbrakeprojectkey.go | 8 +- .../airbrakeprojectkey_integration_test.go | 6 +- .../airbrakeuserkey/airbrakeuserkey.go | 8 +- .../airbrakeuserkey_integration_test.go | 6 +- pkg/detectors/airship/airship.go | 8 +- .../airship/airship_integration_test.go | 6 +- pkg/detectors/airtableoauth/airtableoauth.go | 8 +- .../airtableoauth_integration_test.go | 10 +- .../airtablepersonalaccesstoken.go | 8 +- ...blepersonalaccesstoken_integration_test.go | 10 +- pkg/detectors/airvisual/airvisual.go | 8 +- .../airvisual/airvisual_integration_test.go | 6 +- pkg/detectors/aiven/aiven.go | 8 +- pkg/detectors/aiven/aiven_integration_test.go | 6 +- pkg/detectors/alchemy/alchemy.go | 8 +- .../alchemy/alchemy_integration_test.go | 10 +- pkg/detectors/alconost/alconost.go | 8 +- .../alconost/alconost_integration_test.go | 6 +- pkg/detectors/alegra/alegra.go | 8 +- .../alegra/alegra_integration_test.go | 6 +- pkg/detectors/aletheiaapi/aletheiaapi.go | 8 +- .../aletheiaapi_integration_test.go | 6 +- .../algoliaadminkey/algoliaadminkey.go | 8 +- .../algoliaadminkey_integration_test.go | 6 +- pkg/detectors/alibaba/alibaba.go | 8 +- .../alibaba/alibaba_integration_test.go | 12 +- pkg/detectors/alienvault/alienvault.go | 8 +- .../alienvault/alienvault_integration_test.go | 6 +- pkg/detectors/allsports/allsports.go | 8 +- .../allsports/allsports_integration_test.go | 6 +- pkg/detectors/amadeus/amadeus.go | 8 +- .../amadeus/amadeus_integration_test.go | 6 +- pkg/detectors/ambee/ambee.go | 8 +- pkg/detectors/ambee/ambee_integration_test.go | 6 +- .../amplitudeapikey/amplitudeapikey.go | 8 +- .../amplitudeapikey_integration_test.go | 10 +- pkg/detectors/anthropic/anthropic.go | 8 +- .../anthropic/anthropic_integration_test.go | 8 +- pkg/detectors/anypoint/anypoint.go | 8 +- .../anypoint/anypoint_integration_test.go | 6 +- .../anypointoauth2/anypointoauth2.go | 8 +- .../anypointoauth2_integration_test.go | 6 +- pkg/detectors/apacta/apacta.go | 8 +- .../apacta/apacta_integration_test.go | 6 +- pkg/detectors/api2cart/api2cart.go | 8 +- .../api2cart/api2cart_integration_test.go | 6 +- pkg/detectors/apideck/apideck.go | 8 +- .../apideck/apideck_integration_test.go | 6 +- pkg/detectors/apiflash/apiflash.go | 8 +- .../apiflash/apiflash_integration_test.go | 6 +- pkg/detectors/apifonica/apifonica.go | 8 +- .../apifonica/apifonica_integration_test.go | 6 +- pkg/detectors/apify/apify.go | 8 +- pkg/detectors/apify/apify_integration_test.go | 6 +- pkg/detectors/apilayer/apilayer.go | 8 +- .../apilayer/apilayer_integration_test.go | 6 +- pkg/detectors/apimatic/apimatic.go | 8 +- .../apimatic/apimatic_integration_test.go | 6 +- pkg/detectors/apimetrics/apimetrics.go | 8 +- .../apimetrics/apimetrics_integration_test.go | 6 +- pkg/detectors/apitemplate/apitemplate.go | 8 +- .../apitemplate_integration_test.go | 6 +- pkg/detectors/apollo/apollo.go | 8 +- .../apollo/apollo_integration_test.go | 6 +- pkg/detectors/appcues/appcues.go | 8 +- .../appcues/appcues_integration_test.go | 10 +- pkg/detectors/appfollow/appfollow.go | 8 +- .../appfollow/appfollow_integration_test.go | 6 +- pkg/detectors/appointedd/appointedd.go | 8 +- .../appointedd/appointedd_integration_test.go | 6 +- pkg/detectors/appoptics/appoptics.go | 11 +- .../appoptics/appoptics_integration_test.go | 6 +- pkg/detectors/appsynergy/appsynergy.go | 8 +- .../appsynergy/appsynergy_integration_test.go | 6 +- pkg/detectors/apptivo/apptivo.go | 8 +- .../apptivo/apptivo_integration_test.go | 6 +- pkg/detectors/artifactory/artifactory.go | 8 +- .../artifactory_integration_test.go | 4 +- .../artifactoryreferencetoken.go | 8 +- ...ifactoryreferencetoken_integration_test.go | 10 +- pkg/detectors/artsy/artsy.go | 8 +- pkg/detectors/artsy/artsy_integration_test.go | 6 +- pkg/detectors/asanaoauth/asanaoauth.go | 8 +- .../asanaoauth/asanaoauth_integration_test.go | 6 +- .../asanapersonalaccesstoken.go | 8 +- ...anapersonalaccesstoken_integration_test.go | 10 +- pkg/detectors/assemblyai/assemblyai.go | 8 +- .../assemblyai/assemblyai_integration_test.go | 6 +- pkg/detectors/atera/atera.go | 8 +- pkg/detectors/atera/atera_integration_test.go | 6 +- pkg/detectors/atlassian/v1/atlassian.go | 8 +- .../v1/atlassian_integration_test.go | 10 +- pkg/detectors/atlassian/v2/atlassian.go | 8 +- .../v2/atlassian_integration_test.go | 10 +- pkg/detectors/audd/audd.go | 8 +- pkg/detectors/audd/audd_integration_test.go | 6 +- .../auth0managementapitoken.go | 8 +- ...uth0managementapitoken_integration_test.go | 6 +- pkg/detectors/auth0oauth/auth0oauth.go | 8 +- .../auth0oauth_integeration_test.go | 10 +- pkg/detectors/autodesk/autodesk.go | 8 +- .../autodesk/autodesk_integration_test.go | 6 +- pkg/detectors/autoklose/autoklose.go | 8 +- .../autoklose/autoklose_integration_test.go | 6 +- pkg/detectors/autopilot/autopilot.go | 11 +- .../autopilot/autopilot_integration_test.go | 6 +- .../avazapersonalaccesstoken.go | 8 +- ...azapersonalaccesstoken_integration_test.go | 6 +- pkg/detectors/aviationstack/aviationstack.go | 8 +- .../aviationstack_integration_test.go | 6 +- pkg/detectors/aws/access_keys/accesskey.go | 8 +- .../access_keys/accesskey_integration_test.go | 30 +- pkg/detectors/aws/session_keys/sessionkey.go | 8 +- pkg/detectors/axonaut/axonaut.go | 8 +- .../axonaut/axonaut_integration_test.go | 6 +- pkg/detectors/aylien/aylien.go | 8 +- .../aylien/aylien_integration_test.go | 6 +- pkg/detectors/ayrshare/ayrshare.go | 8 +- .../ayrshare/ayrshare_integration_test.go | 6 +- pkg/detectors/azure_batch/azurebatch.go | 8 +- .../azurebatch_integration_test.go | 6 +- .../azure_cosmosdb/azure_cosmosdb.go | 8 +- .../azure_cosmosdb_integration_test.go | 6 +- .../azure_entra/refreshtoken/refreshtoken.go | 8 +- .../refreshtoken_integration_test.go | 10 +- .../azure_entra/serviceprincipal/v1/spv1.go | 6 +- .../v1/spv1_integration_test.go | 6 +- .../azure_entra/serviceprincipal/v2/spv2.go | 8 +- .../v2/spv2_integration_test.go | 6 +- pkg/detectors/azure_openai/azure_openai.go | 6 +- .../azure_openai_integration_test.go | 15 +- pkg/detectors/azure_storage/storage.go | 6 +- .../azure_storage/storage_integration_test.go | 12 +- .../repositorykey/repositorykey.go | 8 +- .../repositorykey_integration_test.go | 6 +- .../azureapimanagementsubscriptionkey.go | 8 +- ...agementsubscriptionkey_integration_test.go | 6 +- .../azureappconfigconnectionstring.go | 8 +- ...configconnectionstring_integration_test.go | 6 +- .../azurecontainerregistry.go | 8 +- ...azurecontainerregistry_integration_test.go | 6 +- .../azuredevopspersonalaccesstoken.go | 8 +- ...opspersonalaccesstoken_integration_test.go | 10 +- .../azuredirectmanagementkey.go | 8 +- ...uredirectmanagementkey_integration_test.go | 6 +- .../azurefunctionkey/azurefunctionkey.go | 8 +- .../azurefunctionkey_integration_test.go | 10 +- pkg/detectors/azuresastoken/azuresastoken.go | 8 +- .../azuresastoken_integration_test.go | 6 +- .../azuresearchadminkey.go | 8 +- .../azuresearchadminkey_integration_test.go | 10 +- .../azuresearchquerykey.go | 8 +- .../azuresearchquerykey_integration_test.go | 10 +- pkg/detectors/bannerbear/v1/bannerbear.go | 8 +- .../v1/bannerbear_integration_test.go | 6 +- pkg/detectors/bannerbear/v2/bannerbear.go | 8 +- .../v2/bannerbear_integration_test.go | 6 +- pkg/detectors/baremetrics/baremetrics.go | 8 +- .../baremetrics_integration_test.go | 6 +- pkg/detectors/beamer/beamer.go | 8 +- .../beamer/beamer_integration_test.go | 6 +- pkg/detectors/beebole/beebole.go | 8 +- .../beebole/beebole_integration_test.go | 6 +- pkg/detectors/besnappy/besnappy.go | 8 +- .../besnappy/besnappy_integration_test.go | 6 +- pkg/detectors/besttime/besttime.go | 8 +- .../besttime/besttime_integration_test.go | 6 +- pkg/detectors/betterstack/betterstack.go | 8 +- .../betterstack_integration_test.go | 6 +- pkg/detectors/billomat/billomat.go | 8 +- .../billomat/billomat_integration_test.go | 6 +- .../bingsubscriptionkey.go | 10 +- .../bingsubscriptionkey_integration_test.go | 10 +- pkg/detectors/bitbar/bitbar.go | 8 +- .../bitbar/bitbar_integration_test.go | 6 +- .../bitbucketapppassword.go | 8 +- .../bitbucketapppassword_integration_test.go | 6 +- .../bitcoinaverage/bitcoinaverage.go | 8 +- .../bitcoinaverage_integration_test.go | 6 +- pkg/detectors/bitfinex/bitfinex.go | 8 +- .../bitfinex/bitfinex_integration_test.go | 10 +- .../bitlyaccesstoken/bitlyaccesstoken.go | 8 +- .../bitlyaccesstoken_integration_test.go | 6 +- pkg/detectors/bitmex/bitmex.go | 8 +- .../bitmex/bitmex_integration_test.go | 6 +- pkg/detectors/blazemeter/blazemeter.go | 8 +- .../blazemeter/blazemeter_integration_test.go | 6 +- pkg/detectors/blitapp/blitapp.go | 8 +- .../blitapp/blitapp_integration_test.go | 6 +- pkg/detectors/blocknative/blocknative.go | 8 +- .../blocknative_integration_test.go | 6 +- pkg/detectors/blogger/blogger.go | 8 +- .../blogger/blogger_integration_test.go | 6 +- pkg/detectors/bombbomb/bombbomb.go | 8 +- .../bombbomb/bombbomb_integration_test.go | 6 +- pkg/detectors/boostnote/boostnote.go | 8 +- .../boostnote/boostnote_integration_test.go | 6 +- pkg/detectors/borgbase/borgbase.go | 8 +- .../borgbase/borgbase_integration_test.go | 6 +- pkg/detectors/box/box.go | 8 +- pkg/detectors/box/box_integration_test.go | 10 +- pkg/detectors/boxoauth/boxoauth.go | 8 +- .../boxoauth/boxoauth_integration_test.go | 6 +- .../braintreepayments/braintreepayments.go | 8 +- .../braintreepayments_integration_test.go | 10 +- pkg/detectors/brandfetch/v1/brandfetch.go | 8 +- .../v1/brandfetch_integration_test.go | 6 +- pkg/detectors/brandfetch/v2/brandfetch.go | 8 +- .../v2/brandfetch_integration_test.go | 6 +- pkg/detectors/browserstack/browserstack.go | 8 +- .../browserstack_integration_test.go | 12 +- pkg/detectors/browshot/browshot.go | 8 +- .../browshot/browshot_integration_test.go | 6 +- pkg/detectors/bscscan/bscscan.go | 8 +- .../bscscan/bscscan_integration_test.go | 6 +- pkg/detectors/buddyns/buddyns.go | 8 +- .../buddyns/buddyns_integration_test.go | 6 +- pkg/detectors/budibase/budibase.go | 8 +- .../budibase/budibase_integration_test.go | 6 +- pkg/detectors/bugherd/bugherd.go | 8 +- .../bugherd/bugherd_integration_test.go | 6 +- pkg/detectors/bugsnag/bugsnag.go | 8 +- .../bugsnag/bugsnag_integration_test.go | 6 +- pkg/detectors/buildkite/v1/buildkite.go | 8 +- .../v1/buildkite_integration_test.go | 6 +- pkg/detectors/buildkite/v2/buildkite.go | 8 +- .../v2/buildkitev2_integration_test.go | 6 +- pkg/detectors/bulbul/bulbul.go | 8 +- .../bulbul/bulbul_integration_test.go | 6 +- pkg/detectors/bulksms/bulksms.go | 8 +- .../bulksms/bulksms_integration_test.go | 6 +- pkg/detectors/buttercms/buttercms.go | 8 +- .../buttercms/buttercms_integration_test.go | 6 +- pkg/detectors/caflou/caflou.go | 8 +- .../caflou/caflou_integration_test.go | 6 +- pkg/detectors/calendarific/calendarific.go | 8 +- .../calendarific_integration_test.go | 6 +- .../calendlyapikey/calendlyapikey.go | 8 +- .../calendlyapikey_integration_test.go | 6 +- pkg/detectors/calorieninja/calorieninja.go | 8 +- .../calorieninja_integration_test.go | 6 +- pkg/detectors/campayn/campayn.go | 8 +- .../campayn/campayn_integration_test.go | 6 +- pkg/detectors/cannyio/cannyio.go | 8 +- .../cannyio/cannyio_integration_test.go | 6 +- pkg/detectors/capsulecrm/capsulecrm.go | 8 +- .../capsulecrm/capsulecrm_integration_test.go | 6 +- pkg/detectors/captaindata/v1/captaindata.go | 8 +- .../v1/captaindata_integration_test.go | 6 +- pkg/detectors/captaindata/v2/captaindata.go | 8 +- .../v2/captaindata_integration_test.go | 6 +- .../carboninterface/carboninterface.go | 8 +- .../carboninterface_integration_test.go | 6 +- pkg/detectors/cashboard/cashboard.go | 8 +- .../cashboard/cashboard_integration_test.go | 6 +- pkg/detectors/caspio/caspio.go | 8 +- .../caspio/caspio_integration_test.go | 6 +- pkg/detectors/censys/censys.go | 8 +- .../censys/censys_integration_test.go | 6 +- .../centralstationcrm/centralstationcrm.go | 8 +- .../centralstationcrm_integration_test.go | 6 +- pkg/detectors/cexio/cexio.go | 8 +- pkg/detectors/cexio/cexio_integration_test.go | 6 +- pkg/detectors/chartmogul/chartmogul.go | 8 +- .../chartmogul/chartmogul_integration_test.go | 6 +- pkg/detectors/chatbot/chatbot.go | 8 +- .../chatbot/chatbot_integration_test.go | 6 +- pkg/detectors/chatfule/chatfule.go | 8 +- .../chatfule/chatfule_integration_test.go | 6 +- pkg/detectors/checio/checio.go | 8 +- .../checio/checio_integration_test.go | 6 +- pkg/detectors/checklyhq/checklyhq.go | 8 +- .../checklyhq/checklyhq_integration_test.go | 6 +- pkg/detectors/checkout/checkout.go | 8 +- .../checkout/checkout_integration_test.go | 6 +- pkg/detectors/checkvist/checkvist.go | 8 +- .../checkvist/checkvist_integration_test.go | 6 +- pkg/detectors/cicero/cicero.go | 8 +- .../cicero/cicero_integration_test.go | 6 +- pkg/detectors/circleci/v1/circleci.go | 8 +- .../circleci/v1/circleci_integration_test.go | 6 +- pkg/detectors/circleci/v2/circleci.go | 8 +- .../circleci/v2/circleci_integration_test.go | 6 +- pkg/detectors/clarifai/clarifai.go | 8 +- .../clarifai/clarifai_integration_test.go | 8 +- pkg/detectors/clearbit/clearbit.go | 8 +- .../clearbit/clearbit_integration_test.go | 6 +- pkg/detectors/clickhelp/clickhelp.go | 8 +- .../clickhelp/clickhelp_integration_test.go | 6 +- pkg/detectors/clicksendsms/clicksendsms.go | 8 +- .../clicksendsms_integration_test.go | 6 +- .../clickuppersonaltoken.go | 8 +- .../clickuppersonaltoken_integration_test.go | 8 +- pkg/detectors/cliengo/cliengo.go | 8 +- .../cliengo/cliengo_integration_test.go | 6 +- pkg/detectors/clientary/clientary.go | 8 +- .../clientary/clientary_integration_test.go | 8 +- pkg/detectors/clinchpad/clinchpad.go | 8 +- .../clinchpad/clinchpad_integration_test.go | 6 +- pkg/detectors/clockify/clockify.go | 8 +- .../clockify/clockify_integration_test.go | 6 +- pkg/detectors/clockworksms/clockworksms.go | 8 +- .../clockworksms_integration_test.go | 6 +- pkg/detectors/closecrm/close.go | 8 +- .../closecrm/close_integration_test.go | 6 +- pkg/detectors/cloudconvert/cloudconvert.go | 8 +- .../cloudconvert_integration_test.go | 6 +- pkg/detectors/cloudelements/cloudelements.go | 8 +- .../cloudelements_integration_test.go | 6 +- .../cloudflareapitoken/cloudflareapitoken.go | 8 +- .../cloudflareapitoken_integration_test.go | 8 +- .../cloudflarecakey/cloudflarecakey.go | 8 +- .../cloudflarecakey_integration_test.go | 6 +- .../cloudflareglobalapikey.go | 8 +- ...cloudflareglobalapikey_integration_test.go | 6 +- pkg/detectors/cloudimage/cloudimage.go | 8 +- .../cloudimage/cloudimage_integration_test.go | 6 +- pkg/detectors/cloudmersive/cloudmersive.go | 8 +- .../cloudmersive_integration_test.go | 6 +- pkg/detectors/cloudplan/cloudplan.go | 8 +- .../cloudplan/cloudplan_integration_test.go | 6 +- pkg/detectors/cloudsmith/cloudsmith.go | 8 +- .../cloudsmith/cloudsmith_integration_test.go | 6 +- pkg/detectors/cloverly/cloverly.go | 8 +- .../cloverly/cloverly_integration_test.go | 6 +- pkg/detectors/cloze/cloze.go | 8 +- pkg/detectors/cloze/cloze_integration_test.go | 6 +- pkg/detectors/clustdoc/clustdoc.go | 8 +- .../clustdoc/clustdoc_integration_test.go | 6 +- pkg/detectors/coda/coda.go | 8 +- pkg/detectors/coda/coda_integration_test.go | 10 +- pkg/detectors/codacy/codacy.go | 8 +- .../codacy/codacy_integration_test.go | 6 +- pkg/detectors/codeclimate/codeclimate.go | 8 +- .../codeclimate_integration_test.go | 6 +- pkg/detectors/codemagic/codemagic.go | 8 +- .../codemagic/codemagic_integration_test.go | 6 +- pkg/detectors/codequiry/codequiry.go | 8 +- .../codequiry/codequiry_integration_test.go | 6 +- pkg/detectors/coinapi/coinapi.go | 8 +- .../coinapi/coinapi_integration_test.go | 6 +- pkg/detectors/coinbase/coinbase.go | 10 +- .../coinbase/coinbase_integration_test.go | 10 +- pkg/detectors/coinlayer/coinlayer.go | 8 +- .../coinlayer/coinlayer_integration_test.go | 6 +- pkg/detectors/coinlib/coinlib.go | 8 +- .../coinlib/coinlib_integration_test.go | 6 +- pkg/detectors/collect2/collect2.go | 8 +- .../collect2/collect2_integration_test.go | 6 +- pkg/detectors/column/column.go | 8 +- .../column/column_integration_test.go | 6 +- pkg/detectors/commercejs/commercejs.go | 8 +- .../commercejs/commercejs_integration_test.go | 6 +- pkg/detectors/commodities/commodities.go | 8 +- .../commodities_integration_test.go | 6 +- pkg/detectors/companyhub/companyhub.go | 8 +- .../companyhub/companyhub_integration_test.go | 6 +- pkg/detectors/confluent/confluent.go | 8 +- .../confluent/confluent_integration_test.go | 6 +- .../contentfulpersonalaccesstoken.go | 8 +- ...tfulpersonalacesstoken_integration_test.go | 6 +- .../conversiontools/conversiontools.go | 8 +- .../conversiontools_integration_test.go | 6 +- pkg/detectors/convertapi/convertapi.go | 8 +- .../convertapi/convertapi_integration_test.go | 6 +- pkg/detectors/convertkit/convertkit.go | 8 +- .../convertkit/convertkit_integration_test.go | 6 +- pkg/detectors/convier/convier.go | 8 +- .../convier/convier_integration_test.go | 6 +- pkg/detectors/copper/copper.go | 8 +- .../copper/copper_integration_test.go | 6 +- pkg/detectors/couchbase/couchbase.go | 8 +- .../couchbase/couchbase_integration_test.go | 6 +- pkg/detectors/countrylayer/countrylayer.go | 8 +- .../countrylayer_integration_test.go | 6 +- pkg/detectors/courier/courier.go | 8 +- .../courier/courier_integration_test.go | 6 +- pkg/detectors/coveralls/coveralls.go | 8 +- .../coveralls/coveralls_integration_test.go | 6 +- pkg/detectors/craftmypdf/craftmypdf.go | 8 +- .../craftmypdf/craftmypdf_integration_test.go | 6 +- pkg/detectors/crowdin/crowdin.go | 8 +- .../crowdin/crowdin_integration_test.go | 6 +- pkg/detectors/cryptocompare/cryptocompare.go | 8 +- .../cryptocompare_integration_test.go | 6 +- pkg/detectors/currencycloud/currencycloud.go | 8 +- .../currencycloud_integration_test.go | 6 +- .../currencyfreaks/currencyfreaks.go | 8 +- .../currencyfreaks_integration_test.go | 6 +- pkg/detectors/currencylayer/currencylayer.go | 8 +- .../currencylayer_integration_test.go | 6 +- pkg/detectors/currencyscoop/currencyscoop.go | 8 +- .../currencyscoop_integration_test.go | 6 +- pkg/detectors/currentsapi/currentsapi.go | 8 +- .../currentsapi_integration_test.go | 6 +- pkg/detectors/customerguru/customerguru.go | 8 +- .../customerguru_integration_test.go | 6 +- pkg/detectors/customerio/customerio.go | 8 +- .../customerio/customerio_integration_test.go | 6 +- pkg/detectors/d7network/d7network.go | 8 +- .../d7network/d7network_integration_test.go | 6 +- pkg/detectors/dailyco/dailyco.go | 8 +- .../dailyco/dailyco_integration_test.go | 6 +- pkg/detectors/dandelion/dandelion.go | 8 +- .../dandelion/dandelion_integration_test.go | 6 +- pkg/detectors/dareboost/dareboost.go | 8 +- .../dareboost/dareboost_integration_test.go | 6 +- pkg/detectors/databox/databox.go | 8 +- .../databox/databox_integration_test.go | 6 +- .../databrickstoken/databrickstoken.go | 8 +- .../databrickstoken_integration_test.go | 10 +- pkg/detectors/datadogapikey/datadogapikey.go | 8 +- .../datadogapikey_integration_test.go | 6 +- .../datadogapikey/datadogapikey_test.go | 4 +- pkg/detectors/datadogtoken/datadogtoken.go | 8 +- .../datadogtoken_integration_test.go | 6 +- pkg/detectors/datagov/datagov.go | 8 +- .../datagov/datagov_integration_test.go | 6 +- pkg/detectors/debounce/debounce.go | 8 +- .../debounce/debounce_integration_test.go | 6 +- pkg/detectors/deepai/deepai.go | 8 +- .../deepai/deepai_integration_test.go | 6 +- pkg/detectors/deepgram/deepgram.go | 8 +- .../deepgram/deepgram_integration_test.go | 6 +- pkg/detectors/deepseek/deepseek.go | 8 +- .../deepseek/deepseek_integration_test.go | 13 +- pkg/detectors/delighted/delighted.go | 8 +- .../delighted/delighted_integration_test.go | 6 +- pkg/detectors/demio/demio.go | 8 +- pkg/detectors/demio/demio_integration_test.go | 6 +- pkg/detectors/deno/denodeploy.go | 6 +- .../deno/denodeploy_integration_test.go | 10 +- pkg/detectors/deputy/deputy.go | 8 +- .../deputy/deputy_integration_test.go | 6 +- pkg/detectors/detectify/detectify.go | 8 +- .../detectify/detectify_integration_test.go | 6 +- .../detectlanguage/detectlanguage.go | 8 +- .../detectlanguage_integration_test.go | 6 +- pkg/detectors/detectors.go | 5 +- pkg/detectors/dfuse/dfuse.go | 8 +- pkg/detectors/dfuse/dfuse_integration_test.go | 6 +- pkg/detectors/diffbot/diffbot.go | 8 +- .../diffbot/diffbot_integration_test.go | 6 +- pkg/detectors/diggernaut/diggernaut.go | 8 +- .../diggernaut/diggernaut_integration_test.go | 6 +- .../digitaloceantoken/digitaloceantoken.go | 8 +- .../digitaloceantoken_integration_test.go | 8 +- .../digitaloceanv2/digitaloceanv2.go | 8 +- .../digitaloceanv2_integration_test.go | 8 +- .../discordbottoken/discordbottoken.go | 8 +- .../discordbottoken_integration_test.go | 6 +- .../discordwebhook/discordwebhook.go | 8 +- .../discordwebhook_integration_test.go | 6 +- pkg/detectors/disqus/disqus.go | 8 +- .../disqus/disqus_integration_test.go | 6 +- pkg/detectors/ditto/ditto.go | 8 +- pkg/detectors/ditto/ditto_integration_test.go | 6 +- pkg/detectors/dnscheck/dnscheck.go | 8 +- .../dnscheck/dnscheck_integration_test.go | 6 +- pkg/detectors/docker/docker_auth_config.go | 8 +- .../docker_auth_config_integration_test.go | 20 +- pkg/detectors/dockerhub/v1/dockerhub.go | 6 +- .../v1/dockerhub_integration_test.go | 8 +- pkg/detectors/dockerhub/v2/dockerhub.go | 6 +- .../v2/dockerhub_integration_test.go | 8 +- pkg/detectors/docparser/docparser.go | 8 +- .../docparser/docparser_integration_test.go | 6 +- pkg/detectors/documo/documo.go | 8 +- .../documo/documo_integration_test.go | 6 +- pkg/detectors/docusign/docusign.go | 8 +- .../docusign/docusign_integration_test.go | 6 +- pkg/detectors/doppler/doppler.go | 8 +- .../doppler/doppler_integration_test.go | 6 +- pkg/detectors/dotdigital/dotdigital.go | 8 +- .../dotdigital/dotdigital_integration_test.go | 6 +- pkg/detectors/dovico/dovico.go | 8 +- .../dovico/dovico_integration_test.go | 10 +- pkg/detectors/dronahq/dronahq.go | 8 +- .../dronahq/dronahq_integration_test.go | 6 +- pkg/detectors/droneci/droneci.go | 8 +- .../droneci/droneci_integration_test.go | 6 +- pkg/detectors/dropbox/dropbox.go | 8 +- .../dropbox/dropbox_integration_test.go | 6 +- pkg/detectors/duply/duply.go | 8 +- pkg/detectors/duply/duply_integration_test.go | 6 +- pkg/detectors/dwolla/dwolla.go | 8 +- .../dwolla/dwolla_integration_test.go | 10 +- pkg/detectors/dynalist/dynalist.go | 8 +- .../dynalist/dynalist_integration_test.go | 6 +- pkg/detectors/dyspatch/dyspatch.go | 8 +- .../dyspatch/dyspatch_integration_test.go | 6 +- .../eagleeyenetworks/eagleeyenetworks.go | 8 +- .../eagleeyenetworks_integration_test.go | 6 +- pkg/detectors/easyinsight/easyinsight.go | 8 +- .../easyinsight_integration_test.go | 6 +- pkg/detectors/ecostruxureit/ecostruxureit.go | 8 +- .../ecostruxureit_integration_test.go | 6 +- pkg/detectors/edamam/edamam.go | 8 +- .../edamam/edamam_integration_test.go | 6 +- pkg/detectors/edenai/edenai.go | 8 +- .../edenai/edenai_integration_test.go | 6 +- pkg/detectors/eightxeight/eightxeight.go | 8 +- .../eightxeight_integration_test.go | 6 +- pkg/detectors/elasticemail/elasticemail.go | 8 +- .../elasticemail_integration_test.go | 6 +- pkg/detectors/elevenlabs/v1/elevenlabs.go | 8 +- pkg/detectors/elevenlabs/v2/elevenlabs.go | 8 +- .../v2/elevenlabs_integration_test.go | 10 +- pkg/detectors/enablex/enablex.go | 8 +- .../enablex/enablex_integration_test.go | 6 +- pkg/detectors/endorlabs/endorlabs.go | 8 +- .../endorlabs/endorlabs_integration_test.go | 18 +- pkg/detectors/enigma/enigma.go | 8 +- .../enigma/enigma_integration_test.go | 6 +- pkg/detectors/envoyapikey/envoyapikey.go | 8 +- .../envoyapikey_integration_test.go | 6 +- pkg/detectors/eraser/eraser.go | 8 +- .../eraser/eraser_integration_test.go | 10 +- pkg/detectors/etherscan/etherscan.go | 8 +- .../etherscan/etherscan_integration_test.go | 6 +- pkg/detectors/ethplorer/ethplorer.go | 8 +- .../ethplorer/ethplorer_integration_test.go | 6 +- pkg/detectors/eventbrite/eventbrite.go | 8 +- .../eventbrite/eventbrite_integration_test.go | 10 +- pkg/detectors/everhour/everhour.go | 8 +- .../everhour/everhour_integration_test.go | 6 +- .../exchangerateapi/exchangerateapi.go | 8 +- .../exchangerateapi_integration_test.go | 6 +- .../exchangeratesapi/exchangeratesapi.go | 8 +- .../exchangeratesapi_integration_test.go | 6 +- pkg/detectors/exportsdk/exportsdk.go | 8 +- .../exportsdk/exportsdk_integration_test.go | 6 +- pkg/detectors/extractorapi/extractorapi.go | 8 +- .../extractorapi_integration_test.go | 6 +- pkg/detectors/facebookoauth/facebookoauth.go | 8 +- .../facebookoauth_integration_test.go | 6 +- pkg/detectors/faceplusplus/faceplusplus.go | 8 +- .../faceplusplus_integration_test.go | 6 +- pkg/detectors/falsepositives_test.go | 6 +- pkg/detectors/fastforex/fastforex.go | 8 +- .../fastforex/fastforex_integration_test.go | 6 +- .../fastlypersonaltoken.go | 8 +- .../fastlypersonaltoken_integration_test.go | 6 +- pkg/detectors/feedier/feedier.go | 8 +- .../feedier/feedier_integration_test.go | 6 +- pkg/detectors/fetchrss/fetchrss.go | 8 +- .../fetchrss/fetchrss_integration_test.go | 6 +- pkg/detectors/fibery/fibery.go | 8 +- .../fibery/fibery_integration_test.go | 6 +- .../v1/figmapersonalaccesstoken.go | 8 +- ...igmapersonalacesstoken_integration_test.go | 10 +- ...gmapersonalaccesstoken_integration_test.go | 10 +- .../v2/figmapersonalaccesstoken_v2.go | 8 +- pkg/detectors/fileio/fileio.go | 8 +- .../fileio/fileio_integration_test.go | 6 +- pkg/detectors/finage/finage.go | 8 +- .../finage/finage_integration_test.go | 6 +- .../financialmodelingprep.go | 8 +- .../financialmodelingprep_integration_test.go | 6 +- pkg/detectors/findl/findl.go | 8 +- pkg/detectors/findl/findl_integration_test.go | 6 +- pkg/detectors/finnhub/finnhub.go | 8 +- .../finnhub/finnhub_integration_test.go | 6 +- pkg/detectors/fixerio/fixerio.go | 8 +- .../fixerio/fixerio_integration_test.go | 6 +- pkg/detectors/flatio/flatio.go | 8 +- .../flatio/flatio_integration_test.go | 6 +- pkg/detectors/fleetbase/fleetbase.go | 8 +- .../fleetbase/fleetbase_integration_test.go | 6 +- pkg/detectors/flexport/flexport.go | 8 +- pkg/detectors/flexport/flexport_test.go | 12 +- pkg/detectors/flickr/flickr.go | 8 +- .../flickr/flickr_integration_test.go | 6 +- pkg/detectors/flightapi/flightapi.go | 8 +- .../flightapi/flightapi_integration_test.go | 6 +- pkg/detectors/flightlabs/flightlabs.go | 8 +- .../flightlabs/flightlabs_integration_test.go | 6 +- pkg/detectors/flightstats/flightstats.go | 8 +- .../flightstats_integration_test.go | 6 +- pkg/detectors/float/float.go | 8 +- pkg/detectors/float/float_integration_test.go | 6 +- pkg/detectors/flowflu/flowflu.go | 8 +- .../flowflu/flowflu_integration_test.go | 6 +- pkg/detectors/flutterwave/flutterwave.go | 8 +- .../flutterwave_integration_test.go | 6 +- pkg/detectors/flyio/flyio.go | 8 +- pkg/detectors/flyio/flyio_integration_test.go | 10 +- pkg/detectors/flyio/flyio_test.go | 4 +- pkg/detectors/fmfw/fmfw.go | 8 +- pkg/detectors/fmfw/fmfw_integration_test.go | 6 +- pkg/detectors/formbucket/formbucket.go | 8 +- .../formbucket/formbucket_integration_test.go | 6 +- pkg/detectors/formcraft/formcraft.go | 8 +- .../formcraft/formcraft_integration_test.go | 6 +- pkg/detectors/formio/formio.go | 8 +- .../formio/formio_integration_test.go | 6 +- pkg/detectors/formsite/formsite.go | 8 +- .../formsite/formsite_integration_test.go | 10 +- pkg/detectors/foursquare/foursquare.go | 8 +- .../foursquare/foursquare_integration_test.go | 6 +- pkg/detectors/frameio/frameio.go | 8 +- .../frameio/frameio_integration_test.go | 6 +- pkg/detectors/freshbooks/freshbooks.go | 8 +- .../freshbooks/freshbooks_integration_test.go | 6 +- pkg/detectors/freshdesk/freshdesk.go | 8 +- .../freshdesk/freshdesk_integration_test.go | 6 +- pkg/detectors/front/front.go | 8 +- pkg/detectors/front/front_integration_test.go | 6 +- pkg/detectors/ftp/ftp.go | 8 +- pkg/detectors/ftp/ftp_integration_test.go | 12 +- pkg/detectors/fulcrum/fulcrum.go | 8 +- .../fulcrum/fulcrum_integration_test.go | 6 +- pkg/detectors/fullstory/v1/fullstory.go | 8 +- .../v1/fullstory_integration_test.go | 6 +- .../v2/fullstory_integration_test.go | 6 +- pkg/detectors/fullstory/v2/fullstory_v2.go | 8 +- pkg/detectors/fxmarket/fxmarket.go | 8 +- .../fxmarket/fxmarket_integration_test.go | 6 +- pkg/detectors/gcp/gcp.go | 8 +- pkg/detectors/gcp/gcp_integration_test.go | 8 +- .../gcpapplicationdefaultcredentials.go | 8 +- ...tiondefaultcredentials_integration_test.go | 10 +- pkg/detectors/geckoboard/geckoboard.go | 8 +- .../geckoboard/geckoboard_integration_test.go | 6 +- pkg/detectors/gemini/gemini.go | 8 +- .../gemini/gemini_integration_test.go | 8 +- pkg/detectors/generic/generic.go | 8 +- pkg/detectors/gengo/gengo.go | 8 +- pkg/detectors/gengo/gengo_integration_test.go | 6 +- pkg/detectors/geoapify/geoapify.go | 8 +- .../geoapify/geoapify_integration_test.go | 6 +- pkg/detectors/geocode/geocode.go | 8 +- .../geocode/geocode_integration_test.go | 6 +- pkg/detectors/geocodify/geocodify.go | 8 +- .../geocodify/geocodify_integration_test.go | 6 +- pkg/detectors/geocodio/geocodio.go | 8 +- .../geocodio/geocodio_integration_test.go | 6 +- pkg/detectors/geoipifi/geoipifi.go | 8 +- .../geoipifi/geoipifi_integration_test.go | 6 +- pkg/detectors/getemail/getemail.go | 8 +- .../getemail/getemail_integration_test.go | 6 +- pkg/detectors/getemails/getemails.go | 8 +- .../getemails/getemails_integration_test.go | 6 +- pkg/detectors/getgeoapi/getgeoapi.go | 8 +- .../getgeoapi/getgeoapi_integration_test.go | 6 +- pkg/detectors/getgist/getgist.go | 8 +- .../getgist/getgist_integration_test.go | 6 +- pkg/detectors/getresponse/getresponse.go | 8 +- .../getresponse_integration_test.go | 6 +- pkg/detectors/getsandbox/getsandbox.go | 8 +- .../getsandbox/getsandbox_integration_test.go | 6 +- .../github/v1/github_integration_test.go | 6 +- pkg/detectors/github/v1/github_old.go | 8 +- pkg/detectors/github/v2/github.go | 8 +- .../github/v2/github_integration_test.go | 16 +- pkg/detectors/github_oauth2/github_oauth2.go | 8 +- pkg/detectors/githubapp/githubapp.go | 8 +- .../githubapp/githubapp_integration_test.go | 6 +- pkg/detectors/gitlab/v1/gitlab.go | 8 +- .../gitlab/v1/gitlab_integration_test.go | 14 +- .../gitlab/v2/gitlab_integration_test.go | 12 +- pkg/detectors/gitlab/v2/gitlab_v2.go | 8 +- pkg/detectors/gitlab/v3/gitlab_v3.go | 8 +- .../gitlab/v3/gitlab_v3_integration_test.go | 12 +- pkg/detectors/gitter/gitter.go | 8 +- .../gitter/gitter_integration_test.go | 6 +- pkg/detectors/glassnode/glassnode.go | 8 +- .../glassnode/glassnode_integration_test.go | 6 +- pkg/detectors/gocanvas/gocanvas.go | 8 +- .../gocanvas/gocanvas_integration_test.go | 6 +- pkg/detectors/gocardless/gocardless.go | 8 +- .../gocardless/gocardless_integration_test.go | 6 +- pkg/detectors/godaddy/v1/godaddy.go | 8 +- .../godaddy/v1/godaddy_integration_test.go | 6 +- pkg/detectors/godaddy/v2/godaddy.go | 8 +- .../godaddy/v2/godaddy_integration_test.go | 6 +- pkg/detectors/goodday/goodday.go | 8 +- .../goodday/goodday_integration_test.go | 6 +- pkg/detectors/googlegemini/googlegemini.go | 6 +- .../googlegemini_integration_test.go | 8 +- .../googleoauth2/googleoauth2_access_token.go | 6 +- .../googleoauth2_integration_test.go | 10 +- pkg/detectors/grafana/grafana.go | 8 +- .../grafana/grafana_integration_test.go | 10 +- .../grafanaserviceaccount.go | 8 +- .../grafanaserviceaccount_integration_test.go | 10 +- pkg/detectors/graphcms/graphcms.go | 8 +- .../graphcms/graphcms_integration_test.go | 6 +- pkg/detectors/graphhopper/graphhopper.go | 8 +- .../graphhopper_integration_test.go | 6 +- pkg/detectors/groovehq/groovehq.go | 8 +- .../groovehq/groovehq_integration_test.go | 6 +- pkg/detectors/groq/groq.go | 8 +- pkg/detectors/groq/groq_integration_test.go | 10 +- pkg/detectors/gtmetrix/gtmetrix.go | 8 +- .../gtmetrix/gtmetrix_integration_test.go | 6 +- pkg/detectors/guardianapi/guardianapi.go | 8 +- .../guardianapi_integration_test.go | 6 +- pkg/detectors/gumroad/gumroad.go | 8 +- .../gumroad/gumroad_integration_test.go | 6 +- pkg/detectors/guru/guru.go | 8 +- pkg/detectors/guru/guru_integration_test.go | 6 +- pkg/detectors/gyazo/gyazo.go | 8 +- pkg/detectors/gyazo/gyazo_integration_test.go | 6 +- pkg/detectors/happyscribe/happyscribe.go | 8 +- .../happyscribe_integration_test.go | 6 +- pkg/detectors/harness/harness.go | 8 +- .../harness/harness_integration_test.go | 10 +- pkg/detectors/harvest/harvest.go | 8 +- .../harvest/harvest_integration_test.go | 6 +- .../hashicorpvaultauth/hashicorpvaultauth.go | 8 +- .../hashicorpvaultauth_integration_test.go | 6 +- pkg/detectors/hasura/hasura.go | 10 +- .../hasura/hasura_integration_test.go | 10 +- pkg/detectors/hellosign/hellosign.go | 8 +- .../hellosign/hellosign_integration_test.go | 6 +- pkg/detectors/helpcrunch/helpcrunch.go | 8 +- .../helpcrunch/helpcrunch_integration_test.go | 6 +- pkg/detectors/helpscout/helpscout.go | 8 +- .../helpscout/helpscout_integration_test.go | 6 +- pkg/detectors/hereapi/hereapi.go | 8 +- .../hereapi/hereapi_integration_test.go | 6 +- pkg/detectors/heroku/v1/heroku.go | 8 +- .../heroku/v1/heroku_integration_test.go | 6 +- pkg/detectors/heroku/v2/heroku.go | 8 +- .../heroku/v2/heroku_integration_test.go | 6 +- pkg/detectors/hive/hive.go | 8 +- pkg/detectors/hive/hive_integration_test.go | 6 +- pkg/detectors/hiveage/hiveage.go | 8 +- .../hiveage/hiveage_integration_test.go | 6 +- pkg/detectors/holidayapi/holidayapi.go | 8 +- .../holidayapi/holidayapi_integration_test.go | 6 +- pkg/detectors/holistic/holistic.go | 8 +- .../holistic/holistic_integration_test.go | 6 +- pkg/detectors/honeycomb/honeycomb.go | 8 +- .../honeycomb/honeycomb_integration_test.go | 6 +- pkg/detectors/host/host.go | 8 +- pkg/detectors/host/host_integration_test.go | 6 +- pkg/detectors/html2pdf/html2pdf.go | 8 +- .../html2pdf/html2pdf_integration_test.go | 6 +- pkg/detectors/hubspot_apikey/v1/apikey.go | 8 +- .../v1/apikey_integration_test.go | 6 +- pkg/detectors/hubspot_apikey/v2/apikey.go | 8 +- .../v2/apikey_integration_test.go | 6 +- pkg/detectors/huggingface/huggingface.go | 8 +- .../huggingface_integration_test.go | 12 +- pkg/detectors/humanity/humanity.go | 8 +- .../humanity/humanity_integration_test.go | 6 +- pkg/detectors/hunter/hunter.go | 8 +- .../hunter/hunter_integration_test.go | 6 +- pkg/detectors/hybiscus/hybiscus.go | 8 +- .../hybiscus/hybiscus_integration_test.go | 6 +- pkg/detectors/hypertrack/hypertrack.go | 8 +- .../hypertrack/hypertrack_integration_test.go | 6 +- .../ibmclouduserkey/ibmclouduserkey.go | 8 +- .../ibmclouduserkey_integration_test.go | 6 +- pkg/detectors/iconfinder/iconfinder.go | 11 +- .../iconfinder_integreation_test.go | 6 +- pkg/detectors/iexapis/iexapis.go | 11 +- .../iexapis/iexapis_integration_test.go | 6 +- pkg/detectors/iexcloud/iexcloud.go | 11 +- .../iexcloud/iexcloud_integration_test.go | 6 +- pkg/detectors/imagekit/imagekit.go | 11 +- .../imagekit/imagekit_integration_test.go | 6 +- pkg/detectors/imagga/imagga.go | 11 +- .../imagga/imagga_integration_test.go | 6 +- pkg/detectors/impala/impala.go | 11 +- .../impala/impala_integration_test.go | 6 +- pkg/detectors/infura/infura.go | 11 +- .../infura/infura_integration_test.go | 6 +- pkg/detectors/insightly/insightly.go | 11 +- .../insightly/insightly_integration_test.go | 6 +- pkg/detectors/instabot/instabot.go | 11 +- .../instabot/instabot_integration_test.go | 6 +- pkg/detectors/instamojo/instamojo.go | 8 +- .../instamojo/instamojo_integration_test.go | 6 +- pkg/detectors/intercom/intercom.go | 11 +- .../intercom/intercom_integration_test.go | 6 +- pkg/detectors/interseller/interseller.go | 8 +- .../interseller_integration_test.go | 6 +- pkg/detectors/intra42/intra42.go | 8 +- .../intra42/intra42_integration_test.go | 10 +- pkg/detectors/intrinio/intrinio.go | 11 +- .../intrinio/intrinio_integration_test.go | 6 +- pkg/detectors/invoiceocean/invoiceocean.go | 10 +- .../invoiceocean_integration_test.go | 6 +- pkg/detectors/ip2location/ip2location.go | 8 +- .../ip2location_integration_test.go | 6 +- pkg/detectors/ipapi/ipapi.go | 11 +- pkg/detectors/ipapi/ipapi_integration_test.go | 6 +- pkg/detectors/ipgeolocation/ipgeolocation.go | 11 +- .../ipgeolocation_integration_test.go | 6 +- pkg/detectors/ipinfo/ipinfo.go | 8 +- .../ipinfo/ipinfo_integration_test.go | 10 +- pkg/detectors/ipinfodb/ipinfodb.go | 8 +- .../ipinfodb/ipinfodb_integration_test.go | 6 +- pkg/detectors/ipquality/ipquality.go | 8 +- .../ipquality/ipquality_integration_test.go | 6 +- pkg/detectors/ipstack/ipstack.go | 11 +- .../ipstack/ipstack_integration_test.go | 6 +- pkg/detectors/jdbc/jdbc.go | 8 +- pkg/detectors/jdbc/jdbc_integration_test.go | 18 +- pkg/detectors/jiratoken/v1/jiratoken.go | 8 +- .../v1/jiratoken_integration_test.go | 10 +- pkg/detectors/jiratoken/v2/jiratoken_v2.go | 8 +- .../v2/jiratoken_v2_integration_test.go | 10 +- pkg/detectors/jotform/jotform.go | 11 +- .../jotform/jotform_integration_test.go | 6 +- pkg/detectors/jumpcloud/jumpcloud.go | 11 +- .../jumpcloud/jumpcloud_integration_test.go | 6 +- pkg/detectors/jupiterone/jupiterone.go | 8 +- .../jupiterone/jupiterone_integration_test.go | 10 +- pkg/detectors/juro/juro.go | 11 +- pkg/detectors/juro/juro_integration_test.go | 6 +- pkg/detectors/jwt/jwt.go | 8 +- pkg/detectors/kanban/kanban.go | 10 +- .../kanban/kanban_integration_test.go | 6 +- pkg/detectors/kanbantool/kanbantool.go | 8 +- .../kanbantool/kanbantool_integration_test.go | 6 +- pkg/detectors/karmacrm/karmacrm.go | 11 +- .../karmacrm/karmacrm_integration_test.go | 6 +- pkg/detectors/keenio/keenio.go | 11 +- .../keenio/keenio_integration_test.go | 6 +- pkg/detectors/kickbox/kickbox.go | 11 +- .../kickbox/kickbox_integration_test.go | 6 +- pkg/detectors/klaviyo/klaviyo.go | 11 +- .../klaviyo/klaviyo_integration_test.go | 10 +- pkg/detectors/klipfolio/klipfolio.go | 11 +- .../klipfolio/klipfolio_integration_test.go | 6 +- pkg/detectors/knapsackpro/knapsackpro.go | 11 +- .../knapsackpro_integration_test.go | 6 +- pkg/detectors/kontent/kontent.go | 8 +- .../kontent/kontent_integration_test.go | 6 +- pkg/detectors/kraken/kraken.go | 8 +- .../kraken/kraken_integration_test.go | 6 +- pkg/detectors/kucoin/kucoin.go | 13 +- .../kucoin/kucoin_integration_test.go | 6 +- pkg/detectors/kylas/kylas.go | 11 +- pkg/detectors/kylas/kylas_integration_test.go | 6 +- pkg/detectors/langfuse/langfuse.go | 12 +- .../langfuse/langfuse_integration_test.go | 11 +- pkg/detectors/langsmith/langsmith.go | 8 +- .../langsmith/langsmith_integration_test.go | 6 +- pkg/detectors/languagelayer/languagelayer.go | 11 +- .../languagelayer_integration_test.go | 6 +- pkg/detectors/larksuite/larksuite.go | 8 +- .../larksuite/larksuite_integration_test.go | 8 +- .../larksuiteapikey/larksuiteapikey.go | 8 +- .../larksuiteapikey_integration_test.go | 6 +- pkg/detectors/launchdarkly/launchdarkly.go | 8 +- .../launchdarkly_integration_test.go | 10 +- pkg/detectors/ldap/ldap.go | 10 +- pkg/detectors/ldap/ldap_integration_test.go | 16 +- pkg/detectors/leadfeeder/leadfeeder.go | 11 +- .../leadfeeder/leadfeeder_integration_test.go | 6 +- pkg/detectors/lemlist/lemlist.go | 11 +- .../lemlist/lemlist_integration_test.go | 6 +- pkg/detectors/lemonsqueezy/lemonsqueezy.go | 8 +- .../lemonsqueezy_integration_test.go | 6 +- pkg/detectors/lendflow/lendflow.go | 8 +- .../lendflow/lendflow_integration_test.go | 6 +- .../lessannoyingcrm/lessannoyingcrm.go | 8 +- .../lessannoyingcrm_integration_test.go | 6 +- pkg/detectors/lexigram/lexigram.go | 11 +- .../lexigram/lexigram_integration_test.go | 6 +- pkg/detectors/linearapi/linearapi.go | 11 +- .../linearapi/linearapi_integration_test.go | 6 +- pkg/detectors/linemessaging/linemessaging.go | 11 +- .../linemessaging_integration_test.go | 6 +- pkg/detectors/linenotify/linenotify.go | 11 +- .../linenotify/linenotify_integration_test.go | 6 +- pkg/detectors/linkpreview/linkpreview.go | 11 +- .../linkpreview_integration_test.go | 6 +- pkg/detectors/liveagent/liveagent.go | 10 +- .../liveagent/liveagent_integration_test.go | 6 +- pkg/detectors/livestorm/livestorm.go | 11 +- .../livestorm/livestorm_integration_test.go | 6 +- pkg/detectors/loadmill/loadmill.go | 11 +- .../loadmill/loadmill_integration_test.go | 6 +- pkg/detectors/lob/lob.go | 11 +- pkg/detectors/lob/lob_integration_test.go | 6 +- pkg/detectors/locationiq/locationiq.go | 11 +- .../locationiq/locationiq_integration_test.go | 6 +- pkg/detectors/loggly/loggly.go | 8 +- .../loggly/loggly_integration_test.go | 10 +- pkg/detectors/loginradius/loginradius.go | 8 +- .../loginradius_integration_test.go | 6 +- pkg/detectors/logzio/logzio.go | 11 +- .../logzio/logzio_integration_test.go | 10 +- pkg/detectors/lokalisetoken/lokalisetoken.go | 8 +- .../lokalisetoken_integration_test.go | 6 +- pkg/detectors/loyverse/loyverse.go | 11 +- .../loyverse/loyverse_integration_test.go | 6 +- pkg/detectors/lunchmoney/lunchmoney.go | 11 +- .../lunchmoney/lunchmoney_integration_test.go | 6 +- pkg/detectors/luno/luno.go | 13 +- pkg/detectors/luno/luno_integration_test.go | 6 +- pkg/detectors/m3o/m3o.go | 11 +- pkg/detectors/m3o/m3o_integration_test.go | 6 +- pkg/detectors/madkudu/madkudu.go | 11 +- .../madkudu/madkudu_integration_test.go | 6 +- pkg/detectors/magicbell/magicbell.go | 8 +- .../magicbell/magicbell_integration_test.go | 6 +- pkg/detectors/magnetic/magnetic.go | 11 +- .../magnetic/magnetic_integration_test.go | 6 +- pkg/detectors/mailboxlayer/mailboxlayer.go | 8 +- .../mailboxlayer_integration_test.go | 6 +- pkg/detectors/mailchimp/mailchimp.go | 8 +- .../mailchimp/mailchimp_integration_test.go | 6 +- pkg/detectors/mailerlite/mailerlite.go | 11 +- .../mailerlite/mailerlite_integration_test.go | 6 +- pkg/detectors/mailgun/mailgun.go | 6 +- .../mailgun/mailgun_integration_test.go | 10 +- .../mailjetbasicauth/mailjetbasicauth.go | 8 +- .../mailjetbasicauth_integration_test.go | 6 +- pkg/detectors/mailjetsms/mailjetsms.go | 11 +- .../mailjetsms/mailjetsms_integration_test.go | 6 +- pkg/detectors/mailmodo/mailmodo.go | 8 +- .../mailmodo/mailmodo_integration_test.go | 6 +- pkg/detectors/mailsac/mailsac.go | 11 +- .../mailsac/mailsac_integration_test.go | 6 +- pkg/detectors/mandrill/mandrill.go | 11 +- .../mandrill/mandrill_integration_test.go | 6 +- pkg/detectors/manifest/manifest.go | 11 +- .../manifest/manifest_integration_test.go | 6 +- pkg/detectors/mapbox/mapbox.go | 8 +- .../mapbox/mapbox_integration_test.go | 6 +- pkg/detectors/mapquest/mapquest.go | 11 +- .../mapquest/mapquest_integration_test.go | 6 +- pkg/detectors/marketstack/marketstack.go | 11 +- .../marketstack_integration_test.go | 6 +- .../mattermostpersonaltoken.go | 8 +- ...attermostpersonaltoken_integration_test.go | 6 +- pkg/detectors/mavenlink/mavenlink.go | 11 +- .../mavenlink/mavenlink_integration_test.go | 6 +- .../maxmindlicense/v1/maxmindlicense.go | 10 +- .../v1/maxmindlicense_integration_test.go | 6 +- .../maxmindlicense/v2/maxmindlicense_v2.go | 8 +- .../v2/maxmindlicense_v2_integration_test.go | 6 +- pkg/detectors/meaningcloud/meaningcloud.go | 11 +- .../meaningcloud_integration_test.go | 6 +- pkg/detectors/mediastack/mediastack.go | 11 +- .../mediastack/mediastack_integration_test.go | 6 +- pkg/detectors/meistertask/meistertask.go | 11 +- .../meistertask_integration_test.go | 6 +- pkg/detectors/meraki/meraki.go | 8 +- .../meraki/meraki_integration_test.go | 10 +- pkg/detectors/mesibo/mesibo.go | 11 +- .../mesibo/mesibo_integration_test.go | 6 +- pkg/detectors/messagebird/messagebird.go | 11 +- .../messagebird_integration_test.go | 6 +- pkg/detectors/metaapi/metaapi.go | 11 +- .../metaapi/metaapi_integration_test.go | 6 +- pkg/detectors/metabase/metabase.go | 10 +- .../metabase/metabase_integration_test.go | 6 +- pkg/detectors/metrilo/metrilo.go | 11 +- .../metrilo/metrilo_integration_test.go | 6 +- .../microsoftteamswebhook.go | 8 +- .../microsoftteamswebhook_integration_test.go | 12 +- pkg/detectors/mindmeister/mindmeister.go | 13 +- .../mindmeister_integration_test.go | 6 +- pkg/detectors/miro/miro.go | 11 +- pkg/detectors/miro/miro_integration_test.go | 6 +- pkg/detectors/mite/mite.go | 8 +- pkg/detectors/mite/mite_integration_test.go | 6 +- pkg/detectors/mixmax/mixmax.go | 11 +- .../mixmax/mixmax_integration_test.go | 6 +- pkg/detectors/mixpanel/mixpanel.go | 11 +- .../mixpanel/mixpanel_integration_test.go | 6 +- pkg/detectors/mockaroo/mockaroo.go | 8 +- .../mockaroo/mockaroo_integration_test.go | 6 +- pkg/detectors/moderation/moderation.go | 8 +- .../moderation/moderation_integration_test.go | 6 +- pkg/detectors/monday/monday.go | 8 +- .../monday/monday_integration_test.go | 6 +- pkg/detectors/mongodb/mongodb.go | 8 +- .../mongodb/mongodb_integration_test.go | 20 +- pkg/detectors/monkeylearn/monkeylearn.go | 11 +- .../monkeylearn_integration_test.go | 6 +- pkg/detectors/moonclerk/moonclerk.go | 11 +- .../moonclerk/moonclerk_integration_test.go | 6 +- pkg/detectors/moosend/moosend.go | 11 +- .../moosend/moosend_integration_test.go | 6 +- pkg/detectors/moralis/moralis.go | 11 +- .../moralis/moralis_integration_test.go | 6 +- pkg/detectors/mrticktock/mrticktock.go | 8 +- .../mrticktock/mrticktok_integration_test.go | 6 +- pkg/detectors/mux/mux.go | 8 +- pkg/detectors/mux/mux_integration_test.go | 6 +- pkg/detectors/myfreshworks/myfreshworks.go | 11 +- .../myfreshworks_integration_test.go | 10 +- pkg/detectors/myintervals/myintervals.go | 11 +- .../myintervals_integration_test.go | 6 +- .../nasdaqdatalink/nasdaqdatalink.go | 11 +- .../nasdaqdatalink_integration_test.go | 6 +- pkg/detectors/nethunt/nethunt.go | 13 +- .../nethunt/nethunt_integration_test.go | 6 +- pkg/detectors/netlify/v1/netlify_v1.go | 8 +- .../netlify/v1/netlify_v1_integration_test.go | 6 +- pkg/detectors/netlify/v2/netlify_v2.go | 8 +- .../netlify/v2/netlify_v2_integration_test.go | 6 +- pkg/detectors/netsuite/netsuite.go | 8 +- pkg/detectors/neutrinoapi/neutrinoapi.go | 13 +- .../neutrinoapi_integration_test.go | 10 +- .../newrelicpersonalapikey.go | 8 +- ...newrelicpersonalapikey_integration_test.go | 6 +- pkg/detectors/newsapi/newsapi.go | 11 +- .../newsapi/newsapi_integration_test.go | 6 +- pkg/detectors/newscatcher/newscatcher.go | 11 +- .../newscatcher_integration_test.go | 6 +- pkg/detectors/nexmoapikey/nexmoapikey.go | 11 +- .../nexmoapikey_integration_test.go | 6 +- pkg/detectors/nftport/nftport.go | 11 +- .../nftport/nftport_integration_test.go | 6 +- pkg/detectors/ngc/ngc.go | 13 +- pkg/detectors/ngc/ngc_integration_test.go | 6 +- pkg/detectors/ngrok/ngrok.go | 8 +- pkg/detectors/ngrok/ngrok_integration_test.go | 8 +- pkg/detectors/nicereply/nicereply.go | 11 +- .../nicereply/nicereply_integration_test.go | 6 +- pkg/detectors/nightfall/nightfall.go | 11 +- .../nightfall/nightfall_integration_test.go | 6 +- pkg/detectors/nimble/nimble.go | 11 +- .../nimble/nimble_integration_test.go | 6 +- pkg/detectors/noticeable/noticeable.go | 11 +- .../noticeable/noticeable_integration_test.go | 6 +- pkg/detectors/notion/notion.go | 8 +- .../notion/notion_integration_test.go | 6 +- pkg/detectors/nozbeteams/nozbeteams.go | 8 +- .../nozbeteams/nozbeteams_integration_test.go | 6 +- pkg/detectors/npmtoken/npmtoken.go | 8 +- .../npmtoken/npmtoken_integration_test.go | 6 +- pkg/detectors/npmtokenv2/npmtokenv2.go | 8 +- .../npmtokenv2/npmtokenv2_integration_test.go | 6 +- pkg/detectors/nugetapikey/nugetapikey.go | 11 +- .../nugetapikey_integration_test.go | 6 +- pkg/detectors/numverify/numverify.go | 11 +- .../numverify/numverify_integration_test.go | 6 +- pkg/detectors/nutritionix/nutritionix.go | 13 +- .../nutritionix_integration_test.go | 6 +- pkg/detectors/nvapi/nvapi.go | 8 +- pkg/detectors/nvapi/nvapi_integration_test.go | 10 +- pkg/detectors/nylas/nylas.go | 11 +- pkg/detectors/nylas/nylas_integration_test.go | 6 +- pkg/detectors/oanda/oanda.go | 11 +- pkg/detectors/oanda/oanda_integration_test.go | 6 +- pkg/detectors/okta/okta.go | 8 +- pkg/detectors/okta/okta_integration_test.go | 8 +- pkg/detectors/omnisend/omnisend.go | 11 +- .../omnisend/omnisend_integration_test.go | 6 +- pkg/detectors/onedesk/onedesk.go | 8 +- .../onedesk/onedesk_integration_test.go | 6 +- pkg/detectors/onelogin/onelogin.go | 13 +- .../onelogin/onelogin_integration_test.go | 6 +- pkg/detectors/onepagecrm/onepagecrm.go | 11 +- .../onepagecrm/onepagecrm_integration_test.go | 6 +- pkg/detectors/onesignal/onesignal.go | 11 +- .../onesignal/onesignal_integration_test.go | 6 +- pkg/detectors/onfleet/onfleet.go | 8 +- .../onfleet/onfleet_integration_test.go | 10 +- pkg/detectors/oopspam/oopspam.go | 11 +- .../oopspam/oopspam_integration_test.go | 6 +- pkg/detectors/openai/openai.go | 8 +- .../openai/openai_integration_test.go | 6 +- pkg/detectors/openaiadmin/openaiadmin.go | 8 +- .../openaiadmin_integration_test.go | 10 +- pkg/detectors/opencagedata/opencagedata.go | 11 +- .../opencagedata_integration_test.go | 6 +- pkg/detectors/openuv/openuv.go | 13 +- .../openuv/openuv_integration_test.go | 6 +- pkg/detectors/openvpn/openvpn.go | 8 +- .../openvpn/openvpn_integration_test.go | 6 +- pkg/detectors/openweather/openweather.go | 11 +- .../openweather_integration_test.go | 6 +- pkg/detectors/opsgenie/opsgenie.go | 8 +- .../opsgenie/opsgenie_integration_test.go | 6 +- pkg/detectors/optimizely/optimizely.go | 11 +- .../optimizely/optimizely_integration_test.go | 6 +- pkg/detectors/overloop/overloop.go | 11 +- .../overloop/overloop_integration_test.go | 10 +- pkg/detectors/owlbot/owlbot.go | 11 +- .../owlbot/owlbot_integration_test.go | 6 +- pkg/detectors/packagecloud/packagecloud.go | 11 +- .../packagecloud_integration_test.go | 6 +- pkg/detectors/pagarme/pagarme.go | 8 +- .../pagarme/pagarme_integration_test.go | 10 +- .../pagerdutyapikey/pagerdutyapikey.go | 8 +- .../pagerdutyapikey_integration_test.go | 10 +- pkg/detectors/pandadoc/pandadoc.go | 11 +- .../pandadoc/pandadoc_integration_test.go | 6 +- pkg/detectors/pandascore/pandascore.go | 11 +- .../pandascore/pandascore_integration_test.go | 6 +- pkg/detectors/paperform/paperform.go | 11 +- .../paperform/paperform_integration_test.go | 6 +- pkg/detectors/paralleldots/paralleldots.go | 11 +- .../paralleldots_integration_test.go | 6 +- pkg/detectors/parsehub/parsehub.go | 11 +- .../parsehub/parsehub_integration_test.go | 6 +- pkg/detectors/parsers/parsers.go | 11 +- .../parsers/parsers_integration_test.go | 6 +- pkg/detectors/parseur/parseur.go | 11 +- .../parseur/parseur_integration_test.go | 6 +- pkg/detectors/partnerstack/partnerstack.go | 11 +- .../partnerstack_integration_test.go | 6 +- pkg/detectors/pastebin/pastebin.go | 11 +- .../pastebin/pastebin_integration_test.go | 6 +- pkg/detectors/paydirtapp/paydirtapp.go | 11 +- .../paydirtapp/paydirtapp_integration_test.go | 6 +- pkg/detectors/paymoapp/paymoapp.go | 11 +- .../paymoapp/paymoapp_integration_test.go | 6 +- pkg/detectors/paymongo/paymongo.go | 8 +- .../paymongo/paymongo_integration_test.go | 6 +- pkg/detectors/paypaloauth/paypaloauth.go | 13 +- .../paypaloauth_integration_test.go | 14 +- pkg/detectors/paystack/paystack.go | 11 +- .../paystack/paystack_integration_test.go | 6 +- pkg/detectors/pdflayer/pdflayer.go | 11 +- .../pdflayer/pdflayer_integration_test.go | 6 +- pkg/detectors/pdfshift/pdfshift.go | 11 +- .../pdfshift/pdfshift_integration_test.go | 6 +- .../peopledatalabs/peopledatalabs.go | 11 +- .../peopledatalabs_integration_test.go | 6 +- pkg/detectors/pepipost/pepipost.go | 11 +- .../pepipost/pepipost_integration_test.go | 6 +- pkg/detectors/percy/percy.go | 11 +- pkg/detectors/percy/percy_integration_test.go | 6 +- pkg/detectors/photoroom/photoroom.go | 8 +- .../photoroom/photoroom_integration_test.go | 10 +- .../phraseaccesstoken/phraseaccesstoken.go | 8 +- .../phraseaccesstoken_integration_test.go | 10 +- pkg/detectors/pinata/pinata.go | 13 +- .../pinata/pinata_integration_test.go | 6 +- pkg/detectors/pipedream/pipedream.go | 11 +- .../pipedream/pipedream_integration_test.go | 6 +- pkg/detectors/pipedrive/pipedrive.go | 11 +- .../pipedrive/pipedrive_integration_test.go | 6 +- .../pivotaltracker/pivotaltracker.go | 11 +- .../pivotaltracker_integration_test.go | 6 +- pkg/detectors/pixabay/pixabay.go | 11 +- .../pixabay/pixabay_integration_test.go | 6 +- pkg/detectors/plaidkey/plaidkey.go | 8 +- .../plaidkey/plaidkey_integration_test.go | 6 +- pkg/detectors/planetscale/planetscale.go | 8 +- .../planetscale_integration_test.go | 10 +- pkg/detectors/planetscaledb/planetscaledb.go | 13 +- .../planetscaledb_integration_test.go | 6 +- .../planviewleankit/planviewleankit.go | 8 +- .../planviewleankit_integration_test.go | 6 +- pkg/detectors/planyo/planyo.go | 8 +- .../planyo/planyo_integration_test.go | 6 +- pkg/detectors/plivo/plivo.go | 13 +- pkg/detectors/plivo/plivo_integration_test.go | 6 +- pkg/detectors/podio/podio.go | 11 +- pkg/detectors/podio/podio_integration_test.go | 6 +- pkg/detectors/pollsapi/pollsapi.go | 8 +- .../pollsapi/pollsapi_integration_test.go | 6 +- pkg/detectors/poloniex/poloniex.go | 13 +- .../poloniex/poloniex_integration_test.go | 6 +- pkg/detectors/polygon/polygon.go | 11 +- .../polygon/polygon_integration_test.go | 6 +- pkg/detectors/portainer/portainer.go | 8 +- .../portainer/portainer_integration_test.go | 6 +- .../portainertoken/portainertoken.go | 8 +- .../portainertoken_integration_test.go | 6 +- pkg/detectors/positionstack/positionstack.go | 11 +- .../positionstack_integration_test.go | 6 +- pkg/detectors/postageapp/postageapp.go | 11 +- .../postageapp/postageapp_integration_test.go | 6 +- pkg/detectors/postbacks/postbacks.go | 11 +- .../postbacks/postbacks_integration_test.go | 6 +- pkg/detectors/postgres/postgres.go | 8 +- .../postgres/postgres_integration_test.go | 22 +- pkg/detectors/posthog/posthog.go | 8 +- .../posthog/posthog_integration_test.go | 6 +- pkg/detectors/postman/postman.go | 8 +- .../postman/postman_integration_test.go | 10 +- pkg/detectors/postmark/postmark.go | 8 +- .../postmark/postmark_integration_test.go | 8 +- pkg/detectors/powrbot/powrbot.go | 11 +- .../powrbot/powrbot_integration_test.go | 6 +- pkg/detectors/prefect/prefect.go | 11 +- .../prefect/prefect_integration_test.go | 6 +- pkg/detectors/privacy/privacy.go | 8 +- .../privacy/privacy_integration_test.go | 10 +- pkg/detectors/privatekey/privatekey.go | 8 +- .../privatekey/privatekey_integration_test.go | 12 +- pkg/detectors/prodpad/prodpad.go | 11 +- .../prodpad/prodpad_integration_test.go | 6 +- pkg/detectors/prospectcrm/prospectcrm.go | 8 +- .../prospectcrm_integration_test.go | 6 +- pkg/detectors/protocolsio/protocolsio.go | 11 +- .../protocolsio_integration_test.go | 6 +- pkg/detectors/proxycrawl/proxycrawl.go | 11 +- .../proxycrawl/proxycrawl_integration_test.go | 6 +- .../pubnubpublishkey/pubnubpublishkey.go | 8 +- .../pubnubpublishkey_integration_test.go | 10 +- .../pubnubsubscriptionkey.go | 8 +- .../pubnubsubscriptionkey_integration_test.go | 6 +- pkg/detectors/pulumi/pulumi.go | 11 +- .../pulumi/pulumi_integration_test.go | 6 +- pkg/detectors/purestake/purestake.go | 11 +- .../purestake/purestake_integration_test.go | 6 +- .../pushbulletapikey/pushbulletapikey.go | 8 +- .../pushbulletapikey_integration_test.go | 6 +- .../pusherchannelkey/pusherchannelkey.go | 8 +- .../pusherchannelkey_integration_test.go | 10 +- pkg/detectors/pypi/pypi.go | 8 +- pkg/detectors/pypi/pypi_integration_test.go | 10 +- pkg/detectors/qase/qase.go | 8 +- pkg/detectors/qase/qase_integration_test.go | 6 +- pkg/detectors/qualaroo/qualaroo.go | 8 +- .../qualaroo/qualaroo_integration_test.go | 6 +- pkg/detectors/qubole/qubole.go | 8 +- .../qubole/qubole_integration_test.go | 6 +- pkg/detectors/rabbitmq/rabbitmq.go | 8 +- .../rabbitmq/rabbitmq_integration_test.go | 6 +- pkg/detectors/railwayapp/railwayapp.go | 8 +- .../railwayapp/railwayapp_integration_test.go | 10 +- pkg/detectors/ramp/ramp.go | 8 +- pkg/detectors/ramp/ramp_integration_test.go | 10 +- pkg/detectors/rapidapi/rapidapi.go | 11 +- .../rapidapi/rapidapi_integration_test.go | 6 +- pkg/detectors/raven/raven.go | 11 +- pkg/detectors/raven/raven_integration_test.go | 6 +- pkg/detectors/rawg/rawg.go | 11 +- pkg/detectors/rawg/rawg_integration_test.go | 6 +- pkg/detectors/razorpay/razorpay.go | 8 +- .../razorpay/razorpay_integration_test.go | 4 +- pkg/detectors/reachmail/reachmail.go | 11 +- .../reachmail/reachmail_integration_test.go | 6 +- pkg/detectors/readme/readme.go | 11 +- .../readme/readme_integration_test.go | 6 +- .../reallysimplesystems.go | 8 +- .../reallysimplesystems_integration_test.go | 6 +- pkg/detectors/rebrandly/rebrandly.go | 11 +- .../rebrandly/rebrandly_integration_test.go | 6 +- .../rechargepayments/rechargepayments.go | 13 +- .../rechargepayments_integration_test.go | 6 +- pkg/detectors/redis/redis.go | 13 +- pkg/detectors/redis/redis_integration_test.go | 8 +- pkg/detectors/refiner/refiner.go | 11 +- .../refiner/refiner_integration_test.go | 6 +- pkg/detectors/rentman/rentman.go | 11 +- .../rentman/rentman_integration_test.go | 6 +- pkg/detectors/repairshopr/repairshopr.go | 8 +- .../repairshopr_integration_test.go | 6 +- pkg/detectors/replicate/replicate.go | 11 +- .../replicate/replicate_integration_test.go | 6 +- pkg/detectors/replyio/replyio.go | 11 +- .../replyio/replyio_integration_test.go | 6 +- .../requestfinance/requestfinance.go | 8 +- .../requestfinance_integration_test.go | 6 +- .../restpackhtmltopdfapi.go | 8 +- .../restpackhtmltopdfapi_integration_test.go | 6 +- .../restpackscreenshotapi.go | 8 +- .../restpackscreenshotapi_integration_test.go | 6 +- pkg/detectors/rev/rev.go | 13 +- pkg/detectors/rev/rev_integration_test.go | 6 +- pkg/detectors/revampcrm/revampcrm.go | 13 +- .../revampcrm/revampcrm_integration_test.go | 6 +- pkg/detectors/ringcentral/ringcentral.go | 8 +- .../ringcentral_integration_test.go | 6 +- pkg/detectors/ritekit/ritekit.go | 11 +- .../ritekit/ritekit_integration_test.go | 6 +- pkg/detectors/roaring/roaring.go | 13 +- .../roaring/roaring_integration_test.go | 6 +- .../robinhoodcrypto/robinhoodcrypto.go | 8 +- .../robinhoodcrypto_integration_test.go | 12 +- pkg/detectors/rocketreach/rocketreach.go | 11 +- .../rocketreach_integration_test.go | 6 +- pkg/detectors/rootly/rootly.go | 8 +- .../rootly/rootly_integration_test.go | 6 +- pkg/detectors/route4me/route4me.go | 11 +- .../route4me/route4me_integration_test.go | 6 +- pkg/detectors/rownd/rownd.go | 11 +- pkg/detectors/rownd/rownd_integration_test.go | 6 +- pkg/detectors/rubygems/rubygems.go | 11 +- .../rubygems/rubygems_integration_test.go | 6 +- pkg/detectors/runrunit/runrunit.go | 11 +- .../runrunit/runrunit_integration_test.go | 6 +- .../saladcloudapikey/saladcloudapikey.go | 8 +- .../saladcloudapikey_integration_test.go | 10 +- pkg/detectors/salesblink/salesblink.go | 11 +- .../salesblink/salesblink_integration_test.go | 6 +- pkg/detectors/salescookie/salescookie.go | 11 +- .../salescookie_integration_test.go | 6 +- pkg/detectors/salesflare/salesflare.go | 11 +- .../salesflare/salesflare_integration_test.go | 6 +- pkg/detectors/salesforce/salesforce.go | 8 +- .../salesforce/salesforce_integration_test.go | 10 +- .../salesforceoauth2/salesforceoauth2.go | 8 +- .../salesforceoauth2_integration_test.go | 14 +- .../salesforcerefreshtoken.go | 8 +- ...salesforcerefreshtoken_integration_test.go | 16 +- pkg/detectors/salesmate/salesmate.go | 10 +- .../salesmate/salesmate_integration_test.go | 6 +- pkg/detectors/sanity/sanity.go | 8 +- .../sanity/sanity_integration_test.go | 6 +- .../satismeterprojectkey.go | 8 +- .../satismeterprojectkey_integration_test.go | 6 +- .../satismeterwritekey/satismeterwritekey.go | 8 +- .../satismeterwritekey_integration_test.go | 10 +- pkg/detectors/saucelabs/saucelabs.go | 8 +- .../saucelabs/saucelabs_integration_test.go | 10 +- pkg/detectors/scalewaykey/scalewaykey.go | 11 +- .../scalewaykey_integration_test.go | 6 +- pkg/detectors/scalr/scalr.go | 11 +- pkg/detectors/scalr/scalr_integration_test.go | 10 +- pkg/detectors/scrapeowl/scrapeowl.go | 8 +- .../scrapeowl/scrapeowl_integration_test.go | 6 +- pkg/detectors/scraperapi/scraperapi.go | 11 +- .../scraperapi/scraperapi_integration_test.go | 6 +- pkg/detectors/scraperbox/scraperbox.go | 11 +- .../scraperbox/scraperbox_integration_test.go | 6 +- pkg/detectors/scrapestack/scrapestack.go | 11 +- .../scrapestack_integration_test.go | 6 +- pkg/detectors/scrapfly/scrapfly.go | 11 +- .../scrapfly/scrapfly_integration_test.go | 6 +- pkg/detectors/scrapingant/scrapingant.go | 8 +- .../scrapingant_integration_test.go | 6 +- pkg/detectors/scrapingbee/scrapingbee.go | 8 +- .../scrapingbee_integration_test.go | 6 +- pkg/detectors/screenshotapi/screenshotapi.go | 11 +- .../screenshotapi_integration_test.go | 6 +- .../screenshotlayer/screenshotlayer.go | 11 +- .../screenshotlayer_integration_test.go | 6 +- pkg/detectors/scrutinizerci/scrutinizerci.go | 11 +- .../scrutinizerci_integration_test.go | 6 +- .../securitytrails/securitytrails.go | 11 +- .../securitytrails_integration_test.go | 8 +- pkg/detectors/segmentapikey/segmentapikey.go | 11 +- .../segmentapikey_integration_test.go | 6 +- pkg/detectors/selectpdf/selectpdf.go | 11 +- .../selectpdf/selectpdf_integration_test.go | 6 +- pkg/detectors/semaphore/semaphore.go | 11 +- .../semaphore/semaphore_integration_test.go | 6 +- pkg/detectors/sendbird/sendbird.go | 11 +- .../sendbird/sendbird_integration_test.go | 14 +- .../sendbirdorganizationapi.go | 8 +- ...endbirdorganizationapi_integration_test.go | 10 +- pkg/detectors/sendgrid/sendgrid.go | 8 +- .../sendgrid/sendgrid_integration_test.go | 10 +- pkg/detectors/sendinbluev2/sendinbluev2.go | 11 +- .../sendinbluev2_integration_test.go | 6 +- .../sentryorgtoken/sentryorgtoken.go | 8 +- .../sentryorgtoken_integration_test.go | 6 +- pkg/detectors/sentrytoken/v1/sentrytoken.go | 8 +- .../v1/sentrytoken_integration_test.go | 10 +- pkg/detectors/sentrytoken/v2/sentrytoken.go | 8 +- .../v2/sentrytoken_integration_test.go | 10 +- pkg/detectors/serphouse/serphouse.go | 11 +- .../serphouse/serphouse_integration_test.go | 6 +- pkg/detectors/serpstack/serpstack.go | 8 +- .../serpstack/serpstack_integration_test.go | 6 +- pkg/detectors/sheety/sheety.go | 8 +- .../sheety/sheety_integration_test.go | 6 +- pkg/detectors/sherpadesk/sherpadesk.go | 11 +- .../sherpadesk/sherpadesk_integration_test.go | 6 +- pkg/detectors/shipday/shipday.go | 11 +- .../shipday/shipday_integration_test.go | 6 +- pkg/detectors/shodankey/shodankey.go | 11 +- .../shodankey/shodankey_integration_test.go | 6 +- pkg/detectors/shopify/shopify.go | 8 +- .../shopify/shopify_integration_test.go | 6 +- pkg/detectors/shortcut/shortcut.go | 11 +- .../shortcut/shortcut_integration_test.go | 6 +- pkg/detectors/shotstack/shotstack.go | 11 +- .../shotstack/shotstack_integration_test.go | 6 +- pkg/detectors/shutterstock/shutterstock.go | 11 +- .../shutterstock_integration_test.go | 6 +- .../shutterstockoauth/shutterstockoauth.go | 8 +- .../shutterstockoauth_integration_test.go | 6 +- pkg/detectors/signable/signable.go | 11 +- .../signable/signable_integration_test.go | 6 +- pkg/detectors/signalwire/signalwire.go | 8 +- .../signalwire/signalwire_integration_test.go | 6 +- pkg/detectors/signaturit/signaturit.go | 11 +- .../signaturit/signaturit_integration_test.go | 6 +- pkg/detectors/signupgenius/signupgenius.go | 11 +- .../signupgenius_integration_test.go | 6 +- pkg/detectors/sigopt/sigopt.go | 8 +- .../sigopt/sigopt_integration_test.go | 6 +- pkg/detectors/simfin/simfin.go | 8 +- .../simfin/simfin_integration_test.go | 6 +- pkg/detectors/simplesat/simplesat.go | 11 +- .../simplesat/simplesat_integration_test.go | 6 +- pkg/detectors/simplynoted/simplynoted.go | 11 +- .../simplynoted_integration_test.go | 6 +- pkg/detectors/simvoly/simvoly.go | 11 +- .../simvoly/simvoly_integration_test.go | 6 +- pkg/detectors/sinchmessage/sinchmessage.go | 11 +- .../sinchmessage_integration_test.go | 6 +- pkg/detectors/sirv/sirv.go | 13 +- pkg/detectors/sirv/sirv_integration_test.go | 6 +- pkg/detectors/siteleaf/siteleaf.go | 11 +- .../siteleaf/siteleaf_integration_test.go | 6 +- pkg/detectors/skrappio/skrappio.go | 11 +- .../skrappio/skrappio_integration_test.go | 6 +- pkg/detectors/skybiometry/skybiometry.go | 8 +- .../skybiometry_integration_test.go | 10 +- pkg/detectors/slack/slack.go | 8 +- pkg/detectors/slack/slack_integration_test.go | 14 +- pkg/detectors/slackwebhook/slackwebhook.go | 8 +- .../slackwebhook_integration_test.go | 14 +- pkg/detectors/smartsheets/smartsheets.go | 8 +- .../smartsheets_integration_test.go | 6 +- pkg/detectors/smartystreets/smartystreets.go | 13 +- .../smartystreets_integration_test.go | 6 +- pkg/detectors/smooch/smooch.go | 13 +- .../smooch/smooch_integration_test.go | 6 +- pkg/detectors/snipcart/snipcart.go | 11 +- .../snipcart/snipcart_integration_test.go | 6 +- pkg/detectors/snowflake/snowflake.go | 8 +- .../snowflake/snowflake_integration_test.go | 8 +- pkg/detectors/snykkey/snykkey.go | 6 +- .../snykkey/snykkey_integration_test.go | 6 +- pkg/detectors/sonarcloud/sonarcloud.go | 8 +- .../sonarcloud/sonarcloud_integration_test.go | 6 +- pkg/detectors/sourcegraph/sourcegraph.go | 8 +- .../sourcegraph_integration_test.go | 20 +- .../sourcegraphcody/sourcegraphcody.go | 8 +- .../sourcegraphcody_integration_test.go | 10 +- pkg/detectors/sparkpost/sparkpost.go | 11 +- .../sparkpost/sparkpost_integration_test.go | 6 +- pkg/detectors/speechtextai/speechtextai.go | 11 +- .../speechtextai_integration_test.go | 6 +- .../splunkobservabilitytoken.go | 8 +- ...lunkobservabilitytoken_integration_test.go | 6 +- pkg/detectors/spoonacular/spoonacular.go | 11 +- .../spoonacular_integration_test.go | 6 +- pkg/detectors/sportsmonk/sportsmonk.go | 11 +- .../sportsmonk/sportsmonk_integration_test.go | 6 +- pkg/detectors/spotifykey/spotifykey.go | 12 +- .../spotifykey/spotifykey_integration_test.go | 6 +- pkg/detectors/sqlserver/sqlserver.go | 8 +- .../sqlserver/sqlserver_integration_test.go | 16 +- pkg/detectors/square/square.go | 8 +- .../square/square_integration_test.go | 6 +- pkg/detectors/squareapp/squareapp.go | 8 +- .../squareapp/squareapp_integration_test.go | 4 +- pkg/detectors/squarespace/squarespace.go | 11 +- .../squarespace_integration_test.go | 6 +- pkg/detectors/squareup/squareup.go | 11 +- .../squareup/squareup_integration_test.go | 6 +- pkg/detectors/sslmate/sslmate.go | 11 +- .../sslmate/sslmate_integration_test.go | 6 +- pkg/detectors/statuscake/statuscake.go | 11 +- .../statuscake/statuscake_integration_test.go | 6 +- pkg/detectors/statuspage/statuspage.go | 11 +- .../statuspage/statuspage_integration_test.go | 6 +- pkg/detectors/statuspal/statuspal.go | 11 +- .../statuspal/statuspal_integration_test.go | 6 +- pkg/detectors/stitchdata/stitchdata.go | 11 +- .../stitchdata/stitchdata_integration_test.go | 6 +- pkg/detectors/stockdata/stockdata.go | 11 +- .../stockdata/stockdata_integration_test.go | 6 +- pkg/detectors/storecove/storecove.go | 11 +- .../storecove/storecove_integration_test.go | 6 +- pkg/detectors/stormboard/stormboard.go | 11 +- .../stormboard/stormboard_integration_test.go | 6 +- pkg/detectors/stormglass/stormglass.go | 11 +- .../stormglass/stormglass_integration_test.go | 6 +- pkg/detectors/storyblok/storyblok.go | 8 +- .../storyblok/storyblok_integration_test.go | 6 +- .../storyblokpersonalaccesstoken/storyblok.go | 8 +- .../storyblok_integration_test.go | 6 +- pkg/detectors/storychief/storychief.go | 11 +- .../storychief/storychief_integration_test.go | 6 +- pkg/detectors/strava/strava.go | 13 +- .../strava/strava_integration_test.go | 6 +- pkg/detectors/streak/streak.go | 11 +- .../streak/streak_integration_test.go | 6 +- pkg/detectors/stripe/stripe.go | 8 +- .../stripe/stripe_integration_test.go | 6 +- .../stripepaymentintent.go | 10 +- .../stripepaymentintent_integration_test.go | 4 +- pkg/detectors/stripo/stripo.go | 11 +- .../stripo/stripo_integration_test.go | 6 +- pkg/detectors/stytch/stytch.go | 13 +- .../stytch/stytch_integration_test.go | 6 +- pkg/detectors/sugester/sugester.go | 8 +- .../sugester/sugester_integration_test.go | 6 +- pkg/detectors/sumologickey/sumologickey.go | 8 +- .../sumologickey_integration_test.go | 6 +- pkg/detectors/supabasetoken/supabasetoken.go | 11 +- .../supabasetoken_integration_test.go | 6 +- pkg/detectors/supernotesapi/supernotesapi.go | 8 +- .../supernotesapi_integration_test.go | 6 +- .../surveyanyplace/surveyanyplace.go | 13 +- .../surveyanyplace_integration_test.go | 6 +- pkg/detectors/surveybot/surveybot.go | 11 +- .../surveybot/surveybot_integration_test.go | 6 +- pkg/detectors/surveysparrow/surveysparrow.go | 11 +- .../surveysparrow_integration_test.go | 6 +- pkg/detectors/survicate/survicate.go | 11 +- .../survicate/survicate_integration_test.go | 6 +- pkg/detectors/swell/swell.go | 11 +- pkg/detectors/swell/swell_integration_test.go | 6 +- pkg/detectors/swiftype/swiftype.go | 11 +- .../swiftype/swiftype_integration_test.go | 6 +- pkg/detectors/tableau/tableau.go | 8 +- .../tableau/tableau_integration_test.go | 26 +- pkg/detectors/tailscale/tailscale.go | 11 +- .../tailscale/tailscale_integration_test.go | 6 +- pkg/detectors/tallyfy/tallyfy.go | 8 +- .../tallyfy/tallyfy_integration_test.go | 6 +- pkg/detectors/tatumio/tatumio.go | 11 +- .../tatumio/tatumio_integration_test.go | 6 +- pkg/detectors/taxjar/taxjar.go | 11 +- .../taxjar/taxjar_integration_test.go | 6 +- pkg/detectors/teamgate/teamgate.go | 11 +- .../teamgate/teamgate_integration_test.go | 6 +- pkg/detectors/teamworkcrm/teamworkcrm.go | 11 +- .../teamworkcrm_integration_test.go | 6 +- pkg/detectors/teamworkdesk/teamworkdesk.go | 11 +- .../teamworkdesk_integration_test.go | 6 +- .../teamworkspaces/teamworkspaces.go | 11 +- .../teamworkspaces_integration_test.go | 6 +- .../technicalanalysisapi.go | 11 +- .../technicalanalysisapi_integration_test.go | 6 +- pkg/detectors/tefter/tefter.go | 11 +- .../tefter/tefter_integration_test.go | 6 +- .../telegrambottoken/telegrambottoken.go | 8 +- .../telegrambottoken_integration_test.go | 6 +- pkg/detectors/teletype/teletype.go | 11 +- .../teletype/teletype_integration_test.go | 6 +- pkg/detectors/telnyx/telnyx.go | 11 +- .../telnyx/telnyx_integration_test.go | 6 +- .../terraformcloudpersonaltoken.go | 8 +- ...formcloudpersonaltoken_integration_test.go | 8 +- pkg/detectors/testingbot/testingbot.go | 8 +- .../testingbot/testingbot_integration_test.go | 10 +- pkg/detectors/textmagic/textmagic.go | 11 +- .../textmagic/textmagic_integration_test.go | 6 +- pkg/detectors/theoddsapi/theoddsapi.go | 11 +- .../theoddsapi/theoddsapi_integration_test.go | 6 +- pkg/detectors/thinkific/thinkific.go | 8 +- .../thinkific/thinkific_integration_test.go | 6 +- pkg/detectors/thousandeyes/thousandeyes.go | 13 +- .../thousandeyes_integration_test.go | 6 +- pkg/detectors/ticketmaster/ticketmaster.go | 11 +- .../ticketmaster_integration_test.go | 6 +- pkg/detectors/tickettailor/tickettailor.go | 8 +- .../tickettailor_integration_test.go | 6 +- pkg/detectors/tiingo/tiingo.go | 11 +- .../tiingo/tiingo_integration_test.go | 6 +- pkg/detectors/timecamp/timecamp.go | 11 +- .../timecamp/timecamp_integration_test.go | 6 +- pkg/detectors/timezoneapi/timezoneapi.go | 11 +- .../timezoneapi_integration_test.go | 6 +- pkg/detectors/tineswebhook/tineswebhook.go | 8 +- .../tineswebhook_integration_test.go | 6 +- pkg/detectors/tly/tly.go | 11 +- pkg/detectors/tly/tly_integration_test.go | 6 +- pkg/detectors/tmetric/tmetric.go | 11 +- .../tmetric/tmetric_integration_test.go | 6 +- pkg/detectors/todoist/todoist.go | 8 +- .../todoist/todoist_integration_test.go | 6 +- pkg/detectors/toggltrack/toggltrack.go | 11 +- .../toggltrack/toggltrack_integration_test.go | 6 +- pkg/detectors/tokeet/tokeet.go | 13 +- .../tokeet/tokeet_integration_test.go | 6 +- pkg/detectors/tomorrowio/tomorrowio.go | 13 +- .../tomorrowio/tomorrowio_integration_test.go | 6 +- pkg/detectors/tomtom/tomtom.go | 11 +- .../tomtom/tomtom_integration_test.go | 6 +- pkg/detectors/tradier/tradier.go | 11 +- .../tradier/tradier_integration_test.go | 6 +- pkg/detectors/transferwise/transferwise.go | 11 +- .../transferwise_integration_test.go | 6 +- pkg/detectors/travelpayouts/travelpayouts.go | 11 +- .../travelpayouts_integration_test.go | 6 +- pkg/detectors/travisci/travisci.go | 11 +- .../travisci/travisci_integration_test.go | 6 +- pkg/detectors/trelloapikey/trelloapikey.go | 13 +- .../trelloapikey_integration_test.go | 6 +- pkg/detectors/tru/tru.go | 13 +- pkg/detectors/tru/tru_integration_test.go | 6 +- .../trufflehogenterprise.go | 11 +- .../trufflehogenterprise_integration_test.go | 6 +- pkg/detectors/twelvedata/twelvedata.go | 11 +- .../twelvedata/twelvedata_integration_test.go | 6 +- pkg/detectors/twilio/twilio.go | 8 +- .../twilio/twilio_integration_test.go | 10 +- pkg/detectors/twilioapikey/twilioapikey.go | 8 +- .../twilioapikey_integration_test.go | 6 +- pkg/detectors/twist/twist.go | 13 +- pkg/detectors/twist/twist_integration_test.go | 6 +- pkg/detectors/twitch/twitch.go | 8 +- .../twitch/twitch_integration_test.go | 18 +- .../twitchaccesstoken/twitchaccesstoken.go | 8 +- .../twitchaccesstoken_integration_test.go | 10 +- pkg/detectors/twitter/v1/twitter_v1.go | 8 +- .../twitter/v1/twitter_v1_integration_test.go | 6 +- pkg/detectors/twitter/v2/twitter_v2.go | 8 +- .../twitter/v2/twitter_v2_integration_test.go | 6 +- .../twitterconsumerkey/twitterconsumerkey.go | 8 +- .../twitterconsumerkey_integration_test.go | 6 +- pkg/detectors/tyntec/tyntec.go | 11 +- .../tyntec/tyntec_integration_test.go | 6 +- pkg/detectors/typeform/v1/typeform.go | 8 +- .../typeform/v1/typeform_integration_test.go | 6 +- pkg/detectors/typeform/v2/typeform.go | 8 +- .../typeform/v2/typeform_integration_test.go | 6 +- pkg/detectors/typetalk/typetalk.go | 13 +- .../typetalk/typetalk_integration_test.go | 6 +- pkg/detectors/ubidots/ubidots.go | 11 +- .../ubidots/ubidots_integration_test.go | 6 +- pkg/detectors/uclassify/uclassify.go | 11 +- .../uclassify/uclassify_integration_test.go | 6 +- pkg/detectors/unifyid/unifyid.go | 11 +- .../unifyid/unifyid_integration_test.go | 6 +- pkg/detectors/unplugg/unplugg.go | 11 +- .../unplugg/unplugg_integration_test.go | 6 +- pkg/detectors/unsplash/unsplash.go | 11 +- .../unsplash/unsplash_integration_test.go | 6 +- pkg/detectors/upcdatabase/upcdatabase.go | 11 +- .../upcdatabase_integration_test.go | 6 +- pkg/detectors/uplead/uplead.go | 11 +- .../uplead/uplead_integration_test.go | 6 +- pkg/detectors/uploadcare/uploadcare.go | 13 +- .../uploadcare/uploadcare_integration_test.go | 6 +- pkg/detectors/uptimerobot/uptimerobot.go | 8 +- .../uptimerobot_integration_test.go | 6 +- pkg/detectors/upwave/upwave.go | 13 +- .../upwave/upwave_integration_test.go | 6 +- pkg/detectors/uri/uri.go | 8 +- pkg/detectors/uri/uri_integration_test.go | 10 +- pkg/detectors/urlscan/urlscan.go | 11 +- .../urlscan/urlscan_integration_test.go | 6 +- pkg/detectors/user/user.go | 8 +- pkg/detectors/user/user_integration_test.go | 6 +- pkg/detectors/userflow/userflow.go | 11 +- .../userflow/userflow_integration_test.go | 6 +- pkg/detectors/userstack/userstack.go | 11 +- .../userstack/userstack_integration_test.go | 6 +- .../vagrantcloudpersonaltoken.go | 8 +- ...rantcloudpersonaltoken_integration_test.go | 6 +- pkg/detectors/vatlayer/vatlayer.go | 11 +- .../vatlayer/vatlayer_integration_test.go | 6 +- pkg/detectors/vbout/vbout.go | 13 +- pkg/detectors/vbout/vbout_integration_test.go | 6 +- pkg/detectors/vercel/vercel.go | 11 +- .../vercel/vercel_integration_test.go | 6 +- pkg/detectors/verifier/verifier.go | 8 +- .../verifier/verifier_integration_test.go | 6 +- pkg/detectors/verimail/verimail.go | 8 +- .../verimail/verimail_integration_test.go | 6 +- pkg/detectors/veriphone/veriphone.go | 8 +- .../veriphone/veriphone_integration_test.go | 6 +- pkg/detectors/versioneye/versioneye.go | 11 +- .../versioneye/versioneye_integration_test.go | 6 +- pkg/detectors/viewneo/viewneo.go | 8 +- .../viewneo/viewneo_integration_test.go | 6 +- pkg/detectors/virustotal/virustotal.go | 11 +- .../virustotal/virustotal_integration_test.go | 6 +- .../visualcrossing/visualcrossing.go | 8 +- .../visualcrossing_integration_test.go | 6 +- pkg/detectors/voiceflow/voiceflow.go | 11 +- .../voiceflow/voiceflow_integration_test.go | 10 +- pkg/detectors/voicegain/voicegain.go | 11 +- .../voicegain/voicegain_integration_test.go | 6 +- pkg/detectors/voodoosms/voodoosms.go | 11 +- .../voodoosms/voodoosms_integration_test.go | 6 +- pkg/detectors/vouchery/vouchery.go | 13 +- .../vouchery/vouchery_integration_test.go | 10 +- pkg/detectors/vpnapi/vpnapi.go | 11 +- .../vpnapi/vpnapi_integration_test.go | 6 +- pkg/detectors/vultrapikey/vultrapikey.go | 11 +- .../vultrapikey_integration_test.go | 6 +- pkg/detectors/vyte/vyte.go | 11 +- pkg/detectors/vyte/vyte_integration_test.go | 6 +- pkg/detectors/walkscore/walkscore.go | 11 +- .../walkscore/walkscore_integration_test.go | 6 +- pkg/detectors/weatherbit/weatherbit.go | 11 +- .../weatherbit/weatherbit_integration_test.go | 6 +- pkg/detectors/weatherstack/weatherstack.go | 11 +- .../weatherstack_integration_test.go | 6 +- pkg/detectors/web3storage/web3storage.go | 11 +- .../web3storage_integration_test.go | 10 +- pkg/detectors/webex/webex.go | 13 +- pkg/detectors/webex/webex_integration_test.go | 6 +- pkg/detectors/webexbot/webexbot.go | 8 +- .../webexbot/webexbot_integration_test.go | 10 +- pkg/detectors/webflow/webflow.go | 11 +- .../webflow/webflow_integration_test.go | 6 +- pkg/detectors/webscraper/webscraper.go | 8 +- .../webscraper/webscraper_integration_test.go | 6 +- pkg/detectors/webscraping/webscraping.go | 11 +- .../webscraping_integration_test.go | 6 +- pkg/detectors/websitepulse/websitepulse.go | 13 +- .../websitepulse_integration_test.go | 10 +- .../weightsandbiases/weightsandbiases.go | 8 +- .../weightsandbiases_integration_test.go | 10 +- pkg/detectors/wepay/wepay.go | 13 +- pkg/detectors/wepay/wepay_integration_test.go | 6 +- pkg/detectors/whoxy/whoxy.go | 11 +- pkg/detectors/whoxy/whoxy_integration_test.go | 6 +- pkg/detectors/wistia/wistia.go | 13 +- .../wistia/wistia_integration_test.go | 6 +- pkg/detectors/wit/wit.go | 13 +- pkg/detectors/wit/wit_integration_test.go | 6 +- pkg/detectors/wiz/wiz.go | 8 +- pkg/detectors/wiz/wiz_integration_test.go | 10 +- pkg/detectors/worksnaps/worksnaps.go | 11 +- .../worksnaps/worksnaps_integration_test.go | 6 +- pkg/detectors/workstack/workstack.go | 11 +- .../workstack/workstack_integration_test.go | 6 +- .../worldcoinindex/worldcoinindex.go | 8 +- .../worldcoinindex_integration_test.go | 6 +- pkg/detectors/worldweather/worldweather.go | 11 +- .../worldweather_integration_test.go | 6 +- pkg/detectors/wrike/wrike.go | 11 +- pkg/detectors/wrike/wrike_integration_test.go | 6 +- pkg/detectors/xai/xai.go | 8 +- pkg/detectors/xai/xai_integration_test.go | 10 +- pkg/detectors/yandex/yandex.go | 11 +- .../yandex/yandex_integration_test.go | 6 +- pkg/detectors/yelp/yelp.go | 8 +- pkg/detectors/yelp/yelp_integration_test.go | 10 +- .../youneedabudget/youneedabudget.go | 11 +- .../youneedabudget_integration_test.go | 6 +- pkg/detectors/yousign/yousign.go | 8 +- .../yousign/yousign_integration_test.go | 6 +- pkg/detectors/youtubeapikey/youtubeapikey.go | 11 +- .../youtubeapikey_integration_test.go | 6 +- pkg/detectors/zapierwebhook/zapierwebhook.go | 8 +- .../zapierwebhook_integration_test.go | 6 +- pkg/detectors/zendeskapi/zendeskapi.go | 8 +- .../zendeskapi/zendeskapi_integration_test.go | 6 +- pkg/detectors/zenkitapi/zenkitapi.go | 8 +- .../zenkitapi/zenkitapi_integration_test.go | 6 +- pkg/detectors/zenrows/zenrows.go | 8 +- .../zenrows/zenrows_integration_test.go | 6 +- pkg/detectors/zenscrape/zenscrape.go | 8 +- .../zenscrape/zenscrape_integration_test.go | 6 +- pkg/detectors/zenserp/zenserp.go | 8 +- .../zenserp/zenserp_integration_test.go | 6 +- pkg/detectors/zeplin/zeplin.go | 8 +- .../zeplin/zeplin_integration_test.go | 6 +- pkg/detectors/zerobounce/zerobounce.go | 8 +- .../zerobounce/zerobounce_integration_test.go | 6 +- pkg/detectors/zerotier/zerotier.go | 8 +- .../zerotier/zerotier_integration_test.go | 6 +- pkg/detectors/zipapi/zipapi.go | 8 +- .../zipapi/zipapi_integration_test.go | 6 +- pkg/detectors/zipbooks/zipbooks.go | 8 +- .../zipbooks/zipbooks_integration_test.go | 6 +- pkg/detectors/zipcodeapi/zipcodeapi.go | 8 +- .../zipcodeapi/zipcodeapi_integration_test.go | 6 +- pkg/detectors/zipcodebase/zipcodebase.go | 8 +- .../zipcodebase_integration_test.go | 6 +- pkg/detectors/zohocrm/zohocrm.go | 8 +- .../zohocrm/zohocrm_integration_test.go | 10 +- pkg/detectors/zonkafeedback/zonkafeedback.go | 8 +- .../zonkafeedback_integration_test.go | 6 +- pkg/detectors/zulipchat/zulipchat.go | 8 +- .../zulipchat/zulipchat_integration_test.go | 10 +- pkg/engine/ahocorasick/ahocorasickcore.go | 6 +- .../ahocorasick/ahocorasickcore_test.go | 14 +- pkg/engine/defaults/defaults.go | 6 +- pkg/engine/defaults/defaults_test.go | 10 +- pkg/engine/engine.go | 3 +- pkg/engine/engine_test.go | 75 +- pkg/output/json.go | 3 +- pkg/pb/detectorspb/detectors.pb.go | 4312 +---------------- .../verification_cache_test.go | 12 +- proto/detectors.proto | 1043 ---- 1794 files changed, 7395 insertions(+), 12387 deletions(-) diff --git a/CODEOWNERS b/CODEOWNERS index e550d60b7205..501fe8997594 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -1,6 +1,16 @@ # catch-all * @trufflesecurity/product-eng +# Shared +pkg/decoders/ @trufflesecurity/Scanning @trufflesecurity/OSS +pkg/engine/ @trufflesecurity/Scanning @trufflesecurity/OSS +pkg/gitparse/ @trufflesecurity/Scanning @trufflesecurity/OSS +pkg/giturl/ @trufflesecurity/Scanning @trufflesecurity/OSS +pkg/handlers/ @trufflesecurity/Scanning @trufflesecurity/OSS +pkg/iobuf/ @trufflesecurity/Scanning @trufflesecurity/OSS +pkg/sanitizer/ @trufflesecurity/Scanning @trufflesecurity/OSS +proto/ @trufflesecurity/Scanning @trufflesecurity/Integrations + # Scanning pkg/sources/ @trufflesecurity/Scanning pkg/writers/ @trufflesecurity/Scanning @@ -18,16 +28,7 @@ pkg/sources/jenkins/ @trufflesecurity/Integrations pkg/sources/postman/ @trufflesecurity/Integrations pkg/sources/s3/ @trufflesecurity/Integrations pkg/sources/travisci/ @trufflesecurity/Integrations - -# Shared -pkg/decoders/ @trufflesecurity/Scanning @trufflesecurity/OSS -pkg/engine/ @trufflesecurity/Scanning @trufflesecurity/OSS -pkg/gitparse/ @trufflesecurity/Scanning @trufflesecurity/OSS -pkg/giturl/ @trufflesecurity/Scanning @trufflesecurity/OSS -pkg/handlers/ @trufflesecurity/Scanning @trufflesecurity/OSS -pkg/iobuf/ @trufflesecurity/Scanning @trufflesecurity/OSS -pkg/sanitizer/ @trufflesecurity/Scanning @trufflesecurity/OSS -proto/ @trufflesecurity/Scanning @trufflesecurity/Integrations +proto/detector_type.proto @trufflesecurity/Integrations # OSS pkg/detectors/ @trufflesecurity/OSS diff --git a/pkg/config/detectors.go b/pkg/config/detectors.go index d161d79bbddb..28c73b3b31ee 100644 --- a/pkg/config/detectors.go +++ b/pkg/config/detectors.go @@ -8,7 +8,7 @@ import ( "strings" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - dpb "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + dtpb "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) var ( @@ -16,15 +16,15 @@ var ( "all": allDetectors(), } - detectorTypeValue = make(map[string]dpb.DetectorType, len(dpb.DetectorType_value)) - validDetectors = make(map[dpb.DetectorType]struct{}, len(dpb.DetectorType_value)) - maxDetectorType dpb.DetectorType + detectorTypeValue = make(map[string]dtpb.DetectorType, len(dtpb.DetectorType_value)) + validDetectors = make(map[dtpb.DetectorType]struct{}, len(dtpb.DetectorType_value)) + maxDetectorType dtpb.DetectorType ) // Setup package local global variables. func init() { - for k, v := range dpb.DetectorType_value { - dt := dpb.DetectorType(v) + for k, v := range dtpb.DetectorType_value { + dt := dtpb.DetectorType(v) detectorTypeValue[strings.ToLower(k)] = dt validDetectors[dt] = struct{}{} if dt > maxDetectorType { @@ -37,7 +37,7 @@ func init() { // way for users to identify detectors, whether unique or not. A DetectorID // with Version = 0 indicates all possible versions of a detector. type DetectorID struct { - ID dpb.DetectorType + ID dtpb.DetectorType Version int } @@ -117,7 +117,7 @@ func ParseVerifierEndpoints(verifierURLs map[string]string) (map[DetectorID][]st } func (id DetectorID) String() string { - name := dpb.DetectorType_name[int32(id.ID)] + name := dtpb.DetectorType_name[int32(id.ID)] if name == "" { name = "" } @@ -129,9 +129,9 @@ func (id DetectorID) String() string { // allDetectors returns an ordered slice of all detector types. func allDetectors() []DetectorID { - all := make([]DetectorID, 0, len(dpb.DetectorType_name)) - for id := range dpb.DetectorType_name { - all = append(all, DetectorID{ID: dpb.DetectorType(id)}) + all := make([]DetectorID, 0, len(dtpb.DetectorType_name)) + for id := range dtpb.DetectorType_name { + all = append(all, DetectorID{ID: dtpb.DetectorType(id)}) } sort.Slice(all, func(i, j int) bool { return all[i].ID < all[j].ID }) return all @@ -173,7 +173,7 @@ func asRange(input string) ([]DetectorID, error) { return nil, fmt.Errorf("versions within ranges are not supported: %s", input) } - step := dpb.DetectorType(1) + step := dtpb.DetectorType(1) if dtStart.ID > dtEnd.ID { step = -1 } @@ -212,7 +212,7 @@ func asDetectorID(input string) (DetectorID, error) { } // Check if it's a detector ID. if i, err := strconv.ParseInt(input, 10, 32); err == nil { - dt := dpb.DetectorType(i) + dt := dtpb.DetectorType(i) if _, ok := validDetectors[dt]; !ok { return DetectorID{}, fmt.Errorf("invalid detector ID: %s", input) } diff --git a/pkg/config/detectors_test.go b/pkg/config/detectors_test.go index 9b3d2ae76f2e..96e20d7be830 100644 --- a/pkg/config/detectors_test.go +++ b/pkg/config/detectors_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/stretchr/testify/assert" - dpb "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + dtpb "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestDetectorParsing(t *testing.T) { @@ -15,9 +15,9 @@ func TestDetectorParsing(t *testing.T) { "all": {"AlL", allDetectors()}, "trailing range": {"0-", allDetectors()}, "all after 1": {"1-", allDetectors()[1:]}, - "named and valid range": {"aWs,8-9", []DetectorID{{ID: dpb.DetectorType_AWS}, {ID: dpb.DetectorType_Github}, {ID: dpb.DetectorType_Gitlab}}}, + "named and valid range": {"aWs,8-9", []DetectorID{{ID: dtpb.DetectorType_AWS}, {ID: dtpb.DetectorType_Github}, {ID: dtpb.DetectorType_Gitlab}}}, "duplicate order preserved": {"9, 8, 9", []DetectorID{{ID: 9}, {ID: 8}}}, - "named range": {"github - gitlab", []DetectorID{{ID: dpb.DetectorType_Github}, {ID: dpb.DetectorType_Gitlab}}}, + "named range": {"github - gitlab", []DetectorID{{ID: dtpb.DetectorType_Github}, {ID: dtpb.DetectorType_Gitlab}}}, "range preserved": {"8-9, 7-10", []DetectorID{{ID: 8}, {ID: 9}, {ID: 7}, {ID: 10}}}, "reverse range": {"9-8", []DetectorID{{ID: 9}, {ID: 8}}}, "range preserved with all": {"10-,all", append(allDetectors()[10:], allDetectors()[:10]...)}, @@ -25,12 +25,12 @@ func TestDetectorParsing(t *testing.T) { "invalid end range": {"0-1337", nil}, "invalid name": {"foo", nil}, "negative": {"-1", nil}, - "github.v1": {"github.v1", []DetectorID{{ID: dpb.DetectorType_Github, Version: 1}}}, - "gitlab.v100": {"gitlab.v100", []DetectorID{{ID: dpb.DetectorType_Gitlab, Version: 100}}}, + "github.v1": {"github.v1", []DetectorID{{ID: dtpb.DetectorType_Github, Version: 1}}}, + "gitlab.v100": {"gitlab.v100", []DetectorID{{ID: dtpb.DetectorType_Gitlab, Version: 100}}}, "range with versions": {"github.v2 - gitlab.v1", nil}, "invalid version no v": {"gitlab.2", nil}, "invalid version no number": {"gitlab.github", nil}, - "capital V is fine": {"GiTlAb.V2", []DetectorID{{ID: dpb.DetectorType_Gitlab, Version: 2}}}, + "capital V is fine": {"GiTlAb.V2", []DetectorID{{ID: dtpb.DetectorType_Gitlab, Version: 2}}}, "id number with version": {"8.v2", []DetectorID{{ID: 8, Version: 2}}}, } diff --git a/pkg/custom_detectors/custom_detectors.go b/pkg/custom_detectors/custom_detectors.go index 3a0c93d8de02..6a9e7a39f3a7 100644 --- a/pkg/custom_detectors/custom_detectors.go +++ b/pkg/custom_detectors/custom_detectors.go @@ -16,7 +16,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/pb/custom_detectorspb" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) // The maximum number of matches from one chunk. This const is used when @@ -222,7 +222,7 @@ func (c *CustomRegexWebhook) createResults(ctx context.Context, match map[string } result := detectors.Result{ - DetectorType: detectorspb.DetectorType_CustomRegex, + DetectorType: detector_typepb.DetectorType_CustomRegex, DetectorName: c.GetName(), ExtraData: map[string]string{}, } @@ -398,8 +398,8 @@ func permutateMatches(regexMatches map[string][][]string) []map[string][]string return matches } -func (c *CustomRegexWebhook) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_CustomRegex +func (c *CustomRegexWebhook) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_CustomRegex } const defaultDescription = "This is a user-defined detector with no description provided." diff --git a/pkg/custom_detectors/custom_detectors_test.go b/pkg/custom_detectors/custom_detectors_test.go index a0de48e65e7a..c3a97a461e64 100644 --- a/pkg/custom_detectors/custom_detectors_test.go +++ b/pkg/custom_detectors/custom_detectors_test.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/pb/custom_detectorspb" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" "github.com/trufflesecurity/trufflehog/v3/pkg/protoyaml" ) @@ -317,7 +317,7 @@ func TestDetectorValidations(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_CustomRegex, + DetectorType: detector_typepb.DetectorType_CustomRegex, DetectorName: "test", Verified: false, Raw: []byte("MyStr0ngP@ssword!"), @@ -364,7 +364,7 @@ func TestDetectorValidations(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_CustomRegex, + DetectorType: detector_typepb.DetectorType_CustomRegex, DetectorName: "test", Verified: false, Raw: []byte("MyStrongPassword!"), @@ -411,7 +411,7 @@ func TestDetectorValidations(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_CustomRegex, + DetectorType: detector_typepb.DetectorType_CustomRegex, DetectorName: "test", Verified: false, Raw: []byte("MyStrongPassword!"), @@ -458,7 +458,7 @@ func TestDetectorValidations(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_CustomRegex, + DetectorType: detector_typepb.DetectorType_CustomRegex, DetectorName: "test", Verified: false, Raw: []byte("MyStr@ngP@ssword!"), @@ -506,7 +506,7 @@ func TestDetectorValidations(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_CustomRegex, + DetectorType: detector_typepb.DetectorType_CustomRegex, DetectorName: "test", Verified: false, Raw: []byte("MyStrongP@ssword"), @@ -554,7 +554,7 @@ func TestDetectorValidations(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_CustomRegex, + DetectorType: detector_typepb.DetectorType_CustomRegex, DetectorName: "test", Verified: false, Raw: []byte("mystrongp@ssword"), @@ -590,7 +590,7 @@ func TestDetectorValidations(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_CustomRegex, + DetectorType: detector_typepb.DetectorType_CustomRegex, DetectorName: "test", Verified: false, Raw: []byte("c392c9837d69b44c764cbf260b-e6184MyStrongP@ssword"), diff --git a/pkg/detectors/abstract/abstract.go b/pkg/detectors/abstract/abstract.go index 66c28c1068a7..c0aced72225d 100644 --- a/pkg/detectors/abstract/abstract.go +++ b/pkg/detectors/abstract/abstract.go @@ -3,13 +3,14 @@ package abstract import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -51,7 +52,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Abstract, + DetectorType: detector_typepb.DetectorType_Abstract, Raw: []byte(resMatch), } @@ -92,8 +93,8 @@ func verifyAbstract(ctx context.Context, client *http.Client, resMatch string) ( } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Abstract +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Abstract } func (s Scanner) Description() string { diff --git a/pkg/detectors/abstract/abstract_integration_test.go b/pkg/detectors/abstract/abstract_integration_test.go index 2ed3939c9445..8ee1915f4616 100644 --- a/pkg/detectors/abstract/abstract_integration_test.go +++ b/pkg/detectors/abstract/abstract_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestAbstract_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestAbstract_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Abstract, + DetectorType: detector_typepb.DetectorType_Abstract, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestAbstract_FromChunk(t *testing.T) { }, want: func() []detectors.Result { r := detectors.Result{ - DetectorType: detectorspb.DetectorType_Abstract, + DetectorType: detector_typepb.DetectorType_Abstract, Verified: false, } r.SetVerificationError(context.DeadlineExceeded) @@ -83,7 +83,7 @@ func TestAbstract_FromChunk(t *testing.T) { }, want: func() []detectors.Result { r := detectors.Result{ - DetectorType: detectorspb.DetectorType_Abstract, + DetectorType: detector_typepb.DetectorType_Abstract, Verified: false, } r.SetVerificationError(fmt.Errorf("unexpected HTTP response status 500")) @@ -101,7 +101,7 @@ func TestAbstract_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Abstract, + DetectorType: detector_typepb.DetectorType_Abstract, Verified: false, }, }, diff --git a/pkg/detectors/abuseipdb/abuseipdb.go b/pkg/detectors/abuseipdb/abuseipdb.go index 7ee6c999ec5a..c0368445a3c5 100644 --- a/pkg/detectors/abuseipdb/abuseipdb.go +++ b/pkg/detectors/abuseipdb/abuseipdb.go @@ -12,7 +12,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -54,7 +54,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_AbuseIPDB, + DetectorType: detector_typepb.DetectorType_AbuseIPDB, Raw: []byte(resMatch), } @@ -103,8 +103,8 @@ func verifyAbuseIPDB(ctx context.Context, client *http.Client, resMatch string) } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_AbuseIPDB +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_AbuseIPDB } func (s Scanner) Description() string { diff --git a/pkg/detectors/abuseipdb/abuseipdb_integration_test.go b/pkg/detectors/abuseipdb/abuseipdb_integration_test.go index bd481f08059d..fecbd84e9cae 100644 --- a/pkg/detectors/abuseipdb/abuseipdb_integration_test.go +++ b/pkg/detectors/abuseipdb/abuseipdb_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestAbuseIPDB_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestAbuseIPDB_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_AbuseIPDB, + DetectorType: detector_typepb.DetectorType_AbuseIPDB, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestAbuseIPDB_FromChunk(t *testing.T) { }, want: func() []detectors.Result { r := detectors.Result{ - DetectorType: detectorspb.DetectorType_AbuseIPDB, + DetectorType: detector_typepb.DetectorType_AbuseIPDB, Verified: false, } r.SetVerificationError(context.DeadlineExceeded) @@ -83,7 +83,7 @@ func TestAbuseIPDB_FromChunk(t *testing.T) { }, want: func() []detectors.Result { r := detectors.Result{ - DetectorType: detectorspb.DetectorType_AbuseIPDB, + DetectorType: detector_typepb.DetectorType_AbuseIPDB, Verified: false, } r.SetVerificationError(fmt.Errorf("unexpected HTTP response status 500")) @@ -101,7 +101,7 @@ func TestAbuseIPDB_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_AbuseIPDB, + DetectorType: detector_typepb.DetectorType_AbuseIPDB, Verified: false, }, }, diff --git a/pkg/detectors/abyssale/abyssale.go b/pkg/detectors/abyssale/abyssale.go index 8e2e602ff40b..d292ceafb910 100644 --- a/pkg/detectors/abyssale/abyssale.go +++ b/pkg/detectors/abyssale/abyssale.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -52,7 +52,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Abyssale, + DetectorType: detector_typepb.DetectorType_Abyssale, Raw: []byte(resMatch), } @@ -92,8 +92,8 @@ func verifyAbyssale(ctx context.Context, client *http.Client, resMatch string) ( } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Abyssale +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Abyssale } func (s Scanner) Description() string { diff --git a/pkg/detectors/abyssale/abyssale_integration_test.go b/pkg/detectors/abyssale/abyssale_integration_test.go index bcbf0d35e38a..cc09e4c0497c 100644 --- a/pkg/detectors/abyssale/abyssale_integration_test.go +++ b/pkg/detectors/abyssale/abyssale_integration_test.go @@ -11,7 +11,7 @@ import ( "github.com/google/go-cmp/cmp/cmpopts" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" "github.com/google/go-cmp/cmp" @@ -50,7 +50,7 @@ func TestAbyssale_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Abyssale, + DetectorType: detector_typepb.DetectorType_Abyssale, Verified: true, }, }, @@ -66,7 +66,7 @@ func TestAbyssale_FromChunk(t *testing.T) { }, want: func() []detectors.Result { r := detectors.Result{ - DetectorType: detectorspb.DetectorType_Abyssale, + DetectorType: detector_typepb.DetectorType_Abyssale, Verified: false, } r.SetVerificationError(context.DeadlineExceeded) @@ -84,7 +84,7 @@ func TestAbyssale_FromChunk(t *testing.T) { }, want: func() []detectors.Result { r := detectors.Result{ - DetectorType: detectorspb.DetectorType_Abyssale, + DetectorType: detector_typepb.DetectorType_Abyssale, Verified: false, } r.SetVerificationError(fmt.Errorf("unexpected HTTP response status 500")) @@ -102,7 +102,7 @@ func TestAbyssale_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Abyssale, + DetectorType: detector_typepb.DetectorType_Abyssale, Verified: false, }, }, diff --git a/pkg/detectors/accuweather/v1/accuweather.go b/pkg/detectors/accuweather/v1/accuweather.go index 525a6d2a4ed2..24780dc23a5d 100644 --- a/pkg/detectors/accuweather/v1/accuweather.go +++ b/pkg/detectors/accuweather/v1/accuweather.go @@ -9,7 +9,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -54,7 +54,7 @@ func (s Scanner) ProcessMatches(ctx context.Context, matches [][]string, verify uniqueMatches := getUniqueMatches(matches) for key := range uniqueMatches { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Accuweather, + DetectorType: detector_typepb.DetectorType_Accuweather, Raw: []byte(key), } @@ -106,8 +106,8 @@ func verifyAccuweather(ctx context.Context, client *http.Client, key string) (bo } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Accuweather +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Accuweather } func (s Scanner) Description() string { diff --git a/pkg/detectors/accuweather/v1/accuweather_integration_test.go b/pkg/detectors/accuweather/v1/accuweather_integration_test.go index 68075082d1f7..b255408fffa4 100644 --- a/pkg/detectors/accuweather/v1/accuweather_integration_test.go +++ b/pkg/detectors/accuweather/v1/accuweather_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestAccuweather_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestAccuweather_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Accuweather, + DetectorType: detector_typepb.DetectorType_Accuweather, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestAccuweather_FromChunk(t *testing.T) { }, want: func() []detectors.Result { r := detectors.Result{ - DetectorType: detectorspb.DetectorType_Accuweather, + DetectorType: detector_typepb.DetectorType_Accuweather, Verified: false, } r.SetVerificationError(context.DeadlineExceeded) @@ -83,7 +83,7 @@ func TestAccuweather_FromChunk(t *testing.T) { }, want: func() []detectors.Result { r := detectors.Result{ - DetectorType: detectorspb.DetectorType_Accuweather, + DetectorType: detector_typepb.DetectorType_Accuweather, Verified: false, } r.SetVerificationError(fmt.Errorf("unexpected HTTP response status 500")) @@ -101,7 +101,7 @@ func TestAccuweather_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Accuweather, + DetectorType: detector_typepb.DetectorType_Accuweather, Verified: false, }, }, diff --git a/pkg/detectors/accuweather/v2/accuweather_integration_test.go b/pkg/detectors/accuweather/v2/accuweather_integration_test.go index 2c377fd52b3c..5cbb21233d73 100644 --- a/pkg/detectors/accuweather/v2/accuweather_integration_test.go +++ b/pkg/detectors/accuweather/v2/accuweather_integration_test.go @@ -15,7 +15,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" v1 "github.com/trufflesecurity/trufflehog/v3/pkg/detectors/accuweather/v1" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestAccuweather_FromChunk(t *testing.T) { @@ -50,7 +50,7 @@ func TestAccuweather_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Accuweather, + DetectorType: detector_typepb.DetectorType_Accuweather, Verified: true, }, }, @@ -66,7 +66,7 @@ func TestAccuweather_FromChunk(t *testing.T) { }, want: func() []detectors.Result { r := detectors.Result{ - DetectorType: detectorspb.DetectorType_Accuweather, + DetectorType: detector_typepb.DetectorType_Accuweather, Verified: false, } r.SetVerificationError(context.DeadlineExceeded) @@ -84,7 +84,7 @@ func TestAccuweather_FromChunk(t *testing.T) { }, want: func() []detectors.Result { r := detectors.Result{ - DetectorType: detectorspb.DetectorType_Accuweather, + DetectorType: detector_typepb.DetectorType_Accuweather, Verified: false, } r.SetVerificationError(fmt.Errorf("unexpected HTTP response status 500")) @@ -102,7 +102,7 @@ func TestAccuweather_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Accuweather, + DetectorType: detector_typepb.DetectorType_Accuweather, Verified: false, }, }, diff --git a/pkg/detectors/adafruitio/adafruitio.go b/pkg/detectors/adafruitio/adafruitio.go index d36e82da4060..259176359204 100644 --- a/pkg/detectors/adafruitio/adafruitio.go +++ b/pkg/detectors/adafruitio/adafruitio.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -52,7 +52,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_AdafruitIO, + DetectorType: detector_typepb.DetectorType_AdafruitIO, Raw: []byte(resMatch), } @@ -91,8 +91,8 @@ func verifyAdafruitIO(ctx context.Context, client *http.Client, resMatch string) } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_AdafruitIO +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_AdafruitIO } func (s Scanner) Description() string { diff --git a/pkg/detectors/adafruitio/adafruitio_integration_test.go b/pkg/detectors/adafruitio/adafruitio_integration_test.go index 82702d0e9858..498967a77c52 100644 --- a/pkg/detectors/adafruitio/adafruitio_integration_test.go +++ b/pkg/detectors/adafruitio/adafruitio_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestAdafruitIO_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestAdafruitIO_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_AdafruitIO, + DetectorType: detector_typepb.DetectorType_AdafruitIO, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestAdafruitIO_FromChunk(t *testing.T) { }, want: func() []detectors.Result { r := detectors.Result{ - DetectorType: detectorspb.DetectorType_AdafruitIO, + DetectorType: detector_typepb.DetectorType_AdafruitIO, Verified: false, } r.SetVerificationError(context.DeadlineExceeded) @@ -83,7 +83,7 @@ func TestAdafruitIO_FromChunk(t *testing.T) { }, want: func() []detectors.Result { r := detectors.Result{ - DetectorType: detectorspb.DetectorType_AdafruitIO, + DetectorType: detector_typepb.DetectorType_AdafruitIO, Verified: false, } r.SetVerificationError(fmt.Errorf("unexpected HTTP response status 500")) @@ -101,7 +101,7 @@ func TestAdafruitIO_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_AdafruitIO, + DetectorType: detector_typepb.DetectorType_AdafruitIO, Verified: false, }, }, diff --git a/pkg/detectors/adobeio/adobeio.go b/pkg/detectors/adobeio/adobeio.go index 81eedc3ea4b1..3ec19b3384cb 100644 --- a/pkg/detectors/adobeio/adobeio.go +++ b/pkg/detectors/adobeio/adobeio.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -52,7 +52,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for key := range uniqueKeys { for id := range uniqueIds { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_AdobeIO, + DetectorType: detector_typepb.DetectorType_AdobeIO, Raw: []byte(key), RawV2: []byte(key + id), } @@ -105,8 +105,8 @@ func verifyAdobeIOSecret(ctx context.Context, client *http.Client, key string, i } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_AdobeIO +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_AdobeIO } func (s Scanner) Description() string { diff --git a/pkg/detectors/adobeio/adobeio_integration_test.go b/pkg/detectors/adobeio/adobeio_integration_test.go index e1e3914b16d7..a64222f18fc5 100644 --- a/pkg/detectors/adobeio/adobeio_integration_test.go +++ b/pkg/detectors/adobeio/adobeio_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestAdobeIO_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestAdobeIO_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_AdobeIO, + DetectorType: detector_typepb.DetectorType_AdobeIO, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestAdobeIO_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_AdobeIO, + DetectorType: detector_typepb.DetectorType_AdobeIO, Verified: false, }, }, diff --git a/pkg/detectors/adzuna/adzuna.go b/pkg/detectors/adzuna/adzuna.go index c9b9416b828b..d8d61faf0373 100644 --- a/pkg/detectors/adzuna/adzuna.go +++ b/pkg/detectors/adzuna/adzuna.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -57,7 +57,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resIdMatch := strings.TrimSpace(idMatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Adzuna, + DetectorType: detector_typepb.DetectorType_Adzuna, Raw: []byte(resMatch), RawV2: []byte(resMatch + resIdMatch), } @@ -100,8 +100,8 @@ func verifyAdzuna(ctx context.Context, client *http.Client, resMatch, resIdMatch } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Adzuna +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Adzuna } func (s Scanner) Description() string { diff --git a/pkg/detectors/adzuna/adzuna_integration_test.go b/pkg/detectors/adzuna/adzuna_integration_test.go index f2a1bf630dd0..582639763fac 100644 --- a/pkg/detectors/adzuna/adzuna_integration_test.go +++ b/pkg/detectors/adzuna/adzuna_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestAdzuna_FromChunk(t *testing.T) { @@ -50,7 +50,7 @@ func TestAdzuna_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Adzuna, + DetectorType: detector_typepb.DetectorType_Adzuna, Verified: true, }, }, @@ -66,7 +66,7 @@ func TestAdzuna_FromChunk(t *testing.T) { }, want: func() []detectors.Result { r := detectors.Result{ - DetectorType: detectorspb.DetectorType_Adzuna, + DetectorType: detector_typepb.DetectorType_Adzuna, Verified: false, } r.SetVerificationError(context.DeadlineExceeded) @@ -84,7 +84,7 @@ func TestAdzuna_FromChunk(t *testing.T) { }, want: func() []detectors.Result { r := detectors.Result{ - DetectorType: detectorspb.DetectorType_Adzuna, + DetectorType: detector_typepb.DetectorType_Adzuna, Verified: false, } r.SetVerificationError(fmt.Errorf("unexpected HTTP response status 500")) @@ -102,7 +102,7 @@ func TestAdzuna_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Adzuna, + DetectorType: detector_typepb.DetectorType_Adzuna, Verified: false, }, }, diff --git a/pkg/detectors/aeroworkflow/aeroworkflow.go b/pkg/detectors/aeroworkflow/aeroworkflow.go index 11b14b5c8ead..00395f6e79f1 100644 --- a/pkg/detectors/aeroworkflow/aeroworkflow.go +++ b/pkg/detectors/aeroworkflow/aeroworkflow.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -58,7 +58,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resIdMatch := strings.TrimSpace(idmatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Aeroworkflow, + DetectorType: detector_typepb.DetectorType_Aeroworkflow, Raw: []byte(resMatch), RawV2: []byte(resMatch + resIdMatch), } @@ -104,8 +104,8 @@ func verifyAeroworkflow(ctx context.Context, client *http.Client, resMatch, resI } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Aeroworkflow +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Aeroworkflow } func (s Scanner) Description() string { diff --git a/pkg/detectors/aeroworkflow/aeroworkflow_integration_test.go b/pkg/detectors/aeroworkflow/aeroworkflow_integration_test.go index 3ea3ef555a84..15d691ecda4f 100644 --- a/pkg/detectors/aeroworkflow/aeroworkflow_integration_test.go +++ b/pkg/detectors/aeroworkflow/aeroworkflow_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestAeroworkflow_FromChunk(t *testing.T) { @@ -50,7 +50,7 @@ func TestAeroworkflow_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Aeroworkflow, + DetectorType: detector_typepb.DetectorType_Aeroworkflow, Verified: true, }, }, @@ -66,7 +66,7 @@ func TestAeroworkflow_FromChunk(t *testing.T) { }, want: func() []detectors.Result { r := detectors.Result{ - DetectorType: detectorspb.DetectorType_Aeroworkflow, + DetectorType: detector_typepb.DetectorType_Aeroworkflow, Verified: false, } r.SetVerificationError(context.DeadlineExceeded) @@ -84,7 +84,7 @@ func TestAeroworkflow_FromChunk(t *testing.T) { }, want: func() []detectors.Result { r := detectors.Result{ - DetectorType: detectorspb.DetectorType_Aeroworkflow, + DetectorType: detector_typepb.DetectorType_Aeroworkflow, Verified: false, } r.SetVerificationError(fmt.Errorf("unexpected HTTP response status 500")) @@ -102,7 +102,7 @@ func TestAeroworkflow_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Aeroworkflow, + DetectorType: detector_typepb.DetectorType_Aeroworkflow, Verified: false, }, }, diff --git a/pkg/detectors/agora/agora.go b/pkg/detectors/agora/agora.go index 5ffad3f394ec..bb0d0e096ac4 100644 --- a/pkg/detectors/agora/agora.go +++ b/pkg/detectors/agora/agora.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -65,7 +65,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Agora, + DetectorType: detector_typepb.DetectorType_Agora, Raw: []byte(resMatch), RawV2: []byte(resMatch + resSecret), } @@ -108,8 +108,8 @@ func verifyAgora(ctx context.Context, client *http.Client, resMatch, resSecret s } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Agora +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Agora } func (s Scanner) Description() string { diff --git a/pkg/detectors/agora/agora_integration_test.go b/pkg/detectors/agora/agora_integration_test.go index 2c8b20f28246..d4e67b510dbd 100644 --- a/pkg/detectors/agora/agora_integration_test.go +++ b/pkg/detectors/agora/agora_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestAgora_FromChunk(t *testing.T) { @@ -50,11 +50,11 @@ func TestAgora_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Agora, + DetectorType: detector_typepb.DetectorType_Agora, Verified: true, }, { - DetectorType: detectorspb.DetectorType_Agora, + DetectorType: detector_typepb.DetectorType_Agora, Verified: false, }, }, @@ -70,7 +70,7 @@ func TestAgora_FromChunk(t *testing.T) { }, want: func() []detectors.Result { r := detectors.Result{ - DetectorType: detectorspb.DetectorType_Agora, + DetectorType: detector_typepb.DetectorType_Agora, Verified: false, } r.SetVerificationError(context.DeadlineExceeded) @@ -88,7 +88,7 @@ func TestAgora_FromChunk(t *testing.T) { }, want: func() []detectors.Result { r := detectors.Result{ - DetectorType: detectorspb.DetectorType_Agora, + DetectorType: detector_typepb.DetectorType_Agora, Verified: false, } r.SetVerificationError(fmt.Errorf("unexpected HTTP response status 500")) @@ -106,11 +106,11 @@ func TestAgora_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Agora, + DetectorType: detector_typepb.DetectorType_Agora, Verified: false, }, { - DetectorType: detectorspb.DetectorType_Agora, + DetectorType: detector_typepb.DetectorType_Agora, Verified: false, }, }, diff --git a/pkg/detectors/aha/aha.go b/pkg/detectors/aha/aha.go index 1a50553dc2c8..fc69dab6cd3a 100644 --- a/pkg/detectors/aha/aha.go +++ b/pkg/detectors/aha/aha.go @@ -9,7 +9,7 @@ import ( regexp "github.com/wasilibs/go-re2" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -34,8 +34,8 @@ func (s Scanner) Keywords() []string { return []string{"aha.io"} } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Aha +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Aha } func (s Scanner) Description() string { @@ -71,7 +71,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Aha, + DetectorType: detector_typepb.DetectorType_Aha, Raw: []byte(resMatch), RawV2: []byte(resMatch + url), } diff --git a/pkg/detectors/aha/aha_integration_test.go b/pkg/detectors/aha/aha_integration_test.go index 548beb044bfa..5a5d43b16e11 100644 --- a/pkg/detectors/aha/aha_integration_test.go +++ b/pkg/detectors/aha/aha_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestAha_FromChunk(t *testing.T) { @@ -50,7 +50,7 @@ func TestAha_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Aha, + DetectorType: detector_typepb.DetectorType_Aha, Verified: true, }, }, @@ -66,7 +66,7 @@ func TestAha_FromChunk(t *testing.T) { }, want: func() []detectors.Result { r := detectors.Result{ - DetectorType: detectorspb.DetectorType_Aha, + DetectorType: detector_typepb.DetectorType_Aha, Verified: false, } r.SetVerificationError(context.DeadlineExceeded) @@ -84,7 +84,7 @@ func TestAha_FromChunk(t *testing.T) { }, want: func() []detectors.Result { r := detectors.Result{ - DetectorType: detectorspb.DetectorType_Aha, + DetectorType: detector_typepb.DetectorType_Aha, Verified: false, } r.SetVerificationError(fmt.Errorf("unexpected HTTP response status 500")) @@ -102,7 +102,7 @@ func TestAha_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Aha, + DetectorType: detector_typepb.DetectorType_Aha, Verified: false, }, }, diff --git a/pkg/detectors/airbrakeprojectkey/airbrakeprojectkey.go b/pkg/detectors/airbrakeprojectkey/airbrakeprojectkey.go index 29ec88769102..69e7d8d36672 100644 --- a/pkg/detectors/airbrakeprojectkey/airbrakeprojectkey.go +++ b/pkg/detectors/airbrakeprojectkey/airbrakeprojectkey.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -53,7 +53,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for key := range uniqueKeys { for id := range uniqueIds { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_AirbrakeProjectKey, + DetectorType: detector_typepb.DetectorType_AirbrakeProjectKey, Raw: []byte(key), RawV2: []byte(key + id), } @@ -110,8 +110,8 @@ func verifyAirbrakeProjectKey(ctx context.Context, client *http.Client, key stri } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_AirbrakeProjectKey +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_AirbrakeProjectKey } func (s Scanner) Description() string { diff --git a/pkg/detectors/airbrakeprojectkey/airbrakeprojectkey_integration_test.go b/pkg/detectors/airbrakeprojectkey/airbrakeprojectkey_integration_test.go index 1dc9cc5ec686..3a635a643565 100644 --- a/pkg/detectors/airbrakeprojectkey/airbrakeprojectkey_integration_test.go +++ b/pkg/detectors/airbrakeprojectkey/airbrakeprojectkey_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestAirbrakeProjectKey_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestAirbrakeProjectKey_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_AirbrakeProjectKey, + DetectorType: detector_typepb.DetectorType_AirbrakeProjectKey, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestAirbrakeProjectKey_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_AirbrakeProjectKey, + DetectorType: detector_typepb.DetectorType_AirbrakeProjectKey, Verified: false, }, }, diff --git a/pkg/detectors/airbrakeuserkey/airbrakeuserkey.go b/pkg/detectors/airbrakeuserkey/airbrakeuserkey.go index 97515e406fe0..66fc4572187b 100644 --- a/pkg/detectors/airbrakeuserkey/airbrakeuserkey.go +++ b/pkg/detectors/airbrakeuserkey/airbrakeuserkey.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -45,7 +45,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for key := range uniqueKeys { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_AirbrakeUserKey, + DetectorType: detector_typepb.DetectorType_AirbrakeUserKey, Raw: []byte(key), ExtraData: map[string]string{ "rotation_guide": "https://howtorotate.com/docs/tutorials/airbrake/", @@ -94,8 +94,8 @@ func verifyAirbrakeUserKey(ctx context.Context, client *http.Client, key string) } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_AirbrakeUserKey +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_AirbrakeUserKey } func (s Scanner) Description() string { diff --git a/pkg/detectors/airbrakeuserkey/airbrakeuserkey_integration_test.go b/pkg/detectors/airbrakeuserkey/airbrakeuserkey_integration_test.go index 7e0f5fabc324..57aca32e1bb4 100644 --- a/pkg/detectors/airbrakeuserkey/airbrakeuserkey_integration_test.go +++ b/pkg/detectors/airbrakeuserkey/airbrakeuserkey_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestAirbrakeUserKey_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestAirbrakeUserKey_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_AirbrakeUserKey, + DetectorType: detector_typepb.DetectorType_AirbrakeUserKey, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestAirbrakeUserKey_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_AirbrakeUserKey, + DetectorType: detector_typepb.DetectorType_AirbrakeUserKey, Verified: false, }, }, diff --git a/pkg/detectors/airship/airship.go b/pkg/detectors/airship/airship.go index d2d83565f5b7..c464cfb140a4 100644 --- a/pkg/detectors/airship/airship.go +++ b/pkg/detectors/airship/airship.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -45,7 +45,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for key := range uniqueKeys { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Airship, + DetectorType: detector_typepb.DetectorType_Airship, Raw: []byte(key), } @@ -94,8 +94,8 @@ func verifyAirshipKey(ctx context.Context, client *http.Client, key string) (boo } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Airship +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Airship } func (s Scanner) Description() string { diff --git a/pkg/detectors/airship/airship_integration_test.go b/pkg/detectors/airship/airship_integration_test.go index 8969b280b365..6606dae998e0 100644 --- a/pkg/detectors/airship/airship_integration_test.go +++ b/pkg/detectors/airship/airship_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestAirship_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestAirship_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Airship, + DetectorType: detector_typepb.DetectorType_Airship, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestAirship_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Airship, + DetectorType: detector_typepb.DetectorType_Airship, Verified: false, }, }, diff --git a/pkg/detectors/airtableoauth/airtableoauth.go b/pkg/detectors/airtableoauth/airtableoauth.go index cdb9b8a750cf..46999518f161 100644 --- a/pkg/detectors/airtableoauth/airtableoauth.go +++ b/pkg/detectors/airtableoauth/airtableoauth.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -45,7 +45,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for match := range uniqueMatches { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_AirtableOAuth, + DetectorType: detector_typepb.DetectorType_AirtableOAuth, Raw: []byte(match), } @@ -99,8 +99,8 @@ func verifyMatch(ctx context.Context, client *http.Client, token string) (bool, } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_AirtableOAuth +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_AirtableOAuth } func (s Scanner) Description() string { diff --git a/pkg/detectors/airtableoauth/airtableoauth_integration_test.go b/pkg/detectors/airtableoauth/airtableoauth_integration_test.go index 1477185143f1..b579e7858705 100644 --- a/pkg/detectors/airtableoauth/airtableoauth_integration_test.go +++ b/pkg/detectors/airtableoauth/airtableoauth_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) // TestAirtableoauth_FromChunk verifies the validity of an Airtable OAuth token @@ -56,7 +56,7 @@ func TestAirtableoauth_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_AirtableOAuth, + DetectorType: detector_typepb.DetectorType_AirtableOAuth, Verified: true, }, }, @@ -73,7 +73,7 @@ func TestAirtableoauth_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_AirtableOAuth, + DetectorType: detector_typepb.DetectorType_AirtableOAuth, Verified: false, }, }, @@ -102,7 +102,7 @@ func TestAirtableoauth_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_AirtableOAuth, + DetectorType: detector_typepb.DetectorType_AirtableOAuth, Verified: false, }, }, @@ -119,7 +119,7 @@ func TestAirtableoauth_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_AirtableOAuth, + DetectorType: detector_typepb.DetectorType_AirtableOAuth, Verified: false, }, }, diff --git a/pkg/detectors/airtablepersonalaccesstoken/airtablepersonalaccesstoken.go b/pkg/detectors/airtablepersonalaccesstoken/airtablepersonalaccesstoken.go index f3ef580b41ac..b2c71e1daa2e 100644 --- a/pkg/detectors/airtablepersonalaccesstoken/airtablepersonalaccesstoken.go +++ b/pkg/detectors/airtablepersonalaccesstoken/airtablepersonalaccesstoken.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -40,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for match := range uniqueMatches { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_AirtablePersonalAccessToken, + DetectorType: detector_typepb.DetectorType_AirtablePersonalAccessToken, Raw: []byte(match), } @@ -94,8 +94,8 @@ func verifyMatch(ctx context.Context, client *http.Client, token string) (bool, } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_AirtablePersonalAccessToken +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_AirtablePersonalAccessToken } func (s Scanner) Description() string { diff --git a/pkg/detectors/airtablepersonalaccesstoken/airtablepersonalaccesstoken_integration_test.go b/pkg/detectors/airtablepersonalaccesstoken/airtablepersonalaccesstoken_integration_test.go index 983ef217376b..9dcf83bd51bb 100644 --- a/pkg/detectors/airtablepersonalaccesstoken/airtablepersonalaccesstoken_integration_test.go +++ b/pkg/detectors/airtablepersonalaccesstoken/airtablepersonalaccesstoken_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestAirtablepersonalaccesstoken_FromChunk(t *testing.T) { @@ -50,7 +50,7 @@ func TestAirtablepersonalaccesstoken_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_AirtablePersonalAccessToken, + DetectorType: detector_typepb.DetectorType_AirtablePersonalAccessToken, Verified: true, }, }, @@ -67,7 +67,7 @@ func TestAirtablepersonalaccesstoken_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_AirtablePersonalAccessToken, + DetectorType: detector_typepb.DetectorType_AirtablePersonalAccessToken, Verified: false, }, }, @@ -96,7 +96,7 @@ func TestAirtablepersonalaccesstoken_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_AirtablePersonalAccessToken, + DetectorType: detector_typepb.DetectorType_AirtablePersonalAccessToken, Verified: false, }, }, @@ -113,7 +113,7 @@ func TestAirtablepersonalaccesstoken_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_AirtablePersonalAccessToken, + DetectorType: detector_typepb.DetectorType_AirtablePersonalAccessToken, Verified: false, }, }, diff --git a/pkg/detectors/airvisual/airvisual.go b/pkg/detectors/airvisual/airvisual.go index 573e312fe72e..8cc8a6b5fdc3 100644 --- a/pkg/detectors/airvisual/airvisual.go +++ b/pkg/detectors/airvisual/airvisual.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -45,7 +45,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for key := range uniqueKeys { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_AirVisual, + DetectorType: detector_typepb.DetectorType_AirVisual, Raw: []byte(key), } @@ -94,8 +94,8 @@ func verifyAirVisualKey(ctx context.Context, client *http.Client, key string) (b } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_AirVisual +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_AirVisual } func (s Scanner) Description() string { diff --git a/pkg/detectors/airvisual/airvisual_integration_test.go b/pkg/detectors/airvisual/airvisual_integration_test.go index 74af10ded93f..7833722975ce 100644 --- a/pkg/detectors/airvisual/airvisual_integration_test.go +++ b/pkg/detectors/airvisual/airvisual_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestAirVisual_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestAirVisual_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_AirVisual, + DetectorType: detector_typepb.DetectorType_AirVisual, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestAirVisual_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_AirVisual, + DetectorType: detector_typepb.DetectorType_AirVisual, Verified: false, }, }, diff --git a/pkg/detectors/aiven/aiven.go b/pkg/detectors/aiven/aiven.go index b72a1aeef0a0..17b00b0baee1 100644 --- a/pkg/detectors/aiven/aiven.go +++ b/pkg/detectors/aiven/aiven.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -45,7 +45,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for key := range uniqueKeys { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Aiven, + DetectorType: detector_typepb.DetectorType_Aiven, Raw: []byte(key), } @@ -92,8 +92,8 @@ func verifyAivenKey(ctx context.Context, client *http.Client, key string) (bool, } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Aiven +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Aiven } func (s Scanner) Description() string { diff --git a/pkg/detectors/aiven/aiven_integration_test.go b/pkg/detectors/aiven/aiven_integration_test.go index 5939a17269d9..371d6eb55aec 100644 --- a/pkg/detectors/aiven/aiven_integration_test.go +++ b/pkg/detectors/aiven/aiven_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestAiven_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestAiven_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Aiven, + DetectorType: detector_typepb.DetectorType_Aiven, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestAiven_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Aiven, + DetectorType: detector_typepb.DetectorType_Aiven, Verified: false, }, }, diff --git a/pkg/detectors/alchemy/alchemy.go b/pkg/detectors/alchemy/alchemy.go index 7084749f7e62..6d79707207dc 100644 --- a/pkg/detectors/alchemy/alchemy.go +++ b/pkg/detectors/alchemy/alchemy.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -43,7 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for match := range uniqueMatches { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Alchemy, + DetectorType: detector_typepb.DetectorType_Alchemy, Raw: []byte(match), } @@ -92,8 +92,8 @@ func verifyMatch(ctx context.Context, client *http.Client, token string) (bool, } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Alchemy +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Alchemy } func (s Scanner) Description() string { diff --git a/pkg/detectors/alchemy/alchemy_integration_test.go b/pkg/detectors/alchemy/alchemy_integration_test.go index 036e0a39d579..717101c8b20d 100644 --- a/pkg/detectors/alchemy/alchemy_integration_test.go +++ b/pkg/detectors/alchemy/alchemy_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestAlchemy_FromChunk(t *testing.T) { @@ -50,7 +50,7 @@ func TestAlchemy_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Alchemy, + DetectorType: detector_typepb.DetectorType_Alchemy, Verified: true, }, }, @@ -67,7 +67,7 @@ func TestAlchemy_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Alchemy, + DetectorType: detector_typepb.DetectorType_Alchemy, Verified: false, }, }, @@ -96,7 +96,7 @@ func TestAlchemy_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Alchemy, + DetectorType: detector_typepb.DetectorType_Alchemy, Verified: false, }, }, @@ -113,7 +113,7 @@ func TestAlchemy_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Alchemy, + DetectorType: detector_typepb.DetectorType_Alchemy, Verified: false, }, }, diff --git a/pkg/detectors/alconost/alconost.go b/pkg/detectors/alconost/alconost.go index b183b59f2b6d..f9de760f73e6 100644 --- a/pkg/detectors/alconost/alconost.go +++ b/pkg/detectors/alconost/alconost.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -46,7 +46,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for key := range uniqueKeys { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Alconost, + DetectorType: detector_typepb.DetectorType_Alconost, Raw: []byte(key), } @@ -96,8 +96,8 @@ func verifyAlconostKey(ctx context.Context, client *http.Client, key string) (bo } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Alconost +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Alconost } func (s Scanner) Description() string { diff --git a/pkg/detectors/alconost/alconost_integration_test.go b/pkg/detectors/alconost/alconost_integration_test.go index 6e3fda8fde88..f69a4bec830f 100644 --- a/pkg/detectors/alconost/alconost_integration_test.go +++ b/pkg/detectors/alconost/alconost_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestAlconost_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestAlconost_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Alconost, + DetectorType: detector_typepb.DetectorType_Alconost, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestAlconost_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Alconost, + DetectorType: detector_typepb.DetectorType_Alconost, Verified: false, }, }, diff --git a/pkg/detectors/alegra/alegra.go b/pkg/detectors/alegra/alegra.go index 856d77237681..68f57693e38d 100644 --- a/pkg/detectors/alegra/alegra.go +++ b/pkg/detectors/alegra/alegra.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -56,7 +56,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for token := range uniqueTokens { for id := range uniqueIDs { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Alegra, + DetectorType: detector_typepb.DetectorType_Alegra, Raw: []byte(token), RawV2: []byte(token + ":" + id), } @@ -105,8 +105,8 @@ func verifyCredentials(ctx context.Context, client *http.Client, username, token } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Alegra +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Alegra } func (s Scanner) Description() string { diff --git a/pkg/detectors/alegra/alegra_integration_test.go b/pkg/detectors/alegra/alegra_integration_test.go index 35961518bcb9..cf2c4b1e5b51 100644 --- a/pkg/detectors/alegra/alegra_integration_test.go +++ b/pkg/detectors/alegra/alegra_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestAlegra_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestAlegra_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Alegra, + DetectorType: detector_typepb.DetectorType_Alegra, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestAlegra_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Alegra, + DetectorType: detector_typepb.DetectorType_Alegra, Verified: false, }, }, diff --git a/pkg/detectors/aletheiaapi/aletheiaapi.go b/pkg/detectors/aletheiaapi/aletheiaapi.go index 550bf9b08a42..5a6c49b9f0f3 100644 --- a/pkg/detectors/aletheiaapi/aletheiaapi.go +++ b/pkg/detectors/aletheiaapi/aletheiaapi.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -46,7 +46,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for key := range uniqueKeys { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_AletheiaApi, + DetectorType: detector_typepb.DetectorType_AletheiaApi, Raw: []byte(key), } @@ -95,8 +95,8 @@ func verifyAletheiaAPIKey(ctx context.Context, client *http.Client, key string) } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_AletheiaApi +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_AletheiaApi } func (s Scanner) Description() string { diff --git a/pkg/detectors/aletheiaapi/aletheiaapi_integration_test.go b/pkg/detectors/aletheiaapi/aletheiaapi_integration_test.go index 32b39a124fc8..cd73776d5ae0 100644 --- a/pkg/detectors/aletheiaapi/aletheiaapi_integration_test.go +++ b/pkg/detectors/aletheiaapi/aletheiaapi_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestAletheiaApi_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestAletheiaApi_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_AletheiaApi, + DetectorType: detector_typepb.DetectorType_AletheiaApi, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestAletheiaApi_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_AletheiaApi, + DetectorType: detector_typepb.DetectorType_AletheiaApi, Verified: false, }, }, diff --git a/pkg/detectors/algoliaadminkey/algoliaadminkey.go b/pkg/detectors/algoliaadminkey/algoliaadminkey.go index 73320dec62e8..a36f98d3ee27 100644 --- a/pkg/detectors/algoliaadminkey/algoliaadminkey.go +++ b/pkg/detectors/algoliaadminkey/algoliaadminkey.go @@ -16,7 +16,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" logContext "github.com/trufflesecurity/trufflehog/v3/pkg/context" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -75,7 +75,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } r := detectors.Result{ - DetectorType: detectorspb.DetectorType_AlgoliaAdminKey, + DetectorType: detector_typepb.DetectorType_AlgoliaAdminKey, Raw: []byte(key), RawV2: []byte(id + ":" + key), } @@ -179,8 +179,8 @@ type keyResponse struct { Description string `json:"description"` } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_AlgoliaAdminKey +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_AlgoliaAdminKey } func (s Scanner) Description() string { diff --git a/pkg/detectors/algoliaadminkey/algoliaadminkey_integration_test.go b/pkg/detectors/algoliaadminkey/algoliaadminkey_integration_test.go index a5fe493f280b..22262898844f 100644 --- a/pkg/detectors/algoliaadminkey/algoliaadminkey_integration_test.go +++ b/pkg/detectors/algoliaadminkey/algoliaadminkey_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestAlgoliaAdminKey_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestAlgoliaAdminKey_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_AlgoliaAdminKey, + DetectorType: detector_typepb.DetectorType_AlgoliaAdminKey, Verified: true, RawV2: []byte(fmt.Sprintf("%s%s", secret, id)), }, @@ -66,7 +66,7 @@ func TestAlgoliaAdminKey_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_AlgoliaAdminKey, + DetectorType: detector_typepb.DetectorType_AlgoliaAdminKey, Verified: false, RawV2: []byte(fmt.Sprintf("%s%s", inactiveSecret, id)), }, diff --git a/pkg/detectors/alibaba/alibaba.go b/pkg/detectors/alibaba/alibaba.go index b9e4727f1482..0d8b917774eb 100644 --- a/pkg/detectors/alibaba/alibaba.go +++ b/pkg/detectors/alibaba/alibaba.go @@ -18,7 +18,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -103,7 +103,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resIdMatch := strings.TrimSpace(idMatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Alibaba, + DetectorType: detector_typepb.DetectorType_Alibaba, Raw: []byte(resMatch), RawV2: []byte(resMatch + resIdMatch), } @@ -174,6 +174,6 @@ func verifyAlibaba(ctx context.Context, client *http.Client, resIdMatch, resMatc } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Alibaba +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Alibaba } diff --git a/pkg/detectors/alibaba/alibaba_integration_test.go b/pkg/detectors/alibaba/alibaba_integration_test.go index 31b81881e0e7..05fdcf1036d3 100644 --- a/pkg/detectors/alibaba/alibaba_integration_test.go +++ b/pkg/detectors/alibaba/alibaba_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestAlibaba_FromChunk(t *testing.T) { @@ -50,7 +50,7 @@ func TestAlibaba_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Alibaba, + DetectorType: detector_typepb.DetectorType_Alibaba, Verified: true, }, }, @@ -66,7 +66,7 @@ func TestAlibaba_FromChunk(t *testing.T) { }, want: func() []detectors.Result { r := detectors.Result{ - DetectorType: detectorspb.DetectorType_Alibaba, + DetectorType: detector_typepb.DetectorType_Alibaba, Verified: false, } r.SetVerificationError(context.DeadlineExceeded) @@ -84,7 +84,7 @@ func TestAlibaba_FromChunk(t *testing.T) { }, want: func() []detectors.Result { r := detectors.Result{ - DetectorType: detectorspb.DetectorType_Alibaba, + DetectorType: detector_typepb.DetectorType_Alibaba, Verified: false, } r.SetVerificationError(fmt.Errorf("unexpected HTTP response status 500")) @@ -102,7 +102,7 @@ func TestAlibaba_FromChunk(t *testing.T) { }, want: func() []detectors.Result { r := detectors.Result{ - DetectorType: detectorspb.DetectorType_Alibaba, + DetectorType: detector_typepb.DetectorType_Alibaba, Verified: false, } r.SetVerificationError(fmt.Errorf("unexpected EOF")) @@ -120,7 +120,7 @@ func TestAlibaba_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Alibaba, + DetectorType: detector_typepb.DetectorType_Alibaba, Verified: false, }, }, diff --git a/pkg/detectors/alienvault/alienvault.go b/pkg/detectors/alienvault/alienvault.go index aa4452730490..0b5482821905 100644 --- a/pkg/detectors/alienvault/alienvault.go +++ b/pkg/detectors/alienvault/alienvault.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -45,7 +45,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for key := range uniqueKeys { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_AlienVault, + DetectorType: detector_typepb.DetectorType_AlienVault, Raw: []byte(key), } @@ -66,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_AlienVault +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_AlienVault } func verifyAlienVaultKey(ctx context.Context, client *http.Client, key string) (bool, error) { diff --git a/pkg/detectors/alienvault/alienvault_integration_test.go b/pkg/detectors/alienvault/alienvault_integration_test.go index ab9e035bdf94..833b5f5a462f 100644 --- a/pkg/detectors/alienvault/alienvault_integration_test.go +++ b/pkg/detectors/alienvault/alienvault_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestAlienVault_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestAlienVault_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_AlienVault, + DetectorType: detector_typepb.DetectorType_AlienVault, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestAlienVault_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_AlienVault, + DetectorType: detector_typepb.DetectorType_AlienVault, Verified: false, }, }, diff --git a/pkg/detectors/allsports/allsports.go b/pkg/detectors/allsports/allsports.go index 348f92be6bdb..a2cbb2281cf1 100644 --- a/pkg/detectors/allsports/allsports.go +++ b/pkg/detectors/allsports/allsports.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -46,7 +46,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for key := range uniqueKeys { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Allsports, + DetectorType: detector_typepb.DetectorType_Allsports, Raw: []byte(key), } @@ -100,8 +100,8 @@ func verifyAllSportsKey(ctx context.Context, client *http.Client, key string) (b } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Allsports +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Allsports } func (s Scanner) Description() string { diff --git a/pkg/detectors/allsports/allsports_integration_test.go b/pkg/detectors/allsports/allsports_integration_test.go index 0619c62f7369..574809c30b85 100644 --- a/pkg/detectors/allsports/allsports_integration_test.go +++ b/pkg/detectors/allsports/allsports_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestAllsports_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestAllsports_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Allsports, + DetectorType: detector_typepb.DetectorType_Allsports, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestAllsports_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Allsports, + DetectorType: detector_typepb.DetectorType_Allsports, Verified: false, }, }, diff --git a/pkg/detectors/amadeus/amadeus.go b/pkg/detectors/amadeus/amadeus.go index ad68b77e074d..8070cb4cdf70 100644 --- a/pkg/detectors/amadeus/amadeus.go +++ b/pkg/detectors/amadeus/amadeus.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -53,7 +53,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for key := range uniqueKeys { for secret := range uniqueSecrets { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Amadeus, + DetectorType: detector_typepb.DetectorType_Amadeus, Raw: []byte(key), RawV2: []byte(key + secret), } @@ -112,8 +112,8 @@ func verifyAdobeIOSecret(ctx context.Context, client *http.Client, key string, s } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Amadeus +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Amadeus } func (s Scanner) Description() string { diff --git a/pkg/detectors/amadeus/amadeus_integration_test.go b/pkg/detectors/amadeus/amadeus_integration_test.go index 0f87057ca491..fdf6f7bf8714 100644 --- a/pkg/detectors/amadeus/amadeus_integration_test.go +++ b/pkg/detectors/amadeus/amadeus_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestAmadeus_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestAmadeus_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Amadeus, + DetectorType: detector_typepb.DetectorType_Amadeus, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestAmadeus_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Amadeus, + DetectorType: detector_typepb.DetectorType_Amadeus, Verified: false, }, }, diff --git a/pkg/detectors/ambee/ambee.go b/pkg/detectors/ambee/ambee.go index 82d8637c8d64..ffe09f8b9d8b 100644 --- a/pkg/detectors/ambee/ambee.go +++ b/pkg/detectors/ambee/ambee.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -45,7 +45,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for key := range uniqueKeys { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Ambee, + DetectorType: detector_typepb.DetectorType_Ambee, Raw: []byte(key), } @@ -93,8 +93,8 @@ func verifyAmbeeKey(ctx context.Context, client *http.Client, key string) (bool, } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Ambee +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Ambee } func (s Scanner) Description() string { diff --git a/pkg/detectors/ambee/ambee_integration_test.go b/pkg/detectors/ambee/ambee_integration_test.go index 6ff21de9dc28..4aa0658e9c68 100644 --- a/pkg/detectors/ambee/ambee_integration_test.go +++ b/pkg/detectors/ambee/ambee_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestAmbee_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestAmbee_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Ambee, + DetectorType: detector_typepb.DetectorType_Ambee, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestAmbee_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Ambee, + DetectorType: detector_typepb.DetectorType_Ambee, Verified: false, }, }, diff --git a/pkg/detectors/amplitudeapikey/amplitudeapikey.go b/pkg/detectors/amplitudeapikey/amplitudeapikey.go index d1b13a10e920..d051c7df6e29 100644 --- a/pkg/detectors/amplitudeapikey/amplitudeapikey.go +++ b/pkg/detectors/amplitudeapikey/amplitudeapikey.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -57,7 +57,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_AmplitudeApiKey, + DetectorType: detector_typepb.DetectorType_AmplitudeApiKey, Raw: []byte(key), RawV2: []byte(key + secret), } @@ -106,8 +106,8 @@ func verifyAdobeIOSecret(ctx context.Context, client *http.Client, key string, s } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_AmplitudeApiKey +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_AmplitudeApiKey } func (s Scanner) Description() string { diff --git a/pkg/detectors/amplitudeapikey/amplitudeapikey_integration_test.go b/pkg/detectors/amplitudeapikey/amplitudeapikey_integration_test.go index 4b04165c6b44..1f2e0ee217d5 100644 --- a/pkg/detectors/amplitudeapikey/amplitudeapikey_integration_test.go +++ b/pkg/detectors/amplitudeapikey/amplitudeapikey_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestAmplitudeApiKey_FromChunk(t *testing.T) { @@ -51,11 +51,11 @@ func TestAmplitudeApiKey_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_AmplitudeApiKey, + DetectorType: detector_typepb.DetectorType_AmplitudeApiKey, Verified: true, }, { - DetectorType: detectorspb.DetectorType_AmplitudeApiKey, + DetectorType: detector_typepb.DetectorType_AmplitudeApiKey, Verified: false, }, }, @@ -72,11 +72,11 @@ func TestAmplitudeApiKey_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_AmplitudeApiKey, + DetectorType: detector_typepb.DetectorType_AmplitudeApiKey, Verified: false, }, { - DetectorType: detectorspb.DetectorType_AmplitudeApiKey, + DetectorType: detector_typepb.DetectorType_AmplitudeApiKey, Verified: false, }, }, diff --git a/pkg/detectors/anthropic/anthropic.go b/pkg/detectors/anthropic/anthropic.go index 47f07931a901..defcfec56175 100644 --- a/pkg/detectors/anthropic/anthropic.go +++ b/pkg/detectors/anthropic/anthropic.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -47,7 +47,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result keyMatch := strings.TrimSpace(key[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Anthropic, + DetectorType: detector_typepb.DetectorType_Anthropic, Raw: []byte(keyMatch), ExtraData: make(map[string]string), } @@ -126,8 +126,8 @@ func verifyAnthropicKey(ctx context.Context, client *http.Client, endpoint, key } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Anthropic +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Anthropic } func (s Scanner) Description() string { diff --git a/pkg/detectors/anthropic/anthropic_integration_test.go b/pkg/detectors/anthropic/anthropic_integration_test.go index fd7648aeae53..6d81721f2e08 100644 --- a/pkg/detectors/anthropic/anthropic_integration_test.go +++ b/pkg/detectors/anthropic/anthropic_integration_test.go @@ -15,7 +15,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestAnthropic_FromChunk(t *testing.T) { @@ -52,7 +52,7 @@ func TestAnthropic_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Anthropic, + DetectorType: detector_typepb.DetectorType_Anthropic, Verified: true, }, }, @@ -69,7 +69,7 @@ func TestAnthropic_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Anthropic, + DetectorType: detector_typepb.DetectorType_Anthropic, Verified: false, }, }, @@ -98,7 +98,7 @@ func TestAnthropic_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Anthropic, + DetectorType: detector_typepb.DetectorType_Anthropic, Verified: false, }, }, diff --git a/pkg/detectors/anypoint/anypoint.go b/pkg/detectors/anypoint/anypoint.go index ecd228aea6b9..d858d571937e 100644 --- a/pkg/detectors/anypoint/anypoint.go +++ b/pkg/detectors/anypoint/anypoint.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -57,7 +57,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Anypoint, + DetectorType: detector_typepb.DetectorType_Anypoint, Raw: []byte(key), RawV2: []byte(key + org), } @@ -107,8 +107,8 @@ func verifyAnypointSecret(ctx context.Context, client *http.Client, key string, } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Anypoint +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Anypoint } func (s Scanner) Description() string { diff --git a/pkg/detectors/anypoint/anypoint_integration_test.go b/pkg/detectors/anypoint/anypoint_integration_test.go index e073314369c3..46b3480813a6 100644 --- a/pkg/detectors/anypoint/anypoint_integration_test.go +++ b/pkg/detectors/anypoint/anypoint_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestAnypoint_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestAnypoint_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Anypoint, + DetectorType: detector_typepb.DetectorType_Anypoint, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestAnypoint_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Anypoint, + DetectorType: detector_typepb.DetectorType_Anypoint, Verified: false, }, }, diff --git a/pkg/detectors/anypointoauth2/anypointoauth2.go b/pkg/detectors/anypointoauth2/anypointoauth2.go index 5fcd4f1436ef..a1f16060e2c4 100644 --- a/pkg/detectors/anypointoauth2/anypointoauth2.go +++ b/pkg/detectors/anypointoauth2/anypointoauth2.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -67,7 +67,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_AnypointOAuth2, + DetectorType: detector_typepb.DetectorType_AnypointOAuth2, Raw: []byte(secret), RawV2: []byte(fmt.Sprintf("%s:%s", id, secret)), } @@ -127,8 +127,8 @@ func verifyMatch(ctx context.Context, client *http.Client, id, secret string) (b } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_AnypointOAuth2 +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_AnypointOAuth2 } func (s Scanner) Description() string { diff --git a/pkg/detectors/anypointoauth2/anypointoauth2_integration_test.go b/pkg/detectors/anypointoauth2/anypointoauth2_integration_test.go index e4b416bc2db9..d74a406402d0 100644 --- a/pkg/detectors/anypointoauth2/anypointoauth2_integration_test.go +++ b/pkg/detectors/anypointoauth2/anypointoauth2_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestAnypointOAuth2_FromChunk(t *testing.T) { @@ -50,7 +50,7 @@ func TestAnypointOAuth2_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_AnypointOAuth2, + DetectorType: detector_typepb.DetectorType_AnypointOAuth2, Verified: true, }, }, @@ -66,7 +66,7 @@ func TestAnypointOAuth2_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_AnypointOAuth2, + DetectorType: detector_typepb.DetectorType_AnypointOAuth2, Verified: false, }, }, diff --git a/pkg/detectors/apacta/apacta.go b/pkg/detectors/apacta/apacta.go index 77d9a6c6c99a..fb4b7c8ee106 100644 --- a/pkg/detectors/apacta/apacta.go +++ b/pkg/detectors/apacta/apacta.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -45,7 +45,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for key := range uniqueKeys { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Apacta, + DetectorType: detector_typepb.DetectorType_Apacta, Raw: []byte(key), } @@ -91,8 +91,8 @@ func verifyApactaKey(ctx context.Context, client *http.Client, key string) (bool } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Apacta +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Apacta } func (s Scanner) Description() string { diff --git a/pkg/detectors/apacta/apacta_integration_test.go b/pkg/detectors/apacta/apacta_integration_test.go index d80e7f04b6a2..352bf2c46d7c 100644 --- a/pkg/detectors/apacta/apacta_integration_test.go +++ b/pkg/detectors/apacta/apacta_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestApacta_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestApacta_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Apacta, + DetectorType: detector_typepb.DetectorType_Apacta, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestApacta_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Apacta, + DetectorType: detector_typepb.DetectorType_Apacta, Verified: false, }, }, diff --git a/pkg/detectors/api2cart/api2cart.go b/pkg/detectors/api2cart/api2cart.go index 6fa8c2bda26c..5aa82913edc4 100644 --- a/pkg/detectors/api2cart/api2cart.go +++ b/pkg/detectors/api2cart/api2cart.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -46,7 +46,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for key := range uniqueKeys { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Api2Cart, + DetectorType: detector_typepb.DetectorType_Api2Cart, Raw: []byte(key), } @@ -109,8 +109,8 @@ type Response struct { ReturnCode int `json:"return_code"` } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Api2Cart +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Api2Cart } func (s Scanner) Description() string { diff --git a/pkg/detectors/api2cart/api2cart_integration_test.go b/pkg/detectors/api2cart/api2cart_integration_test.go index f0243d52bcc9..974daa60d6b2 100644 --- a/pkg/detectors/api2cart/api2cart_integration_test.go +++ b/pkg/detectors/api2cart/api2cart_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestApi2Cart_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestApi2Cart_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Api2Cart, + DetectorType: detector_typepb.DetectorType_Api2Cart, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestApi2Cart_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Api2Cart, + DetectorType: detector_typepb.DetectorType_Api2Cart, Verified: false, }, }, diff --git a/pkg/detectors/apideck/apideck.go b/pkg/detectors/apideck/apideck.go index 5b109614be14..7129cd3263df 100644 --- a/pkg/detectors/apideck/apideck.go +++ b/pkg/detectors/apideck/apideck.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -52,7 +52,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for key := range uniqueKeys { for id := range uniqueIds { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_ApiDeck, + DetectorType: detector_typepb.DetectorType_ApiDeck, Raw: []byte(key), RawV2: []byte(key + id), } @@ -103,8 +103,8 @@ func verifyAdobeIOSecret(ctx context.Context, client *http.Client, key string, i } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_ApiDeck +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_ApiDeck } func (s Scanner) Description() string { diff --git a/pkg/detectors/apideck/apideck_integration_test.go b/pkg/detectors/apideck/apideck_integration_test.go index 2a16e8a2a05e..0b56733802e5 100644 --- a/pkg/detectors/apideck/apideck_integration_test.go +++ b/pkg/detectors/apideck/apideck_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestApiDeck_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestApiDeck_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ApiDeck, + DetectorType: detector_typepb.DetectorType_ApiDeck, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestApiDeck_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ApiDeck, + DetectorType: detector_typepb.DetectorType_ApiDeck, Verified: false, }, }, diff --git a/pkg/detectors/apiflash/apiflash.go b/pkg/detectors/apiflash/apiflash.go index d4ef185d213a..4b275a553b80 100644 --- a/pkg/detectors/apiflash/apiflash.go +++ b/pkg/detectors/apiflash/apiflash.go @@ -10,7 +10,7 @@ import ( regexp "github.com/wasilibs/go-re2" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -46,7 +46,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for key := range uniqueAPIKeys { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Apiflash, + DetectorType: detector_typepb.DetectorType_Apiflash, Raw: []byte(key), } @@ -62,8 +62,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Apiflash +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Apiflash } func (s Scanner) Description() string { diff --git a/pkg/detectors/apiflash/apiflash_integration_test.go b/pkg/detectors/apiflash/apiflash_integration_test.go index c457a47225f2..e13f63c98732 100644 --- a/pkg/detectors/apiflash/apiflash_integration_test.go +++ b/pkg/detectors/apiflash/apiflash_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestApiflash_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestApiflash_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Apiflash, + DetectorType: detector_typepb.DetectorType_Apiflash, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestApiflash_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Apiflash, + DetectorType: detector_typepb.DetectorType_Apiflash, Verified: false, }, }, diff --git a/pkg/detectors/apifonica/apifonica.go b/pkg/detectors/apifonica/apifonica.go index 3c6b17b91e43..57932c46f8b7 100644 --- a/pkg/detectors/apifonica/apifonica.go +++ b/pkg/detectors/apifonica/apifonica.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -51,7 +51,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for key := range uniqueKeys { for token := range uniqueTokens { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_ApiFonica, + DetectorType: detector_typepb.DetectorType_ApiFonica, Raw: []byte(key), } @@ -102,8 +102,8 @@ func verifyApifonicaSecret(ctx context.Context, client *http.Client, key string, } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_ApiFonica +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_ApiFonica } func (s Scanner) Description() string { diff --git a/pkg/detectors/apifonica/apifonica_integration_test.go b/pkg/detectors/apifonica/apifonica_integration_test.go index 8df2c4cb50a8..739f5e6a490d 100644 --- a/pkg/detectors/apifonica/apifonica_integration_test.go +++ b/pkg/detectors/apifonica/apifonica_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestApifonica_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestApifonica_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ApiFonica, + DetectorType: detector_typepb.DetectorType_ApiFonica, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestApifonica_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ApiFonica, + DetectorType: detector_typepb.DetectorType_ApiFonica, Verified: false, }, }, diff --git a/pkg/detectors/apify/apify.go b/pkg/detectors/apify/apify.go index 682d0f9d7871..6742dcbd58e8 100644 --- a/pkg/detectors/apify/apify.go +++ b/pkg/detectors/apify/apify.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -45,7 +45,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for key := range uniqueKeys { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Apify, + DetectorType: detector_typepb.DetectorType_Apify, Raw: []byte(key), } @@ -91,8 +91,8 @@ func verifyApifyKey(ctx context.Context, client *http.Client, key string) (bool, } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Apify +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Apify } func (s Scanner) Description() string { diff --git a/pkg/detectors/apify/apify_integration_test.go b/pkg/detectors/apify/apify_integration_test.go index 79e866953358..ad7395103ce2 100644 --- a/pkg/detectors/apify/apify_integration_test.go +++ b/pkg/detectors/apify/apify_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestApify_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestApify_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Apify, + DetectorType: detector_typepb.DetectorType_Apify, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestApify_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Apify, + DetectorType: detector_typepb.DetectorType_Apify, Verified: false, }, }, diff --git a/pkg/detectors/apilayer/apilayer.go b/pkg/detectors/apilayer/apilayer.go index f3b50b620b34..ad6902b6622d 100644 --- a/pkg/detectors/apilayer/apilayer.go +++ b/pkg/detectors/apilayer/apilayer.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -45,7 +45,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for key := range uniqueKeys { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Apilayer, + DetectorType: detector_typepb.DetectorType_Apilayer, Raw: []byte(key), } @@ -93,8 +93,8 @@ func verifyAPILayerKey(ctx context.Context, client *http.Client, key string) (bo } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Apilayer +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Apilayer } func (s Scanner) Description() string { diff --git a/pkg/detectors/apilayer/apilayer_integration_test.go b/pkg/detectors/apilayer/apilayer_integration_test.go index ef4b0fe2f0ab..2cab58de9964 100644 --- a/pkg/detectors/apilayer/apilayer_integration_test.go +++ b/pkg/detectors/apilayer/apilayer_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestApilayer_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestApilayer_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Apilayer, + DetectorType: detector_typepb.DetectorType_Apilayer, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestApilayer_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Apilayer, + DetectorType: detector_typepb.DetectorType_Apilayer, Verified: false, }, }, diff --git a/pkg/detectors/apimatic/apimatic.go b/pkg/detectors/apimatic/apimatic.go index 754c109c3716..b727daf4dccf 100644 --- a/pkg/detectors/apimatic/apimatic.go +++ b/pkg/detectors/apimatic/apimatic.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -46,7 +46,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for apiKey := range uniqueApiKeys { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_APIMatic, + DetectorType: detector_typepb.DetectorType_APIMatic, Raw: []byte(apiKey), } @@ -99,8 +99,8 @@ func verifyAPImaticKey(ctx context.Context, client *http.Client, key string) (bo } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_APIMatic +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_APIMatic } func (s Scanner) Description() string { diff --git a/pkg/detectors/apimatic/apimatic_integration_test.go b/pkg/detectors/apimatic/apimatic_integration_test.go index 7995bfc48a67..db8b94f17ff3 100644 --- a/pkg/detectors/apimatic/apimatic_integration_test.go +++ b/pkg/detectors/apimatic/apimatic_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestAPIMatic_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestAPIMatic_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_APIMatic, + DetectorType: detector_typepb.DetectorType_APIMatic, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestAPIMatic_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_APIMatic, + DetectorType: detector_typepb.DetectorType_APIMatic, Verified: false, }, }, diff --git a/pkg/detectors/apimetrics/apimetrics.go b/pkg/detectors/apimetrics/apimetrics.go index cf477535ea70..ad27e089c08d 100644 --- a/pkg/detectors/apimetrics/apimetrics.go +++ b/pkg/detectors/apimetrics/apimetrics.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -45,7 +45,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for key := range uniqueKeys { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_ApiMetrics, + DetectorType: detector_typepb.DetectorType_ApiMetrics, Raw: []byte(key), } @@ -92,8 +92,8 @@ func verifyAPIMetricsKey(ctx context.Context, client *http.Client, key string) ( } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_ApiMetrics +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_ApiMetrics } func (s Scanner) Description() string { diff --git a/pkg/detectors/apimetrics/apimetrics_integration_test.go b/pkg/detectors/apimetrics/apimetrics_integration_test.go index a16dc409337a..27fe3bf560aa 100644 --- a/pkg/detectors/apimetrics/apimetrics_integration_test.go +++ b/pkg/detectors/apimetrics/apimetrics_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestApiMetrics_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestApiMetrics_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ApiMetrics, + DetectorType: detector_typepb.DetectorType_ApiMetrics, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestApiMetrics_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ApiMetrics, + DetectorType: detector_typepb.DetectorType_ApiMetrics, Verified: false, }, }, diff --git a/pkg/detectors/apitemplate/apitemplate.go b/pkg/detectors/apitemplate/apitemplate.go index 757564ef050e..ef2159a2b4ab 100644 --- a/pkg/detectors/apitemplate/apitemplate.go +++ b/pkg/detectors/apitemplate/apitemplate.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -45,7 +45,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for key := range uniqueKeys { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_APITemplate, + DetectorType: detector_typepb.DetectorType_APITemplate, Raw: []byte(key), } @@ -94,8 +94,8 @@ func verifyAPITemplateKey(ctx context.Context, client *http.Client, key string) } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_APITemplate +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_APITemplate } func (s Scanner) Description() string { diff --git a/pkg/detectors/apitemplate/apitemplate_integration_test.go b/pkg/detectors/apitemplate/apitemplate_integration_test.go index ff20dbdbd821..7d9d4b4b588f 100644 --- a/pkg/detectors/apitemplate/apitemplate_integration_test.go +++ b/pkg/detectors/apitemplate/apitemplate_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestAPITemplate_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestAPITemplate_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_APITemplate, + DetectorType: detector_typepb.DetectorType_APITemplate, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestAPITemplate_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_APITemplate, + DetectorType: detector_typepb.DetectorType_APITemplate, Verified: false, }, }, diff --git a/pkg/detectors/apollo/apollo.go b/pkg/detectors/apollo/apollo.go index 17f91e6ed053..9a27fc4e90ea 100644 --- a/pkg/detectors/apollo/apollo.go +++ b/pkg/detectors/apollo/apollo.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -45,7 +45,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for key := range uniqueKeys { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Apollo, + DetectorType: detector_typepb.DetectorType_Apollo, Raw: []byte(key), } @@ -92,8 +92,8 @@ func verifyApolloKey(ctx context.Context, client *http.Client, key string) (bool } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Apollo +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Apollo } func (s Scanner) Description() string { diff --git a/pkg/detectors/apollo/apollo_integration_test.go b/pkg/detectors/apollo/apollo_integration_test.go index 99ea2c755f97..93679ac6cacc 100644 --- a/pkg/detectors/apollo/apollo_integration_test.go +++ b/pkg/detectors/apollo/apollo_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestApollo_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestApollo_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Apollo, + DetectorType: detector_typepb.DetectorType_Apollo, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestApollo_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Apollo, + DetectorType: detector_typepb.DetectorType_Apollo, Verified: false, }, }, diff --git a/pkg/detectors/appcues/appcues.go b/pkg/detectors/appcues/appcues.go index 5f378d95ed13..d3b8477ab241 100644 --- a/pkg/detectors/appcues/appcues.go +++ b/pkg/detectors/appcues/appcues.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -56,7 +56,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resIdMatch := strings.TrimSpace(idMatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Appcues, + DetectorType: detector_typepb.DetectorType_Appcues, Raw: []byte(resMatch), RawV2: []byte(resMatch + resUserMatch), } @@ -99,8 +99,8 @@ func verifyMatch(ctx context.Context, client *http.Client, resUserMatch, resMatc } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Appcues +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Appcues } func (s Scanner) Description() string { diff --git a/pkg/detectors/appcues/appcues_integration_test.go b/pkg/detectors/appcues/appcues_integration_test.go index eb36ecac7dcb..3eba06525a08 100644 --- a/pkg/detectors/appcues/appcues_integration_test.go +++ b/pkg/detectors/appcues/appcues_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestAppcues_FromChunk(t *testing.T) { @@ -50,11 +50,11 @@ func TestAppcues_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Appcues, + DetectorType: detector_typepb.DetectorType_Appcues, Verified: true, }, { - DetectorType: detectorspb.DetectorType_Appcues, + DetectorType: detector_typepb.DetectorType_Appcues, Verified: false, }, }, @@ -70,11 +70,11 @@ func TestAppcues_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Appcues, + DetectorType: detector_typepb.DetectorType_Appcues, Verified: false, }, { - DetectorType: detectorspb.DetectorType_Appcues, + DetectorType: detector_typepb.DetectorType_Appcues, Verified: false, }, }, diff --git a/pkg/detectors/appfollow/appfollow.go b/pkg/detectors/appfollow/appfollow.go index c3e439adc61c..6d2ff5df698d 100644 --- a/pkg/detectors/appfollow/appfollow.go +++ b/pkg/detectors/appfollow/appfollow.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -42,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Appfollow, + DetectorType: detector_typepb.DetectorType_Appfollow, Raw: []byte(resMatch), } @@ -83,8 +83,8 @@ func verifyMatch(ctx context.Context, client *http.Client, token string) (bool, } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Appfollow +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Appfollow } func (s Scanner) Description() string { diff --git a/pkg/detectors/appfollow/appfollow_integration_test.go b/pkg/detectors/appfollow/appfollow_integration_test.go index fd6e46745cec..019d8880b24e 100644 --- a/pkg/detectors/appfollow/appfollow_integration_test.go +++ b/pkg/detectors/appfollow/appfollow_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestAppfollow_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestAppfollow_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Appfollow, + DetectorType: detector_typepb.DetectorType_Appfollow, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestAppfollow_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Appfollow, + DetectorType: detector_typepb.DetectorType_Appfollow, Verified: false, }, }, diff --git a/pkg/detectors/appointedd/appointedd.go b/pkg/detectors/appointedd/appointedd.go index aed88100f046..0b4139423505 100644 --- a/pkg/detectors/appointedd/appointedd.go +++ b/pkg/detectors/appointedd/appointedd.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -42,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Appointedd, + DetectorType: detector_typepb.DetectorType_Appointedd, Raw: []byte(resMatch), } if verify { @@ -86,8 +86,8 @@ func verifyMatch(ctx context.Context, client *http.Client, secret string) (bool, } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Appointedd +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Appointedd } func (s Scanner) Description() string { diff --git a/pkg/detectors/appointedd/appointedd_integration_test.go b/pkg/detectors/appointedd/appointedd_integration_test.go index 1f2a8dfe66da..06e735515af8 100644 --- a/pkg/detectors/appointedd/appointedd_integration_test.go +++ b/pkg/detectors/appointedd/appointedd_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestAppointedd_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestAppointedd_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Appointedd, + DetectorType: detector_typepb.DetectorType_Appointedd, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestAppointedd_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Appointedd, + DetectorType: detector_typepb.DetectorType_Appointedd, Verified: false, }, }, diff --git a/pkg/detectors/appoptics/appoptics.go b/pkg/detectors/appoptics/appoptics.go index 5f91103a1be1..7460c2b11173 100644 --- a/pkg/detectors/appoptics/appoptics.go +++ b/pkg/detectors/appoptics/appoptics.go @@ -4,13 +4,14 @@ import ( "context" b64 "encoding/base64" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -42,7 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_AppOptics, + DetectorType: detector_typepb.DetectorType_AppOptics, Raw: []byte(resMatch), } @@ -84,8 +85,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_AppOptics +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_AppOptics } func (s Scanner) Description() string { diff --git a/pkg/detectors/appoptics/appoptics_integration_test.go b/pkg/detectors/appoptics/appoptics_integration_test.go index a50a583b039c..db21dea664e5 100644 --- a/pkg/detectors/appoptics/appoptics_integration_test.go +++ b/pkg/detectors/appoptics/appoptics_integration_test.go @@ -15,7 +15,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestAppoptics_FromChunk(t *testing.T) { @@ -51,7 +51,7 @@ func TestAppoptics_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_AppOptics, + DetectorType: detector_typepb.DetectorType_AppOptics, Verified: true, }, }, @@ -68,7 +68,7 @@ func TestAppoptics_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_AppOptics, + DetectorType: detector_typepb.DetectorType_AppOptics, Verified: false, }, }, diff --git a/pkg/detectors/appsynergy/appsynergy.go b/pkg/detectors/appsynergy/appsynergy.go index 79bcb67e895e..9c9513781ade 100644 --- a/pkg/detectors/appsynergy/appsynergy.go +++ b/pkg/detectors/appsynergy/appsynergy.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -42,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_AppSynergy, + DetectorType: detector_typepb.DetectorType_AppSynergy, Raw: []byte(resMatch), } @@ -93,8 +93,8 @@ func verifyMatch(ctx context.Context, client *http.Client, secret string) (bool, } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_AppSynergy +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_AppSynergy } func (s Scanner) Description() string { diff --git a/pkg/detectors/appsynergy/appsynergy_integration_test.go b/pkg/detectors/appsynergy/appsynergy_integration_test.go index 363af075ed58..c665721e1da4 100644 --- a/pkg/detectors/appsynergy/appsynergy_integration_test.go +++ b/pkg/detectors/appsynergy/appsynergy_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestAppSynergy_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestAppSynergy_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_AppSynergy, + DetectorType: detector_typepb.DetectorType_AppSynergy, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestAppSynergy_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_AppSynergy, + DetectorType: detector_typepb.DetectorType_AppSynergy, Verified: false, }, }, diff --git a/pkg/detectors/apptivo/apptivo.go b/pkg/detectors/apptivo/apptivo.go index eb7882ecb2f3..ccb820894b4b 100644 --- a/pkg/detectors/apptivo/apptivo.go +++ b/pkg/detectors/apptivo/apptivo.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -48,7 +48,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resIdMatch := strings.TrimSpace(idMatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Apptivo, + DetectorType: detector_typepb.DetectorType_Apptivo, Raw: []byte(resMatch), RawV2: []byte(resMatch + resIdMatch), } @@ -92,8 +92,8 @@ func verifyMatch(ctx context.Context, client *http.Client, apiKey, accessKey str } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Apptivo +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Apptivo } func (s Scanner) Description() string { diff --git a/pkg/detectors/apptivo/apptivo_integration_test.go b/pkg/detectors/apptivo/apptivo_integration_test.go index d86c9872724e..d69a044ebdd4 100644 --- a/pkg/detectors/apptivo/apptivo_integration_test.go +++ b/pkg/detectors/apptivo/apptivo_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestApptivo_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestApptivo_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Apptivo, + DetectorType: detector_typepb.DetectorType_Apptivo, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestApptivo_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Apptivo, + DetectorType: detector_typepb.DetectorType_Apptivo, Verified: false, }, }, diff --git a/pkg/detectors/artifactory/artifactory.go b/pkg/detectors/artifactory/artifactory.go index 6b29b1d46c7d..5ba2c23e8cbd 100644 --- a/pkg/detectors/artifactory/artifactory.go +++ b/pkg/detectors/artifactory/artifactory.go @@ -12,7 +12,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/cache/simple" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -83,7 +83,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_ArtifactoryAccessToken, + DetectorType: detector_typepb.DetectorType_ArtifactoryAccessToken, Raw: []byte(token), RawV2: []byte(token + url), } @@ -159,8 +159,8 @@ func verifyArtifactory(ctx context.Context, client *http.Client, resURLMatch, re } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_ArtifactoryAccessToken +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_ArtifactoryAccessToken } func (s Scanner) Description() string { diff --git a/pkg/detectors/artifactory/artifactory_integration_test.go b/pkg/detectors/artifactory/artifactory_integration_test.go index a06a77828b3f..9b1ace34fa11 100644 --- a/pkg/detectors/artifactory/artifactory_integration_test.go +++ b/pkg/detectors/artifactory/artifactory_integration_test.go @@ -12,7 +12,7 @@ import ( "github.com/google/go-cmp/cmp/cmpopts" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestArtifactory_FromChunk(t *testing.T) { @@ -45,7 +45,7 @@ func TestArtifactory_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ArtifactoryAccessToken, + DetectorType: detector_typepb.DetectorType_ArtifactoryAccessToken, Verified: false, }, }, diff --git a/pkg/detectors/artifactoryreferencetoken/artifactoryreferencetoken.go b/pkg/detectors/artifactoryreferencetoken/artifactoryreferencetoken.go index 4271b242a9ad..fce9a895d37d 100644 --- a/pkg/detectors/artifactoryreferencetoken/artifactoryreferencetoken.go +++ b/pkg/detectors/artifactoryreferencetoken/artifactoryreferencetoken.go @@ -12,7 +12,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/cache/simple" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -81,7 +81,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_ArtifactoryReferenceToken, + DetectorType: detector_typepb.DetectorType_ArtifactoryReferenceToken, Raw: []byte(token), RawV2: []byte(token + url), } @@ -157,8 +157,8 @@ func verifyToken(ctx context.Context, client *http.Client, host, token string) ( } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_ArtifactoryReferenceToken +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_ArtifactoryReferenceToken } func (s Scanner) Description() string { diff --git a/pkg/detectors/artifactoryreferencetoken/artifactoryreferencetoken_integration_test.go b/pkg/detectors/artifactoryreferencetoken/artifactoryreferencetoken_integration_test.go index 2bb1daa226b7..66dedf281222 100644 --- a/pkg/detectors/artifactoryreferencetoken/artifactoryreferencetoken_integration_test.go +++ b/pkg/detectors/artifactoryreferencetoken/artifactoryreferencetoken_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestArtifactoryreferencetoken_FromChunk(t *testing.T) { @@ -52,7 +52,7 @@ func TestArtifactoryreferencetoken_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ArtifactoryReferenceToken, + DetectorType: detector_typepb.DetectorType_ArtifactoryReferenceToken, Verified: true, }, }, @@ -69,7 +69,7 @@ func TestArtifactoryreferencetoken_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ArtifactoryReferenceToken, + DetectorType: detector_typepb.DetectorType_ArtifactoryReferenceToken, Verified: false, }, }, @@ -98,7 +98,7 @@ func TestArtifactoryreferencetoken_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ArtifactoryReferenceToken, + DetectorType: detector_typepb.DetectorType_ArtifactoryReferenceToken, Verified: false, }, }, @@ -115,7 +115,7 @@ func TestArtifactoryreferencetoken_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ArtifactoryReferenceToken, + DetectorType: detector_typepb.DetectorType_ArtifactoryReferenceToken, Verified: false, }, }, diff --git a/pkg/detectors/artsy/artsy.go b/pkg/detectors/artsy/artsy.go index 89b6f8eaf726..c1c700bad34f 100644 --- a/pkg/detectors/artsy/artsy.go +++ b/pkg/detectors/artsy/artsy.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -50,7 +50,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resIdMatch := strings.TrimSpace(idmatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Artsy, + DetectorType: detector_typepb.DetectorType_Artsy, Raw: []byte(resMatch), RawV2: []byte(resMatch + resIdMatch), } @@ -93,8 +93,8 @@ func verifyMatch(ctx context.Context, client *http.Client, id, secret string) (b } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Artsy +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Artsy } func (s Scanner) Description() string { diff --git a/pkg/detectors/artsy/artsy_integration_test.go b/pkg/detectors/artsy/artsy_integration_test.go index 82a08adf2548..e115e0dab2e5 100644 --- a/pkg/detectors/artsy/artsy_integration_test.go +++ b/pkg/detectors/artsy/artsy_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestArtsy_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestArtsy_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Artsy, + DetectorType: detector_typepb.DetectorType_Artsy, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestArtsy_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Artsy, + DetectorType: detector_typepb.DetectorType_Artsy, Verified: false, }, }, diff --git a/pkg/detectors/asanaoauth/asanaoauth.go b/pkg/detectors/asanaoauth/asanaoauth.go index 83de2aef1173..43563c42f349 100644 --- a/pkg/detectors/asanaoauth/asanaoauth.go +++ b/pkg/detectors/asanaoauth/asanaoauth.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -42,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_AsanaOauth, + DetectorType: detector_typepb.DetectorType_AsanaOauth, Raw: []byte(resMatch), } @@ -83,8 +83,8 @@ func verifyMatch(ctx context.Context, client *http.Client, token string) (bool, } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_AsanaOauth +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_AsanaOauth } func (s Scanner) Description() string { diff --git a/pkg/detectors/asanaoauth/asanaoauth_integration_test.go b/pkg/detectors/asanaoauth/asanaoauth_integration_test.go index 063c55b0cede..361e85054244 100644 --- a/pkg/detectors/asanaoauth/asanaoauth_integration_test.go +++ b/pkg/detectors/asanaoauth/asanaoauth_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestAsanaOauth_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestAsanaOauth_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_AsanaOauth, + DetectorType: detector_typepb.DetectorType_AsanaOauth, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestAsanaOauth_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_AsanaOauth, + DetectorType: detector_typepb.DetectorType_AsanaOauth, Verified: false, }, }, diff --git a/pkg/detectors/asanapersonalaccesstoken/asanapersonalaccesstoken.go b/pkg/detectors/asanapersonalaccesstoken/asanapersonalaccesstoken.go index 7e3eb830dd82..ab7d7d5f4a8e 100644 --- a/pkg/detectors/asanapersonalaccesstoken/asanapersonalaccesstoken.go +++ b/pkg/detectors/asanapersonalaccesstoken/asanapersonalaccesstoken.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -44,7 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_AsanaPersonalAccessToken, + DetectorType: detector_typepb.DetectorType_AsanaPersonalAccessToken, Raw: []byte(resMatch), } @@ -84,8 +84,8 @@ func verifyMatch(ctx context.Context, client *http.Client, token string) (bool, } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_AsanaPersonalAccessToken +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_AsanaPersonalAccessToken } func (s Scanner) Description() string { diff --git a/pkg/detectors/asanapersonalaccesstoken/asanapersonalaccesstoken_integration_test.go b/pkg/detectors/asanapersonalaccesstoken/asanapersonalaccesstoken_integration_test.go index a33eefeb2b6f..6532667acdc5 100644 --- a/pkg/detectors/asanapersonalaccesstoken/asanapersonalaccesstoken_integration_test.go +++ b/pkg/detectors/asanapersonalaccesstoken/asanapersonalaccesstoken_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestAsanaPersonalAccessToken_FromChunk(t *testing.T) { @@ -55,7 +55,7 @@ func TestAsanaPersonalAccessToken_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_AsanaPersonalAccessToken, + DetectorType: detector_typepb.DetectorType_AsanaPersonalAccessToken, Verified: true, }, }, @@ -71,7 +71,7 @@ func TestAsanaPersonalAccessToken_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_AsanaPersonalAccessToken, + DetectorType: detector_typepb.DetectorType_AsanaPersonalAccessToken, Verified: false, }, }, @@ -87,7 +87,7 @@ func TestAsanaPersonalAccessToken_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_AsanaPersonalAccessToken, + DetectorType: detector_typepb.DetectorType_AsanaPersonalAccessToken, Verified: true, }, }, @@ -103,7 +103,7 @@ func TestAsanaPersonalAccessToken_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_AsanaPersonalAccessToken, + DetectorType: detector_typepb.DetectorType_AsanaPersonalAccessToken, Verified: false, }, }, diff --git a/pkg/detectors/assemblyai/assemblyai.go b/pkg/detectors/assemblyai/assemblyai.go index 73441ccbbd7c..1eac498f3dcd 100644 --- a/pkg/detectors/assemblyai/assemblyai.go +++ b/pkg/detectors/assemblyai/assemblyai.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -42,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_AssemblyAI, + DetectorType: detector_typepb.DetectorType_AssemblyAI, Raw: []byte(resMatch), } @@ -83,8 +83,8 @@ func verifyMatch(ctx context.Context, client *http.Client, token string) (bool, } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_AssemblyAI +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_AssemblyAI } func (s Scanner) Description() string { diff --git a/pkg/detectors/assemblyai/assemblyai_integration_test.go b/pkg/detectors/assemblyai/assemblyai_integration_test.go index f042fb413469..92e81706bd23 100644 --- a/pkg/detectors/assemblyai/assemblyai_integration_test.go +++ b/pkg/detectors/assemblyai/assemblyai_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestAssemblyai_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestAssemblyai_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_AssemblyAI, + DetectorType: detector_typepb.DetectorType_AssemblyAI, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestAssemblyai_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_AssemblyAI, + DetectorType: detector_typepb.DetectorType_AssemblyAI, Verified: false, }, }, diff --git a/pkg/detectors/atera/atera.go b/pkg/detectors/atera/atera.go index d18650490b11..c2eb6a11c2c3 100644 --- a/pkg/detectors/atera/atera.go +++ b/pkg/detectors/atera/atera.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -42,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Atera, + DetectorType: detector_typepb.DetectorType_Atera, Raw: []byte(resMatch), } @@ -83,8 +83,8 @@ func verifyMatch(ctx context.Context, client *http.Client, token string) (bool, } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Atera +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Atera } func (s Scanner) Description() string { diff --git a/pkg/detectors/atera/atera_integration_test.go b/pkg/detectors/atera/atera_integration_test.go index ee90eafbc080..bf06cf5e8d54 100644 --- a/pkg/detectors/atera/atera_integration_test.go +++ b/pkg/detectors/atera/atera_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestAtera_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestAtera_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Atera, + DetectorType: detector_typepb.DetectorType_Atera, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestAtera_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Atera, + DetectorType: detector_typepb.DetectorType_Atera, Verified: false, }, }, diff --git a/pkg/detectors/atlassian/v1/atlassian.go b/pkg/detectors/atlassian/v1/atlassian.go index f7c2d612ff00..5fe5b180de6c 100644 --- a/pkg/detectors/atlassian/v1/atlassian.go +++ b/pkg/detectors/atlassian/v1/atlassian.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -60,7 +60,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for match := range uniqueMatches { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Atlassian, + DetectorType: detector_typepb.DetectorType_Atlassian, Raw: []byte(match), ExtraData: map[string]string{ "rotation_guide": "https://howtorotate.com/docs/tutorials/atlassian/", @@ -126,6 +126,6 @@ func verifyMatch(ctx context.Context, client *http.Client, token string) (bool, } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Atlassian +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Atlassian } diff --git a/pkg/detectors/atlassian/v1/atlassian_integration_test.go b/pkg/detectors/atlassian/v1/atlassian_integration_test.go index 4d5633928b7d..326c160061dd 100644 --- a/pkg/detectors/atlassian/v1/atlassian_integration_test.go +++ b/pkg/detectors/atlassian/v1/atlassian_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestAtlassian_FromChunk(t *testing.T) { @@ -50,7 +50,7 @@ func TestAtlassian_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Atlassian, + DetectorType: detector_typepb.DetectorType_Atlassian, Verified: true, }, }, @@ -67,7 +67,7 @@ func TestAtlassian_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Atlassian, + DetectorType: detector_typepb.DetectorType_Atlassian, Verified: false, }, }, @@ -96,7 +96,7 @@ func TestAtlassian_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Atlassian, + DetectorType: detector_typepb.DetectorType_Atlassian, Verified: false, }, }, @@ -113,7 +113,7 @@ func TestAtlassian_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Atlassian, + DetectorType: detector_typepb.DetectorType_Atlassian, Verified: false, }, }, diff --git a/pkg/detectors/atlassian/v2/atlassian.go b/pkg/detectors/atlassian/v2/atlassian.go index 0d9f32495131..7b7e546188cf 100644 --- a/pkg/detectors/atlassian/v2/atlassian.go +++ b/pkg/detectors/atlassian/v2/atlassian.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -76,7 +76,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for match := range uniqueMatches { for orgId := range uniqueOrgIdMatches { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Atlassian, + DetectorType: detector_typepb.DetectorType_Atlassian, Raw: []byte(match), ExtraData: map[string]string{ "rotation_guide": "https://howtorotate.com/docs/tutorials/atlassian/", @@ -145,6 +145,6 @@ func verifyMatch(ctx context.Context, client *http.Client, token string) (bool, } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Atlassian +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Atlassian } diff --git a/pkg/detectors/atlassian/v2/atlassian_integration_test.go b/pkg/detectors/atlassian/v2/atlassian_integration_test.go index efe0e0d9d034..0eee829f0e0d 100644 --- a/pkg/detectors/atlassian/v2/atlassian_integration_test.go +++ b/pkg/detectors/atlassian/v2/atlassian_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestAtlassian_FromChunk(t *testing.T) { @@ -50,7 +50,7 @@ func TestAtlassian_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Atlassian, + DetectorType: detector_typepb.DetectorType_Atlassian, Verified: true, }, }, @@ -67,7 +67,7 @@ func TestAtlassian_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Atlassian, + DetectorType: detector_typepb.DetectorType_Atlassian, Verified: false, }, }, @@ -96,7 +96,7 @@ func TestAtlassian_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Atlassian, + DetectorType: detector_typepb.DetectorType_Atlassian, Verified: false, }, }, @@ -113,7 +113,7 @@ func TestAtlassian_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Atlassian, + DetectorType: detector_typepb.DetectorType_Atlassian, Verified: false, }, }, diff --git a/pkg/detectors/audd/audd.go b/pkg/detectors/audd/audd.go index d60c9cc65c97..2b5e237131c1 100644 --- a/pkg/detectors/audd/audd.go +++ b/pkg/detectors/audd/audd.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -42,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Audd, + DetectorType: detector_typepb.DetectorType_Audd, Raw: []byte(resMatch), } @@ -75,8 +75,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Audd +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Audd } func (s Scanner) Description() string { diff --git a/pkg/detectors/audd/audd_integration_test.go b/pkg/detectors/audd/audd_integration_test.go index 4f1424150edf..fb48fda6c032 100644 --- a/pkg/detectors/audd/audd_integration_test.go +++ b/pkg/detectors/audd/audd_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestAudd_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestAudd_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Audd, + DetectorType: detector_typepb.DetectorType_Audd, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestAudd_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Audd, + DetectorType: detector_typepb.DetectorType_Audd, Verified: false, }, }, diff --git a/pkg/detectors/auth0managementapitoken/auth0managementapitoken.go b/pkg/detectors/auth0managementapitoken/auth0managementapitoken.go index bffa672e9349..8736632952b5 100644 --- a/pkg/detectors/auth0managementapitoken/auth0managementapitoken.go +++ b/pkg/detectors/auth0managementapitoken/auth0managementapitoken.go @@ -10,7 +10,7 @@ import ( regexp "github.com/wasilibs/go-re2" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -55,7 +55,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result domainRes := strings.TrimSpace(domainMatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Auth0ManagementApiToken, + DetectorType: detector_typepb.DetectorType_Auth0ManagementApiToken, Redacted: domainRes, Raw: []byte(managementAPITokenRes), RawV2: []byte(managementAPITokenRes + domainRes), @@ -102,8 +102,8 @@ func verifyMatch(ctx context.Context, client *http.Client, token, domain string) } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Auth0ManagementApiToken +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Auth0ManagementApiToken } func (s Scanner) Description() string { diff --git a/pkg/detectors/auth0managementapitoken/auth0managementapitoken_integration_test.go b/pkg/detectors/auth0managementapitoken/auth0managementapitoken_integration_test.go index dbbdf270886c..8c29dea91bbc 100644 --- a/pkg/detectors/auth0managementapitoken/auth0managementapitoken_integration_test.go +++ b/pkg/detectors/auth0managementapitoken/auth0managementapitoken_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestAuth0ManagementApiToken_FromChunk(t *testing.T) { @@ -51,7 +51,7 @@ func TestAuth0ManagementApiToken_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Auth0ManagementApiToken, + DetectorType: detector_typepb.DetectorType_Auth0ManagementApiToken, RawV2: []byte(managementApiToken + domain), Redacted: domain, Verified: true, @@ -69,7 +69,7 @@ func TestAuth0ManagementApiToken_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Auth0ManagementApiToken, + DetectorType: detector_typepb.DetectorType_Auth0ManagementApiToken, RawV2: []byte(inactiveManagementApiToken + domain), Redacted: domain, Verified: false, diff --git a/pkg/detectors/auth0oauth/auth0oauth.go b/pkg/detectors/auth0oauth/auth0oauth.go index 543fa060be8e..3bd6ee1fe0f1 100644 --- a/pkg/detectors/auth0oauth/auth0oauth.go +++ b/pkg/detectors/auth0oauth/auth0oauth.go @@ -11,7 +11,7 @@ import ( regexp "github.com/wasilibs/go-re2" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -56,7 +56,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for clientSecretRes := range uniqueSecrets { for domainRes := range uniqueDomainMatches { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Auth0oauth, + DetectorType: detector_typepb.DetectorType_Auth0oauth, Redacted: clientIdRes, Raw: []byte(clientSecretRes), RawV2: []byte(clientIdRes + clientSecretRes), @@ -139,8 +139,8 @@ func verifyTuple(ctx context.Context, client *http.Client, domainRes, clientId, } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Auth0oauth +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Auth0oauth } func (s Scanner) Description() string { diff --git a/pkg/detectors/auth0oauth/auth0oauth_integeration_test.go b/pkg/detectors/auth0oauth/auth0oauth_integeration_test.go index 2a678030136e..cad221012c1e 100644 --- a/pkg/detectors/auth0oauth/auth0oauth_integeration_test.go +++ b/pkg/detectors/auth0oauth/auth0oauth_integeration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestAuth0oauth_FromChunk(t *testing.T) { @@ -57,7 +57,7 @@ func TestAuth0oauth_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Auth0oauth, + DetectorType: detector_typepb.DetectorType_Auth0oauth, Redacted: clientId, Verified: true, }, @@ -74,7 +74,7 @@ func TestAuth0oauth_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Auth0oauth, + DetectorType: detector_typepb.DetectorType_Auth0oauth, Redacted: clientIdUnauthorized, Verified: true, }, @@ -91,7 +91,7 @@ func TestAuth0oauth_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Auth0oauth, + DetectorType: detector_typepb.DetectorType_Auth0oauth, Redacted: clientId, Verified: false, }, @@ -119,7 +119,7 @@ func TestAuth0oauth_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Auth0oauth, + DetectorType: detector_typepb.DetectorType_Auth0oauth, Redacted: clientId, Verified: false, }, diff --git a/pkg/detectors/autodesk/autodesk.go b/pkg/detectors/autodesk/autodesk.go index 43f391abf5f1..424ed457fc90 100644 --- a/pkg/detectors/autodesk/autodesk.go +++ b/pkg/detectors/autodesk/autodesk.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -47,7 +47,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resSecret := strings.TrimSpace(secretMatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Autodesk, + DetectorType: detector_typepb.DetectorType_Autodesk, Raw: []byte(resMatch), RawV2: []byte(resMatch + resSecret), } @@ -75,8 +75,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Autodesk +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Autodesk } func (s Scanner) Description() string { diff --git a/pkg/detectors/autodesk/autodesk_integration_test.go b/pkg/detectors/autodesk/autodesk_integration_test.go index d3d90c83c811..9cfe19845223 100644 --- a/pkg/detectors/autodesk/autodesk_integration_test.go +++ b/pkg/detectors/autodesk/autodesk_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestAutodesk_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestAutodesk_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Autodesk, + DetectorType: detector_typepb.DetectorType_Autodesk, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestAutodesk_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Autodesk, + DetectorType: detector_typepb.DetectorType_Autodesk, Verified: false, }, }, diff --git a/pkg/detectors/autoklose/autoklose.go b/pkg/detectors/autoklose/autoklose.go index e675257afacf..cee93d3451a6 100644 --- a/pkg/detectors/autoklose/autoklose.go +++ b/pkg/detectors/autoklose/autoklose.go @@ -12,7 +12,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -43,7 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Autoklose, + DetectorType: detector_typepb.DetectorType_Autoklose, Raw: []byte(resMatch), } @@ -100,8 +100,8 @@ func verifyMatch(ctx context.Context, client *http.Client, token string) (bool, } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Autoklose +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Autoklose } func (s Scanner) Description() string { diff --git a/pkg/detectors/autoklose/autoklose_integration_test.go b/pkg/detectors/autoklose/autoklose_integration_test.go index 9675d22cba0f..be36ab241c2a 100644 --- a/pkg/detectors/autoklose/autoklose_integration_test.go +++ b/pkg/detectors/autoklose/autoklose_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestAutoklose_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestAutoklose_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Autoklose, + DetectorType: detector_typepb.DetectorType_Autoklose, Verified: true, ExtraData: map[string]string{ "email": "mladen.stevanovic@vanillasoft.com", @@ -67,7 +67,7 @@ func TestAutoklose_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Autoklose, + DetectorType: detector_typepb.DetectorType_Autoklose, Verified: false, }, }, diff --git a/pkg/detectors/autopilot/autopilot.go b/pkg/detectors/autopilot/autopilot.go index 617a71a05d4b..24bc6103541f 100644 --- a/pkg/detectors/autopilot/autopilot.go +++ b/pkg/detectors/autopilot/autopilot.go @@ -2,13 +2,14 @@ package autopilot import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -39,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_AutoPilot, + DetectorType: detector_typepb.DetectorType_AutoPilot, Raw: []byte(resMatch), } @@ -64,8 +65,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_AutoPilot +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_AutoPilot } func (s Scanner) Description() string { diff --git a/pkg/detectors/autopilot/autopilot_integration_test.go b/pkg/detectors/autopilot/autopilot_integration_test.go index b15e26cd8e27..6bb922b1019b 100644 --- a/pkg/detectors/autopilot/autopilot_integration_test.go +++ b/pkg/detectors/autopilot/autopilot_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestAutoPilot_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestAutoPilot_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_AutoPilot, + DetectorType: detector_typepb.DetectorType_AutoPilot, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestAutoPilot_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_AutoPilot, + DetectorType: detector_typepb.DetectorType_AutoPilot, Verified: false, }, }, diff --git a/pkg/detectors/avazapersonalaccesstoken/avazapersonalaccesstoken.go b/pkg/detectors/avazapersonalaccesstoken/avazapersonalaccesstoken.go index d9fcbadf8e93..6d5eca0650e5 100644 --- a/pkg/detectors/avazapersonalaccesstoken/avazapersonalaccesstoken.go +++ b/pkg/detectors/avazapersonalaccesstoken/avazapersonalaccesstoken.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -43,7 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_AvazaPersonalAccessToken, + DetectorType: detector_typepb.DetectorType_AvazaPersonalAccessToken, Raw: []byte(resMatch), } @@ -85,8 +85,8 @@ func verifyMatch(ctx context.Context, client *http.Client, token string) (bool, } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_AvazaPersonalAccessToken +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_AvazaPersonalAccessToken } func (s Scanner) Description() string { diff --git a/pkg/detectors/avazapersonalaccesstoken/avazapersonalaccesstoken_integration_test.go b/pkg/detectors/avazapersonalaccesstoken/avazapersonalaccesstoken_integration_test.go index 80664332bfba..347b7159a4c0 100644 --- a/pkg/detectors/avazapersonalaccesstoken/avazapersonalaccesstoken_integration_test.go +++ b/pkg/detectors/avazapersonalaccesstoken/avazapersonalaccesstoken_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestAvazaPersonalAccessToken_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestAvazaPersonalAccessToken_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_AvazaPersonalAccessToken, + DetectorType: detector_typepb.DetectorType_AvazaPersonalAccessToken, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestAvazaPersonalAccessToken_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_AvazaPersonalAccessToken, + DetectorType: detector_typepb.DetectorType_AvazaPersonalAccessToken, Verified: false, }, }, diff --git a/pkg/detectors/aviationstack/aviationstack.go b/pkg/detectors/aviationstack/aviationstack.go index 8626e9ac17fe..e3da06004dea 100644 --- a/pkg/detectors/aviationstack/aviationstack.go +++ b/pkg/detectors/aviationstack/aviationstack.go @@ -12,7 +12,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -43,7 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_AviationStack, + DetectorType: detector_typepb.DetectorType_AviationStack, Raw: []byte(resMatch), } @@ -85,8 +85,8 @@ func verifyMatch(ctx context.Context, client *http.Client, token string) (bool, } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_AviationStack +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_AviationStack } func (s Scanner) Description() string { diff --git a/pkg/detectors/aviationstack/aviationstack_integration_test.go b/pkg/detectors/aviationstack/aviationstack_integration_test.go index b716fcd195e7..4ea46d2e62fb 100644 --- a/pkg/detectors/aviationstack/aviationstack_integration_test.go +++ b/pkg/detectors/aviationstack/aviationstack_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestAviationStack_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestAviationStack_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_AviationStack, + DetectorType: detector_typepb.DetectorType_AviationStack, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestAviationStack_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_AviationStack, + DetectorType: detector_typepb.DetectorType_AviationStack, Verified: false, }, }, diff --git a/pkg/detectors/aws/access_keys/accesskey.go b/pkg/detectors/aws/access_keys/accesskey.go index 7c8439f8b809..158f3aeee4a1 100644 --- a/pkg/detectors/aws/access_keys/accesskey.go +++ b/pkg/detectors/aws/access_keys/accesskey.go @@ -20,7 +20,7 @@ import ( logContext "github.com/trufflesecurity/trufflehog/v3/pkg/context" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors/aws" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type scanner struct { @@ -147,7 +147,7 @@ func (s scanner) FromData(ctx context.Context, verify bool, data []byte) (result } s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_AWS, + DetectorType: detector_typepb.DetectorType_AWS, Raw: []byte(idMatch), Redacted: idMatch, RawV2: []byte(idMatch + ":" + secretMatch), @@ -309,8 +309,8 @@ func (s scanner) CleanResults(results []detectors.Result) []detectors.Result { return aws.CleanResults(results) } -func (s scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_AWS +func (s scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_AWS } func (s scanner) Description() string { diff --git a/pkg/detectors/aws/access_keys/accesskey_integration_test.go b/pkg/detectors/aws/access_keys/accesskey_integration_test.go index ef01ddad9a6e..d9bf33b02d44 100644 --- a/pkg/detectors/aws/access_keys/accesskey_integration_test.go +++ b/pkg/detectors/aws/access_keys/accesskey_integration_test.go @@ -16,7 +16,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) const canaryAccessKeyID = "AKIASP2TPHJSQH3FJRUX" @@ -49,7 +49,7 @@ func TestAWS_FromChunk_InvalidValidReuseIDSequence(t *testing.T) { if assert.NoError(t, err) { want := []detectors.Result{ { - DetectorType: detectorspb.DetectorType_AWS, + DetectorType: detector_typepb.DetectorType_AWS, Verified: false, Redacted: "AKIAZAVB57H55F3T4BKH", ExtraData: map[string]string{ @@ -67,7 +67,7 @@ func TestAWS_FromChunk_InvalidValidReuseIDSequence(t *testing.T) { if assert.NoError(t, err) { want := []detectors.Result{ { - DetectorType: detectorspb.DetectorType_AWS, + DetectorType: detector_typepb.DetectorType_AWS, Verified: true, Redacted: "AKIAZAVB57H55F3T4BKH", ExtraData: map[string]string{ @@ -122,7 +122,7 @@ func TestAWS_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_AWS, + DetectorType: detector_typepb.DetectorType_AWS, Verified: true, Redacted: "AKIAZAVB57H55F3T4BKH", ExtraData: map[string]string{ @@ -146,7 +146,7 @@ func TestAWS_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_AWS, + DetectorType: detector_typepb.DetectorType_AWS, Verified: false, Redacted: "AKIAZAVB57H55F3T4BKH", ExtraData: map[string]string{ @@ -178,7 +178,7 @@ func TestAWS_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_AWS, + DetectorType: detector_typepb.DetectorType_AWS, Verified: false, Redacted: "AKIAZAVB57H55F3T4XYZ", ExtraData: map[string]string{ @@ -187,7 +187,7 @@ func TestAWS_FromChunk(t *testing.T) { }, }, { - DetectorType: detectorspb.DetectorType_AWS, + DetectorType: detector_typepb.DetectorType_AWS, Verified: true, Redacted: "AKIAZAVB57H55F3T4BKH", ExtraData: map[string]string{ @@ -222,7 +222,7 @@ func TestAWS_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_AWS, + DetectorType: detector_typepb.DetectorType_AWS, Verified: true, Redacted: "AKIAZAVB57H55F3T4BKH", ExtraData: map[string]string{ @@ -248,7 +248,7 @@ func TestAWS_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_AWS, + DetectorType: detector_typepb.DetectorType_AWS, Verified: false, Redacted: "AKIAZAVB57H55F3T4BKH", ExtraData: map[string]string{ @@ -285,7 +285,7 @@ func TestAWS_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_AWS, + DetectorType: detector_typepb.DetectorType_AWS, Verified: false, Redacted: "AKIAZAVB57H55F3T4BKH", ExtraData: map[string]string{ @@ -309,7 +309,7 @@ func TestAWS_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_AWS, + DetectorType: detector_typepb.DetectorType_AWS, Verified: false, Redacted: "AKIAZAVB57H55F3T4BKH", ExtraData: map[string]string{ @@ -331,7 +331,7 @@ func TestAWS_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_AWS, + DetectorType: detector_typepb.DetectorType_AWS, Verified: false, Redacted: canaryAccessKeyID, ExtraData: map[string]string{ @@ -355,7 +355,7 @@ func TestAWS_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_AWS, + DetectorType: detector_typepb.DetectorType_AWS, Verified: false, Redacted: canaryAccessKeyID, ExtraData: map[string]string{ @@ -379,7 +379,7 @@ func TestAWS_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_AWS, + DetectorType: detector_typepb.DetectorType_AWS, Verified: false, Redacted: "AKIAZAVB57H55F3T4BKH", ExtraData: map[string]string{ @@ -388,7 +388,7 @@ func TestAWS_FromChunk(t *testing.T) { }, }, { - DetectorType: detectorspb.DetectorType_AWS, + DetectorType: detector_typepb.DetectorType_AWS, Verified: true, Redacted: "AKIAZAVB57H55F3T4BKH", ExtraData: map[string]string{ diff --git a/pkg/detectors/aws/session_keys/sessionkey.go b/pkg/detectors/aws/session_keys/sessionkey.go index 7017478371b0..63f949545914 100644 --- a/pkg/detectors/aws/session_keys/sessionkey.go +++ b/pkg/detectors/aws/session_keys/sessionkey.go @@ -16,7 +16,7 @@ import ( logContext "github.com/trufflesecurity/trufflehog/v3/pkg/context" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors/aws" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type scanner struct { @@ -126,7 +126,7 @@ func (s scanner) FromData(ctx context.Context, verify bool, data []byte) (result } s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_AWSSessionKey, + DetectorType: detector_typepb.DetectorType_AWSSessionKey, Raw: []byte(idMatch), RawV2: []byte(fmt.Sprintf("%s:%s:%s", idMatch, secretMatch, sessionMatch)), Redacted: idMatch, @@ -339,8 +339,8 @@ func checkSessionToken(sessionToken string, secret string) bool { return true } -func (s scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_AWSSessionKey +func (s scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_AWSSessionKey } func (s scanner) Description() string { diff --git a/pkg/detectors/axonaut/axonaut.go b/pkg/detectors/axonaut/axonaut.go index 04a4549f419e..24dac7252c3a 100644 --- a/pkg/detectors/axonaut/axonaut.go +++ b/pkg/detectors/axonaut/axonaut.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -42,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Axonaut, + DetectorType: detector_typepb.DetectorType_Axonaut, Raw: []byte(resMatch), } @@ -83,8 +83,8 @@ func verifyMatch(ctx context.Context, client *http.Client, key string) (bool, er } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Axonaut +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Axonaut } func (s Scanner) Description() string { diff --git a/pkg/detectors/axonaut/axonaut_integration_test.go b/pkg/detectors/axonaut/axonaut_integration_test.go index 0d64cbc64e1e..1097843e8bd7 100644 --- a/pkg/detectors/axonaut/axonaut_integration_test.go +++ b/pkg/detectors/axonaut/axonaut_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestAxonaut_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestAxonaut_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Axonaut, + DetectorType: detector_typepb.DetectorType_Axonaut, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestAxonaut_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Axonaut, + DetectorType: detector_typepb.DetectorType_Axonaut, Verified: false, }, }, diff --git a/pkg/detectors/aylien/aylien.go b/pkg/detectors/aylien/aylien.go index 1006b7f597f6..d9294f745b03 100644 --- a/pkg/detectors/aylien/aylien.go +++ b/pkg/detectors/aylien/aylien.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -49,7 +49,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resIdMatch := strings.TrimSpace(idMatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Aylien, + DetectorType: detector_typepb.DetectorType_Aylien, Raw: []byte(resMatch), RawV2: []byte(resMatch + resIdMatch), } @@ -92,8 +92,8 @@ func verifyMatch(ctx context.Context, client *http.Client, id, key string) (bool } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Aylien +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Aylien } func (s Scanner) Description() string { diff --git a/pkg/detectors/aylien/aylien_integration_test.go b/pkg/detectors/aylien/aylien_integration_test.go index e1315f5f9b66..2fbc353cad2b 100644 --- a/pkg/detectors/aylien/aylien_integration_test.go +++ b/pkg/detectors/aylien/aylien_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestAylien_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestAylien_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Aylien, + DetectorType: detector_typepb.DetectorType_Aylien, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestAylien_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Aylien, + DetectorType: detector_typepb.DetectorType_Aylien, Verified: false, }, }, diff --git a/pkg/detectors/ayrshare/ayrshare.go b/pkg/detectors/ayrshare/ayrshare.go index 6ac4e3ae0d03..a18d6e02b777 100644 --- a/pkg/detectors/ayrshare/ayrshare.go +++ b/pkg/detectors/ayrshare/ayrshare.go @@ -12,7 +12,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -43,7 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Ayrshare, + DetectorType: detector_typepb.DetectorType_Ayrshare, Raw: []byte(resMatch), } @@ -105,8 +105,8 @@ func verifyMatch(ctx context.Context, client *http.Client, key string) (bool, ma return false, nil, fmt.Errorf("unexpected status code: %d", res.StatusCode) } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Ayrshare +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Ayrshare } func (s Scanner) Description() string { diff --git a/pkg/detectors/ayrshare/ayrshare_integration_test.go b/pkg/detectors/ayrshare/ayrshare_integration_test.go index da11fac95ea7..d6ee0f355b84 100644 --- a/pkg/detectors/ayrshare/ayrshare_integration_test.go +++ b/pkg/detectors/ayrshare/ayrshare_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestAyrshare_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestAyrshare_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Ayrshare, + DetectorType: detector_typepb.DetectorType_Ayrshare, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestAyrshare_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Ayrshare, + DetectorType: detector_typepb.DetectorType_Ayrshare, Verified: false, }, }, diff --git a/pkg/detectors/azure_batch/azurebatch.go b/pkg/detectors/azure_batch/azurebatch.go index ad2110da281e..a88bd4fefca5 100644 --- a/pkg/detectors/azure_batch/azurebatch.go +++ b/pkg/detectors/azure_batch/azurebatch.go @@ -13,7 +13,7 @@ import ( regexp "github.com/wasilibs/go-re2" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -54,7 +54,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result accountKey := secretMatch[0] s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_AzureBatch, + DetectorType: detector_typepb.DetectorType_AzureBatch, Raw: []byte(endpoint), RawV2: []byte(endpoint + accountKey), Redacted: endpoint, @@ -129,8 +129,8 @@ func (s Scanner) IsFalsePositive(_ detectors.Result) (bool, string) { return false, "" } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_AzureBatch +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_AzureBatch } func (s Scanner) Description() string { diff --git a/pkg/detectors/azure_batch/azurebatch_integration_test.go b/pkg/detectors/azure_batch/azurebatch_integration_test.go index 6af005311d70..7c068d8bf4ba 100644 --- a/pkg/detectors/azure_batch/azurebatch_integration_test.go +++ b/pkg/detectors/azure_batch/azurebatch_integration_test.go @@ -15,7 +15,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestAzurebatch_FromChunk(t *testing.T) { @@ -52,7 +52,7 @@ func TestAzurebatch_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_AzureBatch, + DetectorType: detector_typepb.DetectorType_AzureBatch, Verified: true, }, }, @@ -69,7 +69,7 @@ func TestAzurebatch_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_AzureBatch, + DetectorType: detector_typepb.DetectorType_AzureBatch, Verified: false, }, }, diff --git a/pkg/detectors/azure_cosmosdb/azure_cosmosdb.go b/pkg/detectors/azure_cosmosdb/azure_cosmosdb.go index 906a86119e96..707aba5418c4 100644 --- a/pkg/detectors/azure_cosmosdb/azure_cosmosdb.go +++ b/pkg/detectors/azure_cosmosdb/azure_cosmosdb.go @@ -17,7 +17,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/cache/simple" "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -47,8 +47,8 @@ func (s Scanner) getClient() *http.Client { // Ensure the Scanner satisfies the interface at compile time. var _ detectors.Detector = (*Scanner)(nil) -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_AzureCosmosDBKeyIdentifiable +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_AzureCosmosDBKeyIdentifiable } func (s Scanner) Description() string { @@ -80,7 +80,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_AzureCosmosDBKeyIdentifiable, + DetectorType: detector_typepb.DetectorType_AzureCosmosDBKeyIdentifiable, Raw: []byte(key), RawV2: []byte("key: " + key + " account_url: " + accountUrl), // key: account_url: ExtraData: map[string]string{}, diff --git a/pkg/detectors/azure_cosmosdb/azure_cosmosdb_integration_test.go b/pkg/detectors/azure_cosmosdb/azure_cosmosdb_integration_test.go index 0929cc40b1c5..c282bea29fbc 100644 --- a/pkg/detectors/azure_cosmosdb/azure_cosmosdb_integration_test.go +++ b/pkg/detectors/azure_cosmosdb/azure_cosmosdb_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestCosmosDB_FromChunk(t *testing.T) { @@ -52,7 +52,7 @@ func TestCosmosDB_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_AzureCosmosDBKeyIdentifiable, + DetectorType: detector_typepb.DetectorType_AzureCosmosDBKeyIdentifiable, Verified: true, }, }, @@ -69,7 +69,7 @@ func TestCosmosDB_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_AzureCosmosDBKeyIdentifiable, + DetectorType: detector_typepb.DetectorType_AzureCosmosDBKeyIdentifiable, Verified: false, }, }, diff --git a/pkg/detectors/azure_entra/refreshtoken/refreshtoken.go b/pkg/detectors/azure_entra/refreshtoken/refreshtoken.go index 719bc3febd3b..dbd83f289a1d 100644 --- a/pkg/detectors/azure_entra/refreshtoken/refreshtoken.go +++ b/pkg/detectors/azure_entra/refreshtoken/refreshtoken.go @@ -18,7 +18,7 @@ import ( logContext "github.com/trufflesecurity/trufflehog/v3/pkg/context" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors/azure_entra" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -45,8 +45,8 @@ func (s Scanner) Keywords() []string { return []string{"0.A", "1.A"} } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_AzureRefreshToken +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_AzureRefreshToken } func (s Scanner) Description() string { @@ -299,7 +299,7 @@ func findTokenMatches(data string) map[string]struct{} { func createResult(refreshToken, clientId, tenantId string, verified bool, extraData map[string]string, err error) *detectors.Result { r := &detectors.Result{ - DetectorType: detectorspb.DetectorType_AzureRefreshToken, + DetectorType: detector_typepb.DetectorType_AzureRefreshToken, Raw: []byte(refreshToken), ExtraData: extraData, Verified: verified, diff --git a/pkg/detectors/azure_entra/refreshtoken/refreshtoken_integration_test.go b/pkg/detectors/azure_entra/refreshtoken/refreshtoken_integration_test.go index 066ef312b0be..605d151fd634 100644 --- a/pkg/detectors/azure_entra/refreshtoken/refreshtoken_integration_test.go +++ b/pkg/detectors/azure_entra/refreshtoken/refreshtoken_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestRefreshToken_FromChunk(t *testing.T) { @@ -50,7 +50,7 @@ func TestRefreshToken_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_AzureRefreshToken, + DetectorType: detector_typepb.DetectorType_AzureRefreshToken, Verified: true, }, }, @@ -67,7 +67,7 @@ func TestRefreshToken_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_AzureRefreshToken, + DetectorType: detector_typepb.DetectorType_AzureRefreshToken, Verified: false, }, }, @@ -96,7 +96,7 @@ func TestRefreshToken_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_AzureRefreshToken, + DetectorType: detector_typepb.DetectorType_AzureRefreshToken, Verified: false, }, }, @@ -113,7 +113,7 @@ func TestRefreshToken_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_AzureRefreshToken, + DetectorType: detector_typepb.DetectorType_AzureRefreshToken, Verified: false, }, }, diff --git a/pkg/detectors/azure_entra/serviceprincipal/v1/spv1.go b/pkg/detectors/azure_entra/serviceprincipal/v1/spv1.go index 8cced3f236a3..585d7013a913 100644 --- a/pkg/detectors/azure_entra/serviceprincipal/v1/spv1.go +++ b/pkg/detectors/azure_entra/serviceprincipal/v1/spv1.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors/azure_entra" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors/azure_entra/serviceprincipal" v2 "github.com/trufflesecurity/trufflehog/v3/pkg/detectors/azure_entra/serviceprincipal/v2" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -68,8 +68,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Azure +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Azure } func (s Scanner) Description() string { diff --git a/pkg/detectors/azure_entra/serviceprincipal/v1/spv1_integration_test.go b/pkg/detectors/azure_entra/serviceprincipal/v1/spv1_integration_test.go index f329edda3a78..7fb61a66b918 100644 --- a/pkg/detectors/azure_entra/serviceprincipal/v1/spv1_integration_test.go +++ b/pkg/detectors/azure_entra/serviceprincipal/v1/spv1_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestAzure_FromChunk(t *testing.T) { @@ -55,7 +55,7 @@ func TestAzure_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Azure, + DetectorType: detector_typepb.DetectorType_Azure, Redacted: id, Verified: true, }, @@ -76,7 +76,7 @@ func TestAzure_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Azure, + DetectorType: detector_typepb.DetectorType_Azure, Redacted: id, Verified: false, }, diff --git a/pkg/detectors/azure_entra/serviceprincipal/v2/spv2.go b/pkg/detectors/azure_entra/serviceprincipal/v2/spv2.go index 3b09b0fca0f4..1d317026d491 100644 --- a/pkg/detectors/azure_entra/serviceprincipal/v2/spv2.go +++ b/pkg/detectors/azure_entra/serviceprincipal/v2/spv2.go @@ -12,7 +12,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors/azure_entra" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors/azure_entra/serviceprincipal" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -42,8 +42,8 @@ func (s Scanner) Keywords() []string { return []string{"q~"} } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Azure +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Azure } func (s Scanner) Description() string { @@ -155,7 +155,7 @@ SecretLoop: func createResult(tenantId string, clientId string, clientSecret string, verified bool, extraData map[string]string, err error) *detectors.Result { r := &detectors.Result{ - DetectorType: detectorspb.DetectorType_Azure, + DetectorType: detector_typepb.DetectorType_Azure, Raw: []byte(clientSecret), ExtraData: extraData, Verified: verified, diff --git a/pkg/detectors/azure_entra/serviceprincipal/v2/spv2_integration_test.go b/pkg/detectors/azure_entra/serviceprincipal/v2/spv2_integration_test.go index 704f4ee5ac2e..49031de0ce8e 100644 --- a/pkg/detectors/azure_entra/serviceprincipal/v2/spv2_integration_test.go +++ b/pkg/detectors/azure_entra/serviceprincipal/v2/spv2_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestAzure_FromChunk(t *testing.T) { @@ -55,7 +55,7 @@ func TestAzure_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Azure, + DetectorType: detector_typepb.DetectorType_Azure, Redacted: id, Verified: true, }, @@ -76,7 +76,7 @@ func TestAzure_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Azure, + DetectorType: detector_typepb.DetectorType_Azure, Redacted: id, Verified: false, }, diff --git a/pkg/detectors/azure_openai/azure_openai.go b/pkg/detectors/azure_openai/azure_openai.go index cb8f78224e5b..8d06d1519b8c 100644 --- a/pkg/detectors/azure_openai/azure_openai.go +++ b/pkg/detectors/azure_openai/azure_openai.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/cache/simple" logContext "github.com/trufflesecurity/trufflehog/v3/pkg/context" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" "github.com/trufflesecurity/trufflehog/v3/pkg/common" ) @@ -42,8 +42,8 @@ func (s Scanner) Keywords() []string { return []string{".openai.azure.com"} } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_AzureOpenAI +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_AzureOpenAI } func (s Scanner) Description() string { diff --git a/pkg/detectors/azure_openai/azure_openai_integration_test.go b/pkg/detectors/azure_openai/azure_openai_integration_test.go index 8e0aa7fd56b9..27f99a6590f9 100644 --- a/pkg/detectors/azure_openai/azure_openai_integration_test.go +++ b/pkg/detectors/azure_openai/azure_openai_integration_test.go @@ -6,13 +6,14 @@ package azure_openai import ( "context" "fmt" + "testing" + "time" + "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" - "testing" - "time" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestAzureOpenAI_FromChunk(t *testing.T) { @@ -48,7 +49,7 @@ func TestAzureOpenAI_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_AzureOpenAI, + DetectorType: detector_typepb.DetectorType_AzureOpenAI, Verified: true, }, }, @@ -65,7 +66,7 @@ func TestAzureOpenAI_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_AzureOpenAI, + DetectorType: detector_typepb.DetectorType_AzureOpenAI, Verified: false, }, }, @@ -94,7 +95,7 @@ func TestAzureOpenAI_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_AzureOpenAI, + DetectorType: detector_typepb.DetectorType_AzureOpenAI, Verified: false, }, }, @@ -111,7 +112,7 @@ func TestAzureOpenAI_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_AzureOpenAI, + DetectorType: detector_typepb.DetectorType_AzureOpenAI, Verified: false, }, }, diff --git a/pkg/detectors/azure_storage/storage.go b/pkg/detectors/azure_storage/storage.go index c48496a81610..9c1deb03f60f 100644 --- a/pkg/detectors/azure_storage/storage.go +++ b/pkg/detectors/azure_storage/storage.go @@ -15,7 +15,7 @@ import ( regexp "github.com/wasilibs/go-re2" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -50,8 +50,8 @@ func (s Scanner) Keywords() []string { } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_AzureStorage +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_AzureStorage } func (s Scanner) Description() string { diff --git a/pkg/detectors/azure_storage/storage_integration_test.go b/pkg/detectors/azure_storage/storage_integration_test.go index 85c742b84da0..d0261d4c4708 100644 --- a/pkg/detectors/azure_storage/storage_integration_test.go +++ b/pkg/detectors/azure_storage/storage_integration_test.go @@ -17,7 +17,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestAzurestorage_FromChunk(t *testing.T) { @@ -56,7 +56,7 @@ func TestAzurestorage_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_AzureStorage, + DetectorType: detector_typepb.DetectorType_AzureStorage, Verified: true, ExtraData: map[string]string{ "account_name": "teststoragebytruffle", @@ -75,7 +75,7 @@ func TestAzurestorage_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_AzureStorage, + DetectorType: detector_typepb.DetectorType_AzureStorage, Verified: false, ExtraData: map[string]string{ "account_name": "teststoragebytruffle", @@ -105,7 +105,7 @@ func TestAzurestorage_FromChunk(t *testing.T) { }, want: func() []detectors.Result { r := detectors.Result{ - DetectorType: detectorspb.DetectorType_AzureStorage, + DetectorType: detector_typepb.DetectorType_AzureStorage, Verified: false, ExtraData: map[string]string{ "account_name": "teststoragebytruffle", @@ -126,7 +126,7 @@ func TestAzurestorage_FromChunk(t *testing.T) { }, want: func() []detectors.Result { r := detectors.Result{ - DetectorType: detectorspb.DetectorType_AzureStorage, + DetectorType: detector_typepb.DetectorType_AzureStorage, Verified: false, ExtraData: map[string]string{ "account_name": "teststoragebytruffle", @@ -147,7 +147,7 @@ func TestAzurestorage_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_AzureStorage, + DetectorType: detector_typepb.DetectorType_AzureStorage, Verified: false, ExtraData: map[string]string{ "account_name": "invalid", diff --git a/pkg/detectors/azureapimanagement/repositorykey/repositorykey.go b/pkg/detectors/azureapimanagement/repositorykey/repositorykey.go index 9a2241c80411..accfa759574e 100644 --- a/pkg/detectors/azureapimanagement/repositorykey/repositorykey.go +++ b/pkg/detectors/azureapimanagement/repositorykey/repositorykey.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/cache/simple" logContext "github.com/trufflesecurity/trufflehog/v3/pkg/context" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -64,7 +64,7 @@ EndpointLoop: for urlMatch := range uniqueUrlsMatches { for passwordMatch := range uniquePasswordMatches { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_AzureApiManagementRepositoryKey, + DetectorType: detector_typepb.DetectorType_AzureApiManagementRepositoryKey, Raw: []byte(passwordMatch), RawV2: []byte(urlMatch + passwordMatch), } @@ -92,8 +92,8 @@ EndpointLoop: return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_AzureApiManagementRepositoryKey +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_AzureApiManagementRepositoryKey } func (s Scanner) Description() string { diff --git a/pkg/detectors/azureapimanagement/repositorykey/repositorykey_integration_test.go b/pkg/detectors/azureapimanagement/repositorykey/repositorykey_integration_test.go index 07feb120b5bc..49f2830b285b 100644 --- a/pkg/detectors/azureapimanagement/repositorykey/repositorykey_integration_test.go +++ b/pkg/detectors/azureapimanagement/repositorykey/repositorykey_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestAxonaut_FromChunk(t *testing.T) { @@ -51,7 +51,7 @@ func TestAxonaut_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_AzureApiManagementRepositoryKey, + DetectorType: detector_typepb.DetectorType_AzureApiManagementRepositoryKey, Verified: true, }, }, @@ -67,7 +67,7 @@ func TestAxonaut_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_AzureApiManagementRepositoryKey, + DetectorType: detector_typepb.DetectorType_AzureApiManagementRepositoryKey, Verified: false, }, }, diff --git a/pkg/detectors/azureapimanagementsubscriptionkey/azureapimanagementsubscriptionkey.go b/pkg/detectors/azureapimanagementsubscriptionkey/azureapimanagementsubscriptionkey.go index 6fea8fc49e3d..15a0c9ce2321 100644 --- a/pkg/detectors/azureapimanagementsubscriptionkey/azureapimanagementsubscriptionkey.go +++ b/pkg/detectors/azureapimanagementsubscriptionkey/azureapimanagementsubscriptionkey.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" logContext "github.com/trufflesecurity/trufflehog/v3/pkg/context" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -58,7 +58,7 @@ EndpointLoop: for baseUrl := range urlMatchesUnique { for key := range keyMatchesUnique { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_AzureAPIManagementSubscriptionKey, + DetectorType: detector_typepb.DetectorType_AzureAPIManagementSubscriptionKey, Raw: []byte(baseUrl), RawV2: []byte(baseUrl + ":" + key), } @@ -92,8 +92,8 @@ EndpointLoop: return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_AzureAPIManagementSubscriptionKey +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_AzureAPIManagementSubscriptionKey } func (s Scanner) Description() string { diff --git a/pkg/detectors/azureapimanagementsubscriptionkey/azureapimanagementsubscriptionkey_integration_test.go b/pkg/detectors/azureapimanagementsubscriptionkey/azureapimanagementsubscriptionkey_integration_test.go index db2b19807f95..ecafcbfc44d4 100644 --- a/pkg/detectors/azureapimanagementsubscriptionkey/azureapimanagementsubscriptionkey_integration_test.go +++ b/pkg/detectors/azureapimanagementsubscriptionkey/azureapimanagementsubscriptionkey_integration_test.go @@ -15,7 +15,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestAzureAPIManagementSubscriptionKey_FromChunk(t *testing.T) { @@ -52,7 +52,7 @@ func TestAzureAPIManagementSubscriptionKey_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_AzureAPIManagementSubscriptionKey, + DetectorType: detector_typepb.DetectorType_AzureAPIManagementSubscriptionKey, Verified: true, }, }, @@ -69,7 +69,7 @@ func TestAzureAPIManagementSubscriptionKey_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_AzureAPIManagementSubscriptionKey, + DetectorType: detector_typepb.DetectorType_AzureAPIManagementSubscriptionKey, Verified: false, }, }, diff --git a/pkg/detectors/azureappconfigconnectionstring/azureappconfigconnectionstring.go b/pkg/detectors/azureappconfigconnectionstring/azureappconfigconnectionstring.go index a218ba694937..e32254aa7932 100644 --- a/pkg/detectors/azureappconfigconnectionstring/azureappconfigconnectionstring.go +++ b/pkg/detectors/azureappconfigconnectionstring/azureappconfigconnectionstring.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -50,7 +50,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result id := connectionInfo[2] // Id secret := connectionInfo[3] // Secret s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_AzureAppConfigConnectionString, + DetectorType: detector_typepb.DetectorType_AzureAppConfigConnectionString, Raw: []byte(id), RawV2: []byte(connectionString), } @@ -75,8 +75,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_AzureAppConfigConnectionString +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_AzureAppConfigConnectionString } func (s Scanner) Description() string { diff --git a/pkg/detectors/azureappconfigconnectionstring/azureappconfigconnectionstring_integration_test.go b/pkg/detectors/azureappconfigconnectionstring/azureappconfigconnectionstring_integration_test.go index 7967185254a1..67afb6371df2 100644 --- a/pkg/detectors/azureappconfigconnectionstring/azureappconfigconnectionstring_integration_test.go +++ b/pkg/detectors/azureappconfigconnectionstring/azureappconfigconnectionstring_integration_test.go @@ -15,7 +15,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestAzureAppConfigConnectionString_FromChunk(t *testing.T) { @@ -51,7 +51,7 @@ func TestAzureAppConfigConnectionString_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_AzureAppConfigConnectionString, + DetectorType: detector_typepb.DetectorType_AzureAppConfigConnectionString, Verified: true, }, }, @@ -68,7 +68,7 @@ func TestAzureAppConfigConnectionString_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_AzureAppConfigConnectionString, + DetectorType: detector_typepb.DetectorType_AzureAppConfigConnectionString, Verified: false, }, }, diff --git a/pkg/detectors/azurecontainerregistry/azurecontainerregistry.go b/pkg/detectors/azurecontainerregistry/azurecontainerregistry.go index 74bd6151216b..f5a61de4b3ab 100644 --- a/pkg/detectors/azurecontainerregistry/azurecontainerregistry.go +++ b/pkg/detectors/azurecontainerregistry/azurecontainerregistry.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" logContext "github.com/trufflesecurity/trufflehog/v3/pkg/context" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -41,8 +41,8 @@ func (s Scanner) Keywords() []string { return []string{".azurecr.io"} } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_AzureContainerRegistry +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_AzureContainerRegistry } func (s Scanner) Description() string { @@ -77,7 +77,7 @@ EndpointLoop: for username := range registryMatches { for password := range passwordMatches { r := detectors.Result{ - DetectorType: detectorspb.DetectorType_AzureContainerRegistry, + DetectorType: detector_typepb.DetectorType_AzureContainerRegistry, Raw: []byte(password), RawV2: []byte(`{"username":"` + username + `","password":"` + password + `"}`), Redacted: username, diff --git a/pkg/detectors/azurecontainerregistry/azurecontainerregistry_integration_test.go b/pkg/detectors/azurecontainerregistry/azurecontainerregistry_integration_test.go index 8ed032f97796..70adf42025fe 100644 --- a/pkg/detectors/azurecontainerregistry/azurecontainerregistry_integration_test.go +++ b/pkg/detectors/azurecontainerregistry/azurecontainerregistry_integration_test.go @@ -15,7 +15,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestAzureContainerRegistry_FromChunk(t *testing.T) { @@ -52,7 +52,7 @@ func TestAzureContainerRegistry_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_AzureContainerRegistry, + DetectorType: detector_typepb.DetectorType_AzureContainerRegistry, Verified: true, }, }, @@ -69,7 +69,7 @@ func TestAzureContainerRegistry_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_AzureContainerRegistry, + DetectorType: detector_typepb.DetectorType_AzureContainerRegistry, Verified: false, }, }, diff --git a/pkg/detectors/azuredevopspersonalaccesstoken/azuredevopspersonalaccesstoken.go b/pkg/detectors/azuredevopspersonalaccesstoken/azuredevopspersonalaccesstoken.go index d6acb03cc36f..276b3beb3772 100644 --- a/pkg/detectors/azuredevopspersonalaccesstoken/azuredevopspersonalaccesstoken.go +++ b/pkg/detectors/azuredevopspersonalaccesstoken/azuredevopspersonalaccesstoken.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -47,7 +47,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resOrgMatch := strings.TrimSpace(orgMatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_AzureDevopsPersonalAccessToken, + DetectorType: detector_typepb.DetectorType_AzureDevopsPersonalAccessToken, Raw: []byte(resMatch), RawV2: []byte(resMatch + resOrgMatch), } @@ -86,8 +86,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_AzureDevopsPersonalAccessToken +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_AzureDevopsPersonalAccessToken } func (s Scanner) Description() string { diff --git a/pkg/detectors/azuredevopspersonalaccesstoken/azuredevopspersonalaccesstoken_integration_test.go b/pkg/detectors/azuredevopspersonalaccesstoken/azuredevopspersonalaccesstoken_integration_test.go index 2b7c68f3fd67..0d2f4fb21dc7 100644 --- a/pkg/detectors/azuredevopspersonalaccesstoken/azuredevopspersonalaccesstoken_integration_test.go +++ b/pkg/detectors/azuredevopspersonalaccesstoken/azuredevopspersonalaccesstoken_integration_test.go @@ -15,7 +15,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestAzureDevopsPersonalAccessToken_FromChunk(t *testing.T) { @@ -52,7 +52,7 @@ func TestAzureDevopsPersonalAccessToken_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_AzureDevopsPersonalAccessToken, + DetectorType: detector_typepb.DetectorType_AzureDevopsPersonalAccessToken, Verified: true, RawV2: []byte(secret + org), }, @@ -70,7 +70,7 @@ func TestAzureDevopsPersonalAccessToken_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_AzureDevopsPersonalAccessToken, + DetectorType: detector_typepb.DetectorType_AzureDevopsPersonalAccessToken, Verified: false, RawV2: []byte(inactiveSecret + org), }, @@ -100,7 +100,7 @@ func TestAzureDevopsPersonalAccessToken_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_AzureDevopsPersonalAccessToken, + DetectorType: detector_typepb.DetectorType_AzureDevopsPersonalAccessToken, Verified: false, RawV2: []byte(secret + org), }, @@ -118,7 +118,7 @@ func TestAzureDevopsPersonalAccessToken_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_AzureDevopsPersonalAccessToken, + DetectorType: detector_typepb.DetectorType_AzureDevopsPersonalAccessToken, Verified: false, RawV2: []byte(secret + org), }, diff --git a/pkg/detectors/azuredirectmanagementkey/azuredirectmanagementkey.go b/pkg/detectors/azuredirectmanagementkey/azuredirectmanagementkey.go index e7feda4289ca..551a17a16144 100644 --- a/pkg/detectors/azuredirectmanagementkey/azuredirectmanagementkey.go +++ b/pkg/detectors/azuredirectmanagementkey/azuredirectmanagementkey.go @@ -17,7 +17,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" logContext "github.com/trufflesecurity/trufflehog/v3/pkg/context" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) const RFC3339WithoutMicroseconds = "2006-01-02T15:04:05" @@ -64,7 +64,7 @@ EndpointLoop: for baseUrl, serviceName := range urlMatchesUnique { for key := range keyMatchesUnique { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_AzureDirectManagementKey, + DetectorType: detector_typepb.DetectorType_AzureDirectManagementKey, Raw: []byte(baseUrl), RawV2: []byte(baseUrl + ":" + key), } @@ -98,8 +98,8 @@ EndpointLoop: return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_AzureDirectManagementKey +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_AzureDirectManagementKey } func (s Scanner) Description() string { diff --git a/pkg/detectors/azuredirectmanagementkey/azuredirectmanagementkey_integration_test.go b/pkg/detectors/azuredirectmanagementkey/azuredirectmanagementkey_integration_test.go index 06afd70bbc65..c6f967ec84df 100644 --- a/pkg/detectors/azuredirectmanagementkey/azuredirectmanagementkey_integration_test.go +++ b/pkg/detectors/azuredirectmanagementkey/azuredirectmanagementkey_integration_test.go @@ -15,7 +15,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestAzureDirectManagementAPIKey_FromChunk(t *testing.T) { @@ -52,7 +52,7 @@ func TestAzureDirectManagementAPIKey_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_AzureDirectManagementKey, + DetectorType: detector_typepb.DetectorType_AzureDirectManagementKey, Verified: true, }, }, @@ -69,7 +69,7 @@ func TestAzureDirectManagementAPIKey_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_AzureDirectManagementKey, + DetectorType: detector_typepb.DetectorType_AzureDirectManagementKey, Verified: false, }, }, diff --git a/pkg/detectors/azurefunctionkey/azurefunctionkey.go b/pkg/detectors/azurefunctionkey/azurefunctionkey.go index 99bf43d4ec14..f13e01787557 100644 --- a/pkg/detectors/azurefunctionkey/azurefunctionkey.go +++ b/pkg/detectors/azurefunctionkey/azurefunctionkey.go @@ -9,7 +9,7 @@ import ( regexp "github.com/wasilibs/go-re2" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -44,7 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for _, urlMatch := range urlMatches { resUrl := strings.TrimSpace(urlMatch[0]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_AzureFunctionKey, + DetectorType: detector_typepb.DetectorType_AzureFunctionKey, Raw: []byte(resMatch), RawV2: []byte(resMatch + resUrl), } @@ -81,8 +81,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_AzureFunctionKey +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_AzureFunctionKey } func (s Scanner) Description() string { diff --git a/pkg/detectors/azurefunctionkey/azurefunctionkey_integration_test.go b/pkg/detectors/azurefunctionkey/azurefunctionkey_integration_test.go index 2d9881ed72fa..2fb49ccc7e64 100644 --- a/pkg/detectors/azurefunctionkey/azurefunctionkey_integration_test.go +++ b/pkg/detectors/azurefunctionkey/azurefunctionkey_integration_test.go @@ -15,7 +15,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestAzureFunctionKey_FromChunk(t *testing.T) { @@ -52,7 +52,7 @@ func TestAzureFunctionKey_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_AzureFunctionKey, + DetectorType: detector_typepb.DetectorType_AzureFunctionKey, Verified: true, RawV2: []byte(secret + url), }, @@ -70,7 +70,7 @@ func TestAzureFunctionKey_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_AzureFunctionKey, + DetectorType: detector_typepb.DetectorType_AzureFunctionKey, Verified: false, RawV2: []byte(inactiveSecret + url), }, @@ -100,7 +100,7 @@ func TestAzureFunctionKey_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_AzureFunctionKey, + DetectorType: detector_typepb.DetectorType_AzureFunctionKey, Verified: false, RawV2: []byte(secret + url), }, @@ -118,7 +118,7 @@ func TestAzureFunctionKey_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_AzureFunctionKey, + DetectorType: detector_typepb.DetectorType_AzureFunctionKey, Verified: false, RawV2: []byte(secret + url), }, diff --git a/pkg/detectors/azuresastoken/azuresastoken.go b/pkg/detectors/azuresastoken/azuresastoken.go index d13b6b136286..493e03fcd6fc 100644 --- a/pkg/detectors/azuresastoken/azuresastoken.go +++ b/pkg/detectors/azuresastoken/azuresastoken.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" logContext "github.com/trufflesecurity/trufflehog/v3/pkg/context" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -47,8 +47,8 @@ func (s Scanner) Keywords() []string { } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_AzureSasToken +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_AzureSasToken } func (s Scanner) Description() string { @@ -77,7 +77,7 @@ UrlLoop: for url, storageAccount := range urlMatchesUnique { for key := range keyMatchesUnique { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_AzureSasToken, + DetectorType: detector_typepb.DetectorType_AzureSasToken, Raw: []byte(url), RawV2: []byte(url + key), } diff --git a/pkg/detectors/azuresastoken/azuresastoken_integration_test.go b/pkg/detectors/azuresastoken/azuresastoken_integration_test.go index 39883c9af19d..cd40923fb243 100644 --- a/pkg/detectors/azuresastoken/azuresastoken_integration_test.go +++ b/pkg/detectors/azuresastoken/azuresastoken_integration_test.go @@ -15,7 +15,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestAzureSasToken_FromChunk(t *testing.T) { @@ -52,7 +52,7 @@ func TestAzureSasToken_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_AzureSasToken, + DetectorType: detector_typepb.DetectorType_AzureSasToken, Verified: true, }, }, @@ -69,7 +69,7 @@ func TestAzureSasToken_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_AzureSasToken, + DetectorType: detector_typepb.DetectorType_AzureSasToken, Verified: false, }, }, diff --git a/pkg/detectors/azuresearchadminkey/azuresearchadminkey.go b/pkg/detectors/azuresearchadminkey/azuresearchadminkey.go index b62778051072..7c44cdda3673 100644 --- a/pkg/detectors/azuresearchadminkey/azuresearchadminkey.go +++ b/pkg/detectors/azuresearchadminkey/azuresearchadminkey.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -47,7 +47,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resServiceMatch := strings.TrimSpace(serviceMatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_AzureSearchAdminKey, + DetectorType: detector_typepb.DetectorType_AzureSearchAdminKey, Raw: []byte(resMatch), RawV2: []byte(resMatch + resServiceMatch), } @@ -86,8 +86,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_AzureSearchAdminKey +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_AzureSearchAdminKey } func (s Scanner) Description() string { diff --git a/pkg/detectors/azuresearchadminkey/azuresearchadminkey_integration_test.go b/pkg/detectors/azuresearchadminkey/azuresearchadminkey_integration_test.go index c59e16ceede9..38a2c41ead1c 100644 --- a/pkg/detectors/azuresearchadminkey/azuresearchadminkey_integration_test.go +++ b/pkg/detectors/azuresearchadminkey/azuresearchadminkey_integration_test.go @@ -15,7 +15,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestAzureSearchAdminKey_FromChunk(t *testing.T) { @@ -52,7 +52,7 @@ func TestAzureSearchAdminKey_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_AzureSearchAdminKey, + DetectorType: detector_typepb.DetectorType_AzureSearchAdminKey, Verified: true, RawV2: []byte(secret + service), }, @@ -70,7 +70,7 @@ func TestAzureSearchAdminKey_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_AzureSearchAdminKey, + DetectorType: detector_typepb.DetectorType_AzureSearchAdminKey, Verified: false, RawV2: []byte(inactiveSecret + service), }, @@ -100,7 +100,7 @@ func TestAzureSearchAdminKey_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_AzureSearchAdminKey, + DetectorType: detector_typepb.DetectorType_AzureSearchAdminKey, Verified: false, RawV2: []byte(secret + service), }, @@ -118,7 +118,7 @@ func TestAzureSearchAdminKey_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_AzureSearchAdminKey, + DetectorType: detector_typepb.DetectorType_AzureSearchAdminKey, Verified: false, RawV2: []byte(secret + service), }, diff --git a/pkg/detectors/azuresearchquerykey/azuresearchquerykey.go b/pkg/detectors/azuresearchquerykey/azuresearchquerykey.go index 34b3fb9d463e..03edcd919b15 100644 --- a/pkg/detectors/azuresearchquerykey/azuresearchquerykey.go +++ b/pkg/detectors/azuresearchquerykey/azuresearchquerykey.go @@ -9,7 +9,7 @@ import ( regexp "github.com/wasilibs/go-re2" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -48,7 +48,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resUrlMatch := resTrim[len(resTrim)-1] s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_AzureSearchQueryKey, + DetectorType: detector_typepb.DetectorType_AzureSearchQueryKey, Raw: []byte(resMatch), RawV2: []byte(resMatch + resUrlMatch), } @@ -85,8 +85,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_AzureSearchQueryKey +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_AzureSearchQueryKey } func (s Scanner) Description() string { diff --git a/pkg/detectors/azuresearchquerykey/azuresearchquerykey_integration_test.go b/pkg/detectors/azuresearchquerykey/azuresearchquerykey_integration_test.go index 1967a9b971aa..1bccf2f277b5 100644 --- a/pkg/detectors/azuresearchquerykey/azuresearchquerykey_integration_test.go +++ b/pkg/detectors/azuresearchquerykey/azuresearchquerykey_integration_test.go @@ -15,7 +15,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestAzureSearchQueryKey_FromChunk(t *testing.T) { @@ -52,7 +52,7 @@ func TestAzureSearchQueryKey_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_AzureSearchQueryKey, + DetectorType: detector_typepb.DetectorType_AzureSearchQueryKey, Verified: true, RawV2: []byte(secret + url), }, @@ -70,7 +70,7 @@ func TestAzureSearchQueryKey_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_AzureSearchQueryKey, + DetectorType: detector_typepb.DetectorType_AzureSearchQueryKey, Verified: false, RawV2: []byte(inactiveSecret + url), }, @@ -100,7 +100,7 @@ func TestAzureSearchQueryKey_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_AzureSearchQueryKey, + DetectorType: detector_typepb.DetectorType_AzureSearchQueryKey, Verified: false, RawV2: []byte(secret + url), }, @@ -118,7 +118,7 @@ func TestAzureSearchQueryKey_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_AzureSearchQueryKey, + DetectorType: detector_typepb.DetectorType_AzureSearchQueryKey, Verified: false, RawV2: []byte(secret + url), }, diff --git a/pkg/detectors/bannerbear/v1/bannerbear.go b/pkg/detectors/bannerbear/v1/bannerbear.go index f23c22e27e55..7855974a3c9f 100644 --- a/pkg/detectors/bannerbear/v1/bannerbear.go +++ b/pkg/detectors/bannerbear/v1/bannerbear.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -45,7 +45,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Bannerbear, + DetectorType: detector_typepb.DetectorType_Bannerbear, Raw: []byte(resMatch), ExtraData: map[string]string{ "version": fmt.Sprintf("%d", s.Version()), @@ -64,8 +64,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Bannerbear +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Bannerbear } func (s Scanner) Description() string { diff --git a/pkg/detectors/bannerbear/v1/bannerbear_integration_test.go b/pkg/detectors/bannerbear/v1/bannerbear_integration_test.go index c67e040f5401..79112464a79d 100644 --- a/pkg/detectors/bannerbear/v1/bannerbear_integration_test.go +++ b/pkg/detectors/bannerbear/v1/bannerbear_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestBannerbear_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestBannerbear_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Bannerbear, + DetectorType: detector_typepb.DetectorType_Bannerbear, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestBannerbear_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Bannerbear, + DetectorType: detector_typepb.DetectorType_Bannerbear, Verified: false, }, }, diff --git a/pkg/detectors/bannerbear/v2/bannerbear.go b/pkg/detectors/bannerbear/v2/bannerbear.go index 3b02654214ff..ea2ca4ebab80 100644 --- a/pkg/detectors/bannerbear/v2/bannerbear.go +++ b/pkg/detectors/bannerbear/v2/bannerbear.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -48,7 +48,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for match := range uniqueMatches { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Bannerbear, + DetectorType: detector_typepb.DetectorType_Bannerbear, Raw: []byte(match), ExtraData: map[string]string{ "version": fmt.Sprintf("%d", s.Version()), @@ -68,8 +68,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Bannerbear +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Bannerbear } func (s Scanner) Description() string { diff --git a/pkg/detectors/bannerbear/v2/bannerbear_integration_test.go b/pkg/detectors/bannerbear/v2/bannerbear_integration_test.go index ef8dd9a4c21f..2702d739800d 100644 --- a/pkg/detectors/bannerbear/v2/bannerbear_integration_test.go +++ b/pkg/detectors/bannerbear/v2/bannerbear_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestBannerbear_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestBannerbear_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Bannerbear, + DetectorType: detector_typepb.DetectorType_Bannerbear, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestBannerbear_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Bannerbear, + DetectorType: detector_typepb.DetectorType_Bannerbear, Verified: false, }, }, diff --git a/pkg/detectors/baremetrics/baremetrics.go b/pkg/detectors/baremetrics/baremetrics.go index 5359dec8a7ec..119e8b0dde8b 100644 --- a/pkg/detectors/baremetrics/baremetrics.go +++ b/pkg/detectors/baremetrics/baremetrics.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -48,7 +48,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Baremetrics, + DetectorType: detector_typepb.DetectorType_Baremetrics, Raw: []byte(resMatch), } @@ -64,8 +64,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Baremetrics +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Baremetrics } func (s Scanner) Description() string { diff --git a/pkg/detectors/baremetrics/baremetrics_integration_test.go b/pkg/detectors/baremetrics/baremetrics_integration_test.go index 87fde4b24191..abe0ab8dbe5a 100644 --- a/pkg/detectors/baremetrics/baremetrics_integration_test.go +++ b/pkg/detectors/baremetrics/baremetrics_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestBaremetrics_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestBaremetrics_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Baremetrics, + DetectorType: detector_typepb.DetectorType_Baremetrics, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestBaremetrics_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Baremetrics, + DetectorType: detector_typepb.DetectorType_Baremetrics, Verified: false, }, }, diff --git a/pkg/detectors/beamer/beamer.go b/pkg/detectors/beamer/beamer.go index 2a73e5213fdd..8ecb62417874 100644 --- a/pkg/detectors/beamer/beamer.go +++ b/pkg/detectors/beamer/beamer.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -42,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Beamer, + DetectorType: detector_typepb.DetectorType_Beamer, Raw: []byte(resMatch), } @@ -58,8 +58,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Beamer +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Beamer } func (s Scanner) Description() string { diff --git a/pkg/detectors/beamer/beamer_integration_test.go b/pkg/detectors/beamer/beamer_integration_test.go index 2fd40a34aed9..9ac5bbcabd98 100644 --- a/pkg/detectors/beamer/beamer_integration_test.go +++ b/pkg/detectors/beamer/beamer_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestBeamer_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestBeamer_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Beamer, + DetectorType: detector_typepb.DetectorType_Beamer, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestBeamer_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Beamer, + DetectorType: detector_typepb.DetectorType_Beamer, Verified: false, }, }, diff --git a/pkg/detectors/beebole/beebole.go b/pkg/detectors/beebole/beebole.go index 65f416e48bdf..db6053c6c20b 100644 --- a/pkg/detectors/beebole/beebole.go +++ b/pkg/detectors/beebole/beebole.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -42,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Beebole, + DetectorType: detector_typepb.DetectorType_Beebole, Raw: []byte(resMatch), } @@ -58,8 +58,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Beebole +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Beebole } func (s Scanner) Description() string { diff --git a/pkg/detectors/beebole/beebole_integration_test.go b/pkg/detectors/beebole/beebole_integration_test.go index 8dc52fc458b5..f8e100629798 100644 --- a/pkg/detectors/beebole/beebole_integration_test.go +++ b/pkg/detectors/beebole/beebole_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestBeebole_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestBeebole_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Beebole, + DetectorType: detector_typepb.DetectorType_Beebole, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestBeebole_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Beebole, + DetectorType: detector_typepb.DetectorType_Beebole, Verified: false, }, }, diff --git a/pkg/detectors/besnappy/besnappy.go b/pkg/detectors/besnappy/besnappy.go index 9634bf98fb0e..41965a43f780 100644 --- a/pkg/detectors/besnappy/besnappy.go +++ b/pkg/detectors/besnappy/besnappy.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -42,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Besnappy, + DetectorType: detector_typepb.DetectorType_Besnappy, Raw: []byte(resMatch), } if verify { @@ -57,8 +57,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Besnappy +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Besnappy } func (s Scanner) Description() string { diff --git a/pkg/detectors/besnappy/besnappy_integration_test.go b/pkg/detectors/besnappy/besnappy_integration_test.go index bab5c5563160..53c095cc853f 100644 --- a/pkg/detectors/besnappy/besnappy_integration_test.go +++ b/pkg/detectors/besnappy/besnappy_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestBesnappy_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestBesnappy_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Besnappy, + DetectorType: detector_typepb.DetectorType_Besnappy, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestBesnappy_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Besnappy, + DetectorType: detector_typepb.DetectorType_Besnappy, Verified: false, }, }, diff --git a/pkg/detectors/besttime/besttime.go b/pkg/detectors/besttime/besttime.go index 30a51e90f3ef..e7f2555bf7ba 100644 --- a/pkg/detectors/besttime/besttime.go +++ b/pkg/detectors/besttime/besttime.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -42,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Besttime, + DetectorType: detector_typepb.DetectorType_Besttime, Raw: []byte(resMatch), } @@ -58,8 +58,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Besttime +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Besttime } func (s Scanner) Description() string { diff --git a/pkg/detectors/besttime/besttime_integration_test.go b/pkg/detectors/besttime/besttime_integration_test.go index 902377d769fa..6f56fda50349 100644 --- a/pkg/detectors/besttime/besttime_integration_test.go +++ b/pkg/detectors/besttime/besttime_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestBesttime_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestBesttime_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Besttime, + DetectorType: detector_typepb.DetectorType_Besttime, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestBesttime_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Besttime, + DetectorType: detector_typepb.DetectorType_Besttime, Verified: false, }, }, diff --git a/pkg/detectors/betterstack/betterstack.go b/pkg/detectors/betterstack/betterstack.go index 6eecff1d1bc1..bdb9dd602421 100644 --- a/pkg/detectors/betterstack/betterstack.go +++ b/pkg/detectors/betterstack/betterstack.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -43,7 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_BetterStack, + DetectorType: detector_typepb.DetectorType_BetterStack, Raw: []byte(resMatch), } @@ -64,8 +64,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_BetterStack +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_BetterStack } func (s Scanner) Description() string { diff --git a/pkg/detectors/betterstack/betterstack_integration_test.go b/pkg/detectors/betterstack/betterstack_integration_test.go index 4273df1f291c..fa3623496dc8 100644 --- a/pkg/detectors/betterstack/betterstack_integration_test.go +++ b/pkg/detectors/betterstack/betterstack_integration_test.go @@ -15,7 +15,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestBetterstack_FromChunk(t *testing.T) { @@ -51,7 +51,7 @@ func TestBetterstack_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_BetterStack, + DetectorType: detector_typepb.DetectorType_BetterStack, Verified: true, }, }, @@ -68,7 +68,7 @@ func TestBetterstack_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_BetterStack, + DetectorType: detector_typepb.DetectorType_BetterStack, Verified: false, }, }, diff --git a/pkg/detectors/billomat/billomat.go b/pkg/detectors/billomat/billomat.go index 6cc495e8b5ff..2b441ac53c79 100644 --- a/pkg/detectors/billomat/billomat.go +++ b/pkg/detectors/billomat/billomat.go @@ -12,7 +12,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -38,8 +38,8 @@ func (s Scanner) Keywords() []string { return []string{"billomat"} } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Billomat +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Billomat } func (s Scanner) Description() string { @@ -63,7 +63,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for apiKey := range uniqueAPIKeys { for id := range uniqueIDs { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Billomat, + DetectorType: detector_typepb.DetectorType_Billomat, Raw: []byte(apiKey), RawV2: []byte(apiKey + id), } diff --git a/pkg/detectors/billomat/billomat_integration_test.go b/pkg/detectors/billomat/billomat_integration_test.go index d06708cfa68a..c7394c15b328 100644 --- a/pkg/detectors/billomat/billomat_integration_test.go +++ b/pkg/detectors/billomat/billomat_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestBillomat_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestBillomat_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Billomat, + DetectorType: detector_typepb.DetectorType_Billomat, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestBillomat_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Billomat, + DetectorType: detector_typepb.DetectorType_Billomat, Verified: false, }, }, diff --git a/pkg/detectors/bingsubscriptionkey/bingsubscriptionkey.go b/pkg/detectors/bingsubscriptionkey/bingsubscriptionkey.go index b6c1e0e71893..7544f2fb2e2c 100644 --- a/pkg/detectors/bingsubscriptionkey/bingsubscriptionkey.go +++ b/pkg/detectors/bingsubscriptionkey/bingsubscriptionkey.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -21,7 +21,7 @@ var _ detectors.Detector = (*Scanner)(nil) var ( defaultClient = common.SaneHttpClient() - keyPat = regexp.MustCompile(detectors.PrefixRegex([]string{"bing"}) + `\b([a-fA-F0-9]{32})\b`) + keyPat = regexp.MustCompile(detectors.PrefixRegex([]string{"bing"}) + `\b([a-fA-F0-9]{32})\b`) ) func (s Scanner) Keywords() []string { @@ -38,7 +38,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for match := range uniqueMatches { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_BingSubscriptionKey, + DetectorType: detector_typepb.DetectorType_BingSubscriptionKey, Raw: []byte(match), } @@ -86,8 +86,8 @@ func verifyMatch(ctx context.Context, client *http.Client, subscriptionKey strin } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_BingSubscriptionKey +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_BingSubscriptionKey } func (s Scanner) Description() string { diff --git a/pkg/detectors/bingsubscriptionkey/bingsubscriptionkey_integration_test.go b/pkg/detectors/bingsubscriptionkey/bingsubscriptionkey_integration_test.go index 6d2fbc160076..fee2aaa7cc7b 100644 --- a/pkg/detectors/bingsubscriptionkey/bingsubscriptionkey_integration_test.go +++ b/pkg/detectors/bingsubscriptionkey/bingsubscriptionkey_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestBingsubscriptionkey_FromChunk(t *testing.T) { @@ -50,7 +50,7 @@ func TestBingsubscriptionkey_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_BingSubscriptionKey, + DetectorType: detector_typepb.DetectorType_BingSubscriptionKey, Verified: true, }, }, @@ -67,7 +67,7 @@ func TestBingsubscriptionkey_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_BingSubscriptionKey, + DetectorType: detector_typepb.DetectorType_BingSubscriptionKey, Verified: false, }, }, @@ -96,7 +96,7 @@ func TestBingsubscriptionkey_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_BingSubscriptionKey, + DetectorType: detector_typepb.DetectorType_BingSubscriptionKey, Verified: false, }, }, @@ -113,7 +113,7 @@ func TestBingsubscriptionkey_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_BingSubscriptionKey, + DetectorType: detector_typepb.DetectorType_BingSubscriptionKey, Verified: false, }, }, diff --git a/pkg/detectors/bitbar/bitbar.go b/pkg/detectors/bitbar/bitbar.go index 55b80dcb3c61..36ca3f31dc59 100644 --- a/pkg/detectors/bitbar/bitbar.go +++ b/pkg/detectors/bitbar/bitbar.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -42,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Bitbar, + DetectorType: detector_typepb.DetectorType_Bitbar, Raw: []byte(resMatch), } @@ -58,8 +58,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Bitbar +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Bitbar } func (s Scanner) Description() string { diff --git a/pkg/detectors/bitbar/bitbar_integration_test.go b/pkg/detectors/bitbar/bitbar_integration_test.go index 743a0369e9c8..faecb3d1e4ad 100644 --- a/pkg/detectors/bitbar/bitbar_integration_test.go +++ b/pkg/detectors/bitbar/bitbar_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestBitbar_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestBitbar_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Bitbar, + DetectorType: detector_typepb.DetectorType_Bitbar, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestBitbar_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Bitbar, + DetectorType: detector_typepb.DetectorType_Bitbar, Verified: false, }, }, diff --git a/pkg/detectors/bitbucketapppassword/bitbucketapppassword.go b/pkg/detectors/bitbucketapppassword/bitbucketapppassword.go index 61e9d2a5ccd7..00026155d175 100644 --- a/pkg/detectors/bitbucketapppassword/bitbucketapppassword.go +++ b/pkg/detectors/bitbucketapppassword/bitbucketapppassword.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) // Scanner is a stateless struct that implements the detector interface. @@ -26,8 +26,8 @@ func (s Scanner) Keywords() []string { return []string{"bitbucket", "ATBB"} } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_BitbucketAppPassword +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_BitbucketAppPassword } func (s Scanner) Description() string { @@ -80,7 +80,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) ([]dete var results []detectors.Result for username, password := range uniqueCredentials { result := detectors.Result{ - DetectorType: detectorspb.DetectorType_BitbucketAppPassword, + DetectorType: detector_typepb.DetectorType_BitbucketAppPassword, Raw: fmt.Appendf(nil, "%s:%s", username, password), } if verify { diff --git a/pkg/detectors/bitbucketapppassword/bitbucketapppassword_integration_test.go b/pkg/detectors/bitbucketapppassword/bitbucketapppassword_integration_test.go index bcc8b0fb637a..5b9eaf04a88b 100644 --- a/pkg/detectors/bitbucketapppassword/bitbucketapppassword_integration_test.go +++ b/pkg/detectors/bitbucketapppassword/bitbucketapppassword_integration_test.go @@ -12,7 +12,7 @@ import ( "github.com/google/go-cmp/cmp" "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestBitbucketAppPassword_FromData_Integration(t *testing.T) { @@ -39,7 +39,7 @@ func TestBitbucketAppPassword_FromData_Integration(t *testing.T) { input: fmt.Sprintf("https://%s:%s@bitbucket.org", username, validPassword), want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_BitbucketAppPassword, + DetectorType: detector_typepb.DetectorType_BitbucketAppPassword, Verified: true, Raw: []byte(fmt.Sprintf("%s:%s", username, validPassword)), }, @@ -50,7 +50,7 @@ func TestBitbucketAppPassword_FromData_Integration(t *testing.T) { input: fmt.Sprintf("https://%s:%s@bitbucket.org", username, invalidPassword), want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_BitbucketAppPassword, + DetectorType: detector_typepb.DetectorType_BitbucketAppPassword, Verified: false, Raw: []byte(fmt.Sprintf("%s:%s", username, invalidPassword)), }, diff --git a/pkg/detectors/bitcoinaverage/bitcoinaverage.go b/pkg/detectors/bitcoinaverage/bitcoinaverage.go index 56e531ea8916..49582019435b 100644 --- a/pkg/detectors/bitcoinaverage/bitcoinaverage.go +++ b/pkg/detectors/bitcoinaverage/bitcoinaverage.go @@ -12,7 +12,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -48,7 +48,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_BitcoinAverage, + DetectorType: detector_typepb.DetectorType_BitcoinAverage, Raw: []byte(resMatch), } @@ -64,8 +64,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_BitcoinAverage +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_BitcoinAverage } func (s Scanner) Description() string { diff --git a/pkg/detectors/bitcoinaverage/bitcoinaverage_integration_test.go b/pkg/detectors/bitcoinaverage/bitcoinaverage_integration_test.go index 87a78cd52c20..ec96e9b8c84f 100644 --- a/pkg/detectors/bitcoinaverage/bitcoinaverage_integration_test.go +++ b/pkg/detectors/bitcoinaverage/bitcoinaverage_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestBitcoinAverage_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestBitcoinAverage_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_BitcoinAverage, + DetectorType: detector_typepb.DetectorType_BitcoinAverage, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestBitcoinAverage_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_BitcoinAverage, + DetectorType: detector_typepb.DetectorType_BitcoinAverage, Verified: false, }, }, diff --git a/pkg/detectors/bitfinex/bitfinex.go b/pkg/detectors/bitfinex/bitfinex.go index 0f8b0927d2b6..b51d837eeb62 100644 --- a/pkg/detectors/bitfinex/bitfinex.go +++ b/pkg/detectors/bitfinex/bitfinex.go @@ -16,7 +16,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -41,8 +41,8 @@ func (s Scanner) Keywords() []string { return []string{"bitfinex"} } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Bitfinex +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Bitfinex } func (s Scanner) Description() string { @@ -79,7 +79,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Bitfinex, + DetectorType: detector_typepb.DetectorType_Bitfinex, Raw: []byte(apiKey), } diff --git a/pkg/detectors/bitfinex/bitfinex_integration_test.go b/pkg/detectors/bitfinex/bitfinex_integration_test.go index b663cde92503..1e3d5289c44d 100644 --- a/pkg/detectors/bitfinex/bitfinex_integration_test.go +++ b/pkg/detectors/bitfinex/bitfinex_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestBitfinex_FromChunk(t *testing.T) { @@ -50,11 +50,11 @@ func TestBitfinex_FromChunk(t *testing.T) { want: []detectors.Result{ // will try to scan (apiKey, apiSecret) which will verify then (apiSecret, apiKey) which will not since both parameters have equal length { - DetectorType: detectorspb.DetectorType_Bitfinex, + DetectorType: detector_typepb.DetectorType_Bitfinex, Verified: true, }, { - DetectorType: detectorspb.DetectorType_Bitfinex, + DetectorType: detector_typepb.DetectorType_Bitfinex, Verified: false, }, }, @@ -70,11 +70,11 @@ func TestBitfinex_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Bitfinex, + DetectorType: detector_typepb.DetectorType_Bitfinex, Verified: false, }, { - DetectorType: detectorspb.DetectorType_Bitfinex, + DetectorType: detector_typepb.DetectorType_Bitfinex, Verified: false, }, }, diff --git a/pkg/detectors/bitlyaccesstoken/bitlyaccesstoken.go b/pkg/detectors/bitlyaccesstoken/bitlyaccesstoken.go index acb2eec3cc07..a055f4e99d68 100644 --- a/pkg/detectors/bitlyaccesstoken/bitlyaccesstoken.go +++ b/pkg/detectors/bitlyaccesstoken/bitlyaccesstoken.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -43,7 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for token := range uniqueTokens { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_BitLyAccessToken, + DetectorType: detector_typepb.DetectorType_BitLyAccessToken, Raw: []byte(token), } @@ -59,8 +59,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_BitLyAccessToken +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_BitLyAccessToken } func (s Scanner) Description() string { diff --git a/pkg/detectors/bitlyaccesstoken/bitlyaccesstoken_integration_test.go b/pkg/detectors/bitlyaccesstoken/bitlyaccesstoken_integration_test.go index e4625d2639be..b575310b3f1a 100644 --- a/pkg/detectors/bitlyaccesstoken/bitlyaccesstoken_integration_test.go +++ b/pkg/detectors/bitlyaccesstoken/bitlyaccesstoken_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestBitLyAccessToken_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestBitLyAccessToken_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_BitLyAccessToken, + DetectorType: detector_typepb.DetectorType_BitLyAccessToken, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestBitLyAccessToken_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_BitLyAccessToken, + DetectorType: detector_typepb.DetectorType_BitLyAccessToken, Verified: false, }, }, diff --git a/pkg/detectors/bitmex/bitmex.go b/pkg/detectors/bitmex/bitmex.go index 363e5163b607..16f01c5f36b8 100644 --- a/pkg/detectors/bitmex/bitmex.go +++ b/pkg/detectors/bitmex/bitmex.go @@ -17,7 +17,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -55,7 +55,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resSecretMatch := strings.TrimSpace(secretMatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Bitmex, + DetectorType: detector_typepb.DetectorType_Bitmex, Raw: []byte(resSecretMatch), RawV2: []byte(resMatch + resSecretMatch), } @@ -73,8 +73,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Bitmex +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Bitmex } func (s Scanner) Description() string { diff --git a/pkg/detectors/bitmex/bitmex_integration_test.go b/pkg/detectors/bitmex/bitmex_integration_test.go index 4272f4713937..a3cfcd3a04d6 100644 --- a/pkg/detectors/bitmex/bitmex_integration_test.go +++ b/pkg/detectors/bitmex/bitmex_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestBitmex_FromChunk(t *testing.T) { @@ -50,7 +50,7 @@ func TestBitmex_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Bitmex, + DetectorType: detector_typepb.DetectorType_Bitmex, Verified: true, }, }, @@ -66,7 +66,7 @@ func TestBitmex_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Bitmex, + DetectorType: detector_typepb.DetectorType_Bitmex, Verified: false, }, }, diff --git a/pkg/detectors/blazemeter/blazemeter.go b/pkg/detectors/blazemeter/blazemeter.go index dc6df12f4046..4df8802bd565 100644 --- a/pkg/detectors/blazemeter/blazemeter.go +++ b/pkg/detectors/blazemeter/blazemeter.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -42,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Blazemeter, + DetectorType: detector_typepb.DetectorType_Blazemeter, Raw: []byte(resMatch), } @@ -58,8 +58,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Blazemeter +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Blazemeter } func (s Scanner) Description() string { diff --git a/pkg/detectors/blazemeter/blazemeter_integration_test.go b/pkg/detectors/blazemeter/blazemeter_integration_test.go index 12d958cb23a8..d079d03d9caf 100644 --- a/pkg/detectors/blazemeter/blazemeter_integration_test.go +++ b/pkg/detectors/blazemeter/blazemeter_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestBlazemeter_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestBlazemeter_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Blazemeter, + DetectorType: detector_typepb.DetectorType_Blazemeter, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestBlazemeter_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Blazemeter, + DetectorType: detector_typepb.DetectorType_Blazemeter, Verified: false, }, }, diff --git a/pkg/detectors/blitapp/blitapp.go b/pkg/detectors/blitapp/blitapp.go index 21f10e0ab94e..3921b1e4dcac 100644 --- a/pkg/detectors/blitapp/blitapp.go +++ b/pkg/detectors/blitapp/blitapp.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -42,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_BlitApp, + DetectorType: detector_typepb.DetectorType_BlitApp, Raw: []byte(resMatch), } @@ -58,8 +58,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_BlitApp +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_BlitApp } func (s Scanner) Description() string { diff --git a/pkg/detectors/blitapp/blitapp_integration_test.go b/pkg/detectors/blitapp/blitapp_integration_test.go index 01e4e9df16a9..0ff3550877af 100644 --- a/pkg/detectors/blitapp/blitapp_integration_test.go +++ b/pkg/detectors/blitapp/blitapp_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestBlitApp_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestBlitApp_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_BlitApp, + DetectorType: detector_typepb.DetectorType_BlitApp, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestBlitApp_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_BlitApp, + DetectorType: detector_typepb.DetectorType_BlitApp, Verified: false, }, }, diff --git a/pkg/detectors/blocknative/blocknative.go b/pkg/detectors/blocknative/blocknative.go index c9e5e626f8cd..2c834fc37fed 100644 --- a/pkg/detectors/blocknative/blocknative.go +++ b/pkg/detectors/blocknative/blocknative.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -42,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_BlockNative, + DetectorType: detector_typepb.DetectorType_BlockNative, Raw: []byte(resMatch), } @@ -58,8 +58,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_BlockNative +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_BlockNative } func (s Scanner) Description() string { diff --git a/pkg/detectors/blocknative/blocknative_integration_test.go b/pkg/detectors/blocknative/blocknative_integration_test.go index d781cc699589..30f97d6d32b4 100644 --- a/pkg/detectors/blocknative/blocknative_integration_test.go +++ b/pkg/detectors/blocknative/blocknative_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestBlocknative_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestBlocknative_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_BlockNative, + DetectorType: detector_typepb.DetectorType_BlockNative, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestBlocknative_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_BlockNative, + DetectorType: detector_typepb.DetectorType_BlockNative, Verified: false, }, }, diff --git a/pkg/detectors/blogger/blogger.go b/pkg/detectors/blogger/blogger.go index ef672bb0e350..17a188b9e265 100644 --- a/pkg/detectors/blogger/blogger.go +++ b/pkg/detectors/blogger/blogger.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -41,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Blogger, + DetectorType: detector_typepb.DetectorType_Blogger, Raw: []byte(resMatch), } @@ -57,8 +57,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Blogger +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Blogger } func (s Scanner) Description() string { diff --git a/pkg/detectors/blogger/blogger_integration_test.go b/pkg/detectors/blogger/blogger_integration_test.go index 4afd72354d5b..dffa62239907 100644 --- a/pkg/detectors/blogger/blogger_integration_test.go +++ b/pkg/detectors/blogger/blogger_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestBlogger_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestBlogger_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Blogger, + DetectorType: detector_typepb.DetectorType_Blogger, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestBlogger_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Blogger, + DetectorType: detector_typepb.DetectorType_Blogger, Verified: false, }, }, diff --git a/pkg/detectors/bombbomb/bombbomb.go b/pkg/detectors/bombbomb/bombbomb.go index 177520eb376d..b3842d73953f 100644 --- a/pkg/detectors/bombbomb/bombbomb.go +++ b/pkg/detectors/bombbomb/bombbomb.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -42,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_BombBomb, + DetectorType: detector_typepb.DetectorType_BombBomb, Raw: []byte(resMatch), } @@ -58,8 +58,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_BombBomb +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_BombBomb } func (s Scanner) Description() string { diff --git a/pkg/detectors/bombbomb/bombbomb_integration_test.go b/pkg/detectors/bombbomb/bombbomb_integration_test.go index cae85980792a..e0d0a1e09e41 100644 --- a/pkg/detectors/bombbomb/bombbomb_integration_test.go +++ b/pkg/detectors/bombbomb/bombbomb_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestBombBomb_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestBombBomb_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_BombBomb, + DetectorType: detector_typepb.DetectorType_BombBomb, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestBombBomb_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_BombBomb, + DetectorType: detector_typepb.DetectorType_BombBomb, Verified: false, }, }, diff --git a/pkg/detectors/boostnote/boostnote.go b/pkg/detectors/boostnote/boostnote.go index 085265bd8d90..0072e2a96642 100644 --- a/pkg/detectors/boostnote/boostnote.go +++ b/pkg/detectors/boostnote/boostnote.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -42,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_BoostNote, + DetectorType: detector_typepb.DetectorType_BoostNote, Raw: []byte(resMatch), } @@ -58,8 +58,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_BoostNote +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_BoostNote } func (s Scanner) Description() string { diff --git a/pkg/detectors/boostnote/boostnote_integration_test.go b/pkg/detectors/boostnote/boostnote_integration_test.go index 321b6e4a87a2..9e587936a1e4 100644 --- a/pkg/detectors/boostnote/boostnote_integration_test.go +++ b/pkg/detectors/boostnote/boostnote_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestBoostNote_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestBoostNote_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_BoostNote, + DetectorType: detector_typepb.DetectorType_BoostNote, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestBoostNote_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_BoostNote, + DetectorType: detector_typepb.DetectorType_BoostNote, Verified: false, }, }, diff --git a/pkg/detectors/borgbase/borgbase.go b/pkg/detectors/borgbase/borgbase.go index f13b947d3a1e..47a58b6ee6e8 100644 --- a/pkg/detectors/borgbase/borgbase.go +++ b/pkg/detectors/borgbase/borgbase.go @@ -12,7 +12,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -43,7 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Borgbase, + DetectorType: detector_typepb.DetectorType_Borgbase, Raw: []byte(resMatch), } @@ -59,8 +59,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Borgbase +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Borgbase } func (s Scanner) Description() string { diff --git a/pkg/detectors/borgbase/borgbase_integration_test.go b/pkg/detectors/borgbase/borgbase_integration_test.go index 31757adf83cf..c0942662235b 100644 --- a/pkg/detectors/borgbase/borgbase_integration_test.go +++ b/pkg/detectors/borgbase/borgbase_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestBorgbase_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestBorgbase_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Borgbase, + DetectorType: detector_typepb.DetectorType_Borgbase, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestBorgbase_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Borgbase, + DetectorType: detector_typepb.DetectorType_Borgbase, Verified: false, }, }, diff --git a/pkg/detectors/box/box.go b/pkg/detectors/box/box.go index 0995b7d79db7..3c98f1f9ffa6 100644 --- a/pkg/detectors/box/box.go +++ b/pkg/detectors/box/box.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -48,7 +48,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for match := range uniqueMatches { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Box, + DetectorType: detector_typepb.DetectorType_Box, Raw: []byte(match), } @@ -107,8 +107,8 @@ func verifyMatch(ctx context.Context, client *http.Client, token string) (bool, } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Box +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Box } func bakeExtraDataFromUser(u user) map[string]string { diff --git a/pkg/detectors/box/box_integration_test.go b/pkg/detectors/box/box_integration_test.go index 2c887d56bef1..8473c0007c1f 100644 --- a/pkg/detectors/box/box_integration_test.go +++ b/pkg/detectors/box/box_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestBox_FromChunk(t *testing.T) { @@ -50,7 +50,7 @@ func TestBox_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Box, + DetectorType: detector_typepb.DetectorType_Box, Verified: true, Raw: []byte(token), }, @@ -68,7 +68,7 @@ func TestBox_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Box, + DetectorType: detector_typepb.DetectorType_Box, Verified: false, Raw: []byte(inactiveToken), }, @@ -98,7 +98,7 @@ func TestBox_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Box, + DetectorType: detector_typepb.DetectorType_Box, Verified: false, Raw: []byte(token), }, @@ -116,7 +116,7 @@ func TestBox_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Box, + DetectorType: detector_typepb.DetectorType_Box, Verified: false, Raw: []byte(token), }, diff --git a/pkg/detectors/boxoauth/boxoauth.go b/pkg/detectors/boxoauth/boxoauth.go index 006a633d1a17..4a415f663e76 100644 --- a/pkg/detectors/boxoauth/boxoauth.go +++ b/pkg/detectors/boxoauth/boxoauth.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -61,7 +61,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_BoxOauth, + DetectorType: detector_typepb.DetectorType_BoxOauth, Raw: []byte(resIdMatch), RawV2: []byte(resIdMatch + resSecretMatch), } @@ -137,6 +137,6 @@ func verifyMatch(ctx context.Context, client *http.Client, id string, secret str } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_BoxOauth +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_BoxOauth } diff --git a/pkg/detectors/boxoauth/boxoauth_integration_test.go b/pkg/detectors/boxoauth/boxoauth_integration_test.go index e9790ef49224..61a88b8e1913 100644 --- a/pkg/detectors/boxoauth/boxoauth_integration_test.go +++ b/pkg/detectors/boxoauth/boxoauth_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestBoxOauth_FromChunk(t *testing.T) { @@ -50,7 +50,7 @@ func TestBoxOauth_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_BoxOauth, + DetectorType: detector_typepb.DetectorType_BoxOauth, Verified: true, Raw: []byte(id), RawV2: []byte(id + secret), @@ -68,7 +68,7 @@ func TestBoxOauth_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_BoxOauth, + DetectorType: detector_typepb.DetectorType_BoxOauth, Verified: false, Raw: []byte(id), RawV2: []byte(id + invalidSecret), diff --git a/pkg/detectors/braintreepayments/braintreepayments.go b/pkg/detectors/braintreepayments/braintreepayments.go index fe1b26b0ef84..cab2a3effd70 100644 --- a/pkg/detectors/braintreepayments/braintreepayments.go +++ b/pkg/detectors/braintreepayments/braintreepayments.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -55,7 +55,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resIdMatch := strings.TrimSpace(idMatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_BraintreePayments, + DetectorType: detector_typepb.DetectorType_BraintreePayments, Raw: []byte(resMatch), } @@ -124,8 +124,8 @@ func verifyBraintree(ctx context.Context, client *http.Client, url, pubKey, priv return false, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_BraintreePayments +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_BraintreePayments } func (s Scanner) Description() string { diff --git a/pkg/detectors/braintreepayments/braintreepayments_integration_test.go b/pkg/detectors/braintreepayments/braintreepayments_integration_test.go index 06c933c8e94c..7700c6045a93 100644 --- a/pkg/detectors/braintreepayments/braintreepayments_integration_test.go +++ b/pkg/detectors/braintreepayments/braintreepayments_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestBraintreePayments_FromChunk(t *testing.T) { @@ -51,7 +51,7 @@ func TestBraintreePayments_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_BraintreePayments, + DetectorType: detector_typepb.DetectorType_BraintreePayments, Verified: true, }, }, @@ -69,7 +69,7 @@ func TestBraintreePayments_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_BraintreePayments, + DetectorType: detector_typepb.DetectorType_BraintreePayments, Verified: false, }, }, @@ -88,7 +88,7 @@ func TestBraintreePayments_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_BraintreePayments, + DetectorType: detector_typepb.DetectorType_BraintreePayments, Verified: false, }, }, @@ -105,7 +105,7 @@ func TestBraintreePayments_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_BraintreePayments, + DetectorType: detector_typepb.DetectorType_BraintreePayments, Verified: false, }, }, diff --git a/pkg/detectors/brandfetch/v1/brandfetch.go b/pkg/detectors/brandfetch/v1/brandfetch.go index 8236972bb509..6f560daa3216 100644 --- a/pkg/detectors/brandfetch/v1/brandfetch.go +++ b/pkg/detectors/brandfetch/v1/brandfetch.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" v2 "github.com/trufflesecurity/trufflehog/v3/pkg/detectors/brandfetch/v2" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -35,8 +35,8 @@ func (s Scanner) Keywords() []string { return []string{"brandfetch"} } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Brandfetch +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Brandfetch } func (s Scanner) Description() string { @@ -62,7 +62,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for match := range uniqueTokenMatches { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Brandfetch, + DetectorType: detector_typepb.DetectorType_Brandfetch, Raw: []byte(match), ExtraData: map[string]string{"version": strconv.Itoa(s.Version())}, } diff --git a/pkg/detectors/brandfetch/v1/brandfetch_integration_test.go b/pkg/detectors/brandfetch/v1/brandfetch_integration_test.go index b77f50c0cf7b..03856cd1831f 100644 --- a/pkg/detectors/brandfetch/v1/brandfetch_integration_test.go +++ b/pkg/detectors/brandfetch/v1/brandfetch_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestBrandfetch_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestBrandfetch_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Brandfetch, + DetectorType: detector_typepb.DetectorType_Brandfetch, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestBrandfetch_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Brandfetch, + DetectorType: detector_typepb.DetectorType_Brandfetch, Verified: false, }, }, diff --git a/pkg/detectors/brandfetch/v2/brandfetch.go b/pkg/detectors/brandfetch/v2/brandfetch.go index ce92f93d285e..817d95e8579e 100644 --- a/pkg/detectors/brandfetch/v2/brandfetch.go +++ b/pkg/detectors/brandfetch/v2/brandfetch.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -36,8 +36,8 @@ func (s Scanner) Keywords() []string { return []string{"brandfetch"} } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Brandfetch +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Brandfetch } func (s Scanner) Description() string { @@ -63,7 +63,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for match := range uniqueMatches { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Brandfetch, + DetectorType: detector_typepb.DetectorType_Brandfetch, Raw: []byte(match), ExtraData: map[string]string{"version": strconv.Itoa(s.Version())}, } diff --git a/pkg/detectors/brandfetch/v2/brandfetch_integration_test.go b/pkg/detectors/brandfetch/v2/brandfetch_integration_test.go index ac1b015b27e2..d63b099d3c03 100644 --- a/pkg/detectors/brandfetch/v2/brandfetch_integration_test.go +++ b/pkg/detectors/brandfetch/v2/brandfetch_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestBrandfetch_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestBrandfetch_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Brandfetch, + DetectorType: detector_typepb.DetectorType_Brandfetch, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestBrandfetch_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Brandfetch, + DetectorType: detector_typepb.DetectorType_Brandfetch, Verified: false, }, }, diff --git a/pkg/detectors/browserstack/browserstack.go b/pkg/detectors/browserstack/browserstack.go index b2ca5beb9a6f..caf68ed941a2 100644 --- a/pkg/detectors/browserstack/browserstack.go +++ b/pkg/detectors/browserstack/browserstack.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -63,7 +63,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resUserMatch := strings.TrimSpace(userMatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_BrowserStack, + DetectorType: detector_typepb.DetectorType_BrowserStack, Raw: []byte(resMatch), RawV2: []byte(resMatch + resUserMatch), } @@ -122,8 +122,8 @@ func verifyBrowserStackCredentials(ctx context.Context, client *http.Client, use return false, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_BrowserStack +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_BrowserStack } func (s Scanner) Description() string { diff --git a/pkg/detectors/browserstack/browserstack_integration_test.go b/pkg/detectors/browserstack/browserstack_integration_test.go index ebe47df316ff..760787192c73 100644 --- a/pkg/detectors/browserstack/browserstack_integration_test.go +++ b/pkg/detectors/browserstack/browserstack_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestBrowserStack_FromChunk(t *testing.T) { @@ -50,7 +50,7 @@ func TestBrowserStack_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_BrowserStack, + DetectorType: detector_typepb.DetectorType_BrowserStack, Verified: true, RawV2: []byte(fmt.Sprintf("%s%s", secret, secretUser)), }, @@ -67,7 +67,7 @@ func TestBrowserStack_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_BrowserStack, + DetectorType: detector_typepb.DetectorType_BrowserStack, Verified: false, RawV2: []byte(fmt.Sprintf("%s%s", inactiveSecret, secretUser)), }, @@ -84,7 +84,7 @@ func TestBrowserStack_FromChunk(t *testing.T) { }, want: func() []detectors.Result { r := detectors.Result{ - DetectorType: detectorspb.DetectorType_BrowserStack, + DetectorType: detector_typepb.DetectorType_BrowserStack, RawV2: []byte(fmt.Sprintf("%s%s", secret, secretUser)), Verified: false, } @@ -104,7 +104,7 @@ func TestBrowserStack_FromChunk(t *testing.T) { }, want: func() []detectors.Result { r := detectors.Result{ - DetectorType: detectorspb.DetectorType_BrowserStack, + DetectorType: detector_typepb.DetectorType_BrowserStack, Verified: false, RawV2: []byte(fmt.Sprintf("%s%s", secret, secretUser)), } @@ -124,7 +124,7 @@ func TestBrowserStack_FromChunk(t *testing.T) { }, want: func() []detectors.Result { r := detectors.Result{ - DetectorType: detectorspb.DetectorType_BrowserStack, + DetectorType: detector_typepb.DetectorType_BrowserStack, Verified: false, RawV2: []byte(fmt.Sprintf("%s%s", secret, secretUser)), } diff --git a/pkg/detectors/browshot/browshot.go b/pkg/detectors/browshot/browshot.go index c6a3e0b33de8..a75db17921d8 100644 --- a/pkg/detectors/browshot/browshot.go +++ b/pkg/detectors/browshot/browshot.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -42,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Browshot, + DetectorType: detector_typepb.DetectorType_Browshot, Raw: []byte(resMatch), } @@ -58,8 +58,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Browshot +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Browshot } func (s Scanner) Description() string { diff --git a/pkg/detectors/browshot/browshot_integration_test.go b/pkg/detectors/browshot/browshot_integration_test.go index 401ed17470eb..e1fdb67237c0 100644 --- a/pkg/detectors/browshot/browshot_integration_test.go +++ b/pkg/detectors/browshot/browshot_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestBrowshot_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestBrowshot_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Browshot, + DetectorType: detector_typepb.DetectorType_Browshot, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestBrowshot_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Browshot, + DetectorType: detector_typepb.DetectorType_Browshot, Verified: false, }, }, diff --git a/pkg/detectors/bscscan/bscscan.go b/pkg/detectors/bscscan/bscscan.go index f72b477a1c18..bf48b7a8003b 100644 --- a/pkg/detectors/bscscan/bscscan.go +++ b/pkg/detectors/bscscan/bscscan.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -42,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_BscScan, + DetectorType: detector_typepb.DetectorType_BscScan, Raw: []byte(resMatch), } @@ -58,8 +58,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_BscScan +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_BscScan } func (s Scanner) Description() string { diff --git a/pkg/detectors/bscscan/bscscan_integration_test.go b/pkg/detectors/bscscan/bscscan_integration_test.go index b8bacbc2969f..47df8fe7e1bb 100644 --- a/pkg/detectors/bscscan/bscscan_integration_test.go +++ b/pkg/detectors/bscscan/bscscan_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestBscscan_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestBscscan_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_BscScan, + DetectorType: detector_typepb.DetectorType_BscScan, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestBscscan_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_BscScan, + DetectorType: detector_typepb.DetectorType_BscScan, Verified: false, }, }, diff --git a/pkg/detectors/buddyns/buddyns.go b/pkg/detectors/buddyns/buddyns.go index e6e0d2b72fc0..5d21f032028f 100644 --- a/pkg/detectors/buddyns/buddyns.go +++ b/pkg/detectors/buddyns/buddyns.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -42,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_BuddyNS, + DetectorType: detector_typepb.DetectorType_BuddyNS, Raw: []byte(resMatch), } @@ -58,8 +58,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_BuddyNS +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_BuddyNS } func (s Scanner) Description() string { diff --git a/pkg/detectors/buddyns/buddyns_integration_test.go b/pkg/detectors/buddyns/buddyns_integration_test.go index d1d84bf07093..ca49fc5ad6a2 100644 --- a/pkg/detectors/buddyns/buddyns_integration_test.go +++ b/pkg/detectors/buddyns/buddyns_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestBuddyns_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestBuddyns_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_BuddyNS, + DetectorType: detector_typepb.DetectorType_BuddyNS, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestBuddyns_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_BuddyNS, + DetectorType: detector_typepb.DetectorType_BuddyNS, Verified: false, }, }, diff --git a/pkg/detectors/budibase/budibase.go b/pkg/detectors/budibase/budibase.go index b37f802b0f2f..0d95f1e16df8 100644 --- a/pkg/detectors/budibase/budibase.go +++ b/pkg/detectors/budibase/budibase.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -43,7 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Budibase, + DetectorType: detector_typepb.DetectorType_Budibase, Raw: []byte(resMatch), } @@ -64,8 +64,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Budibase +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Budibase } func (s Scanner) Description() string { diff --git a/pkg/detectors/budibase/budibase_integration_test.go b/pkg/detectors/budibase/budibase_integration_test.go index 40eead4b000a..02bf4aba3cd0 100644 --- a/pkg/detectors/budibase/budibase_integration_test.go +++ b/pkg/detectors/budibase/budibase_integration_test.go @@ -15,7 +15,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestBudibase_FromChunk(t *testing.T) { @@ -51,7 +51,7 @@ func TestBudibase_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Budibase, + DetectorType: detector_typepb.DetectorType_Budibase, Verified: true, }, }, @@ -68,7 +68,7 @@ func TestBudibase_FromChunk(t *testing.T) { }, want: func() []detectors.Result { r := detectors.Result{ - DetectorType: detectorspb.DetectorType_Budibase, + DetectorType: detector_typepb.DetectorType_Budibase, Verified: false, } r.SetVerificationError(fmt.Errorf("unexpected HTTP response status 403")) diff --git a/pkg/detectors/bugherd/bugherd.go b/pkg/detectors/bugherd/bugherd.go index 3544e784ba27..0d4d7759105e 100644 --- a/pkg/detectors/bugherd/bugherd.go +++ b/pkg/detectors/bugherd/bugherd.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -42,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Bugherd, + DetectorType: detector_typepb.DetectorType_Bugherd, Raw: []byte(resMatch), } @@ -58,8 +58,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Bugherd +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Bugherd } func (s Scanner) Description() string { diff --git a/pkg/detectors/bugherd/bugherd_integration_test.go b/pkg/detectors/bugherd/bugherd_integration_test.go index 7d015a448d68..b06bd9173038 100644 --- a/pkg/detectors/bugherd/bugherd_integration_test.go +++ b/pkg/detectors/bugherd/bugherd_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestBugherd_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestBugherd_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Bugherd, + DetectorType: detector_typepb.DetectorType_Bugherd, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestBugherd_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Bugherd, + DetectorType: detector_typepb.DetectorType_Bugherd, Verified: false, }, }, diff --git a/pkg/detectors/bugsnag/bugsnag.go b/pkg/detectors/bugsnag/bugsnag.go index 752d6fb73e5c..a60e322e6a3c 100644 --- a/pkg/detectors/bugsnag/bugsnag.go +++ b/pkg/detectors/bugsnag/bugsnag.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -42,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Bugsnag, + DetectorType: detector_typepb.DetectorType_Bugsnag, Raw: []byte(resMatch), } @@ -58,8 +58,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Bugsnag +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Bugsnag } func (s Scanner) Description() string { diff --git a/pkg/detectors/bugsnag/bugsnag_integration_test.go b/pkg/detectors/bugsnag/bugsnag_integration_test.go index 2d56674eb5b8..6a4981bf0521 100644 --- a/pkg/detectors/bugsnag/bugsnag_integration_test.go +++ b/pkg/detectors/bugsnag/bugsnag_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestBugsnag_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestBugsnag_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Bugsnag, + DetectorType: detector_typepb.DetectorType_Bugsnag, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestBugsnag_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Bugsnag, + DetectorType: detector_typepb.DetectorType_Bugsnag, Verified: false, }, }, diff --git a/pkg/detectors/buildkite/v1/buildkite.go b/pkg/detectors/buildkite/v1/buildkite.go index 7d4497250fcd..3a98936ee2c7 100644 --- a/pkg/detectors/buildkite/v1/buildkite.go +++ b/pkg/detectors/buildkite/v1/buildkite.go @@ -12,7 +12,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -50,7 +50,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Buildkite, + DetectorType: detector_typepb.DetectorType_Buildkite, Raw: []byte(resMatch), ExtraData: make(map[string]string), } @@ -74,8 +74,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Buildkite +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Buildkite } func (s Scanner) Description() string { diff --git a/pkg/detectors/buildkite/v1/buildkite_integration_test.go b/pkg/detectors/buildkite/v1/buildkite_integration_test.go index 8ef4ad89d1dd..9117c5dbae52 100644 --- a/pkg/detectors/buildkite/v1/buildkite_integration_test.go +++ b/pkg/detectors/buildkite/v1/buildkite_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestBuildkite_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestBuildkite_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Buildkite, + DetectorType: detector_typepb.DetectorType_Buildkite, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestBuildkite_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Buildkite, + DetectorType: detector_typepb.DetectorType_Buildkite, Verified: false, }, }, diff --git a/pkg/detectors/buildkite/v2/buildkite.go b/pkg/detectors/buildkite/v2/buildkite.go index b25bf744105f..aadd5e1e44d2 100644 --- a/pkg/detectors/buildkite/v2/buildkite.go +++ b/pkg/detectors/buildkite/v2/buildkite.go @@ -9,7 +9,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" v1 "github.com/trufflesecurity/trufflehog/v3/pkg/detectors/buildkite/v1" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -43,7 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Buildkite, + DetectorType: detector_typepb.DetectorType_Buildkite, Raw: []byte(resMatch), } @@ -67,8 +67,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Buildkite +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Buildkite } func (s Scanner) Description() string { diff --git a/pkg/detectors/buildkite/v2/buildkitev2_integration_test.go b/pkg/detectors/buildkite/v2/buildkitev2_integration_test.go index 83c63391a080..f88d0644517c 100644 --- a/pkg/detectors/buildkite/v2/buildkitev2_integration_test.go +++ b/pkg/detectors/buildkite/v2/buildkitev2_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestBuildkite_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestBuildkite_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Buildkite, + DetectorType: detector_typepb.DetectorType_Buildkite, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestBuildkite_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Buildkite, + DetectorType: detector_typepb.DetectorType_Buildkite, Verified: false, }, }, diff --git a/pkg/detectors/bulbul/bulbul.go b/pkg/detectors/bulbul/bulbul.go index e744b7509b97..7f1c591c489f 100644 --- a/pkg/detectors/bulbul/bulbul.go +++ b/pkg/detectors/bulbul/bulbul.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -42,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Bulbul, + DetectorType: detector_typepb.DetectorType_Bulbul, Raw: []byte(resMatch), } @@ -58,8 +58,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Bulbul +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Bulbul } func (s Scanner) Description() string { diff --git a/pkg/detectors/bulbul/bulbul_integration_test.go b/pkg/detectors/bulbul/bulbul_integration_test.go index e51371cf554e..64efc30aa13f 100644 --- a/pkg/detectors/bulbul/bulbul_integration_test.go +++ b/pkg/detectors/bulbul/bulbul_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestBulbul_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestBulbul_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Bulbul, + DetectorType: detector_typepb.DetectorType_Bulbul, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestBulbul_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Bulbul, + DetectorType: detector_typepb.DetectorType_Bulbul, Verified: false, }, }, diff --git a/pkg/detectors/bulksms/bulksms.go b/pkg/detectors/bulksms/bulksms.go index 8cdbe7b8dbc0..0167ce8a3df4 100644 --- a/pkg/detectors/bulksms/bulksms.go +++ b/pkg/detectors/bulksms/bulksms.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -51,7 +51,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for id := range uniqueIds { for key := range uniqueKeys { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Bulksms, + DetectorType: detector_typepb.DetectorType_Bulksms, Raw: []byte(key), RawV2: []byte(key + id), } @@ -69,8 +69,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Bulksms +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Bulksms } func (s Scanner) Description() string { diff --git a/pkg/detectors/bulksms/bulksms_integration_test.go b/pkg/detectors/bulksms/bulksms_integration_test.go index aed029be3775..23f8e7639e9f 100644 --- a/pkg/detectors/bulksms/bulksms_integration_test.go +++ b/pkg/detectors/bulksms/bulksms_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestBulksms_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestBulksms_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Bulksms, + DetectorType: detector_typepb.DetectorType_Bulksms, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestBulksms_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Bulksms, + DetectorType: detector_typepb.DetectorType_Bulksms, Verified: false, }, }, diff --git a/pkg/detectors/buttercms/buttercms.go b/pkg/detectors/buttercms/buttercms.go index 36c7a12a8b00..2c9d00bb7215 100644 --- a/pkg/detectors/buttercms/buttercms.go +++ b/pkg/detectors/buttercms/buttercms.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -42,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_ButterCMS, + DetectorType: detector_typepb.DetectorType_ButterCMS, Raw: []byte(resMatch), } @@ -58,8 +58,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_ButterCMS +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_ButterCMS } func (s Scanner) Description() string { diff --git a/pkg/detectors/buttercms/buttercms_integration_test.go b/pkg/detectors/buttercms/buttercms_integration_test.go index e4e5d13a7799..e27debeabc5a 100644 --- a/pkg/detectors/buttercms/buttercms_integration_test.go +++ b/pkg/detectors/buttercms/buttercms_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestButterCMS_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestButterCMS_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ButterCMS, + DetectorType: detector_typepb.DetectorType_ButterCMS, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestButterCMS_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ButterCMS, + DetectorType: detector_typepb.DetectorType_ButterCMS, Verified: false, }, }, diff --git a/pkg/detectors/caflou/caflou.go b/pkg/detectors/caflou/caflou.go index f0b8905c6cac..5c012343ba09 100644 --- a/pkg/detectors/caflou/caflou.go +++ b/pkg/detectors/caflou/caflou.go @@ -12,7 +12,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -35,8 +35,8 @@ func (s Scanner) Keywords() []string { return []string{"caflou"} } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Caflou +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Caflou } func (s Scanner) Description() string { @@ -53,7 +53,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Caflou, + DetectorType: detector_typepb.DetectorType_Caflou, Raw: []byte(resMatch), } diff --git a/pkg/detectors/caflou/caflou_integration_test.go b/pkg/detectors/caflou/caflou_integration_test.go index b8eb1bec3024..d889f6e5b9d9 100644 --- a/pkg/detectors/caflou/caflou_integration_test.go +++ b/pkg/detectors/caflou/caflou_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestCaflou_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestCaflou_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Caflou, + DetectorType: detector_typepb.DetectorType_Caflou, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestCaflou_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Caflou, + DetectorType: detector_typepb.DetectorType_Caflou, Verified: false, }, }, diff --git a/pkg/detectors/calendarific/calendarific.go b/pkg/detectors/calendarific/calendarific.go index ff4cd385a33d..96d30769d0ed 100644 --- a/pkg/detectors/calendarific/calendarific.go +++ b/pkg/detectors/calendarific/calendarific.go @@ -9,7 +9,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Calendarific, + DetectorType: detector_typepb.DetectorType_Calendarific, Raw: []byte(resMatch), } @@ -64,8 +64,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Calendarific +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Calendarific } func (s Scanner) Description() string { diff --git a/pkg/detectors/calendarific/calendarific_integration_test.go b/pkg/detectors/calendarific/calendarific_integration_test.go index 9b6fadba0109..a39e1ad9c60c 100644 --- a/pkg/detectors/calendarific/calendarific_integration_test.go +++ b/pkg/detectors/calendarific/calendarific_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestCalendarific_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestCalendarific_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Calendarific, + DetectorType: detector_typepb.DetectorType_Calendarific, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestCalendarific_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Calendarific, + DetectorType: detector_typepb.DetectorType_Calendarific, Verified: false, }, }, diff --git a/pkg/detectors/calendlyapikey/calendlyapikey.go b/pkg/detectors/calendlyapikey/calendlyapikey.go index 17ec832e1979..fa88be3d39c8 100644 --- a/pkg/detectors/calendlyapikey/calendlyapikey.go +++ b/pkg/detectors/calendlyapikey/calendlyapikey.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -41,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_CalendlyApiKey, + DetectorType: detector_typepb.DetectorType_CalendlyApiKey, Raw: []byte(resMatch), } @@ -66,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_CalendlyApiKey +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_CalendlyApiKey } func (s Scanner) Description() string { diff --git a/pkg/detectors/calendlyapikey/calendlyapikey_integration_test.go b/pkg/detectors/calendlyapikey/calendlyapikey_integration_test.go index 4f1e88a3a387..f51a131309cd 100644 --- a/pkg/detectors/calendlyapikey/calendlyapikey_integration_test.go +++ b/pkg/detectors/calendlyapikey/calendlyapikey_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestCalendlyApiKey_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestCalendlyApiKey_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_CalendlyApiKey, + DetectorType: detector_typepb.DetectorType_CalendlyApiKey, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestCalendlyApiKey_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_CalendlyApiKey, + DetectorType: detector_typepb.DetectorType_CalendlyApiKey, Verified: false, }, }, diff --git a/pkg/detectors/calorieninja/calorieninja.go b/pkg/detectors/calorieninja/calorieninja.go index 0ca01216d2f0..e4c8b8cf4691 100644 --- a/pkg/detectors/calorieninja/calorieninja.go +++ b/pkg/detectors/calorieninja/calorieninja.go @@ -9,7 +9,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_CalorieNinja, + DetectorType: detector_typepb.DetectorType_CalorieNinja, Raw: []byte(resMatch), } @@ -66,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_CalorieNinja +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_CalorieNinja } func (s Scanner) Description() string { diff --git a/pkg/detectors/calorieninja/calorieninja_integration_test.go b/pkg/detectors/calorieninja/calorieninja_integration_test.go index 4b680cb75011..4e5d6e216397 100644 --- a/pkg/detectors/calorieninja/calorieninja_integration_test.go +++ b/pkg/detectors/calorieninja/calorieninja_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestCalorieninja_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestCalorieninja_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_CalorieNinja, + DetectorType: detector_typepb.DetectorType_CalorieNinja, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestCalorieninja_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_CalorieNinja, + DetectorType: detector_typepb.DetectorType_CalorieNinja, Verified: false, }, }, diff --git a/pkg/detectors/campayn/campayn.go b/pkg/detectors/campayn/campayn.go index 018e715b0eb1..9c3313397c0b 100644 --- a/pkg/detectors/campayn/campayn.go +++ b/pkg/detectors/campayn/campayn.go @@ -9,7 +9,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Campayn, + DetectorType: detector_typepb.DetectorType_Campayn, Raw: []byte(resMatch), } @@ -65,8 +65,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Campayn +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Campayn } func (s Scanner) Description() string { diff --git a/pkg/detectors/campayn/campayn_integration_test.go b/pkg/detectors/campayn/campayn_integration_test.go index 7cd07d212c00..442b1508f25c 100644 --- a/pkg/detectors/campayn/campayn_integration_test.go +++ b/pkg/detectors/campayn/campayn_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestCampayn_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestCampayn_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Campayn, + DetectorType: detector_typepb.DetectorType_Campayn, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestCampayn_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Campayn, + DetectorType: detector_typepb.DetectorType_Campayn, Verified: false, }, }, diff --git a/pkg/detectors/cannyio/cannyio.go b/pkg/detectors/cannyio/cannyio.go index c85d2edde1ee..2163241575dd 100644 --- a/pkg/detectors/cannyio/cannyio.go +++ b/pkg/detectors/cannyio/cannyio.go @@ -9,7 +9,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -39,7 +39,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_CannyIo, + DetectorType: detector_typepb.DetectorType_CannyIo, Raw: []byte(resMatch), } @@ -65,8 +65,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_CannyIo +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_CannyIo } func (s Scanner) Description() string { diff --git a/pkg/detectors/cannyio/cannyio_integration_test.go b/pkg/detectors/cannyio/cannyio_integration_test.go index 7226dcaf8355..da3b320585fe 100644 --- a/pkg/detectors/cannyio/cannyio_integration_test.go +++ b/pkg/detectors/cannyio/cannyio_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestCannyIo_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestCannyIo_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_CannyIo, + DetectorType: detector_typepb.DetectorType_CannyIo, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestCannyIo_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_CannyIo, + DetectorType: detector_typepb.DetectorType_CannyIo, Verified: false, }, }, diff --git a/pkg/detectors/capsulecrm/capsulecrm.go b/pkg/detectors/capsulecrm/capsulecrm.go index 3af7c28d044f..568e34f8554c 100644 --- a/pkg/detectors/capsulecrm/capsulecrm.go +++ b/pkg/detectors/capsulecrm/capsulecrm.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -41,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_CapsuleCRM, + DetectorType: detector_typepb.DetectorType_CapsuleCRM, Raw: []byte(resMatch), } @@ -66,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_CapsuleCRM +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_CapsuleCRM } func (s Scanner) Description() string { diff --git a/pkg/detectors/capsulecrm/capsulecrm_integration_test.go b/pkg/detectors/capsulecrm/capsulecrm_integration_test.go index c63a12412703..a9e5950e4bc8 100644 --- a/pkg/detectors/capsulecrm/capsulecrm_integration_test.go +++ b/pkg/detectors/capsulecrm/capsulecrm_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestCapsuleCRM_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestCapsuleCRM_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_CapsuleCRM, + DetectorType: detector_typepb.DetectorType_CapsuleCRM, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestCapsuleCRM_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_CapsuleCRM, + DetectorType: detector_typepb.DetectorType_CapsuleCRM, Verified: false, }, }, diff --git a/pkg/detectors/captaindata/v1/captaindata.go b/pkg/detectors/captaindata/v1/captaindata.go index 61300e3a12ab..1f7c00bdecdb 100644 --- a/pkg/detectors/captaindata/v1/captaindata.go +++ b/pkg/detectors/captaindata/v1/captaindata.go @@ -9,7 +9,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -50,7 +50,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_CaptainData, + DetectorType: detector_typepb.DetectorType_CaptainData, Raw: []byte(resMatch), RawV2: []byte(resProjIdMatch + resMatch), } @@ -77,8 +77,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_CaptainData +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_CaptainData } func (s Scanner) Description() string { diff --git a/pkg/detectors/captaindata/v1/captaindata_integration_test.go b/pkg/detectors/captaindata/v1/captaindata_integration_test.go index c77264ade059..2db07f072cb2 100644 --- a/pkg/detectors/captaindata/v1/captaindata_integration_test.go +++ b/pkg/detectors/captaindata/v1/captaindata_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestCaptainData_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestCaptainData_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_CaptainData, + DetectorType: detector_typepb.DetectorType_CaptainData, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestCaptainData_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_CaptainData, + DetectorType: detector_typepb.DetectorType_CaptainData, Verified: false, }, }, diff --git a/pkg/detectors/captaindata/v2/captaindata.go b/pkg/detectors/captaindata/v2/captaindata.go index e24fbe37ca1a..e9941e47bd78 100644 --- a/pkg/detectors/captaindata/v2/captaindata.go +++ b/pkg/detectors/captaindata/v2/captaindata.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -53,7 +53,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for projId := range uniqueProjIdMatches { for apiKey := range uniqueMatches { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_CaptainData, + DetectorType: detector_typepb.DetectorType_CaptainData, Raw: []byte(apiKey), RawV2: []byte(projId + apiKey), } @@ -104,8 +104,8 @@ func verifyMatch(ctx context.Context, client *http.Client, projId, apiKey string } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_CaptainData +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_CaptainData } func (s Scanner) Description() string { diff --git a/pkg/detectors/captaindata/v2/captaindata_integration_test.go b/pkg/detectors/captaindata/v2/captaindata_integration_test.go index b6efcb16e337..43a4f89d27fe 100644 --- a/pkg/detectors/captaindata/v2/captaindata_integration_test.go +++ b/pkg/detectors/captaindata/v2/captaindata_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestCaptainData_FromChunk(t *testing.T) { @@ -51,7 +51,7 @@ func TestCaptainData_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_CaptainData, + DetectorType: detector_typepb.DetectorType_CaptainData, Verified: true, }, }, @@ -68,7 +68,7 @@ func TestCaptainData_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_CaptainData, + DetectorType: detector_typepb.DetectorType_CaptainData, Verified: false, }, }, diff --git a/pkg/detectors/carboninterface/carboninterface.go b/pkg/detectors/carboninterface/carboninterface.go index 7c768cae466f..cd7d99f48df0 100644 --- a/pkg/detectors/carboninterface/carboninterface.go +++ b/pkg/detectors/carboninterface/carboninterface.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -41,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_CarbonInterface, + DetectorType: detector_typepb.DetectorType_CarbonInterface, Raw: []byte(resMatch), } @@ -68,8 +68,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_CarbonInterface +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_CarbonInterface } func (s Scanner) Description() string { diff --git a/pkg/detectors/carboninterface/carboninterface_integration_test.go b/pkg/detectors/carboninterface/carboninterface_integration_test.go index e002caa1c7ca..db56062c0d17 100644 --- a/pkg/detectors/carboninterface/carboninterface_integration_test.go +++ b/pkg/detectors/carboninterface/carboninterface_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestCarbonInterface_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestCarbonInterface_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_CarbonInterface, + DetectorType: detector_typepb.DetectorType_CarbonInterface, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestCarbonInterface_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_CarbonInterface, + DetectorType: detector_typepb.DetectorType_CarbonInterface, Verified: false, }, }, diff --git a/pkg/detectors/cashboard/cashboard.go b/pkg/detectors/cashboard/cashboard.go index 7b38ffc117e0..5ce9a8105453 100644 --- a/pkg/detectors/cashboard/cashboard.go +++ b/pkg/detectors/cashboard/cashboard.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -49,7 +49,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resUser := strings.TrimSpace(userMatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Cashboard, + DetectorType: detector_typepb.DetectorType_Cashboard, Raw: []byte(resMatch), RawV2: []byte(resMatch + resUser), } @@ -78,8 +78,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Cashboard +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Cashboard } func (s Scanner) Description() string { diff --git a/pkg/detectors/cashboard/cashboard_integration_test.go b/pkg/detectors/cashboard/cashboard_integration_test.go index 4b4fd5db01db..b76186897ab8 100644 --- a/pkg/detectors/cashboard/cashboard_integration_test.go +++ b/pkg/detectors/cashboard/cashboard_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestCashboard_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestCashboard_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Cashboard, + DetectorType: detector_typepb.DetectorType_Cashboard, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestCashboard_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Cashboard, + DetectorType: detector_typepb.DetectorType_Cashboard, Verified: false, }, }, diff --git a/pkg/detectors/caspio/caspio.go b/pkg/detectors/caspio/caspio.go index 3c8f34a0c73f..4b665214727b 100644 --- a/pkg/detectors/caspio/caspio.go +++ b/pkg/detectors/caspio/caspio.go @@ -9,7 +9,7 @@ import ( regexp "github.com/wasilibs/go-re2" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -54,7 +54,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resDomainMatch := strings.TrimSpace(domainMatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Caspio, + DetectorType: detector_typepb.DetectorType_Caspio, Raw: []byte(resMatch), RawV2: []byte(resMatch + resIdMatch + resDomainMatch), } @@ -83,8 +83,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Caspio +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Caspio } func (s Scanner) Description() string { diff --git a/pkg/detectors/caspio/caspio_integration_test.go b/pkg/detectors/caspio/caspio_integration_test.go index b285d94cf782..7abd57000923 100644 --- a/pkg/detectors/caspio/caspio_integration_test.go +++ b/pkg/detectors/caspio/caspio_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestCaspio_FromChunk(t *testing.T) { @@ -50,7 +50,7 @@ func TestCaspio_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Caspio, + DetectorType: detector_typepb.DetectorType_Caspio, Verified: true, }, }, @@ -66,7 +66,7 @@ func TestCaspio_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Caspio, + DetectorType: detector_typepb.DetectorType_Caspio, Verified: false, }, }, diff --git a/pkg/detectors/censys/censys.go b/pkg/detectors/censys/censys.go index 01a3b20235a6..c86ad2496812 100644 --- a/pkg/detectors/censys/censys.go +++ b/pkg/detectors/censys/censys.go @@ -9,7 +9,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -46,7 +46,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result userPatMatch := strings.TrimSpace(idMatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Censys, + DetectorType: detector_typepb.DetectorType_Censys, Raw: []byte(tokenPatMatch), RawV2: []byte(tokenPatMatch + userPatMatch), } @@ -73,8 +73,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Censys +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Censys } func (s Scanner) Description() string { diff --git a/pkg/detectors/censys/censys_integration_test.go b/pkg/detectors/censys/censys_integration_test.go index ec5148336993..9b9cdc0def4b 100644 --- a/pkg/detectors/censys/censys_integration_test.go +++ b/pkg/detectors/censys/censys_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestCensys_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestCensys_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Censys, + DetectorType: detector_typepb.DetectorType_Censys, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestCensys_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Censys, + DetectorType: detector_typepb.DetectorType_Censys, Verified: false, }, }, diff --git a/pkg/detectors/centralstationcrm/centralstationcrm.go b/pkg/detectors/centralstationcrm/centralstationcrm.go index b4196acb2c89..9c6ea778922e 100644 --- a/pkg/detectors/centralstationcrm/centralstationcrm.go +++ b/pkg/detectors/centralstationcrm/centralstationcrm.go @@ -9,7 +9,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_CentralStationCRM, + DetectorType: detector_typepb.DetectorType_CentralStationCRM, Raw: []byte(resMatch), } @@ -65,8 +65,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_CentralStationCRM +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_CentralStationCRM } func (s Scanner) Description() string { diff --git a/pkg/detectors/centralstationcrm/centralstationcrm_integration_test.go b/pkg/detectors/centralstationcrm/centralstationcrm_integration_test.go index 364ed8e829a1..6c39cfed8bd2 100644 --- a/pkg/detectors/centralstationcrm/centralstationcrm_integration_test.go +++ b/pkg/detectors/centralstationcrm/centralstationcrm_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestCentralStationCRM_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestCentralStationCRM_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_CentralStationCRM, + DetectorType: detector_typepb.DetectorType_CentralStationCRM, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestCentralStationCRM_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_CentralStationCRM, + DetectorType: detector_typepb.DetectorType_CentralStationCRM, Verified: false, }, }, diff --git a/pkg/detectors/cexio/cexio.go b/pkg/detectors/cexio/cexio.go index 55825f6fa701..fb9036573182 100644 --- a/pkg/detectors/cexio/cexio.go +++ b/pkg/detectors/cexio/cexio.go @@ -17,7 +17,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -60,7 +60,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resSecretMatch := strings.TrimSpace(secretMatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_CexIO, + DetectorType: detector_typepb.DetectorType_CexIO, Raw: []byte(resKeyMatch), RawV2: []byte(resUserIdMatch + resSecretMatch), } @@ -124,8 +124,8 @@ func getCexIOPassphrase(apiSecret string, apiKey string, nonce string, userId st return strings.ToUpper(hex.EncodeToString(macsum)) } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_CexIO +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_CexIO } func (s Scanner) Description() string { diff --git a/pkg/detectors/cexio/cexio_integration_test.go b/pkg/detectors/cexio/cexio_integration_test.go index 0fd5b1422fa4..02853768c6ec 100644 --- a/pkg/detectors/cexio/cexio_integration_test.go +++ b/pkg/detectors/cexio/cexio_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestCexIO_FromChunk(t *testing.T) { @@ -51,7 +51,7 @@ func TestCexIO_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_CexIO, + DetectorType: detector_typepb.DetectorType_CexIO, Verified: true, }, }, @@ -67,7 +67,7 @@ func TestCexIO_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_CexIO, + DetectorType: detector_typepb.DetectorType_CexIO, Verified: false, }, }, diff --git a/pkg/detectors/chartmogul/chartmogul.go b/pkg/detectors/chartmogul/chartmogul.go index 34ad579d2749..ef563c37fb83 100644 --- a/pkg/detectors/chartmogul/chartmogul.go +++ b/pkg/detectors/chartmogul/chartmogul.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -42,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Chartmogul, + DetectorType: detector_typepb.DetectorType_Chartmogul, Raw: []byte(resMatch), } @@ -69,8 +69,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Chartmogul +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Chartmogul } func (s Scanner) Description() string { diff --git a/pkg/detectors/chartmogul/chartmogul_integration_test.go b/pkg/detectors/chartmogul/chartmogul_integration_test.go index 31d43fb4798e..660cd5e4c4e1 100644 --- a/pkg/detectors/chartmogul/chartmogul_integration_test.go +++ b/pkg/detectors/chartmogul/chartmogul_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestChartmogul_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestChartmogul_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Chartmogul, + DetectorType: detector_typepb.DetectorType_Chartmogul, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestChartmogul_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Chartmogul, + DetectorType: detector_typepb.DetectorType_Chartmogul, Verified: false, }, }, diff --git a/pkg/detectors/chatbot/chatbot.go b/pkg/detectors/chatbot/chatbot.go index 0ec29b3012d1..3e867dc223b6 100644 --- a/pkg/detectors/chatbot/chatbot.go +++ b/pkg/detectors/chatbot/chatbot.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -41,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Chatbot, + DetectorType: detector_typepb.DetectorType_Chatbot, Raw: []byte(resMatch), } @@ -66,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Chatbot +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Chatbot } func (s Scanner) Description() string { diff --git a/pkg/detectors/chatbot/chatbot_integration_test.go b/pkg/detectors/chatbot/chatbot_integration_test.go index ff62f399733c..6bd033365985 100644 --- a/pkg/detectors/chatbot/chatbot_integration_test.go +++ b/pkg/detectors/chatbot/chatbot_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestChatbot_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestChatbot_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Chatbot, + DetectorType: detector_typepb.DetectorType_Chatbot, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestChatbot_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Chatbot, + DetectorType: detector_typepb.DetectorType_Chatbot, Verified: false, }, }, diff --git a/pkg/detectors/chatfule/chatfule.go b/pkg/detectors/chatfule/chatfule.go index 252b22ef9baf..f989f3defd0e 100644 --- a/pkg/detectors/chatfule/chatfule.go +++ b/pkg/detectors/chatfule/chatfule.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -41,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Chatfule, + DetectorType: detector_typepb.DetectorType_Chatfule, Raw: []byte(resMatch), } @@ -67,8 +67,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Chatfule +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Chatfule } func (s Scanner) Description() string { diff --git a/pkg/detectors/chatfule/chatfule_integration_test.go b/pkg/detectors/chatfule/chatfule_integration_test.go index 405174ed66ab..8ea780050fd1 100644 --- a/pkg/detectors/chatfule/chatfule_integration_test.go +++ b/pkg/detectors/chatfule/chatfule_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestChatfule_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestChatfule_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Chatfule, + DetectorType: detector_typepb.DetectorType_Chatfule, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestChatfule_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Chatfule, + DetectorType: detector_typepb.DetectorType_Chatfule, Verified: false, }, }, diff --git a/pkg/detectors/checio/checio.go b/pkg/detectors/checio/checio.go index 6aa684ee2808..d5e86df66d15 100644 --- a/pkg/detectors/checio/checio.go +++ b/pkg/detectors/checio/checio.go @@ -9,7 +9,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_ChecIO, + DetectorType: detector_typepb.DetectorType_ChecIO, Raw: []byte(resMatch), } @@ -65,8 +65,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_ChecIO +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_ChecIO } func (s Scanner) Description() string { diff --git a/pkg/detectors/checio/checio_integration_test.go b/pkg/detectors/checio/checio_integration_test.go index e2fd6eafa416..b24d72fd8a94 100644 --- a/pkg/detectors/checio/checio_integration_test.go +++ b/pkg/detectors/checio/checio_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestChecIO_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestChecIO_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ChecIO, + DetectorType: detector_typepb.DetectorType_ChecIO, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestChecIO_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ChecIO, + DetectorType: detector_typepb.DetectorType_ChecIO, Verified: false, }, }, diff --git a/pkg/detectors/checklyhq/checklyhq.go b/pkg/detectors/checklyhq/checklyhq.go index ce3f8d0f5f40..8d3d335b7a39 100644 --- a/pkg/detectors/checklyhq/checklyhq.go +++ b/pkg/detectors/checklyhq/checklyhq.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -41,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_ChecklyHQ, + DetectorType: detector_typepb.DetectorType_ChecklyHQ, Raw: []byte(resMatch), } @@ -66,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_ChecklyHQ +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_ChecklyHQ } func (s Scanner) Description() string { diff --git a/pkg/detectors/checklyhq/checklyhq_integration_test.go b/pkg/detectors/checklyhq/checklyhq_integration_test.go index 8985924f788e..75d5705d3ab4 100644 --- a/pkg/detectors/checklyhq/checklyhq_integration_test.go +++ b/pkg/detectors/checklyhq/checklyhq_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestChecklyHQ_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestChecklyHQ_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ChecklyHQ, + DetectorType: detector_typepb.DetectorType_ChecklyHQ, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestChecklyHQ_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ChecklyHQ, + DetectorType: detector_typepb.DetectorType_ChecklyHQ, Verified: false, }, }, diff --git a/pkg/detectors/checkout/checkout.go b/pkg/detectors/checkout/checkout.go index 70993b448916..76de20715f1e 100644 --- a/pkg/detectors/checkout/checkout.go +++ b/pkg/detectors/checkout/checkout.go @@ -9,7 +9,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -48,7 +48,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resIdMatch := strings.TrimSpace(idMatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Checkout, + DetectorType: detector_typepb.DetectorType_Checkout, Raw: []byte(resMatch), RawV2: []byte(resMatch + resIdMatch), } @@ -76,8 +76,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Checkout +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Checkout } func (s Scanner) Description() string { diff --git a/pkg/detectors/checkout/checkout_integration_test.go b/pkg/detectors/checkout/checkout_integration_test.go index 0337cfe5b788..9bba00ce84f9 100644 --- a/pkg/detectors/checkout/checkout_integration_test.go +++ b/pkg/detectors/checkout/checkout_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestCheckout_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestCheckout_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Checkout, + DetectorType: detector_typepb.DetectorType_Checkout, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestCheckout_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Checkout, + DetectorType: detector_typepb.DetectorType_Checkout, Verified: false, }, }, diff --git a/pkg/detectors/checkvist/checkvist.go b/pkg/detectors/checkvist/checkvist.go index e4e05bad797a..3c5b07f7f53d 100644 --- a/pkg/detectors/checkvist/checkvist.go +++ b/pkg/detectors/checkvist/checkvist.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -50,7 +50,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Checkvist, + DetectorType: detector_typepb.DetectorType_Checkvist, Raw: []byte(resMatch), RawV2: []byte(resMatch + emailMatch), } @@ -81,8 +81,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Checkvist +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Checkvist } func (s Scanner) Description() string { diff --git a/pkg/detectors/checkvist/checkvist_integration_test.go b/pkg/detectors/checkvist/checkvist_integration_test.go index 92e6583ea15d..fb5aea51cf8e 100644 --- a/pkg/detectors/checkvist/checkvist_integration_test.go +++ b/pkg/detectors/checkvist/checkvist_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestCheckvist_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestCheckvist_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Checkvist, + DetectorType: detector_typepb.DetectorType_Checkvist, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestCheckvist_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Checkvist, + DetectorType: detector_typepb.DetectorType_Checkvist, Verified: false, }, }, diff --git a/pkg/detectors/cicero/cicero.go b/pkg/detectors/cicero/cicero.go index 2095087ed122..c537846ae4db 100644 --- a/pkg/detectors/cicero/cicero.go +++ b/pkg/detectors/cicero/cicero.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -41,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Cicero, + DetectorType: detector_typepb.DetectorType_Cicero, Raw: []byte(resMatch), } @@ -66,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Cicero +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Cicero } func (s Scanner) Description() string { diff --git a/pkg/detectors/cicero/cicero_integration_test.go b/pkg/detectors/cicero/cicero_integration_test.go index 7bb562b69e0e..1555f5cb6a56 100644 --- a/pkg/detectors/cicero/cicero_integration_test.go +++ b/pkg/detectors/cicero/cicero_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestCicero_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestCicero_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Cicero, + DetectorType: detector_typepb.DetectorType_Cicero, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestCicero_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Cicero, + DetectorType: detector_typepb.DetectorType_Cicero, Verified: false, }, }, diff --git a/pkg/detectors/circleci/v1/circleci.go b/pkg/detectors/circleci/v1/circleci.go index d98d3bf6f2ba..8a3b828fa4b9 100644 --- a/pkg/detectors/circleci/v1/circleci.go +++ b/pkg/detectors/circleci/v1/circleci.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -44,8 +44,8 @@ func (s Scanner) Keywords() []string { return []string{"circle"} } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Circle +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Circle } func (s Scanner) Description() string { @@ -64,7 +64,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for token := range uniqueTokens { result := detectors.Result{ - DetectorType: detectorspb.DetectorType_Circle, + DetectorType: detector_typepb.DetectorType_Circle, Raw: []byte(token), ExtraData: map[string]string{ "Version": strconv.Itoa(s.Version()), diff --git a/pkg/detectors/circleci/v1/circleci_integration_test.go b/pkg/detectors/circleci/v1/circleci_integration_test.go index 34d685903d28..1d70a8ce1826 100644 --- a/pkg/detectors/circleci/v1/circleci_integration_test.go +++ b/pkg/detectors/circleci/v1/circleci_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/kylelemons/godebug/pretty" "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestCircleCI_FromChunk(t *testing.T) { @@ -47,7 +47,7 @@ func TestCircleCI_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Circle, + DetectorType: detector_typepb.DetectorType_Circle, Verified: true, }, }, @@ -63,7 +63,7 @@ func TestCircleCI_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Circle, + DetectorType: detector_typepb.DetectorType_Circle, Verified: false, }, }, diff --git a/pkg/detectors/circleci/v2/circleci.go b/pkg/detectors/circleci/v2/circleci.go index 6cf34ef54a9f..3d541dbe9e0e 100644 --- a/pkg/detectors/circleci/v2/circleci.go +++ b/pkg/detectors/circleci/v2/circleci.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" v1 "github.com/trufflesecurity/trufflehog/v3/pkg/detectors/circleci/v1" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -43,8 +43,8 @@ func (s Scanner) Keywords() []string { return []string{"CCIPAT_"} } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Circle +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Circle } func (s Scanner) Description() string { @@ -63,7 +63,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for token := range uniqueTokens { result := detectors.Result{ - DetectorType: detectorspb.DetectorType_Circle, + DetectorType: detector_typepb.DetectorType_Circle, Raw: []byte(token), ExtraData: map[string]string{ "Version": strconv.Itoa(s.Version()), diff --git a/pkg/detectors/circleci/v2/circleci_integration_test.go b/pkg/detectors/circleci/v2/circleci_integration_test.go index e514bc23fef6..2becd15227f9 100644 --- a/pkg/detectors/circleci/v2/circleci_integration_test.go +++ b/pkg/detectors/circleci/v2/circleci_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/kylelemons/godebug/pretty" "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestCircleCI_FromChunk(t *testing.T) { @@ -47,7 +47,7 @@ func TestCircleCI_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Circle, + DetectorType: detector_typepb.DetectorType_Circle, Verified: true, }, }, @@ -63,7 +63,7 @@ func TestCircleCI_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Circle, + DetectorType: detector_typepb.DetectorType_Circle, Verified: false, }, }, diff --git a/pkg/detectors/clarifai/clarifai.go b/pkg/detectors/clarifai/clarifai.go index 7b77897b9cdc..79337ee49a10 100644 --- a/pkg/detectors/clarifai/clarifai.go +++ b/pkg/detectors/clarifai/clarifai.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Clarifai, + DetectorType: detector_typepb.DetectorType_Clarifai, Raw: []byte(resMatch), } @@ -83,8 +83,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Clarifai +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Clarifai } func (s Scanner) Description() string { diff --git a/pkg/detectors/clarifai/clarifai_integration_test.go b/pkg/detectors/clarifai/clarifai_integration_test.go index 96ab6fe5ae0e..bfc65a8afccb 100644 --- a/pkg/detectors/clarifai/clarifai_integration_test.go +++ b/pkg/detectors/clarifai/clarifai_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestClarifai_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestClarifai_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Clarifai, + DetectorType: detector_typepb.DetectorType_Clarifai, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestClarifai_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Clarifai, + DetectorType: detector_typepb.DetectorType_Clarifai, Verified: true, }, }, @@ -81,7 +81,7 @@ func TestClarifai_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Clarifai, + DetectorType: detector_typepb.DetectorType_Clarifai, Verified: false, }, }, diff --git a/pkg/detectors/clearbit/clearbit.go b/pkg/detectors/clearbit/clearbit.go index 92f5a4a0d906..b73212a47aab 100644 --- a/pkg/detectors/clearbit/clearbit.go +++ b/pkg/detectors/clearbit/clearbit.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -41,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Clearbit, + DetectorType: detector_typepb.DetectorType_Clearbit, Raw: []byte(resMatch), } @@ -66,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Clearbit +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Clearbit } func (s Scanner) Description() string { diff --git a/pkg/detectors/clearbit/clearbit_integration_test.go b/pkg/detectors/clearbit/clearbit_integration_test.go index da8ba1c26924..2599db07211f 100644 --- a/pkg/detectors/clearbit/clearbit_integration_test.go +++ b/pkg/detectors/clearbit/clearbit_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestClearbit_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestClearbit_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Clearbit, + DetectorType: detector_typepb.DetectorType_Clearbit, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestClearbit_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Clearbit, + DetectorType: detector_typepb.DetectorType_Clearbit, Verified: false, }, }, diff --git a/pkg/detectors/clickhelp/clickhelp.go b/pkg/detectors/clickhelp/clickhelp.go index 08b930c16b8c..0e366310dcab 100644 --- a/pkg/detectors/clickhelp/clickhelp.go +++ b/pkg/detectors/clickhelp/clickhelp.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -29,8 +29,8 @@ var ( keyPat = regexp.MustCompile(detectors.PrefixRegex([]string{"clickhelp", "key", "token", "api", "secret"}) + `\b([0-9A-Za-z]{24})\b`) ) -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_ClickHelp +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_ClickHelp } func (s Scanner) Description() string { @@ -65,7 +65,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for email := range uniqueEmails { for apiKey := range uniqueAPIKeys { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_ClickHelp, + DetectorType: detector_typepb.DetectorType_ClickHelp, Raw: []byte(portalLink), RawV2: []byte(portalLink + email), } diff --git a/pkg/detectors/clickhelp/clickhelp_integration_test.go b/pkg/detectors/clickhelp/clickhelp_integration_test.go index 45355743bc54..adcf1146a785 100644 --- a/pkg/detectors/clickhelp/clickhelp_integration_test.go +++ b/pkg/detectors/clickhelp/clickhelp_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestClickhelp_FromChunk(t *testing.T) { @@ -51,7 +51,7 @@ func TestClickhelp_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ClickHelp, + DetectorType: detector_typepb.DetectorType_ClickHelp, Verified: true, }, }, @@ -67,7 +67,7 @@ func TestClickhelp_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ClickHelp, + DetectorType: detector_typepb.DetectorType_ClickHelp, Verified: false, }, }, diff --git a/pkg/detectors/clicksendsms/clicksendsms.go b/pkg/detectors/clicksendsms/clicksendsms.go index 03416b0f95ac..a4a57ed16593 100644 --- a/pkg/detectors/clicksendsms/clicksendsms.go +++ b/pkg/detectors/clicksendsms/clicksendsms.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -48,7 +48,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resIdMatch := strings.TrimSpace(idMatch[0][strings.LastIndex(idMatch[0], " ")+1:]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_ClickSendsms, + DetectorType: detector_typepb.DetectorType_ClickSendsms, Raw: []byte(resMatch), RawV2: []byte(resMatch + resIdMatch), } @@ -81,8 +81,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_ClickSendsms +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_ClickSendsms } func (s Scanner) Description() string { diff --git a/pkg/detectors/clicksendsms/clicksendsms_integration_test.go b/pkg/detectors/clicksendsms/clicksendsms_integration_test.go index 7808808aee35..5fda28feb47e 100644 --- a/pkg/detectors/clicksendsms/clicksendsms_integration_test.go +++ b/pkg/detectors/clicksendsms/clicksendsms_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestClickSendsms_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestClickSendsms_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ClickSendsms, + DetectorType: detector_typepb.DetectorType_ClickSendsms, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestClickSendsms_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ClickSendsms, + DetectorType: detector_typepb.DetectorType_ClickSendsms, Verified: false, }, }, diff --git a/pkg/detectors/clickuppersonaltoken/clickuppersonaltoken.go b/pkg/detectors/clickuppersonaltoken/clickuppersonaltoken.go index 1f5907bf043c..b5d67756d588 100644 --- a/pkg/detectors/clickuppersonaltoken/clickuppersonaltoken.go +++ b/pkg/detectors/clickuppersonaltoken/clickuppersonaltoken.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -45,7 +45,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for resMatch := range uniqueMatches { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_ClickupPersonalToken, + DetectorType: detector_typepb.DetectorType_ClickupPersonalToken, Raw: []byte(resMatch), } @@ -65,8 +65,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_ClickupPersonalToken +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_ClickupPersonalToken } func (s Scanner) Description() string { diff --git a/pkg/detectors/clickuppersonaltoken/clickuppersonaltoken_integration_test.go b/pkg/detectors/clickuppersonaltoken/clickuppersonaltoken_integration_test.go index 2be96fda4483..7ecf1b63e741 100644 --- a/pkg/detectors/clickuppersonaltoken/clickuppersonaltoken_integration_test.go +++ b/pkg/detectors/clickuppersonaltoken/clickuppersonaltoken_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestClickupPersonalToken_FromChunk(t *testing.T) { @@ -50,7 +50,7 @@ func TestClickupPersonalToken_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ClickupPersonalToken, + DetectorType: detector_typepb.DetectorType_ClickupPersonalToken, Verified: true, }, }, @@ -67,7 +67,7 @@ func TestClickupPersonalToken_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ClickupPersonalToken, + DetectorType: detector_typepb.DetectorType_ClickupPersonalToken, Verified: false, }, }, @@ -96,7 +96,7 @@ func TestClickupPersonalToken_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ClickupPersonalToken, + DetectorType: detector_typepb.DetectorType_ClickupPersonalToken, Verified: false, }, }, diff --git a/pkg/detectors/cliengo/cliengo.go b/pkg/detectors/cliengo/cliengo.go index bd9d877e9ba6..cc4af6d01c75 100644 --- a/pkg/detectors/cliengo/cliengo.go +++ b/pkg/detectors/cliengo/cliengo.go @@ -9,7 +9,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Cliengo, + DetectorType: detector_typepb.DetectorType_Cliengo, Raw: []byte(resMatch), } @@ -64,8 +64,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Cliengo +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Cliengo } func (s Scanner) Description() string { diff --git a/pkg/detectors/cliengo/cliengo_integration_test.go b/pkg/detectors/cliengo/cliengo_integration_test.go index 1d31d5cf0a4f..7ffc7ce9231a 100644 --- a/pkg/detectors/cliengo/cliengo_integration_test.go +++ b/pkg/detectors/cliengo/cliengo_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestCliengo_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestCliengo_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Cliengo, + DetectorType: detector_typepb.DetectorType_Cliengo, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestCliengo_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Cliengo, + DetectorType: detector_typepb.DetectorType_Cliengo, Verified: false, }, }, diff --git a/pkg/detectors/clientary/clientary.go b/pkg/detectors/clientary/clientary.go index 2541a4b03ef5..d4af81fb0814 100644 --- a/pkg/detectors/clientary/clientary.go +++ b/pkg/detectors/clientary/clientary.go @@ -16,7 +16,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -42,8 +42,8 @@ func (s Scanner) Keywords() []string { return []string{"ronin", "clientary"} } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Clientary +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Clientary } func (s Scanner) Description() string { @@ -72,7 +72,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Clientary, + DetectorType: detector_typepb.DetectorType_Clientary, Raw: []byte(apiKey), RawV2: []byte(apiKey + ":" + id), ExtraData: make(map[string]string), diff --git a/pkg/detectors/clientary/clientary_integration_test.go b/pkg/detectors/clientary/clientary_integration_test.go index afb7c2ef8f15..60c9beebe1fc 100644 --- a/pkg/detectors/clientary/clientary_integration_test.go +++ b/pkg/detectors/clientary/clientary_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestRoninApp_FromChunk(t *testing.T) { @@ -49,11 +49,11 @@ func TestRoninApp_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Clientary, + DetectorType: detector_typepb.DetectorType_Clientary, Verified: false, }, { - DetectorType: detectorspb.DetectorType_Clientary, + DetectorType: detector_typepb.DetectorType_Clientary, Verified: true, ExtraData: map[string]string{ "Rebrading Docs": "https://www.clientary.com/articles/a-new-brand/", @@ -72,7 +72,7 @@ func TestRoninApp_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Clientary, + DetectorType: detector_typepb.DetectorType_Clientary, Verified: false, }, }, diff --git a/pkg/detectors/clinchpad/clinchpad.go b/pkg/detectors/clinchpad/clinchpad.go index 9b025b533f0d..f430bef9e007 100644 --- a/pkg/detectors/clinchpad/clinchpad.go +++ b/pkg/detectors/clinchpad/clinchpad.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -42,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Clinchpad, + DetectorType: detector_typepb.DetectorType_Clinchpad, Raw: []byte(resMatch), } @@ -69,8 +69,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Clinchpad +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Clinchpad } func (s Scanner) Description() string { diff --git a/pkg/detectors/clinchpad/clinchpad_integration_test.go b/pkg/detectors/clinchpad/clinchpad_integration_test.go index 68d05a39f247..256ae44f9edc 100644 --- a/pkg/detectors/clinchpad/clinchpad_integration_test.go +++ b/pkg/detectors/clinchpad/clinchpad_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestClinchpad_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestClinchpad_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Clinchpad, + DetectorType: detector_typepb.DetectorType_Clinchpad, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestClinchpad_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Clinchpad, + DetectorType: detector_typepb.DetectorType_Clinchpad, Verified: false, }, }, diff --git a/pkg/detectors/clockify/clockify.go b/pkg/detectors/clockify/clockify.go index 524ca4571879..525be164f517 100644 --- a/pkg/detectors/clockify/clockify.go +++ b/pkg/detectors/clockify/clockify.go @@ -9,7 +9,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Clockify, + DetectorType: detector_typepb.DetectorType_Clockify, Raw: []byte(resMatch), } @@ -66,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Clockify +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Clockify } func (s Scanner) Description() string { diff --git a/pkg/detectors/clockify/clockify_integration_test.go b/pkg/detectors/clockify/clockify_integration_test.go index 618512566d1b..bb3b66e4f5be 100644 --- a/pkg/detectors/clockify/clockify_integration_test.go +++ b/pkg/detectors/clockify/clockify_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestClockify_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestClockify_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Clockify, + DetectorType: detector_typepb.DetectorType_Clockify, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestClockify_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Clockify, + DetectorType: detector_typepb.DetectorType_Clockify, Verified: false, }, }, diff --git a/pkg/detectors/clockworksms/clockworksms.go b/pkg/detectors/clockworksms/clockworksms.go index 18970c049f5e..27ea487ea189 100644 --- a/pkg/detectors/clockworksms/clockworksms.go +++ b/pkg/detectors/clockworksms/clockworksms.go @@ -9,7 +9,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -47,7 +47,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result tokenRes := strings.TrimSpace(tokenMatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_ClockworkSMS, + DetectorType: detector_typepb.DetectorType_ClockworkSMS, Raw: []byte(resMatch), RawV2: []byte(resMatch + tokenRes), } @@ -75,8 +75,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_ClockworkSMS +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_ClockworkSMS } func (s Scanner) Description() string { diff --git a/pkg/detectors/clockworksms/clockworksms_integration_test.go b/pkg/detectors/clockworksms/clockworksms_integration_test.go index 0c1e4d500148..fde1e1bd9a6d 100644 --- a/pkg/detectors/clockworksms/clockworksms_integration_test.go +++ b/pkg/detectors/clockworksms/clockworksms_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestClockworksms_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestClockworksms_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ClockworkSMS, + DetectorType: detector_typepb.DetectorType_ClockworkSMS, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestClockworksms_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ClockworkSMS, + DetectorType: detector_typepb.DetectorType_ClockworkSMS, Verified: false, }, }, diff --git a/pkg/detectors/closecrm/close.go b/pkg/detectors/closecrm/close.go index 47ecc40f6fe6..fef55fb69c05 100644 --- a/pkg/detectors/closecrm/close.go +++ b/pkg/detectors/closecrm/close.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -42,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Close, + DetectorType: detector_typepb.DetectorType_Close, Raw: []byte(resMatch), } @@ -70,8 +70,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Close +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Close } func (s Scanner) Description() string { diff --git a/pkg/detectors/closecrm/close_integration_test.go b/pkg/detectors/closecrm/close_integration_test.go index 2a4940dc432c..6fcfa91a54b4 100644 --- a/pkg/detectors/closecrm/close_integration_test.go +++ b/pkg/detectors/closecrm/close_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestClose_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestClose_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Close, + DetectorType: detector_typepb.DetectorType_Close, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestClose_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Close, + DetectorType: detector_typepb.DetectorType_Close, Verified: false, }, }, diff --git a/pkg/detectors/cloudconvert/cloudconvert.go b/pkg/detectors/cloudconvert/cloudconvert.go index 835f3e7597ae..1e3e4e55bf70 100644 --- a/pkg/detectors/cloudconvert/cloudconvert.go +++ b/pkg/detectors/cloudconvert/cloudconvert.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -46,7 +46,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_CloudConvert, + DetectorType: detector_typepb.DetectorType_CloudConvert, Raw: []byte(resMatch), } @@ -72,8 +72,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_CloudConvert +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_CloudConvert } func (s Scanner) Description() string { diff --git a/pkg/detectors/cloudconvert/cloudconvert_integration_test.go b/pkg/detectors/cloudconvert/cloudconvert_integration_test.go index 9109b4a589fc..482262cdb3d1 100644 --- a/pkg/detectors/cloudconvert/cloudconvert_integration_test.go +++ b/pkg/detectors/cloudconvert/cloudconvert_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestCloudConvert_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestCloudConvert_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_CloudConvert, + DetectorType: detector_typepb.DetectorType_CloudConvert, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestCloudConvert_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_CloudConvert, + DetectorType: detector_typepb.DetectorType_CloudConvert, Verified: false, }, }, diff --git a/pkg/detectors/cloudelements/cloudelements.go b/pkg/detectors/cloudelements/cloudelements.go index c7c4982f46fb..02c421a851cb 100644 --- a/pkg/detectors/cloudelements/cloudelements.go +++ b/pkg/detectors/cloudelements/cloudelements.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -49,7 +49,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resOrgMatch := strings.TrimSpace(orgMatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_CloudElements, + DetectorType: detector_typepb.DetectorType_CloudElements, Raw: []byte(resMatch), RawV2: []byte(resMatch + resOrgMatch), } @@ -76,8 +76,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_CloudElements +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_CloudElements } func (s Scanner) Description() string { diff --git a/pkg/detectors/cloudelements/cloudelements_integration_test.go b/pkg/detectors/cloudelements/cloudelements_integration_test.go index 6fa4314ddd17..e9d41de6203d 100644 --- a/pkg/detectors/cloudelements/cloudelements_integration_test.go +++ b/pkg/detectors/cloudelements/cloudelements_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestCloudElements_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestCloudElements_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_CloudElements, + DetectorType: detector_typepb.DetectorType_CloudElements, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestCloudElements_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_CloudElements, + DetectorType: detector_typepb.DetectorType_CloudElements, Verified: false, }, }, diff --git a/pkg/detectors/cloudflareapitoken/cloudflareapitoken.go b/pkg/detectors/cloudflareapitoken/cloudflareapitoken.go index 1e347c56a424..fd712bddbf80 100644 --- a/pkg/detectors/cloudflareapitoken/cloudflareapitoken.go +++ b/pkg/detectors/cloudflareapitoken/cloudflareapitoken.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_CloudflareApiToken, + DetectorType: detector_typepb.DetectorType_CloudflareApiToken, Raw: []byte(resMatch), } @@ -66,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_CloudflareApiToken +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_CloudflareApiToken } func (s Scanner) Description() string { diff --git a/pkg/detectors/cloudflareapitoken/cloudflareapitoken_integration_test.go b/pkg/detectors/cloudflareapitoken/cloudflareapitoken_integration_test.go index 05660e2c56a8..6ac336bc87a3 100644 --- a/pkg/detectors/cloudflareapitoken/cloudflareapitoken_integration_test.go +++ b/pkg/detectors/cloudflareapitoken/cloudflareapitoken_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestCloudflareApiToken_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestCloudflareApiToken_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_CloudflareApiToken, + DetectorType: detector_typepb.DetectorType_CloudflareApiToken, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestCloudflareApiToken_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_CloudflareApiToken, + DetectorType: detector_typepb.DetectorType_CloudflareApiToken, Verified: true, }, }, @@ -81,7 +81,7 @@ func TestCloudflareApiToken_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_CloudflareApiToken, + DetectorType: detector_typepb.DetectorType_CloudflareApiToken, Verified: false, }, }, diff --git a/pkg/detectors/cloudflarecakey/cloudflarecakey.go b/pkg/detectors/cloudflarecakey/cloudflarecakey.go index dfe21b52ed3f..31ed93b13030 100644 --- a/pkg/detectors/cloudflarecakey/cloudflarecakey.go +++ b/pkg/detectors/cloudflarecakey/cloudflarecakey.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -43,7 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for caKey := range uniqueMatches { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_CloudflareCaKey, + DetectorType: detector_typepb.DetectorType_CloudflareCaKey, Raw: []byte(caKey), } @@ -59,8 +59,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_CloudflareCaKey +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_CloudflareCaKey } func (s Scanner) Description() string { diff --git a/pkg/detectors/cloudflarecakey/cloudflarecakey_integration_test.go b/pkg/detectors/cloudflarecakey/cloudflarecakey_integration_test.go index 0eedf05b9ff9..6ea6e41dd329 100644 --- a/pkg/detectors/cloudflarecakey/cloudflarecakey_integration_test.go +++ b/pkg/detectors/cloudflarecakey/cloudflarecakey_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestCloudflareCaKey_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestCloudflareCaKey_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_CloudflareCaKey, + DetectorType: detector_typepb.DetectorType_CloudflareCaKey, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestCloudflareCaKey_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_CloudflareCaKey, + DetectorType: detector_typepb.DetectorType_CloudflareCaKey, Verified: false, }, }, diff --git a/pkg/detectors/cloudflareglobalapikey/cloudflareglobalapikey.go b/pkg/detectors/cloudflareglobalapikey/cloudflareglobalapikey.go index b44853f0f428..66d14f4d96dd 100644 --- a/pkg/detectors/cloudflareglobalapikey/cloudflareglobalapikey.go +++ b/pkg/detectors/cloudflareglobalapikey/cloudflareglobalapikey.go @@ -9,7 +9,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -49,7 +49,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for emailMatch := range uniqueEmailMatches { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_CloudflareGlobalApiKey, + DetectorType: detector_typepb.DetectorType_CloudflareGlobalApiKey, Redacted: emailMatch, Raw: []byte(apiKeyRes), RawV2: []byte(apiKeyRes + emailMatch), @@ -80,8 +80,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_CloudflareGlobalApiKey +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_CloudflareGlobalApiKey } func (s Scanner) Description() string { diff --git a/pkg/detectors/cloudflareglobalapikey/cloudflareglobalapikey_integration_test.go b/pkg/detectors/cloudflareglobalapikey/cloudflareglobalapikey_integration_test.go index 49a96a617fa4..59a8e849c35c 100644 --- a/pkg/detectors/cloudflareglobalapikey/cloudflareglobalapikey_integration_test.go +++ b/pkg/detectors/cloudflareglobalapikey/cloudflareglobalapikey_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestCloudflareGlobalApiKey_FromChunk(t *testing.T) { @@ -50,7 +50,7 @@ func TestCloudflareGlobalApiKey_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_CloudflareGlobalApiKey, + DetectorType: detector_typepb.DetectorType_CloudflareGlobalApiKey, Redacted: globalApiKeyEmail, Verified: true, }, @@ -67,7 +67,7 @@ func TestCloudflareGlobalApiKey_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_CloudflareGlobalApiKey, + DetectorType: detector_typepb.DetectorType_CloudflareGlobalApiKey, Redacted: globalApiKeyEmail, Verified: false, }, diff --git a/pkg/detectors/cloudimage/cloudimage.go b/pkg/detectors/cloudimage/cloudimage.go index d04e31f2df7a..b87b1b981c39 100644 --- a/pkg/detectors/cloudimage/cloudimage.go +++ b/pkg/detectors/cloudimage/cloudimage.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -41,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_CloudImage, + DetectorType: detector_typepb.DetectorType_CloudImage, Raw: []byte(resMatch), } @@ -71,8 +71,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_CloudImage +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_CloudImage } func (s Scanner) Description() string { diff --git a/pkg/detectors/cloudimage/cloudimage_integration_test.go b/pkg/detectors/cloudimage/cloudimage_integration_test.go index 00e00f173353..3c472750c24e 100644 --- a/pkg/detectors/cloudimage/cloudimage_integration_test.go +++ b/pkg/detectors/cloudimage/cloudimage_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestCloudImage_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestCloudImage_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_CloudImage, + DetectorType: detector_typepb.DetectorType_CloudImage, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestCloudImage_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_CloudImage, + DetectorType: detector_typepb.DetectorType_CloudImage, Verified: false, }, }, diff --git a/pkg/detectors/cloudmersive/cloudmersive.go b/pkg/detectors/cloudmersive/cloudmersive.go index 85d0abd2cf4a..54a8cadc92a3 100644 --- a/pkg/detectors/cloudmersive/cloudmersive.go +++ b/pkg/detectors/cloudmersive/cloudmersive.go @@ -9,7 +9,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Cloudmersive, + DetectorType: detector_typepb.DetectorType_Cloudmersive, Raw: []byte(resMatch), } @@ -67,8 +67,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Cloudmersive +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Cloudmersive } func (s Scanner) Description() string { diff --git a/pkg/detectors/cloudmersive/cloudmersive_integration_test.go b/pkg/detectors/cloudmersive/cloudmersive_integration_test.go index e0acea511c66..25bce1a15a1a 100644 --- a/pkg/detectors/cloudmersive/cloudmersive_integration_test.go +++ b/pkg/detectors/cloudmersive/cloudmersive_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestCloudmersive_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestCloudmersive_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Cloudmersive, + DetectorType: detector_typepb.DetectorType_Cloudmersive, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestCloudmersive_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Cloudmersive, + DetectorType: detector_typepb.DetectorType_Cloudmersive, Verified: false, }, }, diff --git a/pkg/detectors/cloudplan/cloudplan.go b/pkg/detectors/cloudplan/cloudplan.go index 3c94e2021718..71875f7df99e 100644 --- a/pkg/detectors/cloudplan/cloudplan.go +++ b/pkg/detectors/cloudplan/cloudplan.go @@ -9,7 +9,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Cloudplan, + DetectorType: detector_typepb.DetectorType_Cloudplan, Raw: []byte(resMatch), } @@ -65,8 +65,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Cloudplan +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Cloudplan } func (s Scanner) Description() string { diff --git a/pkg/detectors/cloudplan/cloudplan_integration_test.go b/pkg/detectors/cloudplan/cloudplan_integration_test.go index 531d959b4c5f..93669a9aad65 100644 --- a/pkg/detectors/cloudplan/cloudplan_integration_test.go +++ b/pkg/detectors/cloudplan/cloudplan_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestCloudplan_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestCloudplan_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Cloudplan, + DetectorType: detector_typepb.DetectorType_Cloudplan, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestCloudplan_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Cloudplan, + DetectorType: detector_typepb.DetectorType_Cloudplan, Verified: false, }, }, diff --git a/pkg/detectors/cloudsmith/cloudsmith.go b/pkg/detectors/cloudsmith/cloudsmith.go index 157d7184c99b..30d70e845571 100644 --- a/pkg/detectors/cloudsmith/cloudsmith.go +++ b/pkg/detectors/cloudsmith/cloudsmith.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -45,7 +45,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Cloudsmith, + DetectorType: detector_typepb.DetectorType_Cloudsmith, Raw: []byte(resMatch), } @@ -78,8 +78,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Cloudsmith +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Cloudsmith } func (s Scanner) Description() string { diff --git a/pkg/detectors/cloudsmith/cloudsmith_integration_test.go b/pkg/detectors/cloudsmith/cloudsmith_integration_test.go index 58fe57574567..7073fd4075c6 100644 --- a/pkg/detectors/cloudsmith/cloudsmith_integration_test.go +++ b/pkg/detectors/cloudsmith/cloudsmith_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestCloudsmith_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestCloudsmith_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Cloudsmith, + DetectorType: detector_typepb.DetectorType_Cloudsmith, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestCloudsmith_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Cloudsmith, + DetectorType: detector_typepb.DetectorType_Cloudsmith, Verified: false, }, }, diff --git a/pkg/detectors/cloverly/cloverly.go b/pkg/detectors/cloverly/cloverly.go index 3e775a95d28d..47170680727e 100644 --- a/pkg/detectors/cloverly/cloverly.go +++ b/pkg/detectors/cloverly/cloverly.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -41,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Cloverly, + DetectorType: detector_typepb.DetectorType_Cloverly, Raw: []byte(resMatch), } @@ -66,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Cloverly +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Cloverly } func (s Scanner) Description() string { diff --git a/pkg/detectors/cloverly/cloverly_integration_test.go b/pkg/detectors/cloverly/cloverly_integration_test.go index 38d6b72a0a2b..70c32ec5f18b 100644 --- a/pkg/detectors/cloverly/cloverly_integration_test.go +++ b/pkg/detectors/cloverly/cloverly_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestCloverly_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestCloverly_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Cloverly, + DetectorType: detector_typepb.DetectorType_Cloverly, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestCloverly_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Cloverly, + DetectorType: detector_typepb.DetectorType_Cloverly, Verified: false, }, }, diff --git a/pkg/detectors/cloze/cloze.go b/pkg/detectors/cloze/cloze.go index a0f0d717eeac..a47009640077 100644 --- a/pkg/detectors/cloze/cloze.go +++ b/pkg/detectors/cloze/cloze.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -50,7 +50,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Cloze, + DetectorType: detector_typepb.DetectorType_Cloze, Raw: []byte(resMatch), } @@ -79,8 +79,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Cloze +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Cloze } func (s Scanner) Description() string { diff --git a/pkg/detectors/cloze/cloze_integration_test.go b/pkg/detectors/cloze/cloze_integration_test.go index 73733f5edd97..a68a67cace90 100644 --- a/pkg/detectors/cloze/cloze_integration_test.go +++ b/pkg/detectors/cloze/cloze_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestCloze_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestCloze_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Cloze, + DetectorType: detector_typepb.DetectorType_Cloze, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestCloze_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Cloze, + DetectorType: detector_typepb.DetectorType_Cloze, Verified: false, }, }, diff --git a/pkg/detectors/clustdoc/clustdoc.go b/pkg/detectors/clustdoc/clustdoc.go index ed178a73b223..a42de2a5aebe 100644 --- a/pkg/detectors/clustdoc/clustdoc.go +++ b/pkg/detectors/clustdoc/clustdoc.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -41,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_ClustDoc, + DetectorType: detector_typepb.DetectorType_ClustDoc, Raw: []byte(resMatch), } @@ -67,8 +67,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_ClustDoc +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_ClustDoc } func (s Scanner) Description() string { diff --git a/pkg/detectors/clustdoc/clustdoc_integration_test.go b/pkg/detectors/clustdoc/clustdoc_integration_test.go index 35802efcedd5..9cd7756b4943 100644 --- a/pkg/detectors/clustdoc/clustdoc_integration_test.go +++ b/pkg/detectors/clustdoc/clustdoc_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestClustDoc_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestClustDoc_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ClustDoc, + DetectorType: detector_typepb.DetectorType_ClustDoc, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestClustDoc_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ClustDoc, + DetectorType: detector_typepb.DetectorType_ClustDoc, Verified: false, }, }, diff --git a/pkg/detectors/coda/coda.go b/pkg/detectors/coda/coda.go index 34ab2cbd1eff..e8281394d548 100644 --- a/pkg/detectors/coda/coda.go +++ b/pkg/detectors/coda/coda.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -42,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Coda, + DetectorType: detector_typepb.DetectorType_Coda, Raw: []byte(resMatch), } @@ -78,8 +78,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Coda +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Coda } func (s Scanner) Description() string { diff --git a/pkg/detectors/coda/coda_integration_test.go b/pkg/detectors/coda/coda_integration_test.go index 4b38faab82ca..1d3484672737 100644 --- a/pkg/detectors/coda/coda_integration_test.go +++ b/pkg/detectors/coda/coda_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestCoda_FromChunk(t *testing.T) { @@ -50,7 +50,7 @@ func TestCoda_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Coda, + DetectorType: detector_typepb.DetectorType_Coda, Verified: true, }, }, @@ -67,7 +67,7 @@ func TestCoda_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Coda, + DetectorType: detector_typepb.DetectorType_Coda, Verified: false, }, }, @@ -96,7 +96,7 @@ func TestCoda_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Coda, + DetectorType: detector_typepb.DetectorType_Coda, Verified: false, }, }, @@ -113,7 +113,7 @@ func TestCoda_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Coda, + DetectorType: detector_typepb.DetectorType_Coda, Verified: false, }, }, diff --git a/pkg/detectors/codacy/codacy.go b/pkg/detectors/codacy/codacy.go index fa2b3197d236..ac56b14d2006 100644 --- a/pkg/detectors/codacy/codacy.go +++ b/pkg/detectors/codacy/codacy.go @@ -9,7 +9,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Codacy, + DetectorType: detector_typepb.DetectorType_Codacy, Raw: []byte(resMatch), } @@ -66,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Codacy +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Codacy } func (s Scanner) Description() string { diff --git a/pkg/detectors/codacy/codacy_integration_test.go b/pkg/detectors/codacy/codacy_integration_test.go index d086024efb8e..3ef55627664d 100644 --- a/pkg/detectors/codacy/codacy_integration_test.go +++ b/pkg/detectors/codacy/codacy_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestCodacy_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestCodacy_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Codacy, + DetectorType: detector_typepb.DetectorType_Codacy, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestCodacy_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Codacy, + DetectorType: detector_typepb.DetectorType_Codacy, Verified: false, }, }, diff --git a/pkg/detectors/codeclimate/codeclimate.go b/pkg/detectors/codeclimate/codeclimate.go index 791b1d1d5885..289528550c98 100644 --- a/pkg/detectors/codeclimate/codeclimate.go +++ b/pkg/detectors/codeclimate/codeclimate.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -48,7 +48,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Codeclimate, + DetectorType: detector_typepb.DetectorType_Codeclimate, Raw: []byte(resMatch), } @@ -81,8 +81,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Codeclimate +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Codeclimate } func (s Scanner) Description() string { diff --git a/pkg/detectors/codeclimate/codeclimate_integration_test.go b/pkg/detectors/codeclimate/codeclimate_integration_test.go index 3a2fcf1b15fa..2a87c4246098 100644 --- a/pkg/detectors/codeclimate/codeclimate_integration_test.go +++ b/pkg/detectors/codeclimate/codeclimate_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestCodeclimate_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestCodeclimate_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Codeclimate, + DetectorType: detector_typepb.DetectorType_Codeclimate, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestCodeclimate_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Codeclimate, + DetectorType: detector_typepb.DetectorType_Codeclimate, Verified: false, }, }, diff --git a/pkg/detectors/codemagic/codemagic.go b/pkg/detectors/codemagic/codemagic.go index d3a455a9e92b..0f5ebb450780 100644 --- a/pkg/detectors/codemagic/codemagic.go +++ b/pkg/detectors/codemagic/codemagic.go @@ -9,7 +9,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Codemagic, + DetectorType: detector_typepb.DetectorType_Codemagic, Raw: []byte(resMatch), } @@ -66,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Codemagic +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Codemagic } func (s Scanner) Description() string { diff --git a/pkg/detectors/codemagic/codemagic_integration_test.go b/pkg/detectors/codemagic/codemagic_integration_test.go index e3ab148ae221..13192c5e54d9 100644 --- a/pkg/detectors/codemagic/codemagic_integration_test.go +++ b/pkg/detectors/codemagic/codemagic_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestCodemagic_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestCodemagic_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Codemagic, + DetectorType: detector_typepb.DetectorType_Codemagic, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestCodemagic_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Codemagic, + DetectorType: detector_typepb.DetectorType_Codemagic, Verified: false, }, }, diff --git a/pkg/detectors/codequiry/codequiry.go b/pkg/detectors/codequiry/codequiry.go index d2a3cce7cb57..bfd5a44b5943 100644 --- a/pkg/detectors/codequiry/codequiry.go +++ b/pkg/detectors/codequiry/codequiry.go @@ -9,7 +9,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Codequiry, + DetectorType: detector_typepb.DetectorType_Codequiry, Raw: []byte(resMatch), } @@ -66,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Codequiry +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Codequiry } func (s Scanner) Description() string { diff --git a/pkg/detectors/codequiry/codequiry_integration_test.go b/pkg/detectors/codequiry/codequiry_integration_test.go index 30e9e1751eab..18f3af5c2bd9 100644 --- a/pkg/detectors/codequiry/codequiry_integration_test.go +++ b/pkg/detectors/codequiry/codequiry_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestCodequiry_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestCodequiry_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Codequiry, + DetectorType: detector_typepb.DetectorType_Codequiry, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestCodequiry_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Codequiry, + DetectorType: detector_typepb.DetectorType_Codequiry, Verified: false, }, }, diff --git a/pkg/detectors/coinapi/coinapi.go b/pkg/detectors/coinapi/coinapi.go index dac83f2a78c6..2b63a16a8d0d 100644 --- a/pkg/detectors/coinapi/coinapi.go +++ b/pkg/detectors/coinapi/coinapi.go @@ -9,7 +9,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_CoinApi, + DetectorType: detector_typepb.DetectorType_CoinApi, Raw: []byte(resMatch), } @@ -65,8 +65,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_CoinApi +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_CoinApi } func (s Scanner) Description() string { diff --git a/pkg/detectors/coinapi/coinapi_integration_test.go b/pkg/detectors/coinapi/coinapi_integration_test.go index 9ee35f7f9d83..e97f35764132 100644 --- a/pkg/detectors/coinapi/coinapi_integration_test.go +++ b/pkg/detectors/coinapi/coinapi_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestCoinApi_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestCoinApi_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_CoinApi, + DetectorType: detector_typepb.DetectorType_CoinApi, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestCoinApi_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_CoinApi, + DetectorType: detector_typepb.DetectorType_CoinApi, Verified: false, }, }, diff --git a/pkg/detectors/coinbase/coinbase.go b/pkg/detectors/coinbase/coinbase.go index f683b1277209..75db24b1c1b8 100644 --- a/pkg/detectors/coinbase/coinbase.go +++ b/pkg/detectors/coinbase/coinbase.go @@ -16,7 +16,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" "github.com/golang-jwt/jwt/v5" ) @@ -68,7 +68,7 @@ func isValidECPrivateKey(pemKey []byte) bool { // Check the key type _, ok := key.Public().(*ecdsa.PublicKey) - return ok + return ok } func (s Scanner) getClient() *http.Client { @@ -103,7 +103,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Coinbase, + DetectorType: detector_typepb.DetectorType_Coinbase, Raw: []byte(resPrivateKey), RawV2: []byte(fmt.Sprintf("%s:%s", resKeyName, resPrivateKey)), } @@ -197,8 +197,8 @@ func makeNonce() []byte { return nonce } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Coinbase +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Coinbase } func (s Scanner) Description() string { diff --git a/pkg/detectors/coinbase/coinbase_integration_test.go b/pkg/detectors/coinbase/coinbase_integration_test.go index d51e352f4b18..1ab543b2fb80 100644 --- a/pkg/detectors/coinbase/coinbase_integration_test.go +++ b/pkg/detectors/coinbase/coinbase_integration_test.go @@ -16,7 +16,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestCoinbase_FromChunk(t *testing.T) { @@ -55,7 +55,7 @@ func TestCoinbase_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Coinbase, + DetectorType: detector_typepb.DetectorType_Coinbase, Verified: true, }, }, @@ -72,7 +72,7 @@ func TestCoinbase_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Coinbase, + DetectorType: detector_typepb.DetectorType_Coinbase, Verified: false, }, }, @@ -101,7 +101,7 @@ func TestCoinbase_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Coinbase, + DetectorType: detector_typepb.DetectorType_Coinbase, Verified: false, }, }, @@ -118,7 +118,7 @@ func TestCoinbase_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Coinbase, + DetectorType: detector_typepb.DetectorType_Coinbase, Verified: false, }, }, diff --git a/pkg/detectors/coinlayer/coinlayer.go b/pkg/detectors/coinlayer/coinlayer.go index 280497e50516..5d53ba96a192 100644 --- a/pkg/detectors/coinlayer/coinlayer.go +++ b/pkg/detectors/coinlayer/coinlayer.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -42,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Coinlayer, + DetectorType: detector_typepb.DetectorType_Coinlayer, Raw: []byte(resMatch), } @@ -75,8 +75,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Coinlayer +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Coinlayer } func (s Scanner) Description() string { diff --git a/pkg/detectors/coinlayer/coinlayer_integration_test.go b/pkg/detectors/coinlayer/coinlayer_integration_test.go index 095501355744..5c8e635d9b34 100644 --- a/pkg/detectors/coinlayer/coinlayer_integration_test.go +++ b/pkg/detectors/coinlayer/coinlayer_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestCoinlayer_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestCoinlayer_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Coinlayer, + DetectorType: detector_typepb.DetectorType_Coinlayer, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestCoinlayer_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Coinlayer, + DetectorType: detector_typepb.DetectorType_Coinlayer, Verified: false, }, }, diff --git a/pkg/detectors/coinlib/coinlib.go b/pkg/detectors/coinlib/coinlib.go index 949fe4480dc1..7a0d014eb7b5 100644 --- a/pkg/detectors/coinlib/coinlib.go +++ b/pkg/detectors/coinlib/coinlib.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -41,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Coinlib, + DetectorType: detector_typepb.DetectorType_Coinlib, Raw: []byte(resMatch), } @@ -65,8 +65,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Coinlib +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Coinlib } func (s Scanner) Description() string { diff --git a/pkg/detectors/coinlib/coinlib_integration_test.go b/pkg/detectors/coinlib/coinlib_integration_test.go index a4955448778f..9d4b0db333ac 100644 --- a/pkg/detectors/coinlib/coinlib_integration_test.go +++ b/pkg/detectors/coinlib/coinlib_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestCoinlib_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestCoinlib_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Coinlib, + DetectorType: detector_typepb.DetectorType_Coinlib, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestCoinlib_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Coinlib, + DetectorType: detector_typepb.DetectorType_Coinlib, Verified: false, }, }, diff --git a/pkg/detectors/collect2/collect2.go b/pkg/detectors/collect2/collect2.go index 52e316d0d40a..57b3d6dc7308 100644 --- a/pkg/detectors/collect2/collect2.go +++ b/pkg/detectors/collect2/collect2.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -41,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Collect2, + DetectorType: detector_typepb.DetectorType_Collect2, Raw: []byte(resMatch), } @@ -66,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Collect2 +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Collect2 } func (s Scanner) Description() string { diff --git a/pkg/detectors/collect2/collect2_integration_test.go b/pkg/detectors/collect2/collect2_integration_test.go index ddd91500e1fc..7217dfbd0072 100644 --- a/pkg/detectors/collect2/collect2_integration_test.go +++ b/pkg/detectors/collect2/collect2_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestCollect2_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestCollect2_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Collect2, + DetectorType: detector_typepb.DetectorType_Collect2, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestCollect2_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Collect2, + DetectorType: detector_typepb.DetectorType_Collect2, Verified: false, }, }, diff --git a/pkg/detectors/column/column.go b/pkg/detectors/column/column.go index b33f862771be..0172aa877d29 100644 --- a/pkg/detectors/column/column.go +++ b/pkg/detectors/column/column.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -42,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Column, + DetectorType: detector_typepb.DetectorType_Column, Raw: []byte(resMatch), } @@ -70,8 +70,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Column +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Column } func (s Scanner) Description() string { diff --git a/pkg/detectors/column/column_integration_test.go b/pkg/detectors/column/column_integration_test.go index 6e9b22e4f5cc..bec2f6dd3c75 100644 --- a/pkg/detectors/column/column_integration_test.go +++ b/pkg/detectors/column/column_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestColumn_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestColumn_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Column, + DetectorType: detector_typepb.DetectorType_Column, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestColumn_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Column, + DetectorType: detector_typepb.DetectorType_Column, Verified: false, }, }, diff --git a/pkg/detectors/commercejs/commercejs.go b/pkg/detectors/commercejs/commercejs.go index 05de8861185a..4dd196992df6 100644 --- a/pkg/detectors/commercejs/commercejs.go +++ b/pkg/detectors/commercejs/commercejs.go @@ -9,7 +9,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_CommerceJS, + DetectorType: detector_typepb.DetectorType_CommerceJS, Raw: []byte(resMatch), } @@ -65,8 +65,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_CommerceJS +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_CommerceJS } func (s Scanner) Description() string { diff --git a/pkg/detectors/commercejs/commercejs_integration_test.go b/pkg/detectors/commercejs/commercejs_integration_test.go index 0c39e067e92a..6d4e83211733 100644 --- a/pkg/detectors/commercejs/commercejs_integration_test.go +++ b/pkg/detectors/commercejs/commercejs_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestCommerceJS_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestCommerceJS_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_CommerceJS, + DetectorType: detector_typepb.DetectorType_CommerceJS, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestCommerceJS_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_CommerceJS, + DetectorType: detector_typepb.DetectorType_CommerceJS, Verified: false, }, }, diff --git a/pkg/detectors/commodities/commodities.go b/pkg/detectors/commodities/commodities.go index e68b623877a4..37f440ab2a89 100644 --- a/pkg/detectors/commodities/commodities.go +++ b/pkg/detectors/commodities/commodities.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -42,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Commodities, + DetectorType: detector_typepb.DetectorType_Commodities, Raw: []byte(resMatch), } @@ -77,8 +77,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Commodities +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Commodities } func (s Scanner) Description() string { diff --git a/pkg/detectors/commodities/commodities_integration_test.go b/pkg/detectors/commodities/commodities_integration_test.go index 0c0ef7c2dbc0..7de0292eac94 100644 --- a/pkg/detectors/commodities/commodities_integration_test.go +++ b/pkg/detectors/commodities/commodities_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestCommodities_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestCommodities_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Commodities, + DetectorType: detector_typepb.DetectorType_Commodities, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestCommodities_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Commodities, + DetectorType: detector_typepb.DetectorType_Commodities, Verified: false, }, }, diff --git a/pkg/detectors/companyhub/companyhub.go b/pkg/detectors/companyhub/companyhub.go index 7178cf8e6a6a..e0e2bdde0d74 100644 --- a/pkg/detectors/companyhub/companyhub.go +++ b/pkg/detectors/companyhub/companyhub.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -48,7 +48,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resIdMatch := strings.TrimSpace(idmatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_CompanyHub, + DetectorType: detector_typepb.DetectorType_CompanyHub, Raw: []byte(resMatch), RawV2: []byte(resMatch + resIdMatch), } @@ -77,8 +77,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_CompanyHub +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_CompanyHub } func (s Scanner) Description() string { diff --git a/pkg/detectors/companyhub/companyhub_integration_test.go b/pkg/detectors/companyhub/companyhub_integration_test.go index 877eef42e4e7..c43b6d341899 100644 --- a/pkg/detectors/companyhub/companyhub_integration_test.go +++ b/pkg/detectors/companyhub/companyhub_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestCompanyHub_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestCompanyHub_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_CompanyHub, + DetectorType: detector_typepb.DetectorType_CompanyHub, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestCompanyHub_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_CompanyHub, + DetectorType: detector_typepb.DetectorType_CompanyHub, Verified: false, }, }, diff --git a/pkg/detectors/confluent/confluent.go b/pkg/detectors/confluent/confluent.go index 6283e8f7c227..acedec9cb08f 100644 --- a/pkg/detectors/confluent/confluent.go +++ b/pkg/detectors/confluent/confluent.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -49,7 +49,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resSecret := strings.TrimSpace(secret[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Confluent, + DetectorType: detector_typepb.DetectorType_Confluent, Raw: []byte(resMatch), RawV2: []byte(resMatch + resSecret), } @@ -79,8 +79,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Confluent +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Confluent } func (s Scanner) Description() string { diff --git a/pkg/detectors/confluent/confluent_integration_test.go b/pkg/detectors/confluent/confluent_integration_test.go index 91b535decaa5..c6aa6d73fb37 100644 --- a/pkg/detectors/confluent/confluent_integration_test.go +++ b/pkg/detectors/confluent/confluent_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestConfluent_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestConfluent_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Confluent, + DetectorType: detector_typepb.DetectorType_Confluent, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestConfluent_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Confluent, + DetectorType: detector_typepb.DetectorType_Confluent, Verified: false, }, }, diff --git a/pkg/detectors/contentfulpersonalaccesstoken/contentfulpersonalaccesstoken.go b/pkg/detectors/contentfulpersonalaccesstoken/contentfulpersonalaccesstoken.go index 517951928e84..ec7f5660a201 100644 --- a/pkg/detectors/contentfulpersonalaccesstoken/contentfulpersonalaccesstoken.go +++ b/pkg/detectors/contentfulpersonalaccesstoken/contentfulpersonalaccesstoken.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -39,7 +39,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result keyRes := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_ContentfulPersonalAccessToken, + DetectorType: detector_typepb.DetectorType_ContentfulPersonalAccessToken, Raw: []byte(keyRes), } @@ -65,8 +65,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_ContentfulPersonalAccessToken +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_ContentfulPersonalAccessToken } func (s Scanner) Description() string { diff --git a/pkg/detectors/contentfulpersonalaccesstoken/contentfulpersonalacesstoken_integration_test.go b/pkg/detectors/contentfulpersonalaccesstoken/contentfulpersonalacesstoken_integration_test.go index f69286595b34..0bf4bdb68c47 100644 --- a/pkg/detectors/contentfulpersonalaccesstoken/contentfulpersonalacesstoken_integration_test.go +++ b/pkg/detectors/contentfulpersonalaccesstoken/contentfulpersonalacesstoken_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestContentfulPersonalAccessToken_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestContentfulPersonalAccessToken_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ContentfulPersonalAccessToken, + DetectorType: detector_typepb.DetectorType_ContentfulPersonalAccessToken, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestContentfulPersonalAccessToken_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ContentfulPersonalAccessToken, + DetectorType: detector_typepb.DetectorType_ContentfulPersonalAccessToken, Verified: false, }, }, diff --git a/pkg/detectors/conversiontools/conversiontools.go b/pkg/detectors/conversiontools/conversiontools.go index 0272ef5c863f..a83f00c19547 100644 --- a/pkg/detectors/conversiontools/conversiontools.go +++ b/pkg/detectors/conversiontools/conversiontools.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -41,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_ConversionTools, + DetectorType: detector_typepb.DetectorType_ConversionTools, Raw: []byte(resMatch), } @@ -68,8 +68,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_ConversionTools +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_ConversionTools } func (s Scanner) Description() string { diff --git a/pkg/detectors/conversiontools/conversiontools_integration_test.go b/pkg/detectors/conversiontools/conversiontools_integration_test.go index ab698d0a25ff..f791fe68bcf1 100644 --- a/pkg/detectors/conversiontools/conversiontools_integration_test.go +++ b/pkg/detectors/conversiontools/conversiontools_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestConversionTools_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestConversionTools_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ConversionTools, + DetectorType: detector_typepb.DetectorType_ConversionTools, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestConversionTools_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ConversionTools, + DetectorType: detector_typepb.DetectorType_ConversionTools, Verified: false, }, }, diff --git a/pkg/detectors/convertapi/convertapi.go b/pkg/detectors/convertapi/convertapi.go index eaa3edaf16d8..ad9c70477591 100644 --- a/pkg/detectors/convertapi/convertapi.go +++ b/pkg/detectors/convertapi/convertapi.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -41,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_ConvertApi, + DetectorType: detector_typepb.DetectorType_ConvertApi, Raw: []byte(resMatch), } @@ -65,8 +65,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_ConvertApi +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_ConvertApi } func (s Scanner) Description() string { diff --git a/pkg/detectors/convertapi/convertapi_integration_test.go b/pkg/detectors/convertapi/convertapi_integration_test.go index 89acb1db5823..b544458db9cc 100644 --- a/pkg/detectors/convertapi/convertapi_integration_test.go +++ b/pkg/detectors/convertapi/convertapi_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestConvertApi_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestConvertApi_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ConvertApi, + DetectorType: detector_typepb.DetectorType_ConvertApi, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestConvertApi_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ConvertApi, + DetectorType: detector_typepb.DetectorType_ConvertApi, Verified: false, }, }, diff --git a/pkg/detectors/convertkit/convertkit.go b/pkg/detectors/convertkit/convertkit.go index 73d41bf38cda..447c148adb31 100644 --- a/pkg/detectors/convertkit/convertkit.go +++ b/pkg/detectors/convertkit/convertkit.go @@ -9,7 +9,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Convertkit, + DetectorType: detector_typepb.DetectorType_Convertkit, Raw: []byte(resMatch), } @@ -65,8 +65,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Convertkit +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Convertkit } func (s Scanner) Description() string { diff --git a/pkg/detectors/convertkit/convertkit_integration_test.go b/pkg/detectors/convertkit/convertkit_integration_test.go index 2b773d28c04e..820be0652294 100644 --- a/pkg/detectors/convertkit/convertkit_integration_test.go +++ b/pkg/detectors/convertkit/convertkit_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestConvertkit_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestConvertkit_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Convertkit, + DetectorType: detector_typepb.DetectorType_Convertkit, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestConvertkit_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Convertkit, + DetectorType: detector_typepb.DetectorType_Convertkit, Verified: false, }, }, diff --git a/pkg/detectors/convier/convier.go b/pkg/detectors/convier/convier.go index e8dd1517d5fa..2236e579f157 100644 --- a/pkg/detectors/convier/convier.go +++ b/pkg/detectors/convier/convier.go @@ -12,7 +12,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -43,7 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Convier, + DetectorType: detector_typepb.DetectorType_Convier, Raw: []byte(resMatch), } @@ -80,8 +80,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Convier +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Convier } func (s Scanner) Description() string { diff --git a/pkg/detectors/convier/convier_integration_test.go b/pkg/detectors/convier/convier_integration_test.go index 190274a00bf4..a31254df54ac 100644 --- a/pkg/detectors/convier/convier_integration_test.go +++ b/pkg/detectors/convier/convier_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestConvier_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestConvier_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Convier, + DetectorType: detector_typepb.DetectorType_Convier, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestConvier_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Convier, + DetectorType: detector_typepb.DetectorType_Convier, Verified: false, }, }, diff --git a/pkg/detectors/copper/copper.go b/pkg/detectors/copper/copper.go index 85a53e62568a..b4ac66ccaee6 100644 --- a/pkg/detectors/copper/copper.go +++ b/pkg/detectors/copper/copper.go @@ -12,7 +12,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -54,7 +54,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resIdMatch := strings.TrimSpace(idmatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Copper, + DetectorType: detector_typepb.DetectorType_Copper, Raw: []byte(resMatch), RawV2: []byte(resMatch + resIdMatch), } @@ -122,8 +122,8 @@ func verifyCopper(ctx context.Context, client *http.Client, email, apiKey string } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Copper +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Copper } func (s Scanner) Description() string { diff --git a/pkg/detectors/copper/copper_integration_test.go b/pkg/detectors/copper/copper_integration_test.go index 070a1aac77b6..6eabfdea9291 100644 --- a/pkg/detectors/copper/copper_integration_test.go +++ b/pkg/detectors/copper/copper_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/google/go-cmp/cmp/cmpopts" "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestCopper_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestCopper_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Copper, + DetectorType: detector_typepb.DetectorType_Copper, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestCopper_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Copper, + DetectorType: detector_typepb.DetectorType_Copper, Verified: false, }, }, diff --git a/pkg/detectors/couchbase/couchbase.go b/pkg/detectors/couchbase/couchbase.go index dda7d1430a56..a232ced3a63a 100644 --- a/pkg/detectors/couchbase/couchbase.go +++ b/pkg/detectors/couchbase/couchbase.go @@ -11,7 +11,7 @@ import ( "github.com/couchbase/gocb/v2" "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -28,8 +28,8 @@ var ( passwordPat = common.PasswordRegexCheck(`^<>;.*&|£\n\s`) ) -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Couchbase +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Couchbase } func (s Scanner) Description() string { @@ -68,7 +68,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Couchbase, + DetectorType: detector_typepb.DetectorType_Couchbase, Raw: fmt.Appendf([]byte(""), "%s:%s@%s", username, password, connString), } diff --git a/pkg/detectors/couchbase/couchbase_integration_test.go b/pkg/detectors/couchbase/couchbase_integration_test.go index 61f7f3eabfd2..999a424a0a5a 100644 --- a/pkg/detectors/couchbase/couchbase_integration_test.go +++ b/pkg/detectors/couchbase/couchbase_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestCouchbase_FromChunk(t *testing.T) { @@ -51,7 +51,7 @@ func TestCouchbase_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Couchbase, + DetectorType: detector_typepb.DetectorType_Couchbase, Verified: true, }, }, @@ -67,7 +67,7 @@ func TestCouchbase_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Couchbase, + DetectorType: detector_typepb.DetectorType_Couchbase, Verified: false, }, }, diff --git a/pkg/detectors/countrylayer/countrylayer.go b/pkg/detectors/countrylayer/countrylayer.go index a6f251769246..262bae6da5cf 100644 --- a/pkg/detectors/countrylayer/countrylayer.go +++ b/pkg/detectors/countrylayer/countrylayer.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -41,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_CountryLayer, + DetectorType: detector_typepb.DetectorType_CountryLayer, Raw: []byte(resMatch), } @@ -65,8 +65,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_CountryLayer +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_CountryLayer } func (s Scanner) Description() string { diff --git a/pkg/detectors/countrylayer/countrylayer_integration_test.go b/pkg/detectors/countrylayer/countrylayer_integration_test.go index c70dcc65ada0..616dfa87e379 100644 --- a/pkg/detectors/countrylayer/countrylayer_integration_test.go +++ b/pkg/detectors/countrylayer/countrylayer_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestCountryLayer_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestCountryLayer_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_CountryLayer, + DetectorType: detector_typepb.DetectorType_CountryLayer, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestCountryLayer_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_CountryLayer, + DetectorType: detector_typepb.DetectorType_CountryLayer, Verified: false, }, }, diff --git a/pkg/detectors/courier/courier.go b/pkg/detectors/courier/courier.go index cf9edc53077b..6ff8d2daa15b 100644 --- a/pkg/detectors/courier/courier.go +++ b/pkg/detectors/courier/courier.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -41,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Courier, + DetectorType: detector_typepb.DetectorType_Courier, Raw: []byte(resMatch), } @@ -67,8 +67,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Courier +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Courier } func (s Scanner) Description() string { diff --git a/pkg/detectors/courier/courier_integration_test.go b/pkg/detectors/courier/courier_integration_test.go index 2b6f81803575..f205d67cdfd4 100644 --- a/pkg/detectors/courier/courier_integration_test.go +++ b/pkg/detectors/courier/courier_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestCourier_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestCourier_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Courier, + DetectorType: detector_typepb.DetectorType_Courier, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestCourier_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Courier, + DetectorType: detector_typepb.DetectorType_Courier, Verified: false, }, }, diff --git a/pkg/detectors/coveralls/coveralls.go b/pkg/detectors/coveralls/coveralls.go index 587386841c5b..244910acc9cb 100644 --- a/pkg/detectors/coveralls/coveralls.go +++ b/pkg/detectors/coveralls/coveralls.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -41,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Coveralls, + DetectorType: detector_typepb.DetectorType_Coveralls, Raw: []byte(resMatch), } @@ -66,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Coveralls +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Coveralls } func (s Scanner) Description() string { diff --git a/pkg/detectors/coveralls/coveralls_integration_test.go b/pkg/detectors/coveralls/coveralls_integration_test.go index 17b7299de839..4852dcc1848a 100644 --- a/pkg/detectors/coveralls/coveralls_integration_test.go +++ b/pkg/detectors/coveralls/coveralls_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestCoveralls_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestCoveralls_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Coveralls, + DetectorType: detector_typepb.DetectorType_Coveralls, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestCoveralls_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Coveralls, + DetectorType: detector_typepb.DetectorType_Coveralls, Verified: false, }, }, diff --git a/pkg/detectors/craftmypdf/craftmypdf.go b/pkg/detectors/craftmypdf/craftmypdf.go index fcbe111c7304..9d17ee9fff3b 100644 --- a/pkg/detectors/craftmypdf/craftmypdf.go +++ b/pkg/detectors/craftmypdf/craftmypdf.go @@ -9,7 +9,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_CraftMyPDF, + DetectorType: detector_typepb.DetectorType_CraftMyPDF, Raw: []byte(resMatch), } @@ -66,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_CraftMyPDF +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_CraftMyPDF } func (s Scanner) Description() string { diff --git a/pkg/detectors/craftmypdf/craftmypdf_integration_test.go b/pkg/detectors/craftmypdf/craftmypdf_integration_test.go index b2952d214408..647f3e96f785 100644 --- a/pkg/detectors/craftmypdf/craftmypdf_integration_test.go +++ b/pkg/detectors/craftmypdf/craftmypdf_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestCraftMyPDF_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestCraftMyPDF_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_CraftMyPDF, + DetectorType: detector_typepb.DetectorType_CraftMyPDF, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestCraftMyPDF_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_CraftMyPDF, + DetectorType: detector_typepb.DetectorType_CraftMyPDF, Verified: false, }, }, diff --git a/pkg/detectors/crowdin/crowdin.go b/pkg/detectors/crowdin/crowdin.go index 5abb5b110d64..abf5516cfb91 100644 --- a/pkg/detectors/crowdin/crowdin.go +++ b/pkg/detectors/crowdin/crowdin.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Crowdin, + DetectorType: detector_typepb.DetectorType_Crowdin, Raw: []byte(resMatch), } @@ -64,8 +64,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Crowdin +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Crowdin } func (s Scanner) Description() string { diff --git a/pkg/detectors/crowdin/crowdin_integration_test.go b/pkg/detectors/crowdin/crowdin_integration_test.go index 10a050d8cb04..7b4e4cf2689a 100644 --- a/pkg/detectors/crowdin/crowdin_integration_test.go +++ b/pkg/detectors/crowdin/crowdin_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestCrowdin_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestCrowdin_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Crowdin, + DetectorType: detector_typepb.DetectorType_Crowdin, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestCrowdin_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Crowdin, + DetectorType: detector_typepb.DetectorType_Crowdin, Verified: false, }, }, diff --git a/pkg/detectors/cryptocompare/cryptocompare.go b/pkg/detectors/cryptocompare/cryptocompare.go index 11bb6fa991db..cfde06058d99 100644 --- a/pkg/detectors/cryptocompare/cryptocompare.go +++ b/pkg/detectors/cryptocompare/cryptocompare.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -41,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_CryptoCompare, + DetectorType: detector_typepb.DetectorType_CryptoCompare, Raw: []byte(resMatch), } @@ -75,8 +75,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_CryptoCompare +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_CryptoCompare } func (s Scanner) Description() string { diff --git a/pkg/detectors/cryptocompare/cryptocompare_integration_test.go b/pkg/detectors/cryptocompare/cryptocompare_integration_test.go index 49f069a3c993..60113a5331bf 100644 --- a/pkg/detectors/cryptocompare/cryptocompare_integration_test.go +++ b/pkg/detectors/cryptocompare/cryptocompare_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestCryptoCompare_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestCryptoCompare_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_CryptoCompare, + DetectorType: detector_typepb.DetectorType_CryptoCompare, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestCryptoCompare_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_CryptoCompare, + DetectorType: detector_typepb.DetectorType_CryptoCompare, Verified: false, }, }, diff --git a/pkg/detectors/currencycloud/currencycloud.go b/pkg/detectors/currencycloud/currencycloud.go index 188bacc3c5dc..a71fbe22c511 100644 --- a/pkg/detectors/currencycloud/currencycloud.go +++ b/pkg/detectors/currencycloud/currencycloud.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -51,7 +51,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for emailmatch := range uniqueEmailMatches { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_CurrencyCloud, + DetectorType: detector_typepb.DetectorType_CurrencyCloud, Raw: []byte(resMatch), } environments := []string{"devapi", "api"} @@ -88,8 +88,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_CurrencyCloud +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_CurrencyCloud } func (s Scanner) Description() string { diff --git a/pkg/detectors/currencycloud/currencycloud_integration_test.go b/pkg/detectors/currencycloud/currencycloud_integration_test.go index cddcf55b6db8..26a22385a169 100644 --- a/pkg/detectors/currencycloud/currencycloud_integration_test.go +++ b/pkg/detectors/currencycloud/currencycloud_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestCurrencycloud_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestCurrencycloud_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_CurrencyCloud, + DetectorType: detector_typepb.DetectorType_CurrencyCloud, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestCurrencycloud_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_CurrencyCloud, + DetectorType: detector_typepb.DetectorType_CurrencyCloud, Verified: false, }, }, diff --git a/pkg/detectors/currencyfreaks/currencyfreaks.go b/pkg/detectors/currencyfreaks/currencyfreaks.go index 890ef352fa0c..aad85c162926 100644 --- a/pkg/detectors/currencyfreaks/currencyfreaks.go +++ b/pkg/detectors/currencyfreaks/currencyfreaks.go @@ -9,7 +9,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Currencyfreaks, + DetectorType: detector_typepb.DetectorType_Currencyfreaks, Raw: []byte(resMatch), } @@ -64,8 +64,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Currencyfreaks +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Currencyfreaks } func (s Scanner) Description() string { diff --git a/pkg/detectors/currencyfreaks/currencyfreaks_integration_test.go b/pkg/detectors/currencyfreaks/currencyfreaks_integration_test.go index e3daa56b1e71..e09b59251763 100644 --- a/pkg/detectors/currencyfreaks/currencyfreaks_integration_test.go +++ b/pkg/detectors/currencyfreaks/currencyfreaks_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestCurrencyfreaks_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestCurrencyfreaks_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Currencyfreaks, + DetectorType: detector_typepb.DetectorType_Currencyfreaks, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestCurrencyfreaks_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Currencyfreaks, + DetectorType: detector_typepb.DetectorType_Currencyfreaks, Verified: false, }, }, diff --git a/pkg/detectors/currencylayer/currencylayer.go b/pkg/detectors/currencylayer/currencylayer.go index 0e50615f8781..086a6976eda1 100644 --- a/pkg/detectors/currencylayer/currencylayer.go +++ b/pkg/detectors/currencylayer/currencylayer.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -42,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Currencylayer, + DetectorType: detector_typepb.DetectorType_Currencylayer, Raw: []byte(resMatch), } @@ -75,8 +75,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Currencylayer +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Currencylayer } func (s Scanner) Description() string { diff --git a/pkg/detectors/currencylayer/currencylayer_integration_test.go b/pkg/detectors/currencylayer/currencylayer_integration_test.go index 5cc7958d8583..fe6a85f8b583 100644 --- a/pkg/detectors/currencylayer/currencylayer_integration_test.go +++ b/pkg/detectors/currencylayer/currencylayer_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestCurrencylayer_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestCurrencylayer_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Currencylayer, + DetectorType: detector_typepb.DetectorType_Currencylayer, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestCurrencylayer_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Currencylayer, + DetectorType: detector_typepb.DetectorType_Currencylayer, Verified: false, }, }, diff --git a/pkg/detectors/currencyscoop/currencyscoop.go b/pkg/detectors/currencyscoop/currencyscoop.go index 3c6964dbb40b..259e267a871a 100644 --- a/pkg/detectors/currencyscoop/currencyscoop.go +++ b/pkg/detectors/currencyscoop/currencyscoop.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -41,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_CurrencyScoop, + DetectorType: detector_typepb.DetectorType_CurrencyScoop, Raw: []byte(resMatch), } @@ -66,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_CurrencyScoop +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_CurrencyScoop } func (s Scanner) Description() string { diff --git a/pkg/detectors/currencyscoop/currencyscoop_integration_test.go b/pkg/detectors/currencyscoop/currencyscoop_integration_test.go index 378a11cff3ba..21b9ae242aa3 100644 --- a/pkg/detectors/currencyscoop/currencyscoop_integration_test.go +++ b/pkg/detectors/currencyscoop/currencyscoop_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestCurrencyscoop_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestCurrencyscoop_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_CurrencyScoop, + DetectorType: detector_typepb.DetectorType_CurrencyScoop, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestCurrencyscoop_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_CurrencyScoop, + DetectorType: detector_typepb.DetectorType_CurrencyScoop, Verified: false, }, }, diff --git a/pkg/detectors/currentsapi/currentsapi.go b/pkg/detectors/currentsapi/currentsapi.go index 63e3f8181ab3..f80561df161b 100644 --- a/pkg/detectors/currentsapi/currentsapi.go +++ b/pkg/detectors/currentsapi/currentsapi.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -25,8 +25,8 @@ var ( keyPat = regexp.MustCompile(detectors.PrefixRegex([]string{"currentsapi"}) + `([a-zA-Z0-9_-]{48})`) ) -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_CurrentsAPI +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_CurrentsAPI } func (s Scanner) Description() string { @@ -51,7 +51,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for token := range uniqueTokens { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_CurrentsAPI, + DetectorType: detector_typepb.DetectorType_CurrentsAPI, Raw: []byte(token), } diff --git a/pkg/detectors/currentsapi/currentsapi_integration_test.go b/pkg/detectors/currentsapi/currentsapi_integration_test.go index 63a8e8ed5e6b..e5b35444154d 100644 --- a/pkg/detectors/currentsapi/currentsapi_integration_test.go +++ b/pkg/detectors/currentsapi/currentsapi_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestCurrentsAPI_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestCurrentsAPI_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_CurrentsAPI, + DetectorType: detector_typepb.DetectorType_CurrentsAPI, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestCurrentsAPI_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_CurrentsAPI, + DetectorType: detector_typepb.DetectorType_CurrentsAPI, Verified: false, }, }, diff --git a/pkg/detectors/customerguru/customerguru.go b/pkg/detectors/customerguru/customerguru.go index 94714af815cf..798df0a58bb2 100644 --- a/pkg/detectors/customerguru/customerguru.go +++ b/pkg/detectors/customerguru/customerguru.go @@ -9,7 +9,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -47,7 +47,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resIdMatch := strings.TrimSpace(idmatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_CustomerGuru, + DetectorType: detector_typepb.DetectorType_CustomerGuru, Raw: []byte(resMatch), RawV2: []byte(resMatch + resIdMatch), } @@ -76,8 +76,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_CustomerGuru +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_CustomerGuru } func (s Scanner) Description() string { diff --git a/pkg/detectors/customerguru/customerguru_integration_test.go b/pkg/detectors/customerguru/customerguru_integration_test.go index 3c16c76aa806..3dd210545141 100644 --- a/pkg/detectors/customerguru/customerguru_integration_test.go +++ b/pkg/detectors/customerguru/customerguru_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestCustomerGuru_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestCustomerGuru_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_CustomerGuru, + DetectorType: detector_typepb.DetectorType_CustomerGuru, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestCustomerGuru_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_CustomerGuru, + DetectorType: detector_typepb.DetectorType_CustomerGuru, Verified: false, }, }, diff --git a/pkg/detectors/customerio/customerio.go b/pkg/detectors/customerio/customerio.go index 743a020b1b5e..1d9c076393af 100644 --- a/pkg/detectors/customerio/customerio.go +++ b/pkg/detectors/customerio/customerio.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -47,7 +47,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for _, idmatch := range idmatches { resIdMatch := strings.TrimSpace(idmatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_CustomerIO, + DetectorType: detector_typepb.DetectorType_CustomerIO, Raw: []byte(resMatch), RawV2: []byte(resMatch + resIdMatch), } @@ -81,8 +81,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_CustomerIO +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_CustomerIO } func (s Scanner) Description() string { diff --git a/pkg/detectors/customerio/customerio_integration_test.go b/pkg/detectors/customerio/customerio_integration_test.go index a28613e0433b..cd83701fb754 100644 --- a/pkg/detectors/customerio/customerio_integration_test.go +++ b/pkg/detectors/customerio/customerio_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestCustomerIO_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestCustomerIO_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_CustomerIO, + DetectorType: detector_typepb.DetectorType_CustomerIO, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestCustomerIO_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_CustomerIO, + DetectorType: detector_typepb.DetectorType_CustomerIO, Verified: false, }, }, diff --git a/pkg/detectors/d7network/d7network.go b/pkg/detectors/d7network/d7network.go index 2756175f68c7..1944658394ca 100644 --- a/pkg/detectors/d7network/d7network.go +++ b/pkg/detectors/d7network/d7network.go @@ -8,7 +8,7 @@ import ( regexp "github.com/wasilibs/go-re2" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -37,7 +37,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_D7Network, + DetectorType: detector_typepb.DetectorType_D7Network, Raw: []byte(resMatch), } @@ -62,8 +62,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_D7Network +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_D7Network } func (s Scanner) Description() string { diff --git a/pkg/detectors/d7network/d7network_integration_test.go b/pkg/detectors/d7network/d7network_integration_test.go index 737362aae3c6..e646b4e5fab8 100644 --- a/pkg/detectors/d7network/d7network_integration_test.go +++ b/pkg/detectors/d7network/d7network_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestD7Network_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestD7Network_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_D7Network, + DetectorType: detector_typepb.DetectorType_D7Network, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestD7Network_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_D7Network, + DetectorType: detector_typepb.DetectorType_D7Network, Verified: false, }, }, diff --git a/pkg/detectors/dailyco/dailyco.go b/pkg/detectors/dailyco/dailyco.go index c4108b49cb2f..6d3b8bd655fa 100644 --- a/pkg/detectors/dailyco/dailyco.go +++ b/pkg/detectors/dailyco/dailyco.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -41,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_DailyCO, + DetectorType: detector_typepb.DetectorType_DailyCO, Raw: []byte(resMatch), } @@ -66,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_DailyCO +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_DailyCO } func (s Scanner) Description() string { diff --git a/pkg/detectors/dailyco/dailyco_integration_test.go b/pkg/detectors/dailyco/dailyco_integration_test.go index 8832457eb5c4..44d700f04b73 100644 --- a/pkg/detectors/dailyco/dailyco_integration_test.go +++ b/pkg/detectors/dailyco/dailyco_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestDailyCO_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestDailyCO_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_DailyCO, + DetectorType: detector_typepb.DetectorType_DailyCO, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestDailyCO_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_DailyCO, + DetectorType: detector_typepb.DetectorType_DailyCO, Verified: false, }, }, diff --git a/pkg/detectors/dandelion/dandelion.go b/pkg/detectors/dandelion/dandelion.go index 596aeff9c01c..4c17b21bbcb7 100644 --- a/pkg/detectors/dandelion/dandelion.go +++ b/pkg/detectors/dandelion/dandelion.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -41,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Dandelion, + DetectorType: detector_typepb.DetectorType_Dandelion, Raw: []byte(resMatch), } @@ -65,8 +65,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Dandelion +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Dandelion } func (s Scanner) Description() string { diff --git a/pkg/detectors/dandelion/dandelion_integration_test.go b/pkg/detectors/dandelion/dandelion_integration_test.go index 3f7f376312e4..95b7bbf937b4 100644 --- a/pkg/detectors/dandelion/dandelion_integration_test.go +++ b/pkg/detectors/dandelion/dandelion_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestDandelion_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestDandelion_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Dandelion, + DetectorType: detector_typepb.DetectorType_Dandelion, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestDandelion_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Dandelion, + DetectorType: detector_typepb.DetectorType_Dandelion, Verified: false, }, }, diff --git a/pkg/detectors/dareboost/dareboost.go b/pkg/detectors/dareboost/dareboost.go index 38c52423c07d..4881da0e7c90 100644 --- a/pkg/detectors/dareboost/dareboost.go +++ b/pkg/detectors/dareboost/dareboost.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -41,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Dareboost, + DetectorType: detector_typepb.DetectorType_Dareboost, Raw: []byte(resMatch), } @@ -80,8 +80,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Dareboost +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Dareboost } func (s Scanner) Description() string { diff --git a/pkg/detectors/dareboost/dareboost_integration_test.go b/pkg/detectors/dareboost/dareboost_integration_test.go index 356ebace0d8f..e586f02c0abd 100644 --- a/pkg/detectors/dareboost/dareboost_integration_test.go +++ b/pkg/detectors/dareboost/dareboost_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestDareboost_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestDareboost_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Dareboost, + DetectorType: detector_typepb.DetectorType_Dareboost, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestDareboost_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Dareboost, + DetectorType: detector_typepb.DetectorType_Dareboost, Verified: false, }, }, diff --git a/pkg/detectors/databox/databox.go b/pkg/detectors/databox/databox.go index ab2da25ca559..bd43d3ea4c4c 100644 --- a/pkg/detectors/databox/databox.go +++ b/pkg/detectors/databox/databox.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -42,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Databox, + DetectorType: detector_typepb.DetectorType_Databox, Raw: []byte(resMatch), } if verify { @@ -79,8 +79,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Databox +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Databox } func (s Scanner) Description() string { diff --git a/pkg/detectors/databox/databox_integration_test.go b/pkg/detectors/databox/databox_integration_test.go index 4492d4cdb412..5da82a6eb538 100644 --- a/pkg/detectors/databox/databox_integration_test.go +++ b/pkg/detectors/databox/databox_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestDatabox_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestDatabox_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Databox, + DetectorType: detector_typepb.DetectorType_Databox, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestDatabox_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Databox, + DetectorType: detector_typepb.DetectorType_Databox, Verified: false, }, }, diff --git a/pkg/detectors/databrickstoken/databrickstoken.go b/pkg/detectors/databrickstoken/databrickstoken.go index 676de74a893e..6cb73fccae7a 100644 --- a/pkg/detectors/databrickstoken/databrickstoken.go +++ b/pkg/detectors/databrickstoken/databrickstoken.go @@ -10,7 +10,7 @@ import ( regexp "github.com/wasilibs/go-re2" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -51,7 +51,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for token := range uniqueTokens { for domain := range uniqueDomains { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_DatabricksToken, + DetectorType: detector_typepb.DetectorType_DatabricksToken, Raw: []byte(token), RawV2: []byte(token + domain), } @@ -80,8 +80,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_DatabricksToken +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_DatabricksToken } func (s Scanner) Description() string { diff --git a/pkg/detectors/databrickstoken/databrickstoken_integration_test.go b/pkg/detectors/databrickstoken/databrickstoken_integration_test.go index 9957dcb0f9a6..bf4897f2ff89 100644 --- a/pkg/detectors/databrickstoken/databrickstoken_integration_test.go +++ b/pkg/detectors/databrickstoken/databrickstoken_integration_test.go @@ -15,7 +15,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestDatabricksToken_FromChunk(t *testing.T) { @@ -52,7 +52,7 @@ func TestDatabricksToken_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_DatabricksToken, + DetectorType: detector_typepb.DetectorType_DatabricksToken, Verified: true, }, }, @@ -69,7 +69,7 @@ func TestDatabricksToken_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_DatabricksToken, + DetectorType: detector_typepb.DetectorType_DatabricksToken, Verified: false, }, }, @@ -98,7 +98,7 @@ func TestDatabricksToken_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_DatabricksToken, + DetectorType: detector_typepb.DetectorType_DatabricksToken, Verified: false, }, }, @@ -115,7 +115,7 @@ func TestDatabricksToken_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_DatabricksToken, + DetectorType: detector_typepb.DetectorType_DatabricksToken, Verified: false, }, }, diff --git a/pkg/detectors/datadogapikey/datadogapikey.go b/pkg/detectors/datadogapikey/datadogapikey.go index a8554e788705..fefd472f9baa 100644 --- a/pkg/detectors/datadogapikey/datadogapikey.go +++ b/pkg/detectors/datadogapikey/datadogapikey.go @@ -9,7 +9,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" regexp "github.com/wasilibs/go-re2" ) @@ -64,7 +64,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for _, apiMatch := range apiMatches { resApiMatch := strings.TrimSpace(apiMatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_DatadogApikey, + DetectorType: detector_typepb.DetectorType_DatadogApikey, Raw: []byte(resApiMatch), } @@ -117,8 +117,8 @@ func verifyMatch(ctx context.Context, client *http.Client, apiKey, baseUrl strin } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_DatadogApikey +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_DatadogApikey } func (s Scanner) Description() string { diff --git a/pkg/detectors/datadogapikey/datadogapikey_integration_test.go b/pkg/detectors/datadogapikey/datadogapikey_integration_test.go index 27262381f552..f1baa04c96b9 100644 --- a/pkg/detectors/datadogapikey/datadogapikey_integration_test.go +++ b/pkg/detectors/datadogapikey/datadogapikey_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestDataDogApiKey_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestDataDogApiKey_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_DatadogApikey, + DetectorType: detector_typepb.DetectorType_DatadogApikey, Verified: true, AnalysisInfo: map[string]string{ "api_key": apiKey, @@ -69,7 +69,7 @@ func TestDataDogApiKey_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_DatadogApikey, + DetectorType: detector_typepb.DetectorType_DatadogApikey, Verified: false, Raw: []byte(invalidApiKey), }, diff --git a/pkg/detectors/datadogapikey/datadogapikey_test.go b/pkg/detectors/datadogapikey/datadogapikey_test.go index 0a76eb1829f7..dca21a5268d4 100644 --- a/pkg/detectors/datadogapikey/datadogapikey_test.go +++ b/pkg/detectors/datadogapikey/datadogapikey_test.go @@ -9,7 +9,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/engine/ahocorasick" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestDataDogApiKey_Pattern_WithValidAPIKey(t *testing.T) { @@ -25,7 +25,7 @@ func TestDataDogApiKey_Pattern_WithValidAPIKey(t *testing.T) { apiKey := "FKNwdbyfYTmGUm5DK3yHEuK-BBQf0fVG" wantedResult := []detectors.Result{ { - DetectorType: detectorspb.DetectorType_DatadogApikey, + DetectorType: detector_typepb.DetectorType_DatadogApikey, Raw: []byte(apiKey), }, } diff --git a/pkg/detectors/datadogtoken/datadogtoken.go b/pkg/detectors/datadogtoken/datadogtoken.go index f03983f49ece..0996092b0594 100644 --- a/pkg/detectors/datadogtoken/datadogtoken.go +++ b/pkg/detectors/datadogtoken/datadogtoken.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -120,7 +120,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for _, appMatch := range appMatches { resAppMatch := strings.TrimSpace(appMatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_DatadogToken, + DetectorType: detector_typepb.DetectorType_DatadogToken, Raw: []byte(resAppMatch), RawV2: []byte(resAppMatch + resApiMatch), ExtraData: map[string]string{ @@ -167,8 +167,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_DatadogToken +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_DatadogToken } func (s Scanner) Description() string { diff --git a/pkg/detectors/datadogtoken/datadogtoken_integration_test.go b/pkg/detectors/datadogtoken/datadogtoken_integration_test.go index cc731f738fd3..7593b1ed7f3e 100644 --- a/pkg/detectors/datadogtoken/datadogtoken_integration_test.go +++ b/pkg/detectors/datadogtoken/datadogtoken_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestDatadogToken_FromChunk(t *testing.T) { @@ -50,7 +50,7 @@ func TestDatadogToken_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_DatadogToken, + DetectorType: detector_typepb.DetectorType_DatadogToken, Verified: true, ExtraData: map[string]string{ "Type": "Application+APIKey", @@ -74,7 +74,7 @@ func TestDatadogToken_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_DatadogToken, + DetectorType: detector_typepb.DetectorType_DatadogToken, Verified: false, ExtraData: map[string]string{ "Type": "Application+APIKey", diff --git a/pkg/detectors/datagov/datagov.go b/pkg/detectors/datagov/datagov.go index 2c7e7e1714e4..8b477cab65da 100644 --- a/pkg/detectors/datagov/datagov.go +++ b/pkg/detectors/datagov/datagov.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -41,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_DataGov, + DetectorType: detector_typepb.DetectorType_DataGov, Raw: []byte(resMatch), } @@ -65,8 +65,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_DataGov +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_DataGov } func (s Scanner) Description() string { diff --git a/pkg/detectors/datagov/datagov_integration_test.go b/pkg/detectors/datagov/datagov_integration_test.go index 41903fd76b2a..8b4beb0f1fbb 100644 --- a/pkg/detectors/datagov/datagov_integration_test.go +++ b/pkg/detectors/datagov/datagov_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestDataGov_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestDataGov_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_DataGov, + DetectorType: detector_typepb.DetectorType_DataGov, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestDataGov_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_DataGov, + DetectorType: detector_typepb.DetectorType_DataGov, Verified: false, }, }, diff --git a/pkg/detectors/debounce/debounce.go b/pkg/detectors/debounce/debounce.go index 14d43fc92819..e5c657131303 100644 --- a/pkg/detectors/debounce/debounce.go +++ b/pkg/detectors/debounce/debounce.go @@ -9,7 +9,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Debounce, + DetectorType: detector_typepb.DetectorType_Debounce, Raw: []byte(resMatch), } @@ -65,8 +65,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Debounce +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Debounce } func (s Scanner) Description() string { diff --git a/pkg/detectors/debounce/debounce_integration_test.go b/pkg/detectors/debounce/debounce_integration_test.go index 4d9cc1a3e6bf..1c3d9ef52af3 100644 --- a/pkg/detectors/debounce/debounce_integration_test.go +++ b/pkg/detectors/debounce/debounce_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestDebounce_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestDebounce_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Debounce, + DetectorType: detector_typepb.DetectorType_Debounce, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestDebounce_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Debounce, + DetectorType: detector_typepb.DetectorType_Debounce, Verified: false, }, }, diff --git a/pkg/detectors/deepai/deepai.go b/pkg/detectors/deepai/deepai.go index 00ebdc6270ee..56bbf05eb1c8 100644 --- a/pkg/detectors/deepai/deepai.go +++ b/pkg/detectors/deepai/deepai.go @@ -12,7 +12,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -43,7 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_DeepAI, + DetectorType: detector_typepb.DetectorType_DeepAI, Raw: []byte(resMatch), } @@ -80,8 +80,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_DeepAI +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_DeepAI } func (s Scanner) Description() string { diff --git a/pkg/detectors/deepai/deepai_integration_test.go b/pkg/detectors/deepai/deepai_integration_test.go index ced7b9676924..38aa39938451 100644 --- a/pkg/detectors/deepai/deepai_integration_test.go +++ b/pkg/detectors/deepai/deepai_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestDeepAI_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestDeepAI_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_DeepAI, + DetectorType: detector_typepb.DetectorType_DeepAI, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestDeepAI_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_DeepAI, + DetectorType: detector_typepb.DetectorType_DeepAI, Verified: false, }, }, diff --git a/pkg/detectors/deepgram/deepgram.go b/pkg/detectors/deepgram/deepgram.go index bfd97da42329..9569f2d0dbb1 100644 --- a/pkg/detectors/deepgram/deepgram.go +++ b/pkg/detectors/deepgram/deepgram.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -41,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Deepgram, + DetectorType: detector_typepb.DetectorType_Deepgram, Raw: []byte(resMatch), } @@ -67,8 +67,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Deepgram +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Deepgram } func (s Scanner) Description() string { diff --git a/pkg/detectors/deepgram/deepgram_integration_test.go b/pkg/detectors/deepgram/deepgram_integration_test.go index 0a8d271a0c94..26bcd7a2389f 100644 --- a/pkg/detectors/deepgram/deepgram_integration_test.go +++ b/pkg/detectors/deepgram/deepgram_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestDeepgram_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestDeepgram_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Deepgram, + DetectorType: detector_typepb.DetectorType_Deepgram, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestDeepgram_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Deepgram, + DetectorType: detector_typepb.DetectorType_Deepgram, Verified: false, }, }, diff --git a/pkg/detectors/deepseek/deepseek.go b/pkg/detectors/deepseek/deepseek.go index 15bf825ace21..ca7582a6d0d0 100644 --- a/pkg/detectors/deepseek/deepseek.go +++ b/pkg/detectors/deepseek/deepseek.go @@ -10,7 +10,7 @@ import ( regexp "github.com/wasilibs/go-re2" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" "github.com/trufflesecurity/trufflehog/v3/pkg/common" ) @@ -45,7 +45,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for token := range uniqueMatches { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_DeepSeek, + DetectorType: detector_typepb.DetectorType_DeepSeek, Raw: []byte(token), } @@ -103,8 +103,8 @@ func verifyToken(ctx context.Context, client *http.Client, token string) (bool, } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_DeepSeek +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_DeepSeek } func (s Scanner) Description() string { diff --git a/pkg/detectors/deepseek/deepseek_integration_test.go b/pkg/detectors/deepseek/deepseek_integration_test.go index 72c64803bbbb..82e3a96d0013 100644 --- a/pkg/detectors/deepseek/deepseek_integration_test.go +++ b/pkg/detectors/deepseek/deepseek_integration_test.go @@ -6,13 +6,14 @@ package deepseek import ( "context" "fmt" + "testing" + "time" + "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" - "testing" - "time" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestDeepseek_FromChunk(t *testing.T) { @@ -49,7 +50,7 @@ func TestDeepseek_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_DeepSeek, + DetectorType: detector_typepb.DetectorType_DeepSeek, Verified: true, }, }, @@ -66,7 +67,7 @@ func TestDeepseek_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_DeepSeek, + DetectorType: detector_typepb.DetectorType_DeepSeek, Verified: false, }, }, @@ -95,7 +96,7 @@ func TestDeepseek_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_DeepSeek, + DetectorType: detector_typepb.DetectorType_DeepSeek, Verified: false, }, }, diff --git a/pkg/detectors/delighted/delighted.go b/pkg/detectors/delighted/delighted.go index ff00dfa31366..57331e7561b3 100644 --- a/pkg/detectors/delighted/delighted.go +++ b/pkg/detectors/delighted/delighted.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -42,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Delighted, + DetectorType: detector_typepb.DetectorType_Delighted, Raw: []byte(resMatch), } @@ -74,8 +74,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Delighted +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Delighted } func (s Scanner) Description() string { diff --git a/pkg/detectors/delighted/delighted_integration_test.go b/pkg/detectors/delighted/delighted_integration_test.go index 629f39d9e6f6..988cd53f7c1f 100644 --- a/pkg/detectors/delighted/delighted_integration_test.go +++ b/pkg/detectors/delighted/delighted_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestDelighted_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestDelighted_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Delighted, + DetectorType: detector_typepb.DetectorType_Delighted, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestDelighted_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Delighted, + DetectorType: detector_typepb.DetectorType_Delighted, Verified: false, }, }, diff --git a/pkg/detectors/demio/demio.go b/pkg/detectors/demio/demio.go index ce38c691e84f..9da21350fe5c 100644 --- a/pkg/detectors/demio/demio.go +++ b/pkg/detectors/demio/demio.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -46,7 +46,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resIdMatch := strings.TrimSpace(idmatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Demio, + DetectorType: detector_typepb.DetectorType_Demio, Raw: []byte(resMatch), } @@ -73,8 +73,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Demio +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Demio } func (s Scanner) Description() string { diff --git a/pkg/detectors/demio/demio_integration_test.go b/pkg/detectors/demio/demio_integration_test.go index 766783a4cf48..9c4a65bdb5cb 100644 --- a/pkg/detectors/demio/demio_integration_test.go +++ b/pkg/detectors/demio/demio_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestDemio_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestDemio_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Demio, + DetectorType: detector_typepb.DetectorType_Demio, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestDemio_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Demio, + DetectorType: detector_typepb.DetectorType_Demio, Verified: false, }, }, diff --git a/pkg/detectors/deno/denodeploy.go b/pkg/detectors/deno/denodeploy.go index 3ea648d1dc0d..e5349b20586e 100644 --- a/pkg/detectors/deno/denodeploy.go +++ b/pkg/detectors/deno/denodeploy.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -98,8 +98,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_DenoDeploy +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_DenoDeploy } func (s Scanner) Description() string { diff --git a/pkg/detectors/deno/denodeploy_integration_test.go b/pkg/detectors/deno/denodeploy_integration_test.go index 8a2a4a4cab63..6121ff3f6428 100644 --- a/pkg/detectors/deno/denodeploy_integration_test.go +++ b/pkg/detectors/deno/denodeploy_integration_test.go @@ -15,7 +15,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestDenoDeploy_FromChunk(t *testing.T) { @@ -51,7 +51,7 @@ func TestDenoDeploy_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_DenoDeploy, + DetectorType: detector_typepb.DetectorType_DenoDeploy, Verified: true, }, }, @@ -68,7 +68,7 @@ func TestDenoDeploy_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_DenoDeploy, + DetectorType: detector_typepb.DetectorType_DenoDeploy, Verified: false, }, }, @@ -97,7 +97,7 @@ func TestDenoDeploy_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_DenoDeploy, + DetectorType: detector_typepb.DetectorType_DenoDeploy, Verified: false, }, }, @@ -114,7 +114,7 @@ func TestDenoDeploy_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_DenoDeploy, + DetectorType: detector_typepb.DetectorType_DenoDeploy, Verified: false, }, }, diff --git a/pkg/detectors/deputy/deputy.go b/pkg/detectors/deputy/deputy.go index f40775c07a5b..f1f26d225ab1 100644 --- a/pkg/detectors/deputy/deputy.go +++ b/pkg/detectors/deputy/deputy.go @@ -9,7 +9,7 @@ import ( regexp "github.com/wasilibs/go-re2" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -47,7 +47,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resURL := strings.TrimSpace(urlMatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Deputy, + DetectorType: detector_typepb.DetectorType_Deputy, Raw: []byte(resMatch), } @@ -73,8 +73,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Deputy +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Deputy } func (s Scanner) Description() string { diff --git a/pkg/detectors/deputy/deputy_integration_test.go b/pkg/detectors/deputy/deputy_integration_test.go index d961bab7c957..d1785dc8d97d 100644 --- a/pkg/detectors/deputy/deputy_integration_test.go +++ b/pkg/detectors/deputy/deputy_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestDeputy_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestDeputy_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Deputy, + DetectorType: detector_typepb.DetectorType_Deputy, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestDeputy_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Deputy, + DetectorType: detector_typepb.DetectorType_Deputy, Verified: false, }, }, diff --git a/pkg/detectors/detectify/detectify.go b/pkg/detectors/detectify/detectify.go index df0c1900baa9..fe06ae10b8f6 100644 --- a/pkg/detectors/detectify/detectify.go +++ b/pkg/detectors/detectify/detectify.go @@ -9,7 +9,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Detectify, + DetectorType: detector_typepb.DetectorType_Detectify, Raw: []byte(resMatch), } @@ -65,8 +65,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Detectify +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Detectify } func (s Scanner) Description() string { diff --git a/pkg/detectors/detectify/detectify_integration_test.go b/pkg/detectors/detectify/detectify_integration_test.go index bc9872c78301..fdd74e55b7a6 100644 --- a/pkg/detectors/detectify/detectify_integration_test.go +++ b/pkg/detectors/detectify/detectify_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestDetectify_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestDetectify_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Detectify, + DetectorType: detector_typepb.DetectorType_Detectify, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestDetectify_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Detectify, + DetectorType: detector_typepb.DetectorType_Detectify, Verified: false, }, }, diff --git a/pkg/detectors/detectlanguage/detectlanguage.go b/pkg/detectors/detectlanguage/detectlanguage.go index 4a9e8d248101..aa9c89e5935b 100644 --- a/pkg/detectors/detectlanguage/detectlanguage.go +++ b/pkg/detectors/detectlanguage/detectlanguage.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -41,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_DetectLanguage, + DetectorType: detector_typepb.DetectorType_DetectLanguage, Raw: []byte(resMatch), } @@ -66,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_DetectLanguage +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_DetectLanguage } func (s Scanner) Description() string { diff --git a/pkg/detectors/detectlanguage/detectlanguage_integration_test.go b/pkg/detectors/detectlanguage/detectlanguage_integration_test.go index 338a59aed1dd..9220aa7a96e9 100644 --- a/pkg/detectors/detectlanguage/detectlanguage_integration_test.go +++ b/pkg/detectors/detectlanguage/detectlanguage_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestDetectLanguage_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestDetectLanguage_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_DetectLanguage, + DetectorType: detector_typepb.DetectorType_DetectLanguage, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestDetectLanguage_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_DetectLanguage, + DetectorType: detector_typepb.DetectorType_DetectLanguage, Verified: false, }, }, diff --git a/pkg/detectors/detectors.go b/pkg/detectors/detectors.go index 38f1ad44608e..24628931d93c 100644 --- a/pkg/detectors/detectors.go +++ b/pkg/detectors/detectors.go @@ -9,6 +9,7 @@ import ( "strings" "unicode" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" "github.com/trufflesecurity/trufflehog/v3/pkg/pb/source_metadatapb" "github.com/trufflesecurity/trufflehog/v3/pkg/pb/sourcespb" @@ -31,7 +32,7 @@ type Detector interface { Keywords() []string // Type returns the DetectorType number from detectors.proto for the given detector. - Type() detectorspb.DetectorType + Type() detector_typepb.DetectorType // Description returns a description for the result being detected Description() string @@ -95,7 +96,7 @@ type CloudProvider interface { type Result struct { // DetectorType is the type of Detector. - DetectorType detectorspb.DetectorType + DetectorType detector_typepb.DetectorType // DetectorName is the name of the Detector. Used for custom detectors. DetectorName string // Verified indicates whether the result was verified or not. diff --git a/pkg/detectors/dfuse/dfuse.go b/pkg/detectors/dfuse/dfuse.go index a32acea289af..84ad1d3e170b 100644 --- a/pkg/detectors/dfuse/dfuse.go +++ b/pkg/detectors/dfuse/dfuse.go @@ -9,7 +9,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Dfuse, + DetectorType: detector_typepb.DetectorType_Dfuse, Raw: []byte(resMatch), } @@ -66,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Dfuse +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Dfuse } func (s Scanner) Description() string { diff --git a/pkg/detectors/dfuse/dfuse_integration_test.go b/pkg/detectors/dfuse/dfuse_integration_test.go index 09fcf994d75d..b5db46b64aee 100644 --- a/pkg/detectors/dfuse/dfuse_integration_test.go +++ b/pkg/detectors/dfuse/dfuse_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestDfuse_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestDfuse_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Dfuse, + DetectorType: detector_typepb.DetectorType_Dfuse, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestDfuse_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Dfuse, + DetectorType: detector_typepb.DetectorType_Dfuse, Verified: false, }, }, diff --git a/pkg/detectors/diffbot/diffbot.go b/pkg/detectors/diffbot/diffbot.go index 575ee79a9c15..37f4fb285b6b 100644 --- a/pkg/detectors/diffbot/diffbot.go +++ b/pkg/detectors/diffbot/diffbot.go @@ -12,7 +12,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -43,7 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Diffbot, + DetectorType: detector_typepb.DetectorType_Diffbot, Raw: []byte(resMatch), } @@ -78,8 +78,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Diffbot +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Diffbot } func (s Scanner) Description() string { diff --git a/pkg/detectors/diffbot/diffbot_integration_test.go b/pkg/detectors/diffbot/diffbot_integration_test.go index f0e7d6d9c402..7cd3bed59e49 100644 --- a/pkg/detectors/diffbot/diffbot_integration_test.go +++ b/pkg/detectors/diffbot/diffbot_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestDiffbot_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestDiffbot_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Diffbot, + DetectorType: detector_typepb.DetectorType_Diffbot, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestDiffbot_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Diffbot, + DetectorType: detector_typepb.DetectorType_Diffbot, Verified: false, }, }, diff --git a/pkg/detectors/diggernaut/diggernaut.go b/pkg/detectors/diggernaut/diggernaut.go index 168da9cbaa0d..d7bc58617b58 100644 --- a/pkg/detectors/diggernaut/diggernaut.go +++ b/pkg/detectors/diggernaut/diggernaut.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -41,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Diggernaut, + DetectorType: detector_typepb.DetectorType_Diggernaut, Raw: []byte(resMatch), } @@ -67,8 +67,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Diggernaut +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Diggernaut } func (s Scanner) Description() string { diff --git a/pkg/detectors/diggernaut/diggernaut_integration_test.go b/pkg/detectors/diggernaut/diggernaut_integration_test.go index 724b29d0d1fd..0737d92e75b5 100644 --- a/pkg/detectors/diggernaut/diggernaut_integration_test.go +++ b/pkg/detectors/diggernaut/diggernaut_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestDiggernaut_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestDiggernaut_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Diggernaut, + DetectorType: detector_typepb.DetectorType_Diggernaut, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestDiggernaut_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Diggernaut, + DetectorType: detector_typepb.DetectorType_Diggernaut, Verified: false, }, }, diff --git a/pkg/detectors/digitaloceantoken/digitaloceantoken.go b/pkg/detectors/digitaloceantoken/digitaloceantoken.go index 6b9f544fead0..f56c2dec324c 100644 --- a/pkg/detectors/digitaloceantoken/digitaloceantoken.go +++ b/pkg/detectors/digitaloceantoken/digitaloceantoken.go @@ -9,7 +9,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -41,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for token := range uniqueTokens { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_DigitalOceanToken, + DetectorType: detector_typepb.DetectorType_DigitalOceanToken, Raw: []byte(token), } @@ -91,8 +91,8 @@ func verifyDigitalOceanToken(ctx context.Context, client *http.Client, token str } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_DigitalOceanToken +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_DigitalOceanToken } func (s Scanner) Description() string { diff --git a/pkg/detectors/digitaloceantoken/digitaloceantoken_integration_test.go b/pkg/detectors/digitaloceantoken/digitaloceantoken_integration_test.go index 7859ec1fc3de..e2ba4c825927 100644 --- a/pkg/detectors/digitaloceantoken/digitaloceantoken_integration_test.go +++ b/pkg/detectors/digitaloceantoken/digitaloceantoken_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestDigitalOceanToken_FromChunk(t *testing.T) { @@ -50,7 +50,7 @@ func TestDigitalOceanToken_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_DigitalOceanToken, + DetectorType: detector_typepb.DetectorType_DigitalOceanToken, Verified: true, }, }, @@ -67,7 +67,7 @@ func TestDigitalOceanToken_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_DigitalOceanToken, + DetectorType: detector_typepb.DetectorType_DigitalOceanToken, Verified: false, }, }, @@ -96,7 +96,7 @@ func TestDigitalOceanToken_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_DigitalOceanToken, + DetectorType: detector_typepb.DetectorType_DigitalOceanToken, Verified: false, }, }, diff --git a/pkg/detectors/digitaloceanv2/digitaloceanv2.go b/pkg/detectors/digitaloceanv2/digitaloceanv2.go index caf5c7a17756..0d44dedbb35e 100644 --- a/pkg/detectors/digitaloceanv2/digitaloceanv2.go +++ b/pkg/detectors/digitaloceanv2/digitaloceanv2.go @@ -12,7 +12,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -47,7 +47,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for token := range uniqueTokens { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_DigitalOceanV2, + DetectorType: detector_typepb.DetectorType_DigitalOceanV2, Raw: []byte(token), } @@ -159,8 +159,8 @@ func verifyAccessToken(ctx context.Context, client *http.Client, token string) ( } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_DigitalOceanV2 +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_DigitalOceanV2 } func (s Scanner) Description() string { diff --git a/pkg/detectors/digitaloceanv2/digitaloceanv2_integration_test.go b/pkg/detectors/digitaloceanv2/digitaloceanv2_integration_test.go index a1736df26f28..334b67d91b3c 100644 --- a/pkg/detectors/digitaloceanv2/digitaloceanv2_integration_test.go +++ b/pkg/detectors/digitaloceanv2/digitaloceanv2_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestDigitalOceanV2_FromChunk(t *testing.T) { @@ -50,7 +50,7 @@ func TestDigitalOceanV2_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_DigitalOceanV2, + DetectorType: detector_typepb.DetectorType_DigitalOceanV2, Verified: true, }, }, @@ -66,7 +66,7 @@ func TestDigitalOceanV2_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_DigitalOceanV2, + DetectorType: detector_typepb.DetectorType_DigitalOceanV2, Verified: false, }, }, @@ -93,7 +93,7 @@ func TestDigitalOceanV2_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_DigitalOceanV2, + DetectorType: detector_typepb.DetectorType_DigitalOceanV2, Verified: false, }, }, diff --git a/pkg/detectors/discordbottoken/discordbottoken.go b/pkg/detectors/discordbottoken/discordbottoken.go index aeed56051191..15fcae2e798f 100644 --- a/pkg/detectors/discordbottoken/discordbottoken.go +++ b/pkg/detectors/discordbottoken/discordbottoken.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -45,7 +45,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for _, idmatch := range idMatch { resId := strings.TrimSpace(idmatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_DiscordBotToken, + DetectorType: detector_typepb.DetectorType_DiscordBotToken, Redacted: resId, Raw: []byte(resMatch), RawV2: []byte(resMatch + resId), @@ -73,8 +73,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_DiscordBotToken +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_DiscordBotToken } func (s Scanner) Description() string { diff --git a/pkg/detectors/discordbottoken/discordbottoken_integration_test.go b/pkg/detectors/discordbottoken/discordbottoken_integration_test.go index 964c14e22bd2..1b4bfba8c7fb 100644 --- a/pkg/detectors/discordbottoken/discordbottoken_integration_test.go +++ b/pkg/detectors/discordbottoken/discordbottoken_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestDiscordBotToken_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestDiscordBotToken_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_DiscordBotToken, + DetectorType: detector_typepb.DetectorType_DiscordBotToken, Redacted: idSecret, Verified: true, }, @@ -66,7 +66,7 @@ func TestDiscordBotToken_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_DiscordBotToken, + DetectorType: detector_typepb.DetectorType_DiscordBotToken, Redacted: idSecret, Verified: false, }, diff --git a/pkg/detectors/discordwebhook/discordwebhook.go b/pkg/detectors/discordwebhook/discordwebhook.go index d06739f14b00..75fce0de64d9 100644 --- a/pkg/detectors/discordwebhook/discordwebhook.go +++ b/pkg/detectors/discordwebhook/discordwebhook.go @@ -8,7 +8,7 @@ import ( regexp "github.com/wasilibs/go-re2" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -36,7 +36,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for _, match := range matches { resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_DiscordWebhook, + DetectorType: detector_typepb.DetectorType_DiscordWebhook, Raw: []byte(resMatch), } @@ -60,8 +60,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_DiscordWebhook +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_DiscordWebhook } func (s Scanner) Description() string { diff --git a/pkg/detectors/discordwebhook/discordwebhook_integration_test.go b/pkg/detectors/discordwebhook/discordwebhook_integration_test.go index 50a874715429..55c895eaae33 100644 --- a/pkg/detectors/discordwebhook/discordwebhook_integration_test.go +++ b/pkg/detectors/discordwebhook/discordwebhook_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestDiscordWebhook_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestDiscordWebhook_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_DiscordWebhook, + DetectorType: detector_typepb.DetectorType_DiscordWebhook, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestDiscordWebhook_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_DiscordWebhook, + DetectorType: detector_typepb.DetectorType_DiscordWebhook, Verified: false, }, }, diff --git a/pkg/detectors/disqus/disqus.go b/pkg/detectors/disqus/disqus.go index 05b05edd432b..664c465f0285 100644 --- a/pkg/detectors/disqus/disqus.go +++ b/pkg/detectors/disqus/disqus.go @@ -9,7 +9,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Disqus, + DetectorType: detector_typepb.DetectorType_Disqus, Raw: []byte(resMatch), } @@ -64,8 +64,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Disqus +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Disqus } func (s Scanner) Description() string { diff --git a/pkg/detectors/disqus/disqus_integration_test.go b/pkg/detectors/disqus/disqus_integration_test.go index 8c5aa5e45d0b..19797e1111b2 100644 --- a/pkg/detectors/disqus/disqus_integration_test.go +++ b/pkg/detectors/disqus/disqus_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestDisqus_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestDisqus_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Disqus, + DetectorType: detector_typepb.DetectorType_Disqus, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestDisqus_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Disqus, + DetectorType: detector_typepb.DetectorType_Disqus, Verified: false, }, }, diff --git a/pkg/detectors/ditto/ditto.go b/pkg/detectors/ditto/ditto.go index 964e86bc285a..2dc56446f37f 100644 --- a/pkg/detectors/ditto/ditto.go +++ b/pkg/detectors/ditto/ditto.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -41,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Ditto, + DetectorType: detector_typepb.DetectorType_Ditto, Raw: []byte(resMatch), } @@ -66,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Ditto +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Ditto } func (s Scanner) Description() string { diff --git a/pkg/detectors/ditto/ditto_integration_test.go b/pkg/detectors/ditto/ditto_integration_test.go index ee7c21b9557e..852587fab3e4 100644 --- a/pkg/detectors/ditto/ditto_integration_test.go +++ b/pkg/detectors/ditto/ditto_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestDitto_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestDitto_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Ditto, + DetectorType: detector_typepb.DetectorType_Ditto, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestDitto_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Ditto, + DetectorType: detector_typepb.DetectorType_Ditto, Verified: false, }, }, diff --git a/pkg/detectors/dnscheck/dnscheck.go b/pkg/detectors/dnscheck/dnscheck.go index c2bec252da12..cc0aeff515b1 100644 --- a/pkg/detectors/dnscheck/dnscheck.go +++ b/pkg/detectors/dnscheck/dnscheck.go @@ -9,7 +9,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -47,7 +47,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resIdMatch := strings.TrimSpace(idmatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Dnscheck, + DetectorType: detector_typepb.DetectorType_Dnscheck, Raw: []byte(resMatch), RawV2: []byte(resMatch + resIdMatch), } @@ -74,8 +74,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Dnscheck +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Dnscheck } func (s Scanner) Description() string { diff --git a/pkg/detectors/dnscheck/dnscheck_integration_test.go b/pkg/detectors/dnscheck/dnscheck_integration_test.go index 374b484bcf89..c82f3cae4f20 100644 --- a/pkg/detectors/dnscheck/dnscheck_integration_test.go +++ b/pkg/detectors/dnscheck/dnscheck_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestDnscheck_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestDnscheck_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Dnscheck, + DetectorType: detector_typepb.DetectorType_Dnscheck, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestDnscheck_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Dnscheck, + DetectorType: detector_typepb.DetectorType_Dnscheck, Verified: false, }, }, diff --git a/pkg/detectors/docker/docker_auth_config.go b/pkg/detectors/docker/docker_auth_config.go index 785dd4962643..d9b2afa4c49d 100644 --- a/pkg/detectors/docker/docker_auth_config.go +++ b/pkg/detectors/docker/docker_auth_config.go @@ -16,7 +16,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" logContext "github.com/trufflesecurity/trufflehog/v3/pkg/context" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -29,8 +29,8 @@ var _ interface { detectors.MaxSecretSizeProvider } = (*Scanner)(nil) -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Docker +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Docker } func (s Scanner) Description() string { @@ -114,7 +114,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } r := detectors.Result{ - DetectorType: detectorspb.DetectorType_Docker, + DetectorType: detector_typepb.DetectorType_Docker, Raw: []byte(b64encoded), RawV2: []byte(`{"registry":"` + registry + `","auth":"` + b64encoded + `"}`), ExtraData: map[string]string{"Username": username}, diff --git a/pkg/detectors/docker/docker_auth_config_integration_test.go b/pkg/detectors/docker/docker_auth_config_integration_test.go index 998e7ea79d63..f8f5801ace9e 100644 --- a/pkg/detectors/docker/docker_auth_config_integration_test.go +++ b/pkg/detectors/docker/docker_auth_config_integration_test.go @@ -3,6 +3,18 @@ package docker +import ( + "context" + "fmt" + "testing" + "time" + + "github.com/google/go-cmp/cmp" + "github.com/google/go-cmp/cmp/cmpopts" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" + "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" +) + func TestDocker_FromChunk(t *testing.T) { ctx, cancel := context.WithTimeout(context.Background(), time.Second*5) defer cancel() @@ -36,7 +48,7 @@ func TestDocker_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Docker, + DetectorType: detector_typepb.DetectorType_Docker, Verified: true, }, }, @@ -53,7 +65,7 @@ func TestDocker_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Docker, + DetectorType: detector_typepb.DetectorType_Docker, Verified: false, }, }, @@ -82,7 +94,7 @@ func TestDocker_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Docker, + DetectorType: detector_typepb.DetectorType_Docker, Verified: false, }, }, @@ -99,7 +111,7 @@ func TestDocker_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Docker, + DetectorType: detector_typepb.DetectorType_Docker, Verified: false, }, }, diff --git a/pkg/detectors/dockerhub/v1/dockerhub.go b/pkg/detectors/dockerhub/v1/dockerhub.go index cc27eed489d4..139ee46f611c 100644 --- a/pkg/detectors/dockerhub/v1/dockerhub.go +++ b/pkg/detectors/dockerhub/v1/dockerhub.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -180,8 +180,8 @@ type mfaRequiredResponse struct { MfaToken string `json:"login_2fa_token"` } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Dockerhub +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Dockerhub } func (s Scanner) Description() string { diff --git a/pkg/detectors/dockerhub/v1/dockerhub_integration_test.go b/pkg/detectors/dockerhub/v1/dockerhub_integration_test.go index 5f3526fc0762..1fb24c149a35 100644 --- a/pkg/detectors/dockerhub/v1/dockerhub_integration_test.go +++ b/pkg/detectors/dockerhub/v1/dockerhub_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestDockerhub_FromChunk(t *testing.T) { @@ -51,7 +51,7 @@ func TestDockerhub_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Dockerhub, + DetectorType: detector_typepb.DetectorType_Dockerhub, Verified: true, }, }, @@ -67,7 +67,7 @@ func TestDockerhub_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Dockerhub, + DetectorType: detector_typepb.DetectorType_Dockerhub, Verified: true, }, }, @@ -83,7 +83,7 @@ func TestDockerhub_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Dockerhub, + DetectorType: detector_typepb.DetectorType_Dockerhub, Verified: false, }, }, diff --git a/pkg/detectors/dockerhub/v2/dockerhub.go b/pkg/detectors/dockerhub/v2/dockerhub.go index 1ddf609fc542..17a7e80f5ac1 100644 --- a/pkg/detectors/dockerhub/v2/dockerhub.go +++ b/pkg/detectors/dockerhub/v2/dockerhub.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -180,8 +180,8 @@ type mfaRequiredResponse struct { MfaToken string `json:"login_2fa_token"` } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Dockerhub +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Dockerhub } func (s Scanner) Description() string { diff --git a/pkg/detectors/dockerhub/v2/dockerhub_integration_test.go b/pkg/detectors/dockerhub/v2/dockerhub_integration_test.go index 9b59e257058e..65631b6a2eb8 100644 --- a/pkg/detectors/dockerhub/v2/dockerhub_integration_test.go +++ b/pkg/detectors/dockerhub/v2/dockerhub_integration_test.go @@ -15,7 +15,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestDockerhub_FromChunk(t *testing.T) { @@ -52,7 +52,7 @@ func TestDockerhub_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Dockerhub, + DetectorType: detector_typepb.DetectorType_Dockerhub, Verified: true, AnalysisInfo: map[string]string{ "username": username, @@ -72,7 +72,7 @@ func TestDockerhub_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Dockerhub, + DetectorType: detector_typepb.DetectorType_Dockerhub, Verified: true, AnalysisInfo: map[string]string{ "username": strings.Split(email, "-")[0], @@ -92,7 +92,7 @@ func TestDockerhub_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Dockerhub, + DetectorType: detector_typepb.DetectorType_Dockerhub, Verified: false, }, }, diff --git a/pkg/detectors/docparser/docparser.go b/pkg/detectors/docparser/docparser.go index 8d4fb4ef801d..34a8597290f4 100644 --- a/pkg/detectors/docparser/docparser.go +++ b/pkg/detectors/docparser/docparser.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -41,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Docparser, + DetectorType: detector_typepb.DetectorType_Docparser, Raw: []byte(resMatch), } @@ -67,8 +67,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Docparser +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Docparser } func (s Scanner) Description() string { diff --git a/pkg/detectors/docparser/docparser_integration_test.go b/pkg/detectors/docparser/docparser_integration_test.go index 0bdc0411885d..8a3e562006a8 100644 --- a/pkg/detectors/docparser/docparser_integration_test.go +++ b/pkg/detectors/docparser/docparser_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestDocparser_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestDocparser_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Docparser, + DetectorType: detector_typepb.DetectorType_Docparser, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestDocparser_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Docparser, + DetectorType: detector_typepb.DetectorType_Docparser, Verified: false, }, }, diff --git a/pkg/detectors/documo/documo.go b/pkg/detectors/documo/documo.go index 73d0355de535..ca5d7aee54cf 100644 --- a/pkg/detectors/documo/documo.go +++ b/pkg/detectors/documo/documo.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -41,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Documo, + DetectorType: detector_typepb.DetectorType_Documo, Raw: []byte(resMatch), } @@ -67,8 +67,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Documo +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Documo } func (s Scanner) Description() string { diff --git a/pkg/detectors/documo/documo_integration_test.go b/pkg/detectors/documo/documo_integration_test.go index 29435856ccef..499022a1926e 100644 --- a/pkg/detectors/documo/documo_integration_test.go +++ b/pkg/detectors/documo/documo_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestDocumo_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestDocumo_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Documo, + DetectorType: detector_typepb.DetectorType_Documo, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestDocumo_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Documo, + DetectorType: detector_typepb.DetectorType_Documo, Verified: false, }, }, diff --git a/pkg/detectors/docusign/docusign.go b/pkg/detectors/docusign/docusign.go index 6f2047835884..68506108acc6 100644 --- a/pkg/detectors/docusign/docusign.go +++ b/pkg/detectors/docusign/docusign.go @@ -12,7 +12,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -54,7 +54,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resSecretMatch := strings.TrimSpace(secretMatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Docusign, + DetectorType: detector_typepb.DetectorType_Docusign, Raw: []byte(resIDMatch), Redacted: resIDMatch, RawV2: []byte(resIDMatch + resSecretMatch), @@ -99,8 +99,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Docusign +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Docusign } func (s Scanner) Description() string { diff --git a/pkg/detectors/docusign/docusign_integration_test.go b/pkg/detectors/docusign/docusign_integration_test.go index b3911ae31cdc..b063ac5c59cc 100644 --- a/pkg/detectors/docusign/docusign_integration_test.go +++ b/pkg/detectors/docusign/docusign_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestDocusign_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestDocusign_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Docusign, + DetectorType: detector_typepb.DetectorType_Docusign, Verified: true, RawV2: []byte(integrationKey + activeSecret), Redacted: integrationKey, @@ -67,7 +67,7 @@ func TestDocusign_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Docusign, + DetectorType: detector_typepb.DetectorType_Docusign, Verified: false, RawV2: []byte(integrationKey + inactiveSecret), Redacted: integrationKey, diff --git a/pkg/detectors/doppler/doppler.go b/pkg/detectors/doppler/doppler.go index 4ed8dad54625..1b897114f90c 100644 --- a/pkg/detectors/doppler/doppler.go +++ b/pkg/detectors/doppler/doppler.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type response struct { @@ -58,7 +58,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Doppler, + DetectorType: detector_typepb.DetectorType_Doppler, Raw: []byte(resMatch), ExtraData: map[string]string{}, } @@ -96,8 +96,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Doppler +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Doppler } func (s Scanner) Description() string { diff --git a/pkg/detectors/doppler/doppler_integration_test.go b/pkg/detectors/doppler/doppler_integration_test.go index 8e8a88893a56..47b7b8c10afb 100644 --- a/pkg/detectors/doppler/doppler_integration_test.go +++ b/pkg/detectors/doppler/doppler_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestDoppler_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestDoppler_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Doppler, + DetectorType: detector_typepb.DetectorType_Doppler, Verified: true, ExtraData: map[string]string{ "key type": "personal", @@ -68,7 +68,7 @@ func TestDoppler_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Doppler, + DetectorType: detector_typepb.DetectorType_Doppler, Verified: false, }, }, diff --git a/pkg/detectors/dotdigital/dotdigital.go b/pkg/detectors/dotdigital/dotdigital.go index 6fe5b4197192..fd91ca6a5f3d 100644 --- a/pkg/detectors/dotdigital/dotdigital.go +++ b/pkg/detectors/dotdigital/dotdigital.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -59,7 +59,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for email := range uniqueEmails { for password := range uniquePasswords { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Dotdigital, + DetectorType: detector_typepb.DetectorType_Dotdigital, Raw: []byte(email), RawV2: []byte(email + password), } @@ -114,8 +114,8 @@ func verifyMatch(ctx context.Context, client *http.Client, email, pass string) ( } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Dotdigital +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Dotdigital } func (s Scanner) Description() string { diff --git a/pkg/detectors/dotdigital/dotdigital_integration_test.go b/pkg/detectors/dotdigital/dotdigital_integration_test.go index 1a9a409331d0..af175f0a0599 100644 --- a/pkg/detectors/dotdigital/dotdigital_integration_test.go +++ b/pkg/detectors/dotdigital/dotdigital_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestDotdigital_FromChunk(t *testing.T) { @@ -50,7 +50,7 @@ func TestDotdigital_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Dotdigital, + DetectorType: detector_typepb.DetectorType_Dotdigital, Verified: true, }, }, @@ -66,7 +66,7 @@ func TestDotdigital_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Dotdigital, + DetectorType: detector_typepb.DetectorType_Dotdigital, Verified: false, }, }, diff --git a/pkg/detectors/dovico/dovico.go b/pkg/detectors/dovico/dovico.go index f1282cb3b367..998fb465dc6e 100644 --- a/pkg/detectors/dovico/dovico.go +++ b/pkg/detectors/dovico/dovico.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -63,7 +63,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Dovico, + DetectorType: detector_typepb.DetectorType_Dovico, Raw: []byte(key), RawV2: []byte(fmt.Sprintf("%s:%s", key, userKey)), } @@ -114,8 +114,8 @@ func verifyMatch(ctx context.Context, client *http.Client, key, user string) (bo } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Dovico +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Dovico } func (s Scanner) Description() string { diff --git a/pkg/detectors/dovico/dovico_integration_test.go b/pkg/detectors/dovico/dovico_integration_test.go index 17ddedc462c3..393aa4b486ec 100644 --- a/pkg/detectors/dovico/dovico_integration_test.go +++ b/pkg/detectors/dovico/dovico_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestDovico_FromChunk(t *testing.T) { @@ -50,11 +50,11 @@ func TestDovico_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Dovico, + DetectorType: detector_typepb.DetectorType_Dovico, Verified: true, }, { - DetectorType: detectorspb.DetectorType_Dovico, + DetectorType: detector_typepb.DetectorType_Dovico, Verified: false, }, }, @@ -70,11 +70,11 @@ func TestDovico_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Dovico, + DetectorType: detector_typepb.DetectorType_Dovico, Verified: false, }, { - DetectorType: detectorspb.DetectorType_Dovico, + DetectorType: detector_typepb.DetectorType_Dovico, Verified: false, }, }, diff --git a/pkg/detectors/dronahq/dronahq.go b/pkg/detectors/dronahq/dronahq.go index eb23a8b70c6f..ad41cada7629 100644 --- a/pkg/detectors/dronahq/dronahq.go +++ b/pkg/detectors/dronahq/dronahq.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -41,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_DronaHQ, + DetectorType: detector_typepb.DetectorType_DronaHQ, Raw: []byte(resMatch), } @@ -65,8 +65,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_DronaHQ +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_DronaHQ } func (s Scanner) Description() string { diff --git a/pkg/detectors/dronahq/dronahq_integration_test.go b/pkg/detectors/dronahq/dronahq_integration_test.go index 87d542fbbf6d..892b244bb2da 100644 --- a/pkg/detectors/dronahq/dronahq_integration_test.go +++ b/pkg/detectors/dronahq/dronahq_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestDronaHQ_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestDronaHQ_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_DronaHQ, + DetectorType: detector_typepb.DetectorType_DronaHQ, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestDronaHQ_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_DronaHQ, + DetectorType: detector_typepb.DetectorType_DronaHQ, Verified: false, }, }, diff --git a/pkg/detectors/droneci/droneci.go b/pkg/detectors/droneci/droneci.go index 0084515806f4..88fb226be247 100644 --- a/pkg/detectors/droneci/droneci.go +++ b/pkg/detectors/droneci/droneci.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -41,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_DroneCI, + DetectorType: detector_typepb.DetectorType_DroneCI, Raw: []byte(resMatch), } @@ -66,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_DroneCI +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_DroneCI } func (s Scanner) Description() string { diff --git a/pkg/detectors/droneci/droneci_integration_test.go b/pkg/detectors/droneci/droneci_integration_test.go index f4538cb1c7ba..48754832afca 100644 --- a/pkg/detectors/droneci/droneci_integration_test.go +++ b/pkg/detectors/droneci/droneci_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestDroneCI_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestDroneCI_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_DroneCI, + DetectorType: detector_typepb.DetectorType_DroneCI, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestDroneCI_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_DroneCI, + DetectorType: detector_typepb.DetectorType_DroneCI, Verified: false, }, }, diff --git a/pkg/detectors/dropbox/dropbox.go b/pkg/detectors/dropbox/dropbox.go index 4568576d55c9..4ee788e1462d 100644 --- a/pkg/detectors/dropbox/dropbox.go +++ b/pkg/detectors/dropbox/dropbox.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -44,7 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for key := range uniqueKeys { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Dropbox, + DetectorType: detector_typepb.DetectorType_Dropbox, Raw: []byte(key), } @@ -111,8 +111,8 @@ func verifyDropboxToken(ctx context.Context, client *http.Client, key string) (b } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Dropbox +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Dropbox } func (s Scanner) Description() string { diff --git a/pkg/detectors/dropbox/dropbox_integration_test.go b/pkg/detectors/dropbox/dropbox_integration_test.go index 3b13b813c537..1dcab231d229 100644 --- a/pkg/detectors/dropbox/dropbox_integration_test.go +++ b/pkg/detectors/dropbox/dropbox_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestDropbox_FromChunk(t *testing.T) { @@ -47,7 +47,7 @@ func TestDropbox_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Dropbox, + DetectorType: detector_typepb.DetectorType_Dropbox, Verified: true, }, }, @@ -63,7 +63,7 @@ func TestDropbox_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Dropbox, + DetectorType: detector_typepb.DetectorType_Dropbox, Verified: false, }, }, diff --git a/pkg/detectors/duply/duply.go b/pkg/detectors/duply/duply.go index c5cb0d65f975..404592c91f0e 100644 --- a/pkg/detectors/duply/duply.go +++ b/pkg/detectors/duply/duply.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -48,7 +48,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resIdMatch := strings.TrimSpace(idMatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Duply, + DetectorType: detector_typepb.DetectorType_Duply, Raw: []byte(resMatch), } @@ -78,8 +78,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Duply +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Duply } func (s Scanner) Description() string { diff --git a/pkg/detectors/duply/duply_integration_test.go b/pkg/detectors/duply/duply_integration_test.go index 8c2a7f3306dc..d1015d4ccbd7 100644 --- a/pkg/detectors/duply/duply_integration_test.go +++ b/pkg/detectors/duply/duply_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestDuply_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestDuply_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Duply, + DetectorType: detector_typepb.DetectorType_Duply, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestDuply_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Duply, + DetectorType: detector_typepb.DetectorType_Duply, Verified: false, }, }, diff --git a/pkg/detectors/dwolla/dwolla.go b/pkg/detectors/dwolla/dwolla.go index d9223a7cbe97..e7865b61e9c5 100644 --- a/pkg/detectors/dwolla/dwolla.go +++ b/pkg/detectors/dwolla/dwolla.go @@ -12,7 +12,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -65,7 +65,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Dwolla, + DetectorType: detector_typepb.DetectorType_Dwolla, Raw: []byte(id), RawV2: []byte(id + secret), } @@ -115,8 +115,8 @@ func verifyMatch(ctx context.Context, client *http.Client, id, secret string) (b } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Dwolla +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Dwolla } func (s Scanner) Description() string { diff --git a/pkg/detectors/dwolla/dwolla_integration_test.go b/pkg/detectors/dwolla/dwolla_integration_test.go index dfedc6a99d16..3974689b8b19 100644 --- a/pkg/detectors/dwolla/dwolla_integration_test.go +++ b/pkg/detectors/dwolla/dwolla_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestDwolla_FromChunk(t *testing.T) { @@ -50,11 +50,11 @@ func TestDwolla_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Dwolla, + DetectorType: detector_typepb.DetectorType_Dwolla, Verified: false, }, { - DetectorType: detectorspb.DetectorType_Dwolla, + DetectorType: detector_typepb.DetectorType_Dwolla, Verified: true, }, }, @@ -70,11 +70,11 @@ func TestDwolla_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Dwolla, + DetectorType: detector_typepb.DetectorType_Dwolla, Verified: false, }, { - DetectorType: detectorspb.DetectorType_Dwolla, + DetectorType: detector_typepb.DetectorType_Dwolla, Verified: false, }, }, diff --git a/pkg/detectors/dynalist/dynalist.go b/pkg/detectors/dynalist/dynalist.go index 4d9da75ae546..928aa3497977 100644 --- a/pkg/detectors/dynalist/dynalist.go +++ b/pkg/detectors/dynalist/dynalist.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -42,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Dynalist, + DetectorType: detector_typepb.DetectorType_Dynalist, Raw: []byte(resMatch), } @@ -77,8 +77,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Dynalist +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Dynalist } func (s Scanner) Description() string { diff --git a/pkg/detectors/dynalist/dynalist_integration_test.go b/pkg/detectors/dynalist/dynalist_integration_test.go index 0d4fbb270e56..6afa893932bd 100644 --- a/pkg/detectors/dynalist/dynalist_integration_test.go +++ b/pkg/detectors/dynalist/dynalist_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestDynalist_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestDynalist_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Dynalist, + DetectorType: detector_typepb.DetectorType_Dynalist, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestDynalist_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Dynalist, + DetectorType: detector_typepb.DetectorType_Dynalist, Verified: false, }, }, diff --git a/pkg/detectors/dyspatch/dyspatch.go b/pkg/detectors/dyspatch/dyspatch.go index 670389107fcf..f51496031d36 100644 --- a/pkg/detectors/dyspatch/dyspatch.go +++ b/pkg/detectors/dyspatch/dyspatch.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -42,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Dyspatch, + DetectorType: detector_typepb.DetectorType_Dyspatch, Raw: []byte(resMatch), } @@ -75,8 +75,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Dyspatch +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Dyspatch } func (s Scanner) Description() string { diff --git a/pkg/detectors/dyspatch/dyspatch_integration_test.go b/pkg/detectors/dyspatch/dyspatch_integration_test.go index 16d968a36553..89563cac399a 100644 --- a/pkg/detectors/dyspatch/dyspatch_integration_test.go +++ b/pkg/detectors/dyspatch/dyspatch_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestDyspatch_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestDyspatch_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Dyspatch, + DetectorType: detector_typepb.DetectorType_Dyspatch, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestDyspatch_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Dyspatch, + DetectorType: detector_typepb.DetectorType_Dyspatch, Verified: false, }, }, diff --git a/pkg/detectors/eagleeyenetworks/eagleeyenetworks.go b/pkg/detectors/eagleeyenetworks/eagleeyenetworks.go index 36cea7f9ccce..321e2438b9c9 100644 --- a/pkg/detectors/eagleeyenetworks/eagleeyenetworks.go +++ b/pkg/detectors/eagleeyenetworks/eagleeyenetworks.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -48,7 +48,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resEmailPatMatch := strings.TrimSpace(emailMatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_EagleEyeNetworks, + DetectorType: detector_typepb.DetectorType_EagleEyeNetworks, Raw: []byte(resMatch), } @@ -74,8 +74,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_EagleEyeNetworks +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_EagleEyeNetworks } func (s Scanner) Description() string { diff --git a/pkg/detectors/eagleeyenetworks/eagleeyenetworks_integration_test.go b/pkg/detectors/eagleeyenetworks/eagleeyenetworks_integration_test.go index 8706b4d9ee11..5b0fff4e8cd8 100644 --- a/pkg/detectors/eagleeyenetworks/eagleeyenetworks_integration_test.go +++ b/pkg/detectors/eagleeyenetworks/eagleeyenetworks_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestEagleEyeNetworks_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestEagleEyeNetworks_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_EagleEyeNetworks, + DetectorType: detector_typepb.DetectorType_EagleEyeNetworks, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestEagleEyeNetworks_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_EagleEyeNetworks, + DetectorType: detector_typepb.DetectorType_EagleEyeNetworks, Verified: false, }, }, diff --git a/pkg/detectors/easyinsight/easyinsight.go b/pkg/detectors/easyinsight/easyinsight.go index c51387bd881d..8e48229c8817 100644 --- a/pkg/detectors/easyinsight/easyinsight.go +++ b/pkg/detectors/easyinsight/easyinsight.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -58,7 +58,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_EasyInsight, + DetectorType: detector_typepb.DetectorType_EasyInsight, Raw: []byte(keyMatch), RawV2: []byte(keyMatch + idMatch), } @@ -82,8 +82,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_EasyInsight +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_EasyInsight } func (s Scanner) Description() string { diff --git a/pkg/detectors/easyinsight/easyinsight_integration_test.go b/pkg/detectors/easyinsight/easyinsight_integration_test.go index 098b8a3a3954..f6d0f42dbece 100644 --- a/pkg/detectors/easyinsight/easyinsight_integration_test.go +++ b/pkg/detectors/easyinsight/easyinsight_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestEasyInsight_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestEasyInsight_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_EasyInsight, + DetectorType: detector_typepb.DetectorType_EasyInsight, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestEasyInsight_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_EasyInsight, + DetectorType: detector_typepb.DetectorType_EasyInsight, Verified: false, }, }, diff --git a/pkg/detectors/ecostruxureit/ecostruxureit.go b/pkg/detectors/ecostruxureit/ecostruxureit.go index de2b7fce8cc3..b1ed412f8fea 100644 --- a/pkg/detectors/ecostruxureit/ecostruxureit.go +++ b/pkg/detectors/ecostruxureit/ecostruxureit.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -41,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_EcoStruxureIT, + DetectorType: detector_typepb.DetectorType_EcoStruxureIT, Raw: []byte(resMatch), } @@ -67,8 +67,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_EcoStruxureIT +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_EcoStruxureIT } func (s Scanner) Description() string { diff --git a/pkg/detectors/ecostruxureit/ecostruxureit_integration_test.go b/pkg/detectors/ecostruxureit/ecostruxureit_integration_test.go index 151efcdba6e9..ad65b7f84bc5 100644 --- a/pkg/detectors/ecostruxureit/ecostruxureit_integration_test.go +++ b/pkg/detectors/ecostruxureit/ecostruxureit_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestEcoStruxureIT_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestEcoStruxureIT_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_EcoStruxureIT, + DetectorType: detector_typepb.DetectorType_EcoStruxureIT, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestEcoStruxureIT_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_EcoStruxureIT, + DetectorType: detector_typepb.DetectorType_EcoStruxureIT, Verified: false, }, }, diff --git a/pkg/detectors/edamam/edamam.go b/pkg/detectors/edamam/edamam.go index 5a72549dcafd..89db3475a156 100644 --- a/pkg/detectors/edamam/edamam.go +++ b/pkg/detectors/edamam/edamam.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -46,7 +46,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for _, idMatch := range idMatches { resId := strings.TrimSpace(idMatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Edamam, + DetectorType: detector_typepb.DetectorType_Edamam, Raw: []byte(resMatch), RawV2: []byte(resMatch + resId), } @@ -73,8 +73,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Edamam +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Edamam } func (s Scanner) Description() string { diff --git a/pkg/detectors/edamam/edamam_integration_test.go b/pkg/detectors/edamam/edamam_integration_test.go index af09b26d7caa..c3d33e08e6c7 100644 --- a/pkg/detectors/edamam/edamam_integration_test.go +++ b/pkg/detectors/edamam/edamam_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestEdamam_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestEdamam_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Edamam, + DetectorType: detector_typepb.DetectorType_Edamam, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestEdamam_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Edamam, + DetectorType: detector_typepb.DetectorType_Edamam, Verified: false, }, }, diff --git a/pkg/detectors/edenai/edenai.go b/pkg/detectors/edenai/edenai.go index 6eeab40acd4c..b7afce19baa5 100644 --- a/pkg/detectors/edenai/edenai.go +++ b/pkg/detectors/edenai/edenai.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -41,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_EdenAI, + DetectorType: detector_typepb.DetectorType_EdenAI, Raw: []byte(resMatch), } @@ -66,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_EdenAI +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_EdenAI } func (s Scanner) Description() string { diff --git a/pkg/detectors/edenai/edenai_integration_test.go b/pkg/detectors/edenai/edenai_integration_test.go index 6852f229908d..11c6b09444d1 100644 --- a/pkg/detectors/edenai/edenai_integration_test.go +++ b/pkg/detectors/edenai/edenai_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestEdenAI_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestEdenAI_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_EdenAI, + DetectorType: detector_typepb.DetectorType_EdenAI, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestEdenAI_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_EdenAI, + DetectorType: detector_typepb.DetectorType_EdenAI, Verified: false, }, }, diff --git a/pkg/detectors/eightxeight/eightxeight.go b/pkg/detectors/eightxeight/eightxeight.go index d2cb05b26518..cea44762f081 100644 --- a/pkg/detectors/eightxeight/eightxeight.go +++ b/pkg/detectors/eightxeight/eightxeight.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -50,7 +50,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resIdMatch := strings.TrimSpace(idMatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_EightxEight, + DetectorType: detector_typepb.DetectorType_EightxEight, Raw: []byte(resMatch), RawV2: []byte(resMatch + resIdMatch), } @@ -80,8 +80,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_EightxEight +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_EightxEight } func (s Scanner) Description() string { diff --git a/pkg/detectors/eightxeight/eightxeight_integration_test.go b/pkg/detectors/eightxeight/eightxeight_integration_test.go index 91ba987cfdc0..f37575d1cd1c 100644 --- a/pkg/detectors/eightxeight/eightxeight_integration_test.go +++ b/pkg/detectors/eightxeight/eightxeight_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestEightxEight_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestEightxEight_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_EightxEight, + DetectorType: detector_typepb.DetectorType_EightxEight, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestEightxEight_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_EightxEight, + DetectorType: detector_typepb.DetectorType_EightxEight, Verified: false, }, }, diff --git a/pkg/detectors/elasticemail/elasticemail.go b/pkg/detectors/elasticemail/elasticemail.go index a8f7d06f9ca1..f1bc69f6a48a 100644 --- a/pkg/detectors/elasticemail/elasticemail.go +++ b/pkg/detectors/elasticemail/elasticemail.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -41,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_ElasticEmail, + DetectorType: detector_typepb.DetectorType_ElasticEmail, Raw: []byte(resMatch), } @@ -72,8 +72,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_ElasticEmail +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_ElasticEmail } func (s Scanner) Description() string { diff --git a/pkg/detectors/elasticemail/elasticemail_integration_test.go b/pkg/detectors/elasticemail/elasticemail_integration_test.go index a33f76eb2a1f..305e0f1878d8 100644 --- a/pkg/detectors/elasticemail/elasticemail_integration_test.go +++ b/pkg/detectors/elasticemail/elasticemail_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestElasticEmail_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestElasticEmail_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ElasticEmail, + DetectorType: detector_typepb.DetectorType_ElasticEmail, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestElasticEmail_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ElasticEmail, + DetectorType: detector_typepb.DetectorType_ElasticEmail, Verified: false, }, }, diff --git a/pkg/detectors/elevenlabs/v1/elevenlabs.go b/pkg/detectors/elevenlabs/v1/elevenlabs.go index 2edda0cdce8d..cab39021b47e 100644 --- a/pkg/detectors/elevenlabs/v1/elevenlabs.go +++ b/pkg/detectors/elevenlabs/v1/elevenlabs.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -53,7 +53,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for match := range uniqueMatches { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_ElevenLabs, + DetectorType: detector_typepb.DetectorType_ElevenLabs, Raw: []byte(match), ExtraData: map[string]string{ "version": "1", @@ -120,8 +120,8 @@ func verifyMatch(ctx context.Context, client *http.Client, token string) (bool, } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_ElevenLabs +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_ElevenLabs } func (s Scanner) Description() string { diff --git a/pkg/detectors/elevenlabs/v2/elevenlabs.go b/pkg/detectors/elevenlabs/v2/elevenlabs.go index 1e094d12e91a..31b29c4b085c 100644 --- a/pkg/detectors/elevenlabs/v2/elevenlabs.go +++ b/pkg/detectors/elevenlabs/v2/elevenlabs.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -53,7 +53,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for match := range uniqueMatches { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_ElevenLabs, + DetectorType: detector_typepb.DetectorType_ElevenLabs, Raw: []byte(match), ExtraData: map[string]string{"version": "2"}, } @@ -121,6 +121,6 @@ func verifyMatch(ctx context.Context, client *http.Client, token string) (bool, } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_ElevenLabs +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_ElevenLabs } diff --git a/pkg/detectors/elevenlabs/v2/elevenlabs_integration_test.go b/pkg/detectors/elevenlabs/v2/elevenlabs_integration_test.go index 759c58c439e4..5c201123c9ce 100644 --- a/pkg/detectors/elevenlabs/v2/elevenlabs_integration_test.go +++ b/pkg/detectors/elevenlabs/v2/elevenlabs_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestElevenlabs_FromChunk(t *testing.T) { @@ -50,7 +50,7 @@ func TestElevenlabs_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ElevenLabs, + DetectorType: detector_typepb.DetectorType_ElevenLabs, Verified: true, ExtraData: map[string]string{ "version": "2", @@ -72,7 +72,7 @@ func TestElevenlabs_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ElevenLabs, + DetectorType: detector_typepb.DetectorType_ElevenLabs, Verified: false, ExtraData: map[string]string{ "version": "2", @@ -104,7 +104,7 @@ func TestElevenlabs_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ElevenLabs, + DetectorType: detector_typepb.DetectorType_ElevenLabs, Verified: false, ExtraData: map[string]string{ "version": "2", @@ -124,7 +124,7 @@ func TestElevenlabs_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ElevenLabs, + DetectorType: detector_typepb.DetectorType_ElevenLabs, Verified: false, ExtraData: map[string]string{ "version": "2", diff --git a/pkg/detectors/enablex/enablex.go b/pkg/detectors/enablex/enablex.go index 75282065763b..6f28281aa50d 100644 --- a/pkg/detectors/enablex/enablex.go +++ b/pkg/detectors/enablex/enablex.go @@ -9,7 +9,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -48,7 +48,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result userPatMatch := strings.TrimSpace(idMatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Enablex, + DetectorType: detector_typepb.DetectorType_Enablex, Raw: []byte(tokenPatMatch), } @@ -74,8 +74,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Enablex +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Enablex } func (s Scanner) Description() string { diff --git a/pkg/detectors/enablex/enablex_integration_test.go b/pkg/detectors/enablex/enablex_integration_test.go index fc098a806a54..4455209c2827 100644 --- a/pkg/detectors/enablex/enablex_integration_test.go +++ b/pkg/detectors/enablex/enablex_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestEnablex_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestEnablex_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Enablex, + DetectorType: detector_typepb.DetectorType_Enablex, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestEnablex_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Enablex, + DetectorType: detector_typepb.DetectorType_Enablex, Verified: false, }, }, diff --git a/pkg/detectors/endorlabs/endorlabs.go b/pkg/detectors/endorlabs/endorlabs.go index 4aae116d14d6..ff9c0da1bdbc 100644 --- a/pkg/detectors/endorlabs/endorlabs.go +++ b/pkg/detectors/endorlabs/endorlabs.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -54,7 +54,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_EndorLabs, + DetectorType: detector_typepb.DetectorType_EndorLabs, Raw: []byte(key), RawV2: []byte(key + secret), } @@ -109,8 +109,8 @@ func verifyMatch(ctx context.Context, client *http.Client, key, secret string) ( } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_EndorLabs +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_EndorLabs } func (s Scanner) Description() string { diff --git a/pkg/detectors/endorlabs/endorlabs_integration_test.go b/pkg/detectors/endorlabs/endorlabs_integration_test.go index 313c0b291074..14880f27e73b 100644 --- a/pkg/detectors/endorlabs/endorlabs_integration_test.go +++ b/pkg/detectors/endorlabs/endorlabs_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestEndorlabs_FromChunk(t *testing.T) { @@ -52,11 +52,11 @@ func TestEndorlabs_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_EndorLabs, + DetectorType: detector_typepb.DetectorType_EndorLabs, Verified: true, }, { - DetectorType: detectorspb.DetectorType_EndorLabs, + DetectorType: detector_typepb.DetectorType_EndorLabs, Verified: false, }, }, @@ -73,11 +73,11 @@ func TestEndorlabs_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_EndorLabs, + DetectorType: detector_typepb.DetectorType_EndorLabs, Verified: false, }, { - DetectorType: detectorspb.DetectorType_EndorLabs, + DetectorType: detector_typepb.DetectorType_EndorLabs, Verified: false, }, }, @@ -106,11 +106,11 @@ func TestEndorlabs_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_EndorLabs, + DetectorType: detector_typepb.DetectorType_EndorLabs, Verified: false, }, { - DetectorType: detectorspb.DetectorType_EndorLabs, + DetectorType: detector_typepb.DetectorType_EndorLabs, Verified: false, }, }, @@ -127,11 +127,11 @@ func TestEndorlabs_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_EndorLabs, + DetectorType: detector_typepb.DetectorType_EndorLabs, Verified: false, }, { - DetectorType: detectorspb.DetectorType_EndorLabs, + DetectorType: detector_typepb.DetectorType_EndorLabs, Verified: false, }, }, diff --git a/pkg/detectors/enigma/enigma.go b/pkg/detectors/enigma/enigma.go index 3ce901485428..dc251d099927 100644 --- a/pkg/detectors/enigma/enigma.go +++ b/pkg/detectors/enigma/enigma.go @@ -9,7 +9,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Enigma, + DetectorType: detector_typepb.DetectorType_Enigma, Raw: []byte(resMatch), } @@ -67,8 +67,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Enigma +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Enigma } func (s Scanner) Description() string { diff --git a/pkg/detectors/enigma/enigma_integration_test.go b/pkg/detectors/enigma/enigma_integration_test.go index 78065e14ec49..c0fbb725d43a 100644 --- a/pkg/detectors/enigma/enigma_integration_test.go +++ b/pkg/detectors/enigma/enigma_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestEnigma_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestEnigma_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Enigma, + DetectorType: detector_typepb.DetectorType_Enigma, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestEnigma_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Enigma, + DetectorType: detector_typepb.DetectorType_Enigma, Verified: false, }, }, diff --git a/pkg/detectors/envoyapikey/envoyapikey.go b/pkg/detectors/envoyapikey/envoyapikey.go index 3428ba0b3018..1e0263e7505e 100644 --- a/pkg/detectors/envoyapikey/envoyapikey.go +++ b/pkg/detectors/envoyapikey/envoyapikey.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -41,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_EnvoyApiKey, + DetectorType: detector_typepb.DetectorType_EnvoyApiKey, Raw: []byte(resMatch), } @@ -72,8 +72,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_EnvoyApiKey +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_EnvoyApiKey } func (s Scanner) Description() string { diff --git a/pkg/detectors/envoyapikey/envoyapikey_integration_test.go b/pkg/detectors/envoyapikey/envoyapikey_integration_test.go index 00b3536146da..6842ac399055 100644 --- a/pkg/detectors/envoyapikey/envoyapikey_integration_test.go +++ b/pkg/detectors/envoyapikey/envoyapikey_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestEnvoyapikey_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestEnvoyapikey_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_EnvoyApiKey, + DetectorType: detector_typepb.DetectorType_EnvoyApiKey, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestEnvoyapikey_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_EnvoyApiKey, + DetectorType: detector_typepb.DetectorType_EnvoyApiKey, Verified: false, }, }, diff --git a/pkg/detectors/eraser/eraser.go b/pkg/detectors/eraser/eraser.go index 21694ede18ad..db7b16ecdca8 100644 --- a/pkg/detectors/eraser/eraser.go +++ b/pkg/detectors/eraser/eraser.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -44,7 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for match := range uniqueMatches { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Eraser, + DetectorType: detector_typepb.DetectorType_Eraser, Raw: []byte(match), ExtraData: map[string]string{ "rotation_guide": "https://howtorotate.com/docs/tutorials/eraser/", @@ -106,8 +106,8 @@ func verifyMatch(ctx context.Context, client *http.Client, token string) (bool, } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Eraser +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Eraser } func (s Scanner) Description() string { diff --git a/pkg/detectors/eraser/eraser_integration_test.go b/pkg/detectors/eraser/eraser_integration_test.go index 6827f6e955ed..5b00eb2eaf97 100644 --- a/pkg/detectors/eraser/eraser_integration_test.go +++ b/pkg/detectors/eraser/eraser_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestEraser_FromChunk(t *testing.T) { @@ -50,7 +50,7 @@ func TestEraser_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Eraser, + DetectorType: detector_typepb.DetectorType_Eraser, Verified: true, }, }, @@ -67,7 +67,7 @@ func TestEraser_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Eraser, + DetectorType: detector_typepb.DetectorType_Eraser, Verified: false, }, }, @@ -96,7 +96,7 @@ func TestEraser_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Eraser, + DetectorType: detector_typepb.DetectorType_Eraser, Verified: false, }, }, @@ -113,7 +113,7 @@ func TestEraser_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Eraser, + DetectorType: detector_typepb.DetectorType_Eraser, Verified: false, }, }, diff --git a/pkg/detectors/etherscan/etherscan.go b/pkg/detectors/etherscan/etherscan.go index b220dc74c7c7..91f613895d4f 100644 --- a/pkg/detectors/etherscan/etherscan.go +++ b/pkg/detectors/etherscan/etherscan.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -41,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Etherscan, + DetectorType: detector_typepb.DetectorType_Etherscan, Raw: []byte(resMatch), } @@ -71,8 +71,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Etherscan +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Etherscan } func (s Scanner) Description() string { diff --git a/pkg/detectors/etherscan/etherscan_integration_test.go b/pkg/detectors/etherscan/etherscan_integration_test.go index 50bdfa29c2ea..d16a3f7d4d96 100644 --- a/pkg/detectors/etherscan/etherscan_integration_test.go +++ b/pkg/detectors/etherscan/etherscan_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestEtherscan_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestEtherscan_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Etherscan, + DetectorType: detector_typepb.DetectorType_Etherscan, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestEtherscan_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Etherscan, + DetectorType: detector_typepb.DetectorType_Etherscan, Verified: false, }, }, diff --git a/pkg/detectors/ethplorer/ethplorer.go b/pkg/detectors/ethplorer/ethplorer.go index 4e3e9713cd71..e522dd18e685 100644 --- a/pkg/detectors/ethplorer/ethplorer.go +++ b/pkg/detectors/ethplorer/ethplorer.go @@ -9,7 +9,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Ethplorer, + DetectorType: detector_typepb.DetectorType_Ethplorer, Raw: []byte(resMatch), } @@ -67,8 +67,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Ethplorer +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Ethplorer } func (s Scanner) Description() string { diff --git a/pkg/detectors/ethplorer/ethplorer_integration_test.go b/pkg/detectors/ethplorer/ethplorer_integration_test.go index 1a010cb43352..545f9836f8b7 100644 --- a/pkg/detectors/ethplorer/ethplorer_integration_test.go +++ b/pkg/detectors/ethplorer/ethplorer_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestEthplorer_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestEthplorer_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Ethplorer, + DetectorType: detector_typepb.DetectorType_Ethplorer, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestEthplorer_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Ethplorer, + DetectorType: detector_typepb.DetectorType_Ethplorer, Verified: false, }, }, diff --git a/pkg/detectors/eventbrite/eventbrite.go b/pkg/detectors/eventbrite/eventbrite.go index 56ebb1a13b90..ffd5d4aaa085 100644 --- a/pkg/detectors/eventbrite/eventbrite.go +++ b/pkg/detectors/eventbrite/eventbrite.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -53,7 +53,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for token := range uniqueTokenMatches { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Eventbrite, + DetectorType: detector_typepb.DetectorType_Eventbrite, Raw: []byte(token), ExtraData: map[string]string{}, } @@ -71,8 +71,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Eventbrite +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Eventbrite } func (s Scanner) Description() string { diff --git a/pkg/detectors/eventbrite/eventbrite_integration_test.go b/pkg/detectors/eventbrite/eventbrite_integration_test.go index eede39e28d59..91ad87979d1d 100644 --- a/pkg/detectors/eventbrite/eventbrite_integration_test.go +++ b/pkg/detectors/eventbrite/eventbrite_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestEventbrite_FromChunk(t *testing.T) { @@ -50,7 +50,7 @@ func TestEventbrite_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Eventbrite, + DetectorType: detector_typepb.DetectorType_Eventbrite, Verified: true, }, }, @@ -67,7 +67,7 @@ func TestEventbrite_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Eventbrite, + DetectorType: detector_typepb.DetectorType_Eventbrite, Verified: false, }, }, @@ -96,7 +96,7 @@ func TestEventbrite_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Eventbrite, + DetectorType: detector_typepb.DetectorType_Eventbrite, Verified: false, }, }, @@ -113,7 +113,7 @@ func TestEventbrite_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Eventbrite, + DetectorType: detector_typepb.DetectorType_Eventbrite, Verified: false, }, }, diff --git a/pkg/detectors/everhour/everhour.go b/pkg/detectors/everhour/everhour.go index 1c006493ce8d..4ef57a8a4a66 100644 --- a/pkg/detectors/everhour/everhour.go +++ b/pkg/detectors/everhour/everhour.go @@ -9,7 +9,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Everhour, + DetectorType: detector_typepb.DetectorType_Everhour, Raw: []byte(resMatch), } @@ -66,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Everhour +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Everhour } func (s Scanner) Description() string { diff --git a/pkg/detectors/everhour/everhour_integration_test.go b/pkg/detectors/everhour/everhour_integration_test.go index a2555b2623e9..e7036cab4fb6 100644 --- a/pkg/detectors/everhour/everhour_integration_test.go +++ b/pkg/detectors/everhour/everhour_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestEverhour_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestEverhour_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Everhour, + DetectorType: detector_typepb.DetectorType_Everhour, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestEverhour_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Everhour, + DetectorType: detector_typepb.DetectorType_Everhour, Verified: false, }, }, diff --git a/pkg/detectors/exchangerateapi/exchangerateapi.go b/pkg/detectors/exchangerateapi/exchangerateapi.go index 2932392227f9..acbcf1502313 100644 --- a/pkg/detectors/exchangerateapi/exchangerateapi.go +++ b/pkg/detectors/exchangerateapi/exchangerateapi.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -32,8 +32,8 @@ func (s Scanner) Keywords() []string { return []string{"exchangerate", "exchange-rate"} } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_ExchangeRateAPI +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_ExchangeRateAPI } func (s Scanner) Description() string { @@ -50,7 +50,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_ExchangeRateAPI, + DetectorType: detector_typepb.DetectorType_ExchangeRateAPI, Raw: []byte(resMatch), } diff --git a/pkg/detectors/exchangerateapi/exchangerateapi_integration_test.go b/pkg/detectors/exchangerateapi/exchangerateapi_integration_test.go index 89fa657ab99a..57893f09a77c 100644 --- a/pkg/detectors/exchangerateapi/exchangerateapi_integration_test.go +++ b/pkg/detectors/exchangerateapi/exchangerateapi_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestExchangeRateAPI_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestExchangeRateAPI_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ExchangeRateAPI, + DetectorType: detector_typepb.DetectorType_ExchangeRateAPI, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestExchangeRateAPI_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ExchangeRateAPI, + DetectorType: detector_typepb.DetectorType_ExchangeRateAPI, Verified: false, }, }, diff --git a/pkg/detectors/exchangeratesapi/exchangeratesapi.go b/pkg/detectors/exchangeratesapi/exchangeratesapi.go index 12c6934ddef2..cc1570ecc5c3 100644 --- a/pkg/detectors/exchangeratesapi/exchangeratesapi.go +++ b/pkg/detectors/exchangeratesapi/exchangeratesapi.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -41,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_ExchangeRatesAPI, + DetectorType: detector_typepb.DetectorType_ExchangeRatesAPI, Raw: []byte(resMatch), } @@ -65,8 +65,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_ExchangeRatesAPI +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_ExchangeRatesAPI } func (s Scanner) Description() string { diff --git a/pkg/detectors/exchangeratesapi/exchangeratesapi_integration_test.go b/pkg/detectors/exchangeratesapi/exchangeratesapi_integration_test.go index c3c7d216a671..a49855d3ea0f 100644 --- a/pkg/detectors/exchangeratesapi/exchangeratesapi_integration_test.go +++ b/pkg/detectors/exchangeratesapi/exchangeratesapi_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestExchangeRatesAPI_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestExchangeRatesAPI_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ExchangeRatesAPI, + DetectorType: detector_typepb.DetectorType_ExchangeRatesAPI, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestExchangeRatesAPI_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ExchangeRatesAPI, + DetectorType: detector_typepb.DetectorType_ExchangeRatesAPI, Verified: false, }, }, diff --git a/pkg/detectors/exportsdk/exportsdk.go b/pkg/detectors/exportsdk/exportsdk.go index b2761900361b..494c6e69bb1c 100644 --- a/pkg/detectors/exportsdk/exportsdk.go +++ b/pkg/detectors/exportsdk/exportsdk.go @@ -9,7 +9,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -46,7 +46,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resIdMatch := strings.TrimSpace(idmatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_ExportSDK, + DetectorType: detector_typepb.DetectorType_ExportSDK, Raw: []byte(resMatch), } @@ -74,8 +74,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_ExportSDK +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_ExportSDK } func (s Scanner) Description() string { diff --git a/pkg/detectors/exportsdk/exportsdk_integration_test.go b/pkg/detectors/exportsdk/exportsdk_integration_test.go index c4376ccaea5d..f3edfe5eb216 100644 --- a/pkg/detectors/exportsdk/exportsdk_integration_test.go +++ b/pkg/detectors/exportsdk/exportsdk_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestExportSDK_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestExportSDK_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ExportSDK, + DetectorType: detector_typepb.DetectorType_ExportSDK, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestExportSDK_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ExportSDK, + DetectorType: detector_typepb.DetectorType_ExportSDK, Verified: false, }, }, diff --git a/pkg/detectors/extractorapi/extractorapi.go b/pkg/detectors/extractorapi/extractorapi.go index 7c939df8678f..a49b05472d21 100644 --- a/pkg/detectors/extractorapi/extractorapi.go +++ b/pkg/detectors/extractorapi/extractorapi.go @@ -9,7 +9,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_ExtractorAPI, + DetectorType: detector_typepb.DetectorType_ExtractorAPI, Raw: []byte(resMatch), } @@ -64,8 +64,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_ExtractorAPI +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_ExtractorAPI } func (s Scanner) Description() string { diff --git a/pkg/detectors/extractorapi/extractorapi_integration_test.go b/pkg/detectors/extractorapi/extractorapi_integration_test.go index 2eb53e026273..1dd329bae7e2 100644 --- a/pkg/detectors/extractorapi/extractorapi_integration_test.go +++ b/pkg/detectors/extractorapi/extractorapi_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestExtractorAPI_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestExtractorAPI_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ExtractorAPI, + DetectorType: detector_typepb.DetectorType_ExtractorAPI, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestExtractorAPI_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ExtractorAPI, + DetectorType: detector_typepb.DetectorType_ExtractorAPI, Verified: false, }, }, diff --git a/pkg/detectors/facebookoauth/facebookoauth.go b/pkg/detectors/facebookoauth/facebookoauth.go index 8dbfc13c0828..c59901d901ff 100644 --- a/pkg/detectors/facebookoauth/facebookoauth.go +++ b/pkg/detectors/facebookoauth/facebookoauth.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -48,7 +48,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result apiSecretRes := strings.TrimSpace(apiSecretMatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_FacebookOAuth, + DetectorType: detector_typepb.DetectorType_FacebookOAuth, Redacted: apiIdRes, Raw: []byte(apiSecretRes), RawV2: []byte(apiIdRes + apiSecretRes), @@ -77,8 +77,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_FacebookOAuth +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_FacebookOAuth } func (s Scanner) Description() string { diff --git a/pkg/detectors/facebookoauth/facebookoauth_integration_test.go b/pkg/detectors/facebookoauth/facebookoauth_integration_test.go index b264e2230ab3..87112eabd171 100644 --- a/pkg/detectors/facebookoauth/facebookoauth_integration_test.go +++ b/pkg/detectors/facebookoauth/facebookoauth_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestFacebookOAuth_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestFacebookOAuth_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_FacebookOAuth, + DetectorType: detector_typepb.DetectorType_FacebookOAuth, Redacted: appId, Verified: true, }, @@ -66,7 +66,7 @@ func TestFacebookOAuth_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_FacebookOAuth, + DetectorType: detector_typepb.DetectorType_FacebookOAuth, Redacted: appId, Verified: false, }, diff --git a/pkg/detectors/faceplusplus/faceplusplus.go b/pkg/detectors/faceplusplus/faceplusplus.go index 696d62e305b7..49112ade0b62 100644 --- a/pkg/detectors/faceplusplus/faceplusplus.go +++ b/pkg/detectors/faceplusplus/faceplusplus.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -47,7 +47,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resSecret := strings.TrimSpace(secretMatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_FacePlusPlus, + DetectorType: detector_typepb.DetectorType_FacePlusPlus, Raw: []byte(resMatch), RawV2: []byte(resMatch + resSecret), } @@ -74,8 +74,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_FacePlusPlus +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_FacePlusPlus } func (s Scanner) Description() string { diff --git a/pkg/detectors/faceplusplus/faceplusplus_integration_test.go b/pkg/detectors/faceplusplus/faceplusplus_integration_test.go index 9276cb70323f..8ec0a13ece6c 100644 --- a/pkg/detectors/faceplusplus/faceplusplus_integration_test.go +++ b/pkg/detectors/faceplusplus/faceplusplus_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestFaceplusplus_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestFaceplusplus_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_FacePlusPlus, + DetectorType: detector_typepb.DetectorType_FacePlusPlus, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestFaceplusplus_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_FacePlusPlus, + DetectorType: detector_typepb.DetectorType_FacePlusPlus, Verified: false, }, }, diff --git a/pkg/detectors/falsepositives_test.go b/pkg/detectors/falsepositives_test.go index be6b570e4284..3d90d7428de4 100644 --- a/pkg/detectors/falsepositives_test.go +++ b/pkg/detectors/falsepositives_test.go @@ -7,7 +7,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type fakeDetector struct{} @@ -21,8 +21,8 @@ func (d fakeDetector) Keywords() []string { return nil } -func (d fakeDetector) Type() detectorspb.DetectorType { - return detectorspb.DetectorType(0) +func (d fakeDetector) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType(0) } func (f fakeDetector) Description() string { return "" } diff --git a/pkg/detectors/fastforex/fastforex.go b/pkg/detectors/fastforex/fastforex.go index d2c4add4935c..c677c0202c9e 100644 --- a/pkg/detectors/fastforex/fastforex.go +++ b/pkg/detectors/fastforex/fastforex.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -41,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_FastForex, + DetectorType: detector_typepb.DetectorType_FastForex, Raw: []byte(resMatch), } @@ -65,8 +65,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_FastForex +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_FastForex } func (s Scanner) Description() string { diff --git a/pkg/detectors/fastforex/fastforex_integration_test.go b/pkg/detectors/fastforex/fastforex_integration_test.go index c3ff9dfc6735..73831eeb1812 100644 --- a/pkg/detectors/fastforex/fastforex_integration_test.go +++ b/pkg/detectors/fastforex/fastforex_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestFastForex_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestFastForex_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_FastForex, + DetectorType: detector_typepb.DetectorType_FastForex, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestFastForex_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_FastForex, + DetectorType: detector_typepb.DetectorType_FastForex, Verified: false, }, }, diff --git a/pkg/detectors/fastlypersonaltoken/fastlypersonaltoken.go b/pkg/detectors/fastlypersonaltoken/fastlypersonaltoken.go index 9ab6559c0186..bb82ce6cf384 100644 --- a/pkg/detectors/fastlypersonaltoken/fastlypersonaltoken.go +++ b/pkg/detectors/fastlypersonaltoken/fastlypersonaltoken.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -50,7 +50,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for match := range uniqueMatches { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_FastlyPersonalToken, + DetectorType: detector_typepb.DetectorType_FastlyPersonalToken, Raw: []byte(match), } @@ -73,8 +73,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_FastlyPersonalToken +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_FastlyPersonalToken } func (s Scanner) Description() string { diff --git a/pkg/detectors/fastlypersonaltoken/fastlypersonaltoken_integration_test.go b/pkg/detectors/fastlypersonaltoken/fastlypersonaltoken_integration_test.go index 3bbeee3ac6b9..b2974a692a62 100644 --- a/pkg/detectors/fastlypersonaltoken/fastlypersonaltoken_integration_test.go +++ b/pkg/detectors/fastlypersonaltoken/fastlypersonaltoken_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestFastlyPersonalToken_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestFastlyPersonalToken_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_FastlyPersonalToken, + DetectorType: detector_typepb.DetectorType_FastlyPersonalToken, Verified: true, ExtraData: map[string]string{ "token_id": "2ICO7ArmhY8OMiiOyNpXfc", @@ -71,7 +71,7 @@ func TestFastlyPersonalToken_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_FastlyPersonalToken, + DetectorType: detector_typepb.DetectorType_FastlyPersonalToken, Verified: false, ExtraData: nil, }, diff --git a/pkg/detectors/feedier/feedier.go b/pkg/detectors/feedier/feedier.go index da949eb9b81f..7541249c86ae 100644 --- a/pkg/detectors/feedier/feedier.go +++ b/pkg/detectors/feedier/feedier.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -41,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Feedier, + DetectorType: detector_typepb.DetectorType_Feedier, Raw: []byte(resMatch), } @@ -67,8 +67,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Feedier +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Feedier } func (s Scanner) Description() string { diff --git a/pkg/detectors/feedier/feedier_integration_test.go b/pkg/detectors/feedier/feedier_integration_test.go index dc17603b03d0..9fdc827d8a02 100644 --- a/pkg/detectors/feedier/feedier_integration_test.go +++ b/pkg/detectors/feedier/feedier_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestFeedier_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestFeedier_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Feedier, + DetectorType: detector_typepb.DetectorType_Feedier, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestFeedier_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Feedier, + DetectorType: detector_typepb.DetectorType_Feedier, Verified: false, }, }, diff --git a/pkg/detectors/fetchrss/fetchrss.go b/pkg/detectors/fetchrss/fetchrss.go index ff6d319ba0ea..c6a832e22530 100644 --- a/pkg/detectors/fetchrss/fetchrss.go +++ b/pkg/detectors/fetchrss/fetchrss.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -45,7 +45,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for token := range uniqueMatches { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Fetchrss, + DetectorType: detector_typepb.DetectorType_Fetchrss, Raw: []byte(token), } @@ -111,8 +111,8 @@ type response struct { } `json:"error"` } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Fetchrss +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Fetchrss } func (s Scanner) Description() string { diff --git a/pkg/detectors/fetchrss/fetchrss_integration_test.go b/pkg/detectors/fetchrss/fetchrss_integration_test.go index e6ef2f9dd0d3..c53437153593 100644 --- a/pkg/detectors/fetchrss/fetchrss_integration_test.go +++ b/pkg/detectors/fetchrss/fetchrss_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestFetchrss_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestFetchrss_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Fetchrss, + DetectorType: detector_typepb.DetectorType_Fetchrss, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestFetchrss_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Fetchrss, + DetectorType: detector_typepb.DetectorType_Fetchrss, Verified: false, }, }, diff --git a/pkg/detectors/fibery/fibery.go b/pkg/detectors/fibery/fibery.go index adc981abef92..9dbb3d9ab3d9 100644 --- a/pkg/detectors/fibery/fibery.go +++ b/pkg/detectors/fibery/fibery.go @@ -10,7 +10,7 @@ import ( regexp "github.com/wasilibs/go-re2" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -64,7 +64,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for secret := range uniqueSecrets { for domain := range uniqueDomains { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Fibery, + DetectorType: detector_typepb.DetectorType_Fibery, Raw: []byte(secret), } @@ -112,6 +112,6 @@ func verifyMatch(ctx context.Context, client *http.Client, secret, domain string } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Fibery +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Fibery } diff --git a/pkg/detectors/fibery/fibery_integration_test.go b/pkg/detectors/fibery/fibery_integration_test.go index e1c6d46af58a..305438b1c655 100644 --- a/pkg/detectors/fibery/fibery_integration_test.go +++ b/pkg/detectors/fibery/fibery_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestFibery_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestFibery_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Fibery, + DetectorType: detector_typepb.DetectorType_Fibery, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestFibery_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Fibery, + DetectorType: detector_typepb.DetectorType_Fibery, Verified: false, }, }, diff --git a/pkg/detectors/figmapersonalaccesstoken/v1/figmapersonalaccesstoken.go b/pkg/detectors/figmapersonalaccesstoken/v1/figmapersonalaccesstoken.go index 90b52133abab..5425874d99d9 100644 --- a/pkg/detectors/figmapersonalaccesstoken/v1/figmapersonalaccesstoken.go +++ b/pkg/detectors/figmapersonalaccesstoken/v1/figmapersonalaccesstoken.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -45,7 +45,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_FigmaPersonalAccessToken, + DetectorType: detector_typepb.DetectorType_FigmaPersonalAccessToken, Raw: []byte(resMatch), ExtraData: map[string]string{ "version": fmt.Sprintf("%d", s.Version()), @@ -86,8 +86,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_FigmaPersonalAccessToken +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_FigmaPersonalAccessToken } func (s Scanner) Description() string { diff --git a/pkg/detectors/figmapersonalaccesstoken/v1/figmapersonalacesstoken_integration_test.go b/pkg/detectors/figmapersonalaccesstoken/v1/figmapersonalacesstoken_integration_test.go index 86132063cad6..a05e63fbc65b 100644 --- a/pkg/detectors/figmapersonalaccesstoken/v1/figmapersonalacesstoken_integration_test.go +++ b/pkg/detectors/figmapersonalaccesstoken/v1/figmapersonalacesstoken_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestFigmaPersonalAccessToken_FromChunk(t *testing.T) { @@ -50,7 +50,7 @@ func TestFigmaPersonalAccessToken_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_FigmaPersonalAccessToken, + DetectorType: detector_typepb.DetectorType_FigmaPersonalAccessToken, Verified: true, ExtraData: map[string]string{ "version": "1", @@ -69,7 +69,7 @@ func TestFigmaPersonalAccessToken_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_FigmaPersonalAccessToken, + DetectorType: detector_typepb.DetectorType_FigmaPersonalAccessToken, Verified: false, ExtraData: map[string]string{ "version": "1", @@ -88,7 +88,7 @@ func TestFigmaPersonalAccessToken_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_FigmaPersonalAccessToken, + DetectorType: detector_typepb.DetectorType_FigmaPersonalAccessToken, Verified: false, ExtraData: map[string]string{ "version": "1", @@ -108,7 +108,7 @@ func TestFigmaPersonalAccessToken_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_FigmaPersonalAccessToken, + DetectorType: detector_typepb.DetectorType_FigmaPersonalAccessToken, Verified: false, ExtraData: map[string]string{ "version": "1", diff --git a/pkg/detectors/figmapersonalaccesstoken/v2/figmapersonalaccesstoken_integration_test.go b/pkg/detectors/figmapersonalaccesstoken/v2/figmapersonalaccesstoken_integration_test.go index ae485e7b9dbf..d9da51d71e42 100644 --- a/pkg/detectors/figmapersonalaccesstoken/v2/figmapersonalaccesstoken_integration_test.go +++ b/pkg/detectors/figmapersonalaccesstoken/v2/figmapersonalaccesstoken_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestFigmaPersonalAccessToken_FromChunk(t *testing.T) { @@ -50,7 +50,7 @@ func TestFigmaPersonalAccessToken_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_FigmaPersonalAccessToken, + DetectorType: detector_typepb.DetectorType_FigmaPersonalAccessToken, Verified: true, ExtraData: map[string]string{ "version": "2", @@ -69,7 +69,7 @@ func TestFigmaPersonalAccessToken_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_FigmaPersonalAccessToken, + DetectorType: detector_typepb.DetectorType_FigmaPersonalAccessToken, Verified: false, ExtraData: map[string]string{ "version": "2", @@ -88,7 +88,7 @@ func TestFigmaPersonalAccessToken_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_FigmaPersonalAccessToken, + DetectorType: detector_typepb.DetectorType_FigmaPersonalAccessToken, Verified: false, ExtraData: map[string]string{ "version": "2", @@ -108,7 +108,7 @@ func TestFigmaPersonalAccessToken_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_FigmaPersonalAccessToken, + DetectorType: detector_typepb.DetectorType_FigmaPersonalAccessToken, Verified: false, ExtraData: map[string]string{ "version": "2", diff --git a/pkg/detectors/figmapersonalaccesstoken/v2/figmapersonalaccesstoken_v2.go b/pkg/detectors/figmapersonalaccesstoken/v2/figmapersonalaccesstoken_v2.go index 969d716e0990..21da20e19d5c 100644 --- a/pkg/detectors/figmapersonalaccesstoken/v2/figmapersonalaccesstoken_v2.go +++ b/pkg/detectors/figmapersonalaccesstoken/v2/figmapersonalaccesstoken_v2.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -49,7 +49,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_FigmaPersonalAccessToken, + DetectorType: detector_typepb.DetectorType_FigmaPersonalAccessToken, Raw: []byte(resMatch), ExtraData: map[string]string{ "version": fmt.Sprintf("%d", s.Version()), @@ -90,6 +90,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_FigmaPersonalAccessToken +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_FigmaPersonalAccessToken } diff --git a/pkg/detectors/fileio/fileio.go b/pkg/detectors/fileio/fileio.go index 73c9338cd248..81e0ff744b4f 100644 --- a/pkg/detectors/fileio/fileio.go +++ b/pkg/detectors/fileio/fileio.go @@ -12,7 +12,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -43,7 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_FileIO, + DetectorType: detector_typepb.DetectorType_FileIO, Raw: []byte(resMatch), } @@ -76,8 +76,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_FileIO +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_FileIO } func (s Scanner) Description() string { diff --git a/pkg/detectors/fileio/fileio_integration_test.go b/pkg/detectors/fileio/fileio_integration_test.go index c8c151863407..4dcae3794788 100644 --- a/pkg/detectors/fileio/fileio_integration_test.go +++ b/pkg/detectors/fileio/fileio_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestFileIO_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestFileIO_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_FileIO, + DetectorType: detector_typepb.DetectorType_FileIO, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestFileIO_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_FileIO, + DetectorType: detector_typepb.DetectorType_FileIO, Verified: false, }, }, diff --git a/pkg/detectors/finage/finage.go b/pkg/detectors/finage/finage.go index baf9aa487101..b29f86787f0c 100644 --- a/pkg/detectors/finage/finage.go +++ b/pkg/detectors/finage/finage.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -41,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Finage, + DetectorType: detector_typepb.DetectorType_Finage, Raw: []byte(resMatch), } @@ -66,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Finage +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Finage } func (s Scanner) Description() string { diff --git a/pkg/detectors/finage/finage_integration_test.go b/pkg/detectors/finage/finage_integration_test.go index 6f3d2168feaf..33d7a8050755 100644 --- a/pkg/detectors/finage/finage_integration_test.go +++ b/pkg/detectors/finage/finage_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestFinage_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestFinage_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Finage, + DetectorType: detector_typepb.DetectorType_Finage, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestFinage_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Finage, + DetectorType: detector_typepb.DetectorType_Finage, Verified: false, }, }, diff --git a/pkg/detectors/financialmodelingprep/financialmodelingprep.go b/pkg/detectors/financialmodelingprep/financialmodelingprep.go index 1aa7593697c6..79f82aed1bf0 100644 --- a/pkg/detectors/financialmodelingprep/financialmodelingprep.go +++ b/pkg/detectors/financialmodelingprep/financialmodelingprep.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -42,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_FinancialModelingPrep, + DetectorType: detector_typepb.DetectorType_FinancialModelingPrep, Raw: []byte(resMatch), } @@ -78,8 +78,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_FinancialModelingPrep +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_FinancialModelingPrep } func (s Scanner) Description() string { diff --git a/pkg/detectors/financialmodelingprep/financialmodelingprep_integration_test.go b/pkg/detectors/financialmodelingprep/financialmodelingprep_integration_test.go index 43cc8366ebec..11f6ce3642b5 100644 --- a/pkg/detectors/financialmodelingprep/financialmodelingprep_integration_test.go +++ b/pkg/detectors/financialmodelingprep/financialmodelingprep_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestFinancialModelingPrep_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestFinancialModelingPrep_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_FinancialModelingPrep, + DetectorType: detector_typepb.DetectorType_FinancialModelingPrep, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestFinancialModelingPrep_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_FinancialModelingPrep, + DetectorType: detector_typepb.DetectorType_FinancialModelingPrep, Verified: false, }, }, diff --git a/pkg/detectors/findl/findl.go b/pkg/detectors/findl/findl.go index c495fc008cf0..fd4096098b01 100644 --- a/pkg/detectors/findl/findl.go +++ b/pkg/detectors/findl/findl.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -41,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Findl, + DetectorType: detector_typepb.DetectorType_Findl, Raw: []byte(resMatch), } @@ -68,8 +68,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Findl +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Findl } func (s Scanner) Description() string { diff --git a/pkg/detectors/findl/findl_integration_test.go b/pkg/detectors/findl/findl_integration_test.go index 8566f3b290b8..96021f53955e 100644 --- a/pkg/detectors/findl/findl_integration_test.go +++ b/pkg/detectors/findl/findl_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestFindl_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestFindl_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Findl, + DetectorType: detector_typepb.DetectorType_Findl, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestFindl_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Findl, + DetectorType: detector_typepb.DetectorType_Findl, Verified: false, }, }, diff --git a/pkg/detectors/finnhub/finnhub.go b/pkg/detectors/finnhub/finnhub.go index ea3ab11f9375..26ea806fefc6 100644 --- a/pkg/detectors/finnhub/finnhub.go +++ b/pkg/detectors/finnhub/finnhub.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -41,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Finnhub, + DetectorType: detector_typepb.DetectorType_Finnhub, Raw: []byte(resMatch), } @@ -66,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Finnhub +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Finnhub } func (s Scanner) Description() string { diff --git a/pkg/detectors/finnhub/finnhub_integration_test.go b/pkg/detectors/finnhub/finnhub_integration_test.go index 809b500305fb..59d5ea4d7f65 100644 --- a/pkg/detectors/finnhub/finnhub_integration_test.go +++ b/pkg/detectors/finnhub/finnhub_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestFinnhub_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestFinnhub_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Finnhub, + DetectorType: detector_typepb.DetectorType_Finnhub, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestFinnhub_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Finnhub, + DetectorType: detector_typepb.DetectorType_Finnhub, Verified: false, }, }, diff --git a/pkg/detectors/fixerio/fixerio.go b/pkg/detectors/fixerio/fixerio.go index c6b4338014bd..1bb58ab22e38 100644 --- a/pkg/detectors/fixerio/fixerio.go +++ b/pkg/detectors/fixerio/fixerio.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -41,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_FixerIO, + DetectorType: detector_typepb.DetectorType_FixerIO, Raw: []byte(resMatch), } @@ -80,8 +80,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_FixerIO +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_FixerIO } func (s Scanner) Description() string { diff --git a/pkg/detectors/fixerio/fixerio_integration_test.go b/pkg/detectors/fixerio/fixerio_integration_test.go index 585890c06425..91fd67cd19e1 100644 --- a/pkg/detectors/fixerio/fixerio_integration_test.go +++ b/pkg/detectors/fixerio/fixerio_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestFixerIO_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestFixerIO_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_FixerIO, + DetectorType: detector_typepb.DetectorType_FixerIO, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestFixerIO_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_FixerIO, + DetectorType: detector_typepb.DetectorType_FixerIO, Verified: false, }, }, diff --git a/pkg/detectors/flatio/flatio.go b/pkg/detectors/flatio/flatio.go index 51599f11029e..1f2dec6d9883 100644 --- a/pkg/detectors/flatio/flatio.go +++ b/pkg/detectors/flatio/flatio.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -41,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_FlatIO, + DetectorType: detector_typepb.DetectorType_FlatIO, Raw: []byte(resMatch), } @@ -67,8 +67,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_FlatIO +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_FlatIO } func (s Scanner) Description() string { diff --git a/pkg/detectors/flatio/flatio_integration_test.go b/pkg/detectors/flatio/flatio_integration_test.go index 16e8ba94038a..fbc836071d8c 100644 --- a/pkg/detectors/flatio/flatio_integration_test.go +++ b/pkg/detectors/flatio/flatio_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestFlatIO_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestFlatIO_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_FlatIO, + DetectorType: detector_typepb.DetectorType_FlatIO, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestFlatIO_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_FlatIO, + DetectorType: detector_typepb.DetectorType_FlatIO, Verified: false, }, }, diff --git a/pkg/detectors/fleetbase/fleetbase.go b/pkg/detectors/fleetbase/fleetbase.go index fe6405815536..ce3b005ba95b 100644 --- a/pkg/detectors/fleetbase/fleetbase.go +++ b/pkg/detectors/fleetbase/fleetbase.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -41,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Fleetbase, + DetectorType: detector_typepb.DetectorType_Fleetbase, Raw: []byte(resMatch), } @@ -66,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Fleetbase +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Fleetbase } func (s Scanner) Description() string { diff --git a/pkg/detectors/fleetbase/fleetbase_integration_test.go b/pkg/detectors/fleetbase/fleetbase_integration_test.go index 763433b2fb33..daa2ea0e3b88 100644 --- a/pkg/detectors/fleetbase/fleetbase_integration_test.go +++ b/pkg/detectors/fleetbase/fleetbase_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestFleetbase_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestFleetbase_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Fleetbase, + DetectorType: detector_typepb.DetectorType_Fleetbase, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestFleetbase_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Fleetbase, + DetectorType: detector_typepb.DetectorType_Fleetbase, Verified: false, }, }, diff --git a/pkg/detectors/flexport/flexport.go b/pkg/detectors/flexport/flexport.go index 1d77d9affac1..153889331ce3 100644 --- a/pkg/detectors/flexport/flexport.go +++ b/pkg/detectors/flexport/flexport.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -43,7 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for match := range uniqueMatches { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Flexport, + DetectorType: detector_typepb.DetectorType_Flexport, Raw: []byte(match), ExtraData: map[string]string{ "rotation_guide": "https://howtorotate.com/docs/tutorials/flexport/", @@ -97,8 +97,8 @@ func verifyMatch(ctx context.Context, client *http.Client, token string) (bool, } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Flexport +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Flexport } func (s Scanner) Description() string { diff --git a/pkg/detectors/flexport/flexport_test.go b/pkg/detectors/flexport/flexport_test.go index 7096f2a33c9d..234317f0e534 100644 --- a/pkg/detectors/flexport/flexport_test.go +++ b/pkg/detectors/flexport/flexport_test.go @@ -15,7 +15,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/engine/ahocorasick" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestFlexport_Pattern(t *testing.T) { @@ -110,7 +110,7 @@ func TestFlexport_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Flexport, + DetectorType: detector_typepb.DetectorType_Flexport, Verified: true, }, }, @@ -127,7 +127,7 @@ func TestFlexport_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Flexport, + DetectorType: detector_typepb.DetectorType_Flexport, Verified: true, }, }, @@ -144,7 +144,7 @@ func TestFlexport_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Flexport, + DetectorType: detector_typepb.DetectorType_Flexport, Verified: false, }, }, @@ -173,7 +173,7 @@ func TestFlexport_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Flexport, + DetectorType: detector_typepb.DetectorType_Flexport, Verified: false, }, }, @@ -190,7 +190,7 @@ func TestFlexport_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Flexport, + DetectorType: detector_typepb.DetectorType_Flexport, Verified: false, }, }, diff --git a/pkg/detectors/flickr/flickr.go b/pkg/detectors/flickr/flickr.go index 629da0ea85de..1efe2a8af2eb 100644 --- a/pkg/detectors/flickr/flickr.go +++ b/pkg/detectors/flickr/flickr.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -42,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Flickr, + DetectorType: detector_typepb.DetectorType_Flickr, Raw: []byte(resMatch), } @@ -72,8 +72,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Flickr +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Flickr } func (s Scanner) Description() string { diff --git a/pkg/detectors/flickr/flickr_integration_test.go b/pkg/detectors/flickr/flickr_integration_test.go index 3f830f436ce5..ef06cc92f137 100644 --- a/pkg/detectors/flickr/flickr_integration_test.go +++ b/pkg/detectors/flickr/flickr_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestFlickr_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestFlickr_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Flickr, + DetectorType: detector_typepb.DetectorType_Flickr, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestFlickr_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Flickr, + DetectorType: detector_typepb.DetectorType_Flickr, Verified: false, }, }, diff --git a/pkg/detectors/flightapi/flightapi.go b/pkg/detectors/flightapi/flightapi.go index f649e63022ec..2656268a6883 100644 --- a/pkg/detectors/flightapi/flightapi.go +++ b/pkg/detectors/flightapi/flightapi.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -41,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_FlightApi, + DetectorType: detector_typepb.DetectorType_FlightApi, Raw: []byte(resMatch), } @@ -65,8 +65,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_FlightApi +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_FlightApi } func (s Scanner) Description() string { diff --git a/pkg/detectors/flightapi/flightapi_integration_test.go b/pkg/detectors/flightapi/flightapi_integration_test.go index 1c6be19b1710..4741d34bde71 100644 --- a/pkg/detectors/flightapi/flightapi_integration_test.go +++ b/pkg/detectors/flightapi/flightapi_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestFlightApi_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestFlightApi_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_FlightApi, + DetectorType: detector_typepb.DetectorType_FlightApi, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestFlightApi_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_FlightApi, + DetectorType: detector_typepb.DetectorType_FlightApi, Verified: false, }, }, diff --git a/pkg/detectors/flightlabs/flightlabs.go b/pkg/detectors/flightlabs/flightlabs.go index 38cc6171f9ae..0103f441103f 100644 --- a/pkg/detectors/flightlabs/flightlabs.go +++ b/pkg/detectors/flightlabs/flightlabs.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -53,7 +53,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for key := range uniqueKeys { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_FlightLabs, + DetectorType: detector_typepb.DetectorType_FlightLabs, Raw: []byte(key), } @@ -97,8 +97,8 @@ func verifyMatch(ctx context.Context, client *http.Client, secret string) (bool, } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_FlightLabs +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_FlightLabs } func (s Scanner) Description() string { diff --git a/pkg/detectors/flightlabs/flightlabs_integration_test.go b/pkg/detectors/flightlabs/flightlabs_integration_test.go index aeb228e9aaa6..ac39b5c7d6a8 100644 --- a/pkg/detectors/flightlabs/flightlabs_integration_test.go +++ b/pkg/detectors/flightlabs/flightlabs_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestFlightLabs_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestFlightLabs_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_FlightLabs, + DetectorType: detector_typepb.DetectorType_FlightLabs, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestFlightLabs_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_FlightLabs, + DetectorType: detector_typepb.DetectorType_FlightLabs, Verified: false, }, }, diff --git a/pkg/detectors/flightstats/flightstats.go b/pkg/detectors/flightstats/flightstats.go index 6517098b2dcc..a2e1fcf3ddf3 100644 --- a/pkg/detectors/flightstats/flightstats.go +++ b/pkg/detectors/flightstats/flightstats.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -49,7 +49,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resId := strings.TrimSpace(idMatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Flightstats, + DetectorType: detector_typepb.DetectorType_Flightstats, Raw: []byte(resMatch), } @@ -81,8 +81,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Flightstats +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Flightstats } func (s Scanner) Description() string { diff --git a/pkg/detectors/flightstats/flightstats_integration_test.go b/pkg/detectors/flightstats/flightstats_integration_test.go index 018ae17b83eb..b46d3a9caf6b 100644 --- a/pkg/detectors/flightstats/flightstats_integration_test.go +++ b/pkg/detectors/flightstats/flightstats_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestFlightstats_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestFlightstats_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Flightstats, + DetectorType: detector_typepb.DetectorType_Flightstats, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestFlightstats_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Flightstats, + DetectorType: detector_typepb.DetectorType_Flightstats, Verified: false, }, }, diff --git a/pkg/detectors/float/float.go b/pkg/detectors/float/float.go index 5ce95000a5fe..6444f2b9b824 100644 --- a/pkg/detectors/float/float.go +++ b/pkg/detectors/float/float.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -41,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Float, + DetectorType: detector_typepb.DetectorType_Float, Raw: []byte(resMatch), } @@ -67,8 +67,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Float +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Float } func (s Scanner) Description() string { diff --git a/pkg/detectors/float/float_integration_test.go b/pkg/detectors/float/float_integration_test.go index e4b3acb0b73d..3c50bdc5a687 100644 --- a/pkg/detectors/float/float_integration_test.go +++ b/pkg/detectors/float/float_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestFloat_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestFloat_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Float, + DetectorType: detector_typepb.DetectorType_Float, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestFloat_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Float, + DetectorType: detector_typepb.DetectorType_Float, Verified: false, }, }, diff --git a/pkg/detectors/flowflu/flowflu.go b/pkg/detectors/flowflu/flowflu.go index 5bdb9453ed07..5c1d8ffefc71 100644 --- a/pkg/detectors/flowflu/flowflu.go +++ b/pkg/detectors/flowflu/flowflu.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -50,7 +50,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resAccount := strings.TrimSpace(accountMatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_FlowFlu, + DetectorType: detector_typepb.DetectorType_FlowFlu, Raw: []byte(resMatch), } @@ -87,8 +87,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_FlowFlu +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_FlowFlu } func (s Scanner) Description() string { diff --git a/pkg/detectors/flowflu/flowflu_integration_test.go b/pkg/detectors/flowflu/flowflu_integration_test.go index f5098c0b4744..be0b37a9c379 100644 --- a/pkg/detectors/flowflu/flowflu_integration_test.go +++ b/pkg/detectors/flowflu/flowflu_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestFlowFlu_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestFlowFlu_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_FlowFlu, + DetectorType: detector_typepb.DetectorType_FlowFlu, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestFlowFlu_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_FlowFlu, + DetectorType: detector_typepb.DetectorType_FlowFlu, Verified: false, }, }, diff --git a/pkg/detectors/flutterwave/flutterwave.go b/pkg/detectors/flutterwave/flutterwave.go index 3de6afc2bc3a..b027f3ea6860 100644 --- a/pkg/detectors/flutterwave/flutterwave.go +++ b/pkg/detectors/flutterwave/flutterwave.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -42,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Flutterwave, + DetectorType: detector_typepb.DetectorType_Flutterwave, Raw: []byte(resMatch), } @@ -67,8 +67,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Flutterwave +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Flutterwave } func (s Scanner) Description() string { diff --git a/pkg/detectors/flutterwave/flutterwave_integration_test.go b/pkg/detectors/flutterwave/flutterwave_integration_test.go index e558209ed380..f2c3b6d679a2 100644 --- a/pkg/detectors/flutterwave/flutterwave_integration_test.go +++ b/pkg/detectors/flutterwave/flutterwave_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestFlutterwave_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestFlutterwave_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Flutterwave, + DetectorType: detector_typepb.DetectorType_Flutterwave, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestFlutterwave_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Flutterwave, + DetectorType: detector_typepb.DetectorType_Flutterwave, Verified: false, }, }, diff --git a/pkg/detectors/flyio/flyio.go b/pkg/detectors/flyio/flyio.go index 716513ae0b50..cc8397b3c472 100644 --- a/pkg/detectors/flyio/flyio.go +++ b/pkg/detectors/flyio/flyio.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -45,7 +45,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for match := range uniqueMatches { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_FlyIO, + DetectorType: detector_typepb.DetectorType_FlyIO, Raw: []byte(match), } @@ -104,8 +104,8 @@ func verifyMatch(ctx context.Context, client *http.Client, token string) (bool, } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_FlyIO +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_FlyIO } func (s Scanner) Description() string { diff --git a/pkg/detectors/flyio/flyio_integration_test.go b/pkg/detectors/flyio/flyio_integration_test.go index cd67bd2162ce..128afcc650e2 100644 --- a/pkg/detectors/flyio/flyio_integration_test.go +++ b/pkg/detectors/flyio/flyio_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestFlyio_FromChunk(t *testing.T) { @@ -50,7 +50,7 @@ func TestFlyio_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_FlyIO, + DetectorType: detector_typepb.DetectorType_FlyIO, Verified: true, }, }, @@ -67,7 +67,7 @@ func TestFlyio_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_FlyIO, + DetectorType: detector_typepb.DetectorType_FlyIO, Verified: false, }, }, @@ -96,7 +96,7 @@ func TestFlyio_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_FlyIO, + DetectorType: detector_typepb.DetectorType_FlyIO, Verified: false, }, }, @@ -113,7 +113,7 @@ func TestFlyio_FromChunk(t *testing.T) { }, want: func() []detectors.Result { r := detectors.Result{ - DetectorType: detectorspb.DetectorType_FlyIO, + DetectorType: detector_typepb.DetectorType_FlyIO, Verified: false, } r.SetVerificationError(fmt.Errorf("unexpected HTTP response status 404")) diff --git a/pkg/detectors/flyio/flyio_test.go b/pkg/detectors/flyio/flyio_test.go index a8b9631f8b71..bcb2e44685db 100644 --- a/pkg/detectors/flyio/flyio_test.go +++ b/pkg/detectors/flyio/flyio_test.go @@ -8,7 +8,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/engine/ahocorasick" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestFlyio_Pattern(t *testing.T) { @@ -131,7 +131,7 @@ func TestFlyio_IsFalsePositive(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { result := detectors.Result{ - DetectorType: detectorspb.DetectorType_FlyIO, + DetectorType: detector_typepb.DetectorType_FlyIO, Raw: []byte(tt.token), } diff --git a/pkg/detectors/fmfw/fmfw.go b/pkg/detectors/fmfw/fmfw.go index 70438465f88c..517f6fbbe9ee 100644 --- a/pkg/detectors/fmfw/fmfw.go +++ b/pkg/detectors/fmfw/fmfw.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -49,7 +49,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result userPatMatch := strings.TrimSpace(idMatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Fmfw, + DetectorType: detector_typepb.DetectorType_Fmfw, Raw: []byte(tokenPatMatch), } @@ -77,8 +77,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Fmfw +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Fmfw } func (s Scanner) Description() string { diff --git a/pkg/detectors/fmfw/fmfw_integration_test.go b/pkg/detectors/fmfw/fmfw_integration_test.go index 2aa351fc375a..3bd36b37fcd0 100644 --- a/pkg/detectors/fmfw/fmfw_integration_test.go +++ b/pkg/detectors/fmfw/fmfw_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestFmfw_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestFmfw_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Fmfw, + DetectorType: detector_typepb.DetectorType_Fmfw, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestFmfw_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Fmfw, + DetectorType: detector_typepb.DetectorType_Fmfw, Verified: false, }, }, diff --git a/pkg/detectors/formbucket/formbucket.go b/pkg/detectors/formbucket/formbucket.go index 4377a32bb68f..9f786548d341 100644 --- a/pkg/detectors/formbucket/formbucket.go +++ b/pkg/detectors/formbucket/formbucket.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -42,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_FormBucket, + DetectorType: detector_typepb.DetectorType_FormBucket, Raw: []byte(resMatch), } @@ -85,6 +85,6 @@ type Response struct { Anonymous bool `json:"anonymous"` } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_FormBucket +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_FormBucket } diff --git a/pkg/detectors/formbucket/formbucket_integration_test.go b/pkg/detectors/formbucket/formbucket_integration_test.go index ea3a25404b60..af4fd9b8cc85 100644 --- a/pkg/detectors/formbucket/formbucket_integration_test.go +++ b/pkg/detectors/formbucket/formbucket_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestFormBucket_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestFormBucket_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_FormBucket, + DetectorType: detector_typepb.DetectorType_FormBucket, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestFormBucket_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_FormBucket, + DetectorType: detector_typepb.DetectorType_FormBucket, Verified: false, }, }, diff --git a/pkg/detectors/formcraft/formcraft.go b/pkg/detectors/formcraft/formcraft.go index 7d3402843371..8120ba567078 100644 --- a/pkg/detectors/formcraft/formcraft.go +++ b/pkg/detectors/formcraft/formcraft.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -42,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Formcraft, + DetectorType: detector_typepb.DetectorType_Formcraft, Raw: []byte(resMatch), } @@ -69,8 +69,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Formcraft +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Formcraft } func (s Scanner) Description() string { diff --git a/pkg/detectors/formcraft/formcraft_integration_test.go b/pkg/detectors/formcraft/formcraft_integration_test.go index d8ef58a46fe3..f23357948737 100644 --- a/pkg/detectors/formcraft/formcraft_integration_test.go +++ b/pkg/detectors/formcraft/formcraft_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestFormcraft_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestFormcraft_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Formcraft, + DetectorType: detector_typepb.DetectorType_Formcraft, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestFormcraft_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Formcraft, + DetectorType: detector_typepb.DetectorType_Formcraft, Verified: false, }, }, diff --git a/pkg/detectors/formio/formio.go b/pkg/detectors/formio/formio.go index 52b3f3670c41..02fea073856e 100644 --- a/pkg/detectors/formio/formio.go +++ b/pkg/detectors/formio/formio.go @@ -9,7 +9,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_FormIO, + DetectorType: detector_typepb.DetectorType_FormIO, Raw: []byte(resMatch), } @@ -66,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_FormIO +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_FormIO } func (s Scanner) Description() string { diff --git a/pkg/detectors/formio/formio_integration_test.go b/pkg/detectors/formio/formio_integration_test.go index d9c2ec280f22..9eabd00dfd83 100644 --- a/pkg/detectors/formio/formio_integration_test.go +++ b/pkg/detectors/formio/formio_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestFormIO_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestFormIO_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_FormIO, + DetectorType: detector_typepb.DetectorType_FormIO, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestFormIO_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_FormIO, + DetectorType: detector_typepb.DetectorType_FormIO, Verified: false, }, }, diff --git a/pkg/detectors/formsite/formsite.go b/pkg/detectors/formsite/formsite.go index 59344861b47d..874578d8ec26 100644 --- a/pkg/detectors/formsite/formsite.go +++ b/pkg/detectors/formsite/formsite.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -50,7 +50,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for _, userMatch := range userMatches { resUserMatch := strings.TrimSpace(userMatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Formsite, + DetectorType: detector_typepb.DetectorType_Formsite, Raw: []byte(resMatch), } @@ -78,8 +78,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Formsite +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Formsite } func (s Scanner) Description() string { diff --git a/pkg/detectors/formsite/formsite_integration_test.go b/pkg/detectors/formsite/formsite_integration_test.go index da9944d08134..17cbc93dd0da 100644 --- a/pkg/detectors/formsite/formsite_integration_test.go +++ b/pkg/detectors/formsite/formsite_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestFormsite_FromChunk(t *testing.T) { @@ -50,11 +50,11 @@ func TestFormsite_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Formsite, + DetectorType: detector_typepb.DetectorType_Formsite, Verified: true, }, { - DetectorType: detectorspb.DetectorType_Formsite, + DetectorType: detector_typepb.DetectorType_Formsite, Verified: false, }, }, @@ -70,11 +70,11 @@ func TestFormsite_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Formsite, + DetectorType: detector_typepb.DetectorType_Formsite, Verified: false, }, { - DetectorType: detectorspb.DetectorType_Formsite, + DetectorType: detector_typepb.DetectorType_Formsite, Verified: false, }, }, diff --git a/pkg/detectors/foursquare/foursquare.go b/pkg/detectors/foursquare/foursquare.go index b34a53de18f6..dec97151b5f6 100644 --- a/pkg/detectors/foursquare/foursquare.go +++ b/pkg/detectors/foursquare/foursquare.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -46,7 +46,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for _, secretMatch := range secretMatches { resSecret := strings.TrimSpace(secretMatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_FourSquare, + DetectorType: detector_typepb.DetectorType_FourSquare, Raw: []byte(resMatch), RawV2: []byte(resMatch + resSecret), } @@ -73,8 +73,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_FourSquare +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_FourSquare } func (s Scanner) Description() string { diff --git a/pkg/detectors/foursquare/foursquare_integration_test.go b/pkg/detectors/foursquare/foursquare_integration_test.go index e6b1076963d8..ba90683a738f 100644 --- a/pkg/detectors/foursquare/foursquare_integration_test.go +++ b/pkg/detectors/foursquare/foursquare_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestFoursquare_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestFoursquare_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_FourSquare, + DetectorType: detector_typepb.DetectorType_FourSquare, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestFoursquare_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_FourSquare, + DetectorType: detector_typepb.DetectorType_FourSquare, Verified: false, }, }, diff --git a/pkg/detectors/frameio/frameio.go b/pkg/detectors/frameio/frameio.go index 0f1a54e4c802..15f1b106e1f6 100644 --- a/pkg/detectors/frameio/frameio.go +++ b/pkg/detectors/frameio/frameio.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -41,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_FrameIO, + DetectorType: detector_typepb.DetectorType_FrameIO, Raw: []byte(resMatch), } @@ -67,8 +67,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_FrameIO +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_FrameIO } func (s Scanner) Description() string { diff --git a/pkg/detectors/frameio/frameio_integration_test.go b/pkg/detectors/frameio/frameio_integration_test.go index cc7c588c9941..46fe355ee2e9 100644 --- a/pkg/detectors/frameio/frameio_integration_test.go +++ b/pkg/detectors/frameio/frameio_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestFrameio_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestFrameio_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_FrameIO, + DetectorType: detector_typepb.DetectorType_FrameIO, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestFrameio_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_FrameIO, + DetectorType: detector_typepb.DetectorType_FrameIO, Verified: false, }, }, diff --git a/pkg/detectors/freshbooks/freshbooks.go b/pkg/detectors/freshbooks/freshbooks.go index 2cef76521d89..6d1d8f5fe8d8 100644 --- a/pkg/detectors/freshbooks/freshbooks.go +++ b/pkg/detectors/freshbooks/freshbooks.go @@ -10,7 +10,7 @@ import ( regexp "github.com/wasilibs/go-re2" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -47,7 +47,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resURI := strings.TrimSpace(uriMatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Freshbooks, + DetectorType: detector_typepb.DetectorType_Freshbooks, Raw: []byte(resMatch), } @@ -77,8 +77,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Freshbooks +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Freshbooks } func (s Scanner) Description() string { diff --git a/pkg/detectors/freshbooks/freshbooks_integration_test.go b/pkg/detectors/freshbooks/freshbooks_integration_test.go index 136f2f398389..904df7231e8a 100644 --- a/pkg/detectors/freshbooks/freshbooks_integration_test.go +++ b/pkg/detectors/freshbooks/freshbooks_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestFreshbooks_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestFreshbooks_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Freshbooks, + DetectorType: detector_typepb.DetectorType_Freshbooks, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestFreshbooks_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Freshbooks, + DetectorType: detector_typepb.DetectorType_Freshbooks, Verified: false, }, }, diff --git a/pkg/detectors/freshdesk/freshdesk.go b/pkg/detectors/freshdesk/freshdesk.go index 21c513037cdf..4f8a68efbd40 100644 --- a/pkg/detectors/freshdesk/freshdesk.go +++ b/pkg/detectors/freshdesk/freshdesk.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -48,7 +48,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for _, urlMatch := range urlMatches { resURL := strings.TrimSpace(urlMatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Freshdesk, + DetectorType: detector_typepb.DetectorType_Freshdesk, Raw: []byte(resMatch), } @@ -77,8 +77,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Freshdesk +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Freshdesk } func (s Scanner) Description() string { diff --git a/pkg/detectors/freshdesk/freshdesk_integration_test.go b/pkg/detectors/freshdesk/freshdesk_integration_test.go index d8727b654195..cbebf1341deb 100644 --- a/pkg/detectors/freshdesk/freshdesk_integration_test.go +++ b/pkg/detectors/freshdesk/freshdesk_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestFreshdesk_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestFreshdesk_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Freshdesk, + DetectorType: detector_typepb.DetectorType_Freshdesk, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestFreshdesk_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Freshdesk, + DetectorType: detector_typepb.DetectorType_Freshdesk, Verified: false, }, }, diff --git a/pkg/detectors/front/front.go b/pkg/detectors/front/front.go index b413ede5a05c..29ad86fd7f6c 100644 --- a/pkg/detectors/front/front.go +++ b/pkg/detectors/front/front.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -41,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Front, + DetectorType: detector_typepb.DetectorType_Front, Raw: []byte(resMatch), } @@ -67,8 +67,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Front +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Front } func (s Scanner) Description() string { diff --git a/pkg/detectors/front/front_integration_test.go b/pkg/detectors/front/front_integration_test.go index fded1081b1ca..15eb99d3bfdd 100644 --- a/pkg/detectors/front/front_integration_test.go +++ b/pkg/detectors/front/front_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestFront_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestFront_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Front, + DetectorType: detector_typepb.DetectorType_Front, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestFront_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Front, + DetectorType: detector_typepb.DetectorType_Front, Verified: false, }, }, diff --git a/pkg/detectors/ftp/ftp.go b/pkg/detectors/ftp/ftp.go index 1be5520670df..a78bf39a027e 100644 --- a/pkg/detectors/ftp/ftp.go +++ b/pkg/detectors/ftp/ftp.go @@ -13,7 +13,7 @@ import ( regexp "github.com/wasilibs/go-re2" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) const ( @@ -73,7 +73,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result redact := strings.TrimSpace(strings.Replace(rawURL.String(), password, "********", -1)) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_FTP, + DetectorType: detector_typepb.DetectorType_FTP, Raw: []byte(rawURL.String()), Redacted: redact, } @@ -154,8 +154,8 @@ func verifyFTP(timeout time.Duration, u *url.URL) error { return c.Login(u.User.Username(), password) } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_FTP +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_FTP } func (s Scanner) Description() string { diff --git a/pkg/detectors/ftp/ftp_integration_test.go b/pkg/detectors/ftp/ftp_integration_test.go index 2e546945bbe0..4fe1f5df5132 100644 --- a/pkg/detectors/ftp/ftp_integration_test.go +++ b/pkg/detectors/ftp/ftp_integration_test.go @@ -12,7 +12,7 @@ import ( "github.com/google/go-cmp/cmp/cmpopts" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestFTP_FromChunk(t *testing.T) { @@ -50,7 +50,7 @@ func TestFTP_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_FTP, + DetectorType: detector_typepb.DetectorType_FTP, Verified: true, Redacted: "ftp://dlpuser:********@ftp.dlptest.com", }, @@ -68,7 +68,7 @@ func TestFTP_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_FTP, + DetectorType: detector_typepb.DetectorType_FTP, Verified: false, Redacted: "ftp://dlpuser:********@ftp.dlptest.com", }, @@ -86,7 +86,7 @@ func TestFTP_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_FTP, + DetectorType: detector_typepb.DetectorType_FTP, Verified: false, Redacted: "ftp://dlpuser:********@ftp.dlptest.com.badhost", }, @@ -105,7 +105,7 @@ func TestFTP_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_FTP, + DetectorType: detector_typepb.DetectorType_FTP, Verified: false, Redacted: "ftp://dlpuser:********@ftp.dlptest.com", }, @@ -123,7 +123,7 @@ func TestFTP_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_FTP, + DetectorType: detector_typepb.DetectorType_FTP, Verified: false, Redacted: "ftp://abc:********@ftp.freebsd.org", }, diff --git a/pkg/detectors/fulcrum/fulcrum.go b/pkg/detectors/fulcrum/fulcrum.go index 90d5022f581c..23b13fe74e3d 100644 --- a/pkg/detectors/fulcrum/fulcrum.go +++ b/pkg/detectors/fulcrum/fulcrum.go @@ -9,7 +9,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Fulcrum, + DetectorType: detector_typepb.DetectorType_Fulcrum, Raw: []byte(resMatch), } @@ -66,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Fulcrum +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Fulcrum } func (s Scanner) Description() string { diff --git a/pkg/detectors/fulcrum/fulcrum_integration_test.go b/pkg/detectors/fulcrum/fulcrum_integration_test.go index 1450e755b508..4075455400fe 100644 --- a/pkg/detectors/fulcrum/fulcrum_integration_test.go +++ b/pkg/detectors/fulcrum/fulcrum_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestFulcrum_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestFulcrum_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Fulcrum, + DetectorType: detector_typepb.DetectorType_Fulcrum, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestFulcrum_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Fulcrum, + DetectorType: detector_typepb.DetectorType_Fulcrum, Verified: false, }, }, diff --git a/pkg/detectors/fullstory/v1/fullstory.go b/pkg/detectors/fullstory/v1/fullstory.go index d2d9665d4ee5..3d2ca9602633 100644 --- a/pkg/detectors/fullstory/v1/fullstory.go +++ b/pkg/detectors/fullstory/v1/fullstory.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -44,7 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Fullstory, + DetectorType: detector_typepb.DetectorType_Fullstory, Raw: []byte(resMatch), ExtraData: map[string]string{ "version": fmt.Sprintf("%d", s.Version()), @@ -72,8 +72,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Fullstory +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Fullstory } func (s Scanner) Description() string { diff --git a/pkg/detectors/fullstory/v1/fullstory_integration_test.go b/pkg/detectors/fullstory/v1/fullstory_integration_test.go index e893963dc15b..052d1d921eda 100644 --- a/pkg/detectors/fullstory/v1/fullstory_integration_test.go +++ b/pkg/detectors/fullstory/v1/fullstory_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestFullstory_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestFullstory_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Fullstory, + DetectorType: detector_typepb.DetectorType_Fullstory, Verified: true, ExtraData: map[string]string{ "version": "1", @@ -67,7 +67,7 @@ func TestFullstory_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Fullstory, + DetectorType: detector_typepb.DetectorType_Fullstory, Verified: false, ExtraData: map[string]string{ "version": "1", diff --git a/pkg/detectors/fullstory/v2/fullstory_integration_test.go b/pkg/detectors/fullstory/v2/fullstory_integration_test.go index 22ad67f4f97d..2f6fb7ede16d 100644 --- a/pkg/detectors/fullstory/v2/fullstory_integration_test.go +++ b/pkg/detectors/fullstory/v2/fullstory_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestFullstory_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestFullstory_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Fullstory, + DetectorType: detector_typepb.DetectorType_Fullstory, Verified: true, ExtraData: map[string]string{ "version": "2", @@ -67,7 +67,7 @@ func TestFullstory_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Fullstory, + DetectorType: detector_typepb.DetectorType_Fullstory, Verified: false, ExtraData: map[string]string{ "version": "2", diff --git a/pkg/detectors/fullstory/v2/fullstory_v2.go b/pkg/detectors/fullstory/v2/fullstory_v2.go index 8ef3df3511b1..e9add6cf5fc7 100644 --- a/pkg/detectors/fullstory/v2/fullstory_v2.go +++ b/pkg/detectors/fullstory/v2/fullstory_v2.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -44,7 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Fullstory, + DetectorType: detector_typepb.DetectorType_Fullstory, Raw: []byte(resMatch), ExtraData: map[string]string{ "version": fmt.Sprintf("%d", s.Version()), @@ -72,8 +72,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Fullstory +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Fullstory } func (s Scanner) Description() string { diff --git a/pkg/detectors/fxmarket/fxmarket.go b/pkg/detectors/fxmarket/fxmarket.go index 64adcfe9af3c..9f2b528db610 100644 --- a/pkg/detectors/fxmarket/fxmarket.go +++ b/pkg/detectors/fxmarket/fxmarket.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -41,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_FXMarket, + DetectorType: detector_typepb.DetectorType_FXMarket, Raw: []byte(resMatch), } @@ -66,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_FXMarket +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_FXMarket } func (s Scanner) Description() string { diff --git a/pkg/detectors/fxmarket/fxmarket_integration_test.go b/pkg/detectors/fxmarket/fxmarket_integration_test.go index 72dc742356c8..99587302bb5e 100644 --- a/pkg/detectors/fxmarket/fxmarket_integration_test.go +++ b/pkg/detectors/fxmarket/fxmarket_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestFxmarket_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestFxmarket_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_FXMarket, + DetectorType: detector_typepb.DetectorType_FXMarket, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestFxmarket_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_FXMarket, + DetectorType: detector_typepb.DetectorType_FXMarket, Verified: false, }, }, diff --git a/pkg/detectors/gcp/gcp.go b/pkg/detectors/gcp/gcp.go index a530a2b8aa30..73582fea69c0 100644 --- a/pkg/detectors/gcp/gcp.go +++ b/pkg/detectors/gcp/gcp.go @@ -16,7 +16,7 @@ import ( "golang.org/x/oauth2/google" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -62,8 +62,8 @@ const startOffset = 4096 // StartOffset returns the start offset for the secret this detector finds. func (Scanner) StartOffset() int64 { return startOffset } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_GCP +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_GCP } func (s Scanner) Description() string { @@ -110,7 +110,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result credBytes, _ := json.Marshal(creds) result := detectors.Result{ - DetectorType: detectorspb.DetectorType_GCP, + DetectorType: detector_typepb.DetectorType_GCP, Raw: raw, RawV2: credBytes, Redacted: creds.ClientEmail, diff --git a/pkg/detectors/gcp/gcp_integration_test.go b/pkg/detectors/gcp/gcp_integration_test.go index 91dc0190f418..a004334caa2c 100644 --- a/pkg/detectors/gcp/gcp_integration_test.go +++ b/pkg/detectors/gcp/gcp_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestGCP_FromChunk(t *testing.T) { @@ -50,7 +50,7 @@ func TestGCP_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_GCP, + DetectorType: detector_typepb.DetectorType_GCP, Verified: true, Redacted: "detector-tester@thog-sandbox.iam.gserviceaccount.com", ExtraData: map[string]string{ @@ -72,7 +72,7 @@ func TestGCP_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_GCP, + DetectorType: detector_typepb.DetectorType_GCP, Verified: false, Redacted: "detector-tester@thog-sandbox.iam.gserviceaccount.com", ExtraData: map[string]string{ @@ -94,7 +94,7 @@ func TestGCP_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_GCP, + DetectorType: detector_typepb.DetectorType_GCP, Verified: false, Redacted: "detector-test@trufflehog-testing.iam.gserviceaccount.com", ExtraData: map[string]string{ diff --git a/pkg/detectors/gcpapplicationdefaultcredentials/gcpapplicationdefaultcredentials.go b/pkg/detectors/gcpapplicationdefaultcredentials/gcpapplicationdefaultcredentials.go index 33506a352167..dcb466de1f97 100644 --- a/pkg/detectors/gcpapplicationdefaultcredentials/gcpapplicationdefaultcredentials.go +++ b/pkg/detectors/gcpapplicationdefaultcredentials/gcpapplicationdefaultcredentials.go @@ -15,7 +15,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -76,7 +76,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result detectedClientID, _, _ := strings.Cut(creds.ClientID, ".") s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_GCPApplicationDefaultCredentials, + DetectorType: detector_typepb.DetectorType_GCPApplicationDefaultCredentials, Raw: []byte(detectedClientID), RawV2: []byte(detectedClientID + creds.RefreshToken), } @@ -171,8 +171,8 @@ func verifyMatch(ctx context.Context, client *http.Client, token string) (bool, } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_GCPApplicationDefaultCredentials +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_GCPApplicationDefaultCredentials } func (s Scanner) Description() string { diff --git a/pkg/detectors/gcpapplicationdefaultcredentials/gcpapplicationdefaultcredentials_integration_test.go b/pkg/detectors/gcpapplicationdefaultcredentials/gcpapplicationdefaultcredentials_integration_test.go index 501ec66b44d3..255d366ceb4e 100644 --- a/pkg/detectors/gcpapplicationdefaultcredentials/gcpapplicationdefaultcredentials_integration_test.go +++ b/pkg/detectors/gcpapplicationdefaultcredentials/gcpapplicationdefaultcredentials_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestGcpapplicationdefaultcredentials_FromChunk(t *testing.T) { @@ -50,7 +50,7 @@ func TestGcpapplicationdefaultcredentials_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_GCPApplicationDefaultCredentials, + DetectorType: detector_typepb.DetectorType_GCPApplicationDefaultCredentials, Verified: true, }, }, @@ -67,7 +67,7 @@ func TestGcpapplicationdefaultcredentials_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_GCPApplicationDefaultCredentials, + DetectorType: detector_typepb.DetectorType_GCPApplicationDefaultCredentials, Verified: false, }, }, @@ -96,7 +96,7 @@ func TestGcpapplicationdefaultcredentials_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_GCPApplicationDefaultCredentials, + DetectorType: detector_typepb.DetectorType_GCPApplicationDefaultCredentials, Verified: false, }, }, @@ -113,7 +113,7 @@ func TestGcpapplicationdefaultcredentials_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_GCPApplicationDefaultCredentials, + DetectorType: detector_typepb.DetectorType_GCPApplicationDefaultCredentials, Verified: false, }, }, diff --git a/pkg/detectors/geckoboard/geckoboard.go b/pkg/detectors/geckoboard/geckoboard.go index d4878b08a61f..dbb35635d031 100644 --- a/pkg/detectors/geckoboard/geckoboard.go +++ b/pkg/detectors/geckoboard/geckoboard.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -41,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Geckoboard, + DetectorType: detector_typepb.DetectorType_Geckoboard, Raw: []byte(resMatch), } @@ -67,8 +67,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Geckoboard +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Geckoboard } func (s Scanner) Description() string { diff --git a/pkg/detectors/geckoboard/geckoboard_integration_test.go b/pkg/detectors/geckoboard/geckoboard_integration_test.go index 77ec394c5f46..768d2a570c01 100644 --- a/pkg/detectors/geckoboard/geckoboard_integration_test.go +++ b/pkg/detectors/geckoboard/geckoboard_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestGeckoboard_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestGeckoboard_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Geckoboard, + DetectorType: detector_typepb.DetectorType_Geckoboard, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestGeckoboard_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Geckoboard, + DetectorType: detector_typepb.DetectorType_Geckoboard, Verified: false, }, }, diff --git a/pkg/detectors/gemini/gemini.go b/pkg/detectors/gemini/gemini.go index a9b0679c6d72..372e2c566adc 100644 --- a/pkg/detectors/gemini/gemini.go +++ b/pkg/detectors/gemini/gemini.go @@ -16,7 +16,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -60,7 +60,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resSecretMatch := strings.TrimSpace(secretMatch[0]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Gemini, + DetectorType: detector_typepb.DetectorType_Gemini, Raw: []byte(resMatch), RawV2: []byte(resMatch + resSecretMatch), } @@ -129,8 +129,8 @@ func constructSignature(payload string, resSecretMatch string) string { return signature } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Gemini +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Gemini } func (s Scanner) Description() string { diff --git a/pkg/detectors/gemini/gemini_integration_test.go b/pkg/detectors/gemini/gemini_integration_test.go index 8e94ed6ce189..53628a48c8a0 100644 --- a/pkg/detectors/gemini/gemini_integration_test.go +++ b/pkg/detectors/gemini/gemini_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestGemini_FromChunk(t *testing.T) { @@ -52,7 +52,7 @@ func TestGemini_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Gemini, + DetectorType: detector_typepb.DetectorType_Gemini, Verified: true, }, }, @@ -68,7 +68,7 @@ func TestGemini_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Gemini, + DetectorType: detector_typepb.DetectorType_Gemini, Verified: true, }, }, @@ -84,7 +84,7 @@ func TestGemini_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Gemini, + DetectorType: detector_typepb.DetectorType_Gemini, Verified: false, }, }, diff --git a/pkg/detectors/generic/generic.go b/pkg/detectors/generic/generic.go index 658de074e2e9..265f21542c60 100644 --- a/pkg/detectors/generic/generic.go +++ b/pkg/detectors/generic/generic.go @@ -11,7 +11,7 @@ import ( regexp "github.com/wasilibs/go-re2" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func New() Scanner { @@ -91,7 +91,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } s := detectors.Result{ - DetectorType: detectorspb.DetectorType_Generic, + DetectorType: detector_typepb.DetectorType_Generic, Raw: []byte(token), } @@ -110,8 +110,8 @@ func hasReMatch(matchers []*regexp.Regexp, token string) bool { return false } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Generic +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Generic } func (s Scanner) Description() string { diff --git a/pkg/detectors/gengo/gengo.go b/pkg/detectors/gengo/gengo.go index 1b2f6a7d18a1..f3073e84e44b 100644 --- a/pkg/detectors/gengo/gengo.go +++ b/pkg/detectors/gengo/gengo.go @@ -17,7 +17,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -56,7 +56,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resSecretMatch := strings.TrimSpace(secretMatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Gengo, + DetectorType: detector_typepb.DetectorType_Gengo, Raw: []byte(resSecretMatch), RawV2: []byte(resMatch + resSecretMatch), } @@ -108,8 +108,8 @@ func getGengoSignature(timeStamp string, secret string) string { return hex.EncodeToString(macsum) } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Gengo +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Gengo } func (s Scanner) Description() string { diff --git a/pkg/detectors/gengo/gengo_integration_test.go b/pkg/detectors/gengo/gengo_integration_test.go index a80293b0b301..89cfdf602e63 100644 --- a/pkg/detectors/gengo/gengo_integration_test.go +++ b/pkg/detectors/gengo/gengo_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestGengo_FromChunk(t *testing.T) { @@ -50,7 +50,7 @@ func TestGengo_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Gengo, + DetectorType: detector_typepb.DetectorType_Gengo, Verified: true, }, }, @@ -66,7 +66,7 @@ func TestGengo_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Gengo, + DetectorType: detector_typepb.DetectorType_Gengo, Verified: false, }, }, diff --git a/pkg/detectors/geoapify/geoapify.go b/pkg/detectors/geoapify/geoapify.go index a72b38b6a3b8..52cffb23cdce 100644 --- a/pkg/detectors/geoapify/geoapify.go +++ b/pkg/detectors/geoapify/geoapify.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -41,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Geoapify, + DetectorType: detector_typepb.DetectorType_Geoapify, Raw: []byte(resMatch), } @@ -65,8 +65,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Geoapify +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Geoapify } func (s Scanner) Description() string { diff --git a/pkg/detectors/geoapify/geoapify_integration_test.go b/pkg/detectors/geoapify/geoapify_integration_test.go index adb36a65b391..0623093fadaa 100644 --- a/pkg/detectors/geoapify/geoapify_integration_test.go +++ b/pkg/detectors/geoapify/geoapify_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestGeoapify_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestGeoapify_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Geoapify, + DetectorType: detector_typepb.DetectorType_Geoapify, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestGeoapify_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Geoapify, + DetectorType: detector_typepb.DetectorType_Geoapify, Verified: false, }, }, diff --git a/pkg/detectors/geocode/geocode.go b/pkg/detectors/geocode/geocode.go index 650818a08d9c..1c3b988dcfad 100644 --- a/pkg/detectors/geocode/geocode.go +++ b/pkg/detectors/geocode/geocode.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -42,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Geocode, + DetectorType: detector_typepb.DetectorType_Geocode, Raw: []byte(resMatch), } @@ -74,8 +74,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Geocode +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Geocode } func (s Scanner) Description() string { diff --git a/pkg/detectors/geocode/geocode_integration_test.go b/pkg/detectors/geocode/geocode_integration_test.go index 64caacef8d58..35de2ab61323 100644 --- a/pkg/detectors/geocode/geocode_integration_test.go +++ b/pkg/detectors/geocode/geocode_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestGeocode_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestGeocode_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Geocode, + DetectorType: detector_typepb.DetectorType_Geocode, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestGeocode_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Geocode, + DetectorType: detector_typepb.DetectorType_Geocode, Verified: false, }, }, diff --git a/pkg/detectors/geocodify/geocodify.go b/pkg/detectors/geocodify/geocodify.go index d5e0a4cd033e..68d399be7fc0 100644 --- a/pkg/detectors/geocodify/geocodify.go +++ b/pkg/detectors/geocodify/geocodify.go @@ -9,7 +9,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Geocodify, + DetectorType: detector_typepb.DetectorType_Geocodify, Raw: []byte(resMatch), } @@ -64,8 +64,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Geocodify +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Geocodify } func (s Scanner) Description() string { diff --git a/pkg/detectors/geocodify/geocodify_integration_test.go b/pkg/detectors/geocodify/geocodify_integration_test.go index dbf21c0e42eb..7e1b58c4e7e9 100644 --- a/pkg/detectors/geocodify/geocodify_integration_test.go +++ b/pkg/detectors/geocodify/geocodify_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestGeocodify_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestGeocodify_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Geocodify, + DetectorType: detector_typepb.DetectorType_Geocodify, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestGeocodify_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Geocodify, + DetectorType: detector_typepb.DetectorType_Geocodify, Verified: false, }, }, diff --git a/pkg/detectors/geocodio/geocodio.go b/pkg/detectors/geocodio/geocodio.go index dfbb316fea0c..d1360096ed1f 100644 --- a/pkg/detectors/geocodio/geocodio.go +++ b/pkg/detectors/geocodio/geocodio.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -47,7 +47,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resSearchMatch := strings.TrimSpace(searchMatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Geocodio, + DetectorType: detector_typepb.DetectorType_Geocodio, Raw: []byte(resMatch), RawV2: []byte(resMatch + resSearchMatch), } @@ -72,8 +72,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Geocodio +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Geocodio } func (s Scanner) Description() string { diff --git a/pkg/detectors/geocodio/geocodio_integration_test.go b/pkg/detectors/geocodio/geocodio_integration_test.go index 79feb334d42e..1af24adb93ce 100644 --- a/pkg/detectors/geocodio/geocodio_integration_test.go +++ b/pkg/detectors/geocodio/geocodio_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestGeocodio_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestGeocodio_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Geocodio, + DetectorType: detector_typepb.DetectorType_Geocodio, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestGeocodio_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Geocodio, + DetectorType: detector_typepb.DetectorType_Geocodio, Verified: false, }, }, diff --git a/pkg/detectors/geoipifi/geoipifi.go b/pkg/detectors/geoipifi/geoipifi.go index 6f8bb58fc9e0..2617715fef3d 100644 --- a/pkg/detectors/geoipifi/geoipifi.go +++ b/pkg/detectors/geoipifi/geoipifi.go @@ -9,7 +9,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_GeoIpifi, + DetectorType: detector_typepb.DetectorType_GeoIpifi, Raw: []byte(resMatch), } @@ -65,8 +65,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_GeoIpifi +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_GeoIpifi } func (s Scanner) Description() string { diff --git a/pkg/detectors/geoipifi/geoipifi_integration_test.go b/pkg/detectors/geoipifi/geoipifi_integration_test.go index 0befe81ce554..d7984e258f18 100644 --- a/pkg/detectors/geoipifi/geoipifi_integration_test.go +++ b/pkg/detectors/geoipifi/geoipifi_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestGeoIpifi_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestGeoIpifi_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_GeoIpifi, + DetectorType: detector_typepb.DetectorType_GeoIpifi, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestGeoIpifi_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_GeoIpifi, + DetectorType: detector_typepb.DetectorType_GeoIpifi, Verified: false, }, }, diff --git a/pkg/detectors/getemail/getemail.go b/pkg/detectors/getemail/getemail.go index ecfeb074ce94..3ee224365b09 100644 --- a/pkg/detectors/getemail/getemail.go +++ b/pkg/detectors/getemail/getemail.go @@ -12,7 +12,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -43,7 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_GetEmail, + DetectorType: detector_typepb.DetectorType_GetEmail, Raw: []byte(resMatch), } @@ -77,8 +77,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_GetEmail +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_GetEmail } func (s Scanner) Description() string { diff --git a/pkg/detectors/getemail/getemail_integration_test.go b/pkg/detectors/getemail/getemail_integration_test.go index 774a828e5b55..e92c02cfbfb6 100644 --- a/pkg/detectors/getemail/getemail_integration_test.go +++ b/pkg/detectors/getemail/getemail_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestGetEmail_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestGetEmail_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_GetEmail, + DetectorType: detector_typepb.DetectorType_GetEmail, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestGetEmail_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_GetEmail, + DetectorType: detector_typepb.DetectorType_GetEmail, Verified: false, }, }, diff --git a/pkg/detectors/getemails/getemails.go b/pkg/detectors/getemails/getemails.go index 9acf2688e9d6..8077f5fb4d2e 100644 --- a/pkg/detectors/getemails/getemails.go +++ b/pkg/detectors/getemails/getemails.go @@ -9,7 +9,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -48,7 +48,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resIdMatch := strings.TrimSpace(idMatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_GetEmails, + DetectorType: detector_typepb.DetectorType_GetEmails, Raw: []byte(resMatch), } @@ -76,8 +76,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_GetEmails +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_GetEmails } func (s Scanner) Description() string { diff --git a/pkg/detectors/getemails/getemails_integration_test.go b/pkg/detectors/getemails/getemails_integration_test.go index 2579a220b6de..a9d7a61da1b6 100644 --- a/pkg/detectors/getemails/getemails_integration_test.go +++ b/pkg/detectors/getemails/getemails_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestGetEmails_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestGetEmails_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_GetEmails, + DetectorType: detector_typepb.DetectorType_GetEmails, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestGetEmails_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_GetEmails, + DetectorType: detector_typepb.DetectorType_GetEmails, Verified: false, }, }, diff --git a/pkg/detectors/getgeoapi/getgeoapi.go b/pkg/detectors/getgeoapi/getgeoapi.go index 2da71d4a3ab2..528f864c0961 100644 --- a/pkg/detectors/getgeoapi/getgeoapi.go +++ b/pkg/detectors/getgeoapi/getgeoapi.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -41,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_GetGeoAPI, + DetectorType: detector_typepb.DetectorType_GetGeoAPI, Raw: []byte(resMatch), } @@ -66,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_GetGeoAPI +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_GetGeoAPI } func (s Scanner) Description() string { diff --git a/pkg/detectors/getgeoapi/getgeoapi_integration_test.go b/pkg/detectors/getgeoapi/getgeoapi_integration_test.go index 89f1e9e91c8b..19e02a78c65a 100644 --- a/pkg/detectors/getgeoapi/getgeoapi_integration_test.go +++ b/pkg/detectors/getgeoapi/getgeoapi_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestGetgeoapi_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestGetgeoapi_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_GetGeoAPI, + DetectorType: detector_typepb.DetectorType_GetGeoAPI, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestGetgeoapi_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_GetGeoAPI, + DetectorType: detector_typepb.DetectorType_GetGeoAPI, Verified: false, }, }, diff --git a/pkg/detectors/getgist/getgist.go b/pkg/detectors/getgist/getgist.go index 0e2000a9a53e..b4567c3737fc 100644 --- a/pkg/detectors/getgist/getgist.go +++ b/pkg/detectors/getgist/getgist.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -41,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Getgist, + DetectorType: detector_typepb.DetectorType_Getgist, Raw: []byte(resMatch), } @@ -66,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Getgist +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Getgist } func (s Scanner) Description() string { diff --git a/pkg/detectors/getgist/getgist_integration_test.go b/pkg/detectors/getgist/getgist_integration_test.go index a8754a5b6feb..a0598277f6d0 100644 --- a/pkg/detectors/getgist/getgist_integration_test.go +++ b/pkg/detectors/getgist/getgist_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestGetgist_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestGetgist_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Getgist, + DetectorType: detector_typepb.DetectorType_Getgist, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestGetgist_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Getgist, + DetectorType: detector_typepb.DetectorType_Getgist, Verified: false, }, }, diff --git a/pkg/detectors/getresponse/getresponse.go b/pkg/detectors/getresponse/getresponse.go index 31dcba5a7775..49c0a1a1e6c7 100644 --- a/pkg/detectors/getresponse/getresponse.go +++ b/pkg/detectors/getresponse/getresponse.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -41,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Getresponse, + DetectorType: detector_typepb.DetectorType_Getresponse, Raw: []byte(resMatch), } @@ -66,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Getresponse +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Getresponse } func (s Scanner) Description() string { diff --git a/pkg/detectors/getresponse/getresponse_integration_test.go b/pkg/detectors/getresponse/getresponse_integration_test.go index 3c0e3f223037..f328d3de98d9 100644 --- a/pkg/detectors/getresponse/getresponse_integration_test.go +++ b/pkg/detectors/getresponse/getresponse_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestGetresponse_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestGetresponse_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Getresponse, + DetectorType: detector_typepb.DetectorType_Getresponse, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestGetresponse_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Getresponse, + DetectorType: detector_typepb.DetectorType_Getresponse, Verified: false, }, }, diff --git a/pkg/detectors/getsandbox/getsandbox.go b/pkg/detectors/getsandbox/getsandbox.go index a512f6fe9fec..a63d2086eb80 100644 --- a/pkg/detectors/getsandbox/getsandbox.go +++ b/pkg/detectors/getsandbox/getsandbox.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -48,7 +48,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resIdMatch := strings.TrimSpace(idMatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_GetSandbox, + DetectorType: detector_typepb.DetectorType_GetSandbox, Raw: []byte(resMatch), } @@ -74,8 +74,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_GetSandbox +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_GetSandbox } func (s Scanner) Description() string { diff --git a/pkg/detectors/getsandbox/getsandbox_integration_test.go b/pkg/detectors/getsandbox/getsandbox_integration_test.go index ccee57000e34..2764cbb5aace 100644 --- a/pkg/detectors/getsandbox/getsandbox_integration_test.go +++ b/pkg/detectors/getsandbox/getsandbox_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestGetSandbox_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestGetSandbox_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_GetSandbox, + DetectorType: detector_typepb.DetectorType_GetSandbox, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestGetSandbox_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_GetSandbox, + DetectorType: detector_typepb.DetectorType_GetSandbox, Verified: false, }, }, diff --git a/pkg/detectors/github/v1/github_integration_test.go b/pkg/detectors/github/v1/github_integration_test.go index 02ed8aef1b78..e16cc77a2ca8 100644 --- a/pkg/detectors/github/v1/github_integration_test.go +++ b/pkg/detectors/github/v1/github_integration_test.go @@ -12,7 +12,7 @@ import ( "github.com/kylelemons/godebug/pretty" "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestGitHub_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestGitHub_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Github, + DetectorType: detector_typepb.DetectorType_Github, Verified: true, ExtraData: map[string]string{ "rotation_guide": "https://howtorotate.com/docs/tutorials/github/", @@ -68,7 +68,7 @@ func TestGitHub_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Github, + DetectorType: detector_typepb.DetectorType_Github, Verified: false, ExtraData: map[string]string{ "rotation_guide": "https://howtorotate.com/docs/tutorials/github/", diff --git a/pkg/detectors/github/v1/github_old.go b/pkg/detectors/github/v1/github_old.go index e8b2af1cceec..86849f58d8fb 100644 --- a/pkg/detectors/github/v1/github_old.go +++ b/pkg/detectors/github/v1/github_old.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{ detectors.EndpointSetter } @@ -63,8 +63,8 @@ func (s Scanner) Keywords() []string { return []string{"github", "gh"} } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Github +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Github } func (s Scanner) Description() string { @@ -117,7 +117,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Github, + DetectorType: detector_typepb.DetectorType_Github, Raw: []byte(token), ExtraData: map[string]string{ "rotation_guide": "https://howtorotate.com/docs/tutorials/github/", diff --git a/pkg/detectors/github/v2/github.go b/pkg/detectors/github/v2/github.go index 9451de0c0907..87dab43e3cfb 100644 --- a/pkg/detectors/github/v2/github.go +++ b/pkg/detectors/github/v2/github.go @@ -9,7 +9,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" v1 "github.com/trufflesecurity/trufflehog/v3/pkg/detectors/github/v1" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -57,7 +57,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result token := match[1] s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Github, + DetectorType: detector_typepb.DetectorType_Github, Raw: []byte(token), ExtraData: map[string]string{ "rotation_guide": "https://howtorotate.com/docs/tutorials/github/", @@ -87,8 +87,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Github +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Github } func (s Scanner) Description() string { diff --git a/pkg/detectors/github/v2/github_integration_test.go b/pkg/detectors/github/v2/github_integration_test.go index 8cccb1105e6b..c4d8db1aa950 100644 --- a/pkg/detectors/github/v2/github_integration_test.go +++ b/pkg/detectors/github/v2/github_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestGitHub_FromChunk(t *testing.T) { @@ -53,7 +53,7 @@ func TestGitHub_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Github, + DetectorType: detector_typepb.DetectorType_Github, Verified: true, ExtraData: map[string]string{ "account_type": "User", @@ -80,7 +80,7 @@ func TestGitHub_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Github, + DetectorType: detector_typepb.DetectorType_Github, Verified: false, ExtraData: map[string]string{ "rotation_guide": "https://howtorotate.com/docs/tutorials/github/", @@ -100,7 +100,7 @@ func TestGitHub_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Github, + DetectorType: detector_typepb.DetectorType_Github, Verified: false, ExtraData: map[string]string{ "rotation_guide": "https://howtorotate.com/docs/tutorials/github/", @@ -120,7 +120,7 @@ func TestGitHub_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Github, + DetectorType: detector_typepb.DetectorType_Github, Verified: false, ExtraData: map[string]string{ "rotation_guide": "https://howtorotate.com/docs/tutorials/github/", @@ -140,7 +140,7 @@ func TestGitHub_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Github, + DetectorType: detector_typepb.DetectorType_Github, Verified: false, ExtraData: map[string]string{ "rotation_guide": "https://howtorotate.com/docs/tutorials/github/", @@ -160,7 +160,7 @@ func TestGitHub_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Github, + DetectorType: detector_typepb.DetectorType_Github, Verified: false, ExtraData: map[string]string{ "rotation_guide": "https://howtorotate.com/docs/tutorials/github/", @@ -180,7 +180,7 @@ func TestGitHub_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Github, + DetectorType: detector_typepb.DetectorType_Github, Verified: false, ExtraData: map[string]string{ "rotation_guide": "https://howtorotate.com/docs/tutorials/github/", diff --git a/pkg/detectors/github_oauth2/github_oauth2.go b/pkg/detectors/github_oauth2/github_oauth2.go index ff9e6ab351ac..192ac757a89d 100644 --- a/pkg/detectors/github_oauth2/github_oauth2.go +++ b/pkg/detectors/github_oauth2/github_oauth2.go @@ -9,7 +9,7 @@ import ( "golang.org/x/oauth2/github" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -47,7 +47,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for _, secretMatch := range oauth2ClientSecretMatches { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_GitHubOauth2, + DetectorType: detector_typepb.DetectorType_GitHubOauth2, Raw: []byte(idMatch[1]), RawV2: []byte(idMatch[1] + secretMatch[1]), } @@ -77,8 +77,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_GitHubOauth2 +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_GitHubOauth2 } func (s Scanner) Description() string { diff --git a/pkg/detectors/githubapp/githubapp.go b/pkg/detectors/githubapp/githubapp.go index 6a89fdf89d7f..36d36476a3fe 100644 --- a/pkg/detectors/githubapp/githubapp.go +++ b/pkg/detectors/githubapp/githubapp.go @@ -12,7 +12,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -49,7 +49,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for _, appMatch := range appMatches { appResMatch := strings.TrimSpace(appMatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_GitHubApp, + DetectorType: detector_typepb.DetectorType_GitHubApp, Raw: []byte(resMatch), } s1.ExtraData = map[string]string{ @@ -101,8 +101,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_GitHubApp +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_GitHubApp } func (s Scanner) Description() string { diff --git a/pkg/detectors/githubapp/githubapp_integration_test.go b/pkg/detectors/githubapp/githubapp_integration_test.go index 4424405a98cd..98757ec128b9 100644 --- a/pkg/detectors/githubapp/githubapp_integration_test.go +++ b/pkg/detectors/githubapp/githubapp_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestGitHubApp_FromChunk(t *testing.T) { @@ -53,7 +53,7 @@ func TestGitHubApp_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_GitHubApp, + DetectorType: detector_typepb.DetectorType_GitHubApp, Verified: true, }, }, @@ -70,7 +70,7 @@ func TestGitHubApp_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_GitHubApp, + DetectorType: detector_typepb.DetectorType_GitHubApp, Verified: false, }, }, diff --git a/pkg/detectors/gitlab/v1/gitlab.go b/pkg/detectors/gitlab/v1/gitlab.go index fa3c63b84b2d..82f95567d645 100644 --- a/pkg/detectors/gitlab/v1/gitlab.go +++ b/pkg/detectors/gitlab/v1/gitlab.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -53,8 +53,8 @@ func (s Scanner) Keywords() []string { return []string{"gitlab"} } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Gitlab +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Gitlab } func (s Scanner) Description() string { @@ -81,7 +81,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for _, endpoint := range s.Endpoints() { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Gitlab, + DetectorType: detector_typepb.DetectorType_Gitlab, Raw: []byte(resMatch), RawV2: []byte(resMatch + endpoint), ExtraData: map[string]string{ diff --git a/pkg/detectors/gitlab/v1/gitlab_integration_test.go b/pkg/detectors/gitlab/v1/gitlab_integration_test.go index 922889842d9e..4c12fdf43eab 100644 --- a/pkg/detectors/gitlab/v1/gitlab_integration_test.go +++ b/pkg/detectors/gitlab/v1/gitlab_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestGitlab_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestGitlab_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Gitlab, + DetectorType: detector_typepb.DetectorType_Gitlab, Verified: true, ExtraData: map[string]string{ "rotation_guide": "https://howtorotate.com/docs/tutorials/gitlab/", @@ -69,7 +69,7 @@ func TestGitlab_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Gitlab, + DetectorType: detector_typepb.DetectorType_Gitlab, Verified: true, ExtraData: map[string]string{ "rotation_guide": "https://howtorotate.com/docs/tutorials/gitlab/", @@ -89,7 +89,7 @@ func TestGitlab_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Gitlab, + DetectorType: detector_typepb.DetectorType_Gitlab, Verified: false, ExtraData: map[string]string{ "rotation_guide": "https://howtorotate.com/docs/tutorials/gitlab/", @@ -109,7 +109,7 @@ func TestGitlab_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Gitlab, + DetectorType: detector_typepb.DetectorType_Gitlab, Verified: false, ExtraData: map[string]string{ "rotation_guide": "https://howtorotate.com/docs/tutorials/gitlab/", @@ -130,7 +130,7 @@ func TestGitlab_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Gitlab, + DetectorType: detector_typepb.DetectorType_Gitlab, Verified: false, ExtraData: map[string]string{ "rotation_guide": "https://howtorotate.com/docs/tutorials/gitlab/", @@ -151,7 +151,7 @@ func TestGitlab_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Gitlab, + DetectorType: detector_typepb.DetectorType_Gitlab, Verified: true, ExtraData: map[string]string{ "rotation_guide": "https://howtorotate.com/docs/tutorials/gitlab/", diff --git a/pkg/detectors/gitlab/v2/gitlab_integration_test.go b/pkg/detectors/gitlab/v2/gitlab_integration_test.go index 3d10eb860b14..6fe881c799a0 100644 --- a/pkg/detectors/gitlab/v2/gitlab_integration_test.go +++ b/pkg/detectors/gitlab/v2/gitlab_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) // This test ensures gitlab v2 detector does not work on gitlab v1 secrets @@ -254,7 +254,7 @@ func TestGitlabV2_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Gitlab, + DetectorType: detector_typepb.DetectorType_Gitlab, Verified: true, ExtraData: map[string]string{ "rotation_guide": "https://howtorotate.com/docs/tutorials/gitlab/", @@ -274,7 +274,7 @@ func TestGitlabV2_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Gitlab, + DetectorType: detector_typepb.DetectorType_Gitlab, Verified: false, ExtraData: map[string]string{ "rotation_guide": "https://howtorotate.com/docs/tutorials/gitlab/", @@ -294,7 +294,7 @@ func TestGitlabV2_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Gitlab, + DetectorType: detector_typepb.DetectorType_Gitlab, Verified: false, ExtraData: map[string]string{ "rotation_guide": "https://howtorotate.com/docs/tutorials/gitlab/", @@ -315,7 +315,7 @@ func TestGitlabV2_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Gitlab, + DetectorType: detector_typepb.DetectorType_Gitlab, Verified: false, ExtraData: map[string]string{ "rotation_guide": "https://howtorotate.com/docs/tutorials/gitlab/", @@ -336,7 +336,7 @@ func TestGitlabV2_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Gitlab, + DetectorType: detector_typepb.DetectorType_Gitlab, Verified: true, ExtraData: map[string]string{ "rotation_guide": "https://howtorotate.com/docs/tutorials/gitlab/", diff --git a/pkg/detectors/gitlab/v2/gitlab_v2.go b/pkg/detectors/gitlab/v2/gitlab_v2.go index 753f63e84a83..1ffca2334d95 100644 --- a/pkg/detectors/gitlab/v2/gitlab_v2.go +++ b/pkg/detectors/gitlab/v2/gitlab_v2.go @@ -12,7 +12,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" v1 "github.com/trufflesecurity/trufflehog/v3/pkg/detectors/gitlab/v1" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -45,8 +45,8 @@ func (s Scanner) getClient() *http.Client { // Use identifiers in the secret preferably, or the provider name. func (s Scanner) Keywords() []string { return []string{"glpat-"} } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Gitlab +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Gitlab } func (s Scanner) Description() string { @@ -63,7 +63,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for _, endpoint := range s.Endpoints() { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Gitlab, + DetectorType: detector_typepb.DetectorType_Gitlab, Raw: []byte(resMatch), RawV2: []byte(resMatch + endpoint), ExtraData: map[string]string{ diff --git a/pkg/detectors/gitlab/v3/gitlab_v3.go b/pkg/detectors/gitlab/v3/gitlab_v3.go index 8ab45da66b30..b9c21022e94d 100644 --- a/pkg/detectors/gitlab/v3/gitlab_v3.go +++ b/pkg/detectors/gitlab/v3/gitlab_v3.go @@ -12,7 +12,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" v1 "github.com/trufflesecurity/trufflehog/v3/pkg/detectors/gitlab/v1" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -46,8 +46,8 @@ func (s Scanner) getClient() *http.Client { // Use identifiers in the secret preferably, or the provider name. func (s Scanner) Keywords() []string { return []string{"glpat-"} } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Gitlab +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Gitlab } func (s Scanner) Description() string { @@ -64,7 +64,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for _, endpoint := range s.Endpoints() { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Gitlab, + DetectorType: detector_typepb.DetectorType_Gitlab, Raw: []byte(resMatch), RawV2: []byte(resMatch + endpoint), ExtraData: map[string]string{ diff --git a/pkg/detectors/gitlab/v3/gitlab_v3_integration_test.go b/pkg/detectors/gitlab/v3/gitlab_v3_integration_test.go index 8eea3d543ab6..81c6b4119c8b 100644 --- a/pkg/detectors/gitlab/v3/gitlab_v3_integration_test.go +++ b/pkg/detectors/gitlab/v3/gitlab_v3_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestGitlabV3_FromChunk(t *testing.T) { @@ -50,7 +50,7 @@ func TestGitlabV3_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Gitlab, + DetectorType: detector_typepb.DetectorType_Gitlab, Verified: true, ExtraData: map[string]string{ "rotation_guide": "https://howtorotate.com/docs/tutorials/gitlab/", @@ -70,7 +70,7 @@ func TestGitlabV3_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Gitlab, + DetectorType: detector_typepb.DetectorType_Gitlab, Verified: false, ExtraData: map[string]string{ "rotation_guide": "https://howtorotate.com/docs/tutorials/gitlab/", @@ -90,7 +90,7 @@ func TestGitlabV3_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Gitlab, + DetectorType: detector_typepb.DetectorType_Gitlab, Verified: false, ExtraData: map[string]string{ "rotation_guide": "https://howtorotate.com/docs/tutorials/gitlab/", @@ -111,7 +111,7 @@ func TestGitlabV3_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Gitlab, + DetectorType: detector_typepb.DetectorType_Gitlab, Verified: false, ExtraData: map[string]string{ "rotation_guide": "https://howtorotate.com/docs/tutorials/gitlab/", @@ -132,7 +132,7 @@ func TestGitlabV3_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Gitlab, + DetectorType: detector_typepb.DetectorType_Gitlab, Verified: true, ExtraData: map[string]string{ "rotation_guide": "https://howtorotate.com/docs/tutorials/gitlab/", diff --git a/pkg/detectors/gitter/gitter.go b/pkg/detectors/gitter/gitter.go index e8d31bae1c81..fde48c3e58d6 100644 --- a/pkg/detectors/gitter/gitter.go +++ b/pkg/detectors/gitter/gitter.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -41,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Gitter, + DetectorType: detector_typepb.DetectorType_Gitter, Raw: []byte(resMatch), } @@ -66,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Gitter +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Gitter } func (s Scanner) Description() string { diff --git a/pkg/detectors/gitter/gitter_integration_test.go b/pkg/detectors/gitter/gitter_integration_test.go index 6875b0cc8e98..e301a4195823 100644 --- a/pkg/detectors/gitter/gitter_integration_test.go +++ b/pkg/detectors/gitter/gitter_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestGitter_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestGitter_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Gitter, + DetectorType: detector_typepb.DetectorType_Gitter, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestGitter_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Gitter, + DetectorType: detector_typepb.DetectorType_Gitter, Verified: false, }, }, diff --git a/pkg/detectors/glassnode/glassnode.go b/pkg/detectors/glassnode/glassnode.go index 0ac8d2a65b06..1a7d242004f0 100644 --- a/pkg/detectors/glassnode/glassnode.go +++ b/pkg/detectors/glassnode/glassnode.go @@ -9,7 +9,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Glassnode, + DetectorType: detector_typepb.DetectorType_Glassnode, Raw: []byte(resMatch), } @@ -65,8 +65,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Glassnode +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Glassnode } func (s Scanner) Description() string { diff --git a/pkg/detectors/glassnode/glassnode_integration_test.go b/pkg/detectors/glassnode/glassnode_integration_test.go index f72fadadad8f..70eb9278072f 100644 --- a/pkg/detectors/glassnode/glassnode_integration_test.go +++ b/pkg/detectors/glassnode/glassnode_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestGlassnode_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestGlassnode_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Glassnode, + DetectorType: detector_typepb.DetectorType_Glassnode, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestGlassnode_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Glassnode, + DetectorType: detector_typepb.DetectorType_Glassnode, Verified: false, }, }, diff --git a/pkg/detectors/gocanvas/gocanvas.go b/pkg/detectors/gocanvas/gocanvas.go index 67bc8ab47cb5..5c4baa223503 100644 --- a/pkg/detectors/gocanvas/gocanvas.go +++ b/pkg/detectors/gocanvas/gocanvas.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -53,7 +53,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_GoCanvas, + DetectorType: detector_typepb.DetectorType_GoCanvas, Raw: []byte(resMatch), } @@ -98,8 +98,8 @@ type Response struct { } `xml:"Error"` } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_GoCanvas +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_GoCanvas } func (s Scanner) Description() string { diff --git a/pkg/detectors/gocanvas/gocanvas_integration_test.go b/pkg/detectors/gocanvas/gocanvas_integration_test.go index d6bf551feb6e..ddace33778ce 100644 --- a/pkg/detectors/gocanvas/gocanvas_integration_test.go +++ b/pkg/detectors/gocanvas/gocanvas_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestGoCanvas_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestGoCanvas_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_GoCanvas, + DetectorType: detector_typepb.DetectorType_GoCanvas, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestGoCanvas_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_GoCanvas, + DetectorType: detector_typepb.DetectorType_GoCanvas, Verified: false, }, }, diff --git a/pkg/detectors/gocardless/gocardless.go b/pkg/detectors/gocardless/gocardless.go index d1df00a499cf..7d4833ede8d7 100644 --- a/pkg/detectors/gocardless/gocardless.go +++ b/pkg/detectors/gocardless/gocardless.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -42,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_GoCardless, + DetectorType: detector_typepb.DetectorType_GoCardless, Raw: []byte(resMatch), } @@ -69,8 +69,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_GoCardless +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_GoCardless } func (s Scanner) Description() string { diff --git a/pkg/detectors/gocardless/gocardless_integration_test.go b/pkg/detectors/gocardless/gocardless_integration_test.go index dfd0664bdacf..fe549c072fc1 100644 --- a/pkg/detectors/gocardless/gocardless_integration_test.go +++ b/pkg/detectors/gocardless/gocardless_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestGoCardless_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestGoCardless_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_GoCardless, + DetectorType: detector_typepb.DetectorType_GoCardless, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestGoCardless_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_GoCardless, + DetectorType: detector_typepb.DetectorType_GoCardless, Verified: false, }, }, diff --git a/pkg/detectors/godaddy/v1/godaddy.go b/pkg/detectors/godaddy/v1/godaddy.go index 8e78ad1d2c17..b25c36d67205 100644 --- a/pkg/detectors/godaddy/v1/godaddy.go +++ b/pkg/detectors/godaddy/v1/godaddy.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -54,8 +54,8 @@ func (s Scanner) Description() string { "GoDaddy provides applications and access to relevant third-party products and platforms to connect their customers" } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_GoDaddy +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_GoDaddy } // FromData will find and optionally verify GoDaddy API Key and secrets in a given set of bytes. @@ -77,7 +77,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for key := range uniqueKeys { for secret := range uniqueSecrets { result := detectors.Result{ - DetectorType: detectorspb.DetectorType_GoDaddy, + DetectorType: detector_typepb.DetectorType_GoDaddy, Raw: []byte(key), ExtraData: make(map[string]string), } diff --git a/pkg/detectors/godaddy/v1/godaddy_integration_test.go b/pkg/detectors/godaddy/v1/godaddy_integration_test.go index 98233eb9d093..18cf2ac86604 100644 --- a/pkg/detectors/godaddy/v1/godaddy_integration_test.go +++ b/pkg/detectors/godaddy/v1/godaddy_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestGoDaddy_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestGoDaddy_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_GoDaddy, + DetectorType: detector_typepb.DetectorType_GoDaddy, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestGoDaddy_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_GoDaddy, + DetectorType: detector_typepb.DetectorType_GoDaddy, Verified: false, }, }, diff --git a/pkg/detectors/godaddy/v2/godaddy.go b/pkg/detectors/godaddy/v2/godaddy.go index 1d23ea1ce132..7800600dc79f 100644 --- a/pkg/detectors/godaddy/v2/godaddy.go +++ b/pkg/detectors/godaddy/v2/godaddy.go @@ -9,7 +9,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" v1 "github.com/trufflesecurity/trufflehog/v3/pkg/detectors/godaddy/v1" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -53,8 +53,8 @@ func (s Scanner) Description() string { "GoDaddy provides applications and access to relevant third-party products and platforms to connect their customers" } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_GoDaddy +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_GoDaddy } // FromData will find and optionally verify GoDaddy API Key and secrets in a given set of bytes. @@ -76,7 +76,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for key := range uniqueKeys { for secret := range uniqueSecrets { result := detectors.Result{ - DetectorType: detectorspb.DetectorType_GoDaddy, + DetectorType: detector_typepb.DetectorType_GoDaddy, Raw: []byte(key), ExtraData: make(map[string]string), } diff --git a/pkg/detectors/godaddy/v2/godaddy_integration_test.go b/pkg/detectors/godaddy/v2/godaddy_integration_test.go index e9a87105a8f0..2676b1237eb7 100644 --- a/pkg/detectors/godaddy/v2/godaddy_integration_test.go +++ b/pkg/detectors/godaddy/v2/godaddy_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestGoDaddy_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestGoDaddy_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_GoDaddy, + DetectorType: detector_typepb.DetectorType_GoDaddy, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestGoDaddy_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_GoDaddy, + DetectorType: detector_typepb.DetectorType_GoDaddy, Verified: false, }, }, diff --git a/pkg/detectors/goodday/goodday.go b/pkg/detectors/goodday/goodday.go index f5f3f859db24..68224e800d84 100644 --- a/pkg/detectors/goodday/goodday.go +++ b/pkg/detectors/goodday/goodday.go @@ -9,7 +9,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_GoodDay, + DetectorType: detector_typepb.DetectorType_GoodDay, Raw: []byte(resMatch), } @@ -65,8 +65,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_GoodDay +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_GoodDay } func (s Scanner) Description() string { diff --git a/pkg/detectors/goodday/goodday_integration_test.go b/pkg/detectors/goodday/goodday_integration_test.go index 03ea6e687658..70f01f57777f 100644 --- a/pkg/detectors/goodday/goodday_integration_test.go +++ b/pkg/detectors/goodday/goodday_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestGoodDay_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestGoodDay_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_GoodDay, + DetectorType: detector_typepb.DetectorType_GoodDay, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestGoodDay_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_GoodDay, + DetectorType: detector_typepb.DetectorType_GoodDay, Verified: false, }, }, diff --git a/pkg/detectors/googlegemini/googlegemini.go b/pkg/detectors/googlegemini/googlegemini.go index 59379520e886..483d522f59e6 100644 --- a/pkg/detectors/googlegemini/googlegemini.go +++ b/pkg/detectors/googlegemini/googlegemini.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -39,8 +39,8 @@ func (s Scanner) getClient() *http.Client { // Keywords are used for efficiently pre-filtering chunks. func (s Scanner) Keywords() []string { return []string{"aizasy"} } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_GoogleGeminiAPIKey +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_GoogleGeminiAPIKey } func (s Scanner) Description() string { diff --git a/pkg/detectors/googlegemini/googlegemini_integration_test.go b/pkg/detectors/googlegemini/googlegemini_integration_test.go index 202e45d3b79d..b03528f7761d 100644 --- a/pkg/detectors/googlegemini/googlegemini_integration_test.go +++ b/pkg/detectors/googlegemini/googlegemini_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestGoogleGemini_FromChunk(t *testing.T) { @@ -50,7 +50,7 @@ func TestGoogleGemini_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_GoogleGeminiAPIKey, + DetectorType: detector_typepb.DetectorType_GoogleGeminiAPIKey, Verified: true, ExtraData: map[string]string{ "active_google_key": "true", @@ -69,7 +69,7 @@ func TestGoogleGemini_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_GoogleGeminiAPIKey, + DetectorType: detector_typepb.DetectorType_GoogleGeminiAPIKey, Verified: false, ExtraData: map[string]string{ "active_google_key": "true", @@ -88,7 +88,7 @@ func TestGoogleGemini_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_GoogleGeminiAPIKey, + DetectorType: detector_typepb.DetectorType_GoogleGeminiAPIKey, Verified: false, }, }, diff --git a/pkg/detectors/googleoauth2/googleoauth2_access_token.go b/pkg/detectors/googleoauth2/googleoauth2_access_token.go index bba28d8b8c03..1975836d5bef 100644 --- a/pkg/detectors/googleoauth2/googleoauth2_access_token.go +++ b/pkg/detectors/googleoauth2/googleoauth2_access_token.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -135,8 +135,8 @@ type errorInfo struct { Error string `json:"error_description"` } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_GoogleOauth2 +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_GoogleOauth2 } func (s Scanner) Description() string { diff --git a/pkg/detectors/googleoauth2/googleoauth2_integration_test.go b/pkg/detectors/googleoauth2/googleoauth2_integration_test.go index 7ada7c962264..cd10931c7b52 100644 --- a/pkg/detectors/googleoauth2/googleoauth2_integration_test.go +++ b/pkg/detectors/googleoauth2/googleoauth2_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestGoogleoauth2_FromChunk(t *testing.T) { @@ -50,7 +50,7 @@ func TestGoogleoauth2_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_GoogleOauth2, + DetectorType: detector_typepb.DetectorType_GoogleOauth2, Verified: true, }, }, @@ -67,7 +67,7 @@ func TestGoogleoauth2_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_GoogleOauth2, + DetectorType: detector_typepb.DetectorType_GoogleOauth2, Verified: false, }, }, @@ -96,7 +96,7 @@ func TestGoogleoauth2_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_GoogleOauth2, + DetectorType: detector_typepb.DetectorType_GoogleOauth2, Verified: false, }, }, @@ -113,7 +113,7 @@ func TestGoogleoauth2_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_GoogleOauth2, + DetectorType: detector_typepb.DetectorType_GoogleOauth2, Verified: false, }, }, diff --git a/pkg/detectors/grafana/grafana.go b/pkg/detectors/grafana/grafana.go index 8ae17cb2c5fc..c1d06652cfcd 100644 --- a/pkg/detectors/grafana/grafana.go +++ b/pkg/detectors/grafana/grafana.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -52,7 +52,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Grafana, + DetectorType: detector_typepb.DetectorType_Grafana, Raw: []byte(resMatch), } @@ -68,8 +68,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Grafana +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Grafana } func (s Scanner) Description() string { diff --git a/pkg/detectors/grafana/grafana_integration_test.go b/pkg/detectors/grafana/grafana_integration_test.go index b465ffcaab6d..482130716f7e 100644 --- a/pkg/detectors/grafana/grafana_integration_test.go +++ b/pkg/detectors/grafana/grafana_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestGrafana_FromChunk(t *testing.T) { @@ -50,7 +50,7 @@ func TestGrafana_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Grafana, + DetectorType: detector_typepb.DetectorType_Grafana, Verified: true, }, }, @@ -67,7 +67,7 @@ func TestGrafana_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Grafana, + DetectorType: detector_typepb.DetectorType_Grafana, Verified: false, }, }, @@ -96,7 +96,7 @@ func TestGrafana_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Grafana, + DetectorType: detector_typepb.DetectorType_Grafana, Verified: false, }, }, @@ -113,7 +113,7 @@ func TestGrafana_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Grafana, + DetectorType: detector_typepb.DetectorType_Grafana, Verified: false, }, }, diff --git a/pkg/detectors/grafanaserviceaccount/grafanaserviceaccount.go b/pkg/detectors/grafanaserviceaccount/grafanaserviceaccount.go index f4fdb4ad7925..0dc4b04c611b 100644 --- a/pkg/detectors/grafanaserviceaccount/grafanaserviceaccount.go +++ b/pkg/detectors/grafanaserviceaccount/grafanaserviceaccount.go @@ -9,7 +9,7 @@ import ( regexp "github.com/wasilibs/go-re2" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -47,7 +47,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result domainRes := strings.TrimSpace(domainMatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_GrafanaServiceAccount, + DetectorType: detector_typepb.DetectorType_GrafanaServiceAccount, Raw: []byte(key), RawV2: []byte(fmt.Sprintf("%s:%s", domainRes, key)), } @@ -85,8 +85,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_GrafanaServiceAccount +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_GrafanaServiceAccount } func (s Scanner) Description() string { diff --git a/pkg/detectors/grafanaserviceaccount/grafanaserviceaccount_integration_test.go b/pkg/detectors/grafanaserviceaccount/grafanaserviceaccount_integration_test.go index d75d5ddac70f..1091192593de 100644 --- a/pkg/detectors/grafanaserviceaccount/grafanaserviceaccount_integration_test.go +++ b/pkg/detectors/grafanaserviceaccount/grafanaserviceaccount_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestGrafanaServiceAccount_FromChunk(t *testing.T) { @@ -51,7 +51,7 @@ func TestGrafanaServiceAccount_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_GrafanaServiceAccount, + DetectorType: detector_typepb.DetectorType_GrafanaServiceAccount, Verified: true, }, }, @@ -68,7 +68,7 @@ func TestGrafanaServiceAccount_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_GrafanaServiceAccount, + DetectorType: detector_typepb.DetectorType_GrafanaServiceAccount, Verified: false, }, }, @@ -97,7 +97,7 @@ func TestGrafanaServiceAccount_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_GrafanaServiceAccount, + DetectorType: detector_typepb.DetectorType_GrafanaServiceAccount, Verified: false, }, }, @@ -114,7 +114,7 @@ func TestGrafanaServiceAccount_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_GrafanaServiceAccount, + DetectorType: detector_typepb.DetectorType_GrafanaServiceAccount, Verified: false, }, }, diff --git a/pkg/detectors/graphcms/graphcms.go b/pkg/detectors/graphcms/graphcms.go index e01a59fee19d..9220db102058 100644 --- a/pkg/detectors/graphcms/graphcms.go +++ b/pkg/detectors/graphcms/graphcms.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -49,7 +49,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resIdMatch := strings.TrimSpace(idMatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_GraphCMS, + DetectorType: detector_typepb.DetectorType_GraphCMS, Raw: []byte(resMatch), } @@ -78,8 +78,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_GraphCMS +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_GraphCMS } func (s Scanner) Description() string { diff --git a/pkg/detectors/graphcms/graphcms_integration_test.go b/pkg/detectors/graphcms/graphcms_integration_test.go index afd70f575609..1f41e504a316 100644 --- a/pkg/detectors/graphcms/graphcms_integration_test.go +++ b/pkg/detectors/graphcms/graphcms_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestGraphCMS_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestGraphCMS_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_GraphCMS, + DetectorType: detector_typepb.DetectorType_GraphCMS, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestGraphCMS_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_GraphCMS, + DetectorType: detector_typepb.DetectorType_GraphCMS, Verified: false, }, }, diff --git a/pkg/detectors/graphhopper/graphhopper.go b/pkg/detectors/graphhopper/graphhopper.go index 3b423b857414..3ceb954cd4bf 100644 --- a/pkg/detectors/graphhopper/graphhopper.go +++ b/pkg/detectors/graphhopper/graphhopper.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -38,7 +38,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for _, match := range matches { resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Graphhopper, + DetectorType: detector_typepb.DetectorType_Graphhopper, Raw: []byte(resMatch), } if verify { @@ -61,8 +61,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Graphhopper +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Graphhopper } func (s Scanner) Description() string { diff --git a/pkg/detectors/graphhopper/graphhopper_integration_test.go b/pkg/detectors/graphhopper/graphhopper_integration_test.go index 5aeafc1f46fd..2f881ea74a5e 100644 --- a/pkg/detectors/graphhopper/graphhopper_integration_test.go +++ b/pkg/detectors/graphhopper/graphhopper_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestGraphhopper_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestGraphhopper_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Graphhopper, + DetectorType: detector_typepb.DetectorType_Graphhopper, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestGraphhopper_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Graphhopper, + DetectorType: detector_typepb.DetectorType_Graphhopper, Verified: false, }, }, diff --git a/pkg/detectors/groovehq/groovehq.go b/pkg/detectors/groovehq/groovehq.go index e6658ed38103..e931ac306cb4 100644 --- a/pkg/detectors/groovehq/groovehq.go +++ b/pkg/detectors/groovehq/groovehq.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -41,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Groovehq, + DetectorType: detector_typepb.DetectorType_Groovehq, Raw: []byte(resMatch), } @@ -66,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Groovehq +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Groovehq } func (s Scanner) Description() string { diff --git a/pkg/detectors/groovehq/groovehq_integration_test.go b/pkg/detectors/groovehq/groovehq_integration_test.go index bafca3c26790..03743e8945ab 100644 --- a/pkg/detectors/groovehq/groovehq_integration_test.go +++ b/pkg/detectors/groovehq/groovehq_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestGroovehq_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestGroovehq_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Groovehq, + DetectorType: detector_typepb.DetectorType_Groovehq, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestGroovehq_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Groovehq, + DetectorType: detector_typepb.DetectorType_Groovehq, Verified: false, }, }, diff --git a/pkg/detectors/groq/groq.go b/pkg/detectors/groq/groq.go index ccdf73f02c3a..3b3772f826c1 100644 --- a/pkg/detectors/groq/groq.go +++ b/pkg/detectors/groq/groq.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -40,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for match := range uniqueMatches { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Groq, + DetectorType: detector_typepb.DetectorType_Groq, Raw: []byte(match), ExtraData: map[string]string{ "rotation_guide": "https://howtorotate.com/docs/tutorials/groq/", @@ -101,8 +101,8 @@ func verifyMatch(ctx context.Context, client *http.Client, token string) (bool, } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Groq +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Groq } func (s Scanner) Description() string { diff --git a/pkg/detectors/groq/groq_integration_test.go b/pkg/detectors/groq/groq_integration_test.go index fb287cf2c0df..732a33df9599 100644 --- a/pkg/detectors/groq/groq_integration_test.go +++ b/pkg/detectors/groq/groq_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestGroq_FromChunk(t *testing.T) { @@ -50,7 +50,7 @@ func TestGroq_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Groq, + DetectorType: detector_typepb.DetectorType_Groq, Verified: true, }, }, @@ -67,7 +67,7 @@ func TestGroq_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Groq, + DetectorType: detector_typepb.DetectorType_Groq, Verified: false, }, }, @@ -96,7 +96,7 @@ func TestGroq_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Groq, + DetectorType: detector_typepb.DetectorType_Groq, Verified: false, }, }, @@ -113,7 +113,7 @@ func TestGroq_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Groq, + DetectorType: detector_typepb.DetectorType_Groq, Verified: false, }, }, diff --git a/pkg/detectors/gtmetrix/gtmetrix.go b/pkg/detectors/gtmetrix/gtmetrix.go index e998cac5f087..9eeb2370ce19 100644 --- a/pkg/detectors/gtmetrix/gtmetrix.go +++ b/pkg/detectors/gtmetrix/gtmetrix.go @@ -9,7 +9,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_GTMetrix, + DetectorType: detector_typepb.DetectorType_GTMetrix, Raw: []byte(resMatch), } @@ -65,8 +65,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_GTMetrix +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_GTMetrix } func (s Scanner) Description() string { diff --git a/pkg/detectors/gtmetrix/gtmetrix_integration_test.go b/pkg/detectors/gtmetrix/gtmetrix_integration_test.go index f5e8f929df8c..931183cc1602 100644 --- a/pkg/detectors/gtmetrix/gtmetrix_integration_test.go +++ b/pkg/detectors/gtmetrix/gtmetrix_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestGTMetrix_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestGTMetrix_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_GTMetrix, + DetectorType: detector_typepb.DetectorType_GTMetrix, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestGTMetrix_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_GTMetrix, + DetectorType: detector_typepb.DetectorType_GTMetrix, Verified: false, }, }, diff --git a/pkg/detectors/guardianapi/guardianapi.go b/pkg/detectors/guardianapi/guardianapi.go index 464261a9501b..8df261332a1a 100644 --- a/pkg/detectors/guardianapi/guardianapi.go +++ b/pkg/detectors/guardianapi/guardianapi.go @@ -9,7 +9,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Guardianapi, + DetectorType: detector_typepb.DetectorType_Guardianapi, Raw: []byte(resMatch), } @@ -65,8 +65,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Guardianapi +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Guardianapi } func (s Scanner) Description() string { diff --git a/pkg/detectors/guardianapi/guardianapi_integration_test.go b/pkg/detectors/guardianapi/guardianapi_integration_test.go index c1fbd5b3ec2e..9716b9ef9c11 100644 --- a/pkg/detectors/guardianapi/guardianapi_integration_test.go +++ b/pkg/detectors/guardianapi/guardianapi_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestGuardianapi_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestGuardianapi_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Guardianapi, + DetectorType: detector_typepb.DetectorType_Guardianapi, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestGuardianapi_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Guardianapi, + DetectorType: detector_typepb.DetectorType_Guardianapi, Verified: false, }, }, diff --git a/pkg/detectors/gumroad/gumroad.go b/pkg/detectors/gumroad/gumroad.go index e0c9a2c76a6b..7a7f3d7cc2b8 100644 --- a/pkg/detectors/gumroad/gumroad.go +++ b/pkg/detectors/gumroad/gumroad.go @@ -9,7 +9,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Gumroad, + DetectorType: detector_typepb.DetectorType_Gumroad, Raw: []byte(resMatch), } payload := strings.NewReader("access_token=" + resMatch) @@ -65,8 +65,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Gumroad +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Gumroad } func (s Scanner) Description() string { diff --git a/pkg/detectors/gumroad/gumroad_integration_test.go b/pkg/detectors/gumroad/gumroad_integration_test.go index c4ba332ad1d7..6c7e522d1b9c 100644 --- a/pkg/detectors/gumroad/gumroad_integration_test.go +++ b/pkg/detectors/gumroad/gumroad_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestGumroad_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestGumroad_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Gumroad, + DetectorType: detector_typepb.DetectorType_Gumroad, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestGumroad_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Gumroad, + DetectorType: detector_typepb.DetectorType_Gumroad, Verified: false, }, }, diff --git a/pkg/detectors/guru/guru.go b/pkg/detectors/guru/guru.go index 5da8e69af024..cf6451f6d3f9 100644 --- a/pkg/detectors/guru/guru.go +++ b/pkg/detectors/guru/guru.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -51,7 +51,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result keyMatch := strings.TrimSpace(secret[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Guru, + DetectorType: detector_typepb.DetectorType_Guru, Raw: []byte(unameMatch), } @@ -80,8 +80,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Guru +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Guru } func (s Scanner) Description() string { diff --git a/pkg/detectors/guru/guru_integration_test.go b/pkg/detectors/guru/guru_integration_test.go index b2135a2614f6..c1706a8e3afd 100644 --- a/pkg/detectors/guru/guru_integration_test.go +++ b/pkg/detectors/guru/guru_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestGuru_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestGuru_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Guru, + DetectorType: detector_typepb.DetectorType_Guru, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestGuru_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Guru, + DetectorType: detector_typepb.DetectorType_Guru, Verified: false, }, }, diff --git a/pkg/detectors/gyazo/gyazo.go b/pkg/detectors/gyazo/gyazo.go index be3725329623..ffba415b9bd6 100644 --- a/pkg/detectors/gyazo/gyazo.go +++ b/pkg/detectors/gyazo/gyazo.go @@ -9,7 +9,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Gyazo, + DetectorType: detector_typepb.DetectorType_Gyazo, Raw: []byte(resMatch), } @@ -64,8 +64,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Gyazo +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Gyazo } func (s Scanner) Description() string { diff --git a/pkg/detectors/gyazo/gyazo_integration_test.go b/pkg/detectors/gyazo/gyazo_integration_test.go index af682271fe30..571153e58cc0 100644 --- a/pkg/detectors/gyazo/gyazo_integration_test.go +++ b/pkg/detectors/gyazo/gyazo_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestGyazo_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestGyazo_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Gyazo, + DetectorType: detector_typepb.DetectorType_Gyazo, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestGyazo_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Gyazo, + DetectorType: detector_typepb.DetectorType_Gyazo, Verified: false, }, }, diff --git a/pkg/detectors/happyscribe/happyscribe.go b/pkg/detectors/happyscribe/happyscribe.go index a830510cb2c1..ed92139dd6ad 100644 --- a/pkg/detectors/happyscribe/happyscribe.go +++ b/pkg/detectors/happyscribe/happyscribe.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Happyscribe, + DetectorType: detector_typepb.DetectorType_Happyscribe, Raw: []byte(resMatch), } @@ -65,8 +65,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Happyscribe +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Happyscribe } func (s Scanner) Description() string { diff --git a/pkg/detectors/happyscribe/happyscribe_integration_test.go b/pkg/detectors/happyscribe/happyscribe_integration_test.go index 6faed4e3e088..5c7b44023c39 100644 --- a/pkg/detectors/happyscribe/happyscribe_integration_test.go +++ b/pkg/detectors/happyscribe/happyscribe_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestHappyscribe_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestHappyscribe_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Happyscribe, + DetectorType: detector_typepb.DetectorType_Happyscribe, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestHappyscribe_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Happyscribe, + DetectorType: detector_typepb.DetectorType_Happyscribe, Verified: false, }, }, diff --git a/pkg/detectors/harness/harness.go b/pkg/detectors/harness/harness.go index 14fdcaef2d87..115aa69b4092 100644 --- a/pkg/detectors/harness/harness.go +++ b/pkg/detectors/harness/harness.go @@ -12,7 +12,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) // Response struct for decoding API responses. @@ -61,7 +61,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for match := range uniqueMatches { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Harness, + DetectorType: detector_typepb.DetectorType_Harness, Raw: []byte(match), } @@ -127,8 +127,8 @@ func verifyMatch(ctx context.Context, client *http.Client, token string) (bool, } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Harness +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Harness } func (s Scanner) Description() string { diff --git a/pkg/detectors/harness/harness_integration_test.go b/pkg/detectors/harness/harness_integration_test.go index dd529abb9185..ab59f39d6896 100644 --- a/pkg/detectors/harness/harness_integration_test.go +++ b/pkg/detectors/harness/harness_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestHarness_FromChunk(t *testing.T) { @@ -50,7 +50,7 @@ func TestHarness_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Harness, + DetectorType: detector_typepb.DetectorType_Harness, Verified: true, }, }, @@ -67,7 +67,7 @@ func TestHarness_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Harness, + DetectorType: detector_typepb.DetectorType_Harness, Verified: false, }, }, @@ -96,7 +96,7 @@ func TestHarness_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Harness, + DetectorType: detector_typepb.DetectorType_Harness, Verified: false, }, }, @@ -113,7 +113,7 @@ func TestHarness_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Harness, + DetectorType: detector_typepb.DetectorType_Harness, Verified: false, }, }, diff --git a/pkg/detectors/harvest/harvest.go b/pkg/detectors/harvest/harvest.go index 38ac7490ccb0..a5d7dbd4b587 100644 --- a/pkg/detectors/harvest/harvest.go +++ b/pkg/detectors/harvest/harvest.go @@ -9,7 +9,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -46,7 +46,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resIdMatch := strings.TrimSpace(idmatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Harvest, + DetectorType: detector_typepb.DetectorType_Harvest, Raw: []byte(resMatch), } @@ -72,8 +72,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Harvest +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Harvest } func (s Scanner) Description() string { diff --git a/pkg/detectors/harvest/harvest_integration_test.go b/pkg/detectors/harvest/harvest_integration_test.go index 4017dfb3a727..74bd683b80a9 100644 --- a/pkg/detectors/harvest/harvest_integration_test.go +++ b/pkg/detectors/harvest/harvest_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestHarvest_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestHarvest_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Harvest, + DetectorType: detector_typepb.DetectorType_Harvest, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestHarvest_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Harvest, + DetectorType: detector_typepb.DetectorType_Harvest, Verified: false, }, }, diff --git a/pkg/detectors/hashicorpvaultauth/hashicorpvaultauth.go b/pkg/detectors/hashicorpvaultauth/hashicorpvaultauth.go index 87fed3374d01..6d14048101cd 100644 --- a/pkg/detectors/hashicorpvaultauth/hashicorpvaultauth.go +++ b/pkg/detectors/hashicorpvaultauth/hashicorpvaultauth.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -71,7 +71,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for secretId := range uniqueSecretIds { for vaultUrl := range uniqueVaultUrls { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_HashiCorpVaultAuth, + DetectorType: detector_typepb.DetectorType_HashiCorpVaultAuth, Raw: []byte(secretId), RawV2: []byte(fmt.Sprintf("%s:%s", roleId, secretId)), ExtraData: map[string]string{ @@ -143,8 +143,8 @@ func verifyMatch(ctx context.Context, client *http.Client, roleId, secretId, vau } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_HashiCorpVaultAuth +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_HashiCorpVaultAuth } func (s Scanner) Description() string { diff --git a/pkg/detectors/hashicorpvaultauth/hashicorpvaultauth_integration_test.go b/pkg/detectors/hashicorpvaultauth/hashicorpvaultauth_integration_test.go index 2b071bbde90a..68c51fd5a2f9 100644 --- a/pkg/detectors/hashicorpvaultauth/hashicorpvaultauth_integration_test.go +++ b/pkg/detectors/hashicorpvaultauth/hashicorpvaultauth_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestHashiCorpVaultAuth_FromChunk(t *testing.T) { @@ -53,7 +53,7 @@ func TestHashiCorpVaultAuth_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_HashiCorpVaultAuth, + DetectorType: detector_typepb.DetectorType_HashiCorpVaultAuth, Verified: false, VerificationFromCache: false, Raw: []byte(inactiveSecretId), @@ -77,7 +77,7 @@ func TestHashiCorpVaultAuth_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_HashiCorpVaultAuth, + DetectorType: detector_typepb.DetectorType_HashiCorpVaultAuth, Verified: true, VerificationFromCache: false, Raw: []byte(secretId), diff --git a/pkg/detectors/hasura/hasura.go b/pkg/detectors/hasura/hasura.go index 27bfd0b2969b..6bdf21547492 100644 --- a/pkg/detectors/hasura/hasura.go +++ b/pkg/detectors/hasura/hasura.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -63,7 +63,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for key := range uniqueKeyMatches { for domain := range uniqueDomainMatches { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Hasura, + DetectorType: detector_typepb.DetectorType_Hasura, Raw: []byte(key), RawV2: fmt.Appendf([]byte(""), "%s:%s", domain, key), } @@ -86,12 +86,12 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Hasura +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Hasura } func (s Scanner) Description() string { - return `Hasura is an open-source engine that instantly generates GraphQL and REST APIs over PostgreSQL (and other databases). + return `Hasura is an open-source engine that instantly generates GraphQL and REST APIs over PostgreSQL (and other databases). It allows you to query, mutate, and subscribe to data in real time. Admin secrets (or admin keys) are used to securely access and manage Hasura projects, giving full control over data, metadata, and schema.` } diff --git a/pkg/detectors/hasura/hasura_integration_test.go b/pkg/detectors/hasura/hasura_integration_test.go index 5b52c3fd88d7..df31b41f8811 100644 --- a/pkg/detectors/hasura/hasura_integration_test.go +++ b/pkg/detectors/hasura/hasura_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestHasura_FromData(t *testing.T) { @@ -52,7 +52,7 @@ func TestHasura_FromData(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Hasura, + DetectorType: detector_typepb.DetectorType_Hasura, Verified: true, Raw: []byte(secret), RawV2: []byte(fmt.Sprintf("%s:%s", domain, secret)), @@ -72,7 +72,7 @@ func TestHasura_FromData(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Hasura, + DetectorType: detector_typepb.DetectorType_Hasura, Verified: false, Raw: []byte(inactiveSecret), RawV2: []byte(fmt.Sprintf("%s:%s", domain, inactiveSecret)), @@ -104,7 +104,7 @@ func TestHasura_FromData(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Hasura, + DetectorType: detector_typepb.DetectorType_Hasura, Verified: false, Raw: []byte(secret), RawV2: []byte(fmt.Sprintf("%s:%s", domain, secret)), @@ -124,7 +124,7 @@ func TestHasura_FromData(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Hasura, + DetectorType: detector_typepb.DetectorType_Hasura, Verified: false, Raw: []byte(secret), RawV2: []byte(fmt.Sprintf("%s:%s", domain, secret)), diff --git a/pkg/detectors/hellosign/hellosign.go b/pkg/detectors/hellosign/hellosign.go index fc96233b69cf..abde24144c51 100644 --- a/pkg/detectors/hellosign/hellosign.go +++ b/pkg/detectors/hellosign/hellosign.go @@ -9,7 +9,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_HelloSign, + DetectorType: detector_typepb.DetectorType_HelloSign, Raw: []byte(resMatch), } @@ -65,8 +65,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_HelloSign +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_HelloSign } func (s Scanner) Description() string { diff --git a/pkg/detectors/hellosign/hellosign_integration_test.go b/pkg/detectors/hellosign/hellosign_integration_test.go index a764ff549635..6d0e6d48fcb1 100644 --- a/pkg/detectors/hellosign/hellosign_integration_test.go +++ b/pkg/detectors/hellosign/hellosign_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestHelloSign_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestHelloSign_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_HelloSign, + DetectorType: detector_typepb.DetectorType_HelloSign, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestHelloSign_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_HelloSign, + DetectorType: detector_typepb.DetectorType_HelloSign, Verified: false, }, }, diff --git a/pkg/detectors/helpcrunch/helpcrunch.go b/pkg/detectors/helpcrunch/helpcrunch.go index 2c74b734eece..c0ed2e48cfe4 100644 --- a/pkg/detectors/helpcrunch/helpcrunch.go +++ b/pkg/detectors/helpcrunch/helpcrunch.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -41,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_HelpCrunch, + DetectorType: detector_typepb.DetectorType_HelpCrunch, Raw: []byte(resMatch), } @@ -66,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_HelpCrunch +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_HelpCrunch } func (s Scanner) Description() string { diff --git a/pkg/detectors/helpcrunch/helpcrunch_integration_test.go b/pkg/detectors/helpcrunch/helpcrunch_integration_test.go index 38438e11cecc..c7f6b8605e87 100644 --- a/pkg/detectors/helpcrunch/helpcrunch_integration_test.go +++ b/pkg/detectors/helpcrunch/helpcrunch_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestHelpCrunch_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestHelpCrunch_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_HelpCrunch, + DetectorType: detector_typepb.DetectorType_HelpCrunch, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestHelpCrunch_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_HelpCrunch, + DetectorType: detector_typepb.DetectorType_HelpCrunch, Verified: false, }, }, diff --git a/pkg/detectors/helpscout/helpscout.go b/pkg/detectors/helpscout/helpscout.go index baa07a0dfcab..551b8623433e 100644 --- a/pkg/detectors/helpscout/helpscout.go +++ b/pkg/detectors/helpscout/helpscout.go @@ -9,7 +9,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Helpscout, + DetectorType: detector_typepb.DetectorType_Helpscout, Raw: []byte(resMatch), } @@ -65,8 +65,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Helpscout +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Helpscout } func (s Scanner) Description() string { diff --git a/pkg/detectors/helpscout/helpscout_integration_test.go b/pkg/detectors/helpscout/helpscout_integration_test.go index e9f18c6c8893..ed4fa74b28d1 100644 --- a/pkg/detectors/helpscout/helpscout_integration_test.go +++ b/pkg/detectors/helpscout/helpscout_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestHelpscout_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestHelpscout_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Helpscout, + DetectorType: detector_typepb.DetectorType_Helpscout, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestHelpscout_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Helpscout, + DetectorType: detector_typepb.DetectorType_Helpscout, Verified: false, }, }, diff --git a/pkg/detectors/hereapi/hereapi.go b/pkg/detectors/hereapi/hereapi.go index 91e55c91ba25..64459a990b50 100644 --- a/pkg/detectors/hereapi/hereapi.go +++ b/pkg/detectors/hereapi/hereapi.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -39,7 +39,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_HereAPI, + DetectorType: detector_typepb.DetectorType_HereAPI, Raw: []byte(resMatch), } @@ -62,8 +62,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_HereAPI +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_HereAPI } func (s Scanner) Description() string { diff --git a/pkg/detectors/hereapi/hereapi_integration_test.go b/pkg/detectors/hereapi/hereapi_integration_test.go index 0d4c16daf07f..409728ebb93b 100644 --- a/pkg/detectors/hereapi/hereapi_integration_test.go +++ b/pkg/detectors/hereapi/hereapi_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestHereAPI_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestHereAPI_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_HereAPI, + DetectorType: detector_typepb.DetectorType_HereAPI, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestHereAPI_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_HereAPI, + DetectorType: detector_typepb.DetectorType_HereAPI, Verified: false, }, }, diff --git a/pkg/detectors/heroku/v1/heroku.go b/pkg/detectors/heroku/v1/heroku.go index 613bac5afdcd..4693354fc6ef 100644 --- a/pkg/detectors/heroku/v1/heroku.go +++ b/pkg/detectors/heroku/v1/heroku.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -47,7 +47,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Heroku, + DetectorType: detector_typepb.DetectorType_Heroku, Raw: []byte(resMatch), } @@ -63,8 +63,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Heroku +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Heroku } func (s Scanner) Description() string { diff --git a/pkg/detectors/heroku/v1/heroku_integration_test.go b/pkg/detectors/heroku/v1/heroku_integration_test.go index e2316c341734..aeb973a6766d 100644 --- a/pkg/detectors/heroku/v1/heroku_integration_test.go +++ b/pkg/detectors/heroku/v1/heroku_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestHeroku_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestHeroku_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Heroku, + DetectorType: detector_typepb.DetectorType_Heroku, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestHeroku_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Heroku, + DetectorType: detector_typepb.DetectorType_Heroku, Verified: false, }, }, diff --git a/pkg/detectors/heroku/v2/heroku.go b/pkg/detectors/heroku/v2/heroku.go index f67f400c74cd..097392e6213e 100644 --- a/pkg/detectors/heroku/v2/heroku.go +++ b/pkg/detectors/heroku/v2/heroku.go @@ -9,7 +9,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" v1 "github.com/trufflesecurity/trufflehog/v3/pkg/detectors/heroku/v1" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -45,7 +45,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Heroku, + DetectorType: detector_typepb.DetectorType_Heroku, Raw: []byte(resMatch), } @@ -61,8 +61,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Heroku +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Heroku } func (s Scanner) Description() string { diff --git a/pkg/detectors/heroku/v2/heroku_integration_test.go b/pkg/detectors/heroku/v2/heroku_integration_test.go index 804db997045b..4323c176d8f3 100644 --- a/pkg/detectors/heroku/v2/heroku_integration_test.go +++ b/pkg/detectors/heroku/v2/heroku_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestHeroku_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestHeroku_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Heroku, + DetectorType: detector_typepb.DetectorType_Heroku, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestHeroku_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Heroku, + DetectorType: detector_typepb.DetectorType_Heroku, Verified: false, }, }, diff --git a/pkg/detectors/hive/hive.go b/pkg/detectors/hive/hive.go index fe15b26ce081..3f72f23056ac 100644 --- a/pkg/detectors/hive/hive.go +++ b/pkg/detectors/hive/hive.go @@ -9,7 +9,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -48,7 +48,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result keyMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Hive, + DetectorType: detector_typepb.DetectorType_Hive, Raw: []byte(idMatch), } @@ -73,8 +73,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Hive +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Hive } func (s Scanner) Description() string { diff --git a/pkg/detectors/hive/hive_integration_test.go b/pkg/detectors/hive/hive_integration_test.go index 83f649c20273..e373f64747f0 100644 --- a/pkg/detectors/hive/hive_integration_test.go +++ b/pkg/detectors/hive/hive_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestHive_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestHive_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Hive, + DetectorType: detector_typepb.DetectorType_Hive, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestHive_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Hive, + DetectorType: detector_typepb.DetectorType_Hive, Verified: false, }, }, diff --git a/pkg/detectors/hiveage/hiveage.go b/pkg/detectors/hiveage/hiveage.go index 1791e21ae35e..3f80eb97611a 100644 --- a/pkg/detectors/hiveage/hiveage.go +++ b/pkg/detectors/hiveage/hiveage.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -42,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Hiveage, + DetectorType: detector_typepb.DetectorType_Hiveage, Raw: []byte(resMatch), } @@ -70,8 +70,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Hiveage +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Hiveage } func (s Scanner) Description() string { diff --git a/pkg/detectors/hiveage/hiveage_integration_test.go b/pkg/detectors/hiveage/hiveage_integration_test.go index 572e15251a9c..67517b1ffe4e 100644 --- a/pkg/detectors/hiveage/hiveage_integration_test.go +++ b/pkg/detectors/hiveage/hiveage_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestHiveage_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestHiveage_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Hiveage, + DetectorType: detector_typepb.DetectorType_Hiveage, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestHiveage_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Hiveage, + DetectorType: detector_typepb.DetectorType_Hiveage, Verified: false, }, }, diff --git a/pkg/detectors/holidayapi/holidayapi.go b/pkg/detectors/holidayapi/holidayapi.go index 6182dae7e1c3..c5add356ba33 100644 --- a/pkg/detectors/holidayapi/holidayapi.go +++ b/pkg/detectors/holidayapi/holidayapi.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -41,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_HolidayAPI, + DetectorType: detector_typepb.DetectorType_HolidayAPI, Raw: []byte(resMatch), } @@ -65,8 +65,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_HolidayAPI +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_HolidayAPI } func (s Scanner) Description() string { diff --git a/pkg/detectors/holidayapi/holidayapi_integration_test.go b/pkg/detectors/holidayapi/holidayapi_integration_test.go index 363752b473ba..46936a464b63 100644 --- a/pkg/detectors/holidayapi/holidayapi_integration_test.go +++ b/pkg/detectors/holidayapi/holidayapi_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestHolidayAPI_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestHolidayAPI_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_HolidayAPI, + DetectorType: detector_typepb.DetectorType_HolidayAPI, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestHolidayAPI_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_HolidayAPI, + DetectorType: detector_typepb.DetectorType_HolidayAPI, Verified: false, }, }, diff --git a/pkg/detectors/holistic/holistic.go b/pkg/detectors/holistic/holistic.go index 27ff8071fd57..8ee7e2c540e1 100644 --- a/pkg/detectors/holistic/holistic.go +++ b/pkg/detectors/holistic/holistic.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -41,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Holistic, + DetectorType: detector_typepb.DetectorType_Holistic, Raw: []byte(resMatch), } @@ -74,8 +74,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Holistic +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Holistic } func (s Scanner) Description() string { diff --git a/pkg/detectors/holistic/holistic_integration_test.go b/pkg/detectors/holistic/holistic_integration_test.go index 2eb997dfa581..681af9acd2ba 100644 --- a/pkg/detectors/holistic/holistic_integration_test.go +++ b/pkg/detectors/holistic/holistic_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestHolistic_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestHolistic_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Holistic, + DetectorType: detector_typepb.DetectorType_Holistic, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestHolistic_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Holistic, + DetectorType: detector_typepb.DetectorType_Holistic, Verified: false, }, }, diff --git a/pkg/detectors/honeycomb/honeycomb.go b/pkg/detectors/honeycomb/honeycomb.go index 0b02c5ffd468..49070e4791a5 100644 --- a/pkg/detectors/honeycomb/honeycomb.go +++ b/pkg/detectors/honeycomb/honeycomb.go @@ -9,7 +9,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -41,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Honeycomb, + DetectorType: detector_typepb.DetectorType_Honeycomb, Raw: []byte(resMatch), } @@ -66,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Honeycomb +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Honeycomb } func (s Scanner) Description() string { diff --git a/pkg/detectors/honeycomb/honeycomb_integration_test.go b/pkg/detectors/honeycomb/honeycomb_integration_test.go index 1a7d5579077b..4ce21dbb57d7 100644 --- a/pkg/detectors/honeycomb/honeycomb_integration_test.go +++ b/pkg/detectors/honeycomb/honeycomb_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestHoneycomb_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestHoneycomb_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Honeycomb, + DetectorType: detector_typepb.DetectorType_Honeycomb, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestHoneycomb_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Honeycomb, + DetectorType: detector_typepb.DetectorType_Honeycomb, Verified: false, }, }, diff --git a/pkg/detectors/host/host.go b/pkg/detectors/host/host.go index 3fc5b070ebdd..e3a2e4c902bd 100644 --- a/pkg/detectors/host/host.go +++ b/pkg/detectors/host/host.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -41,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Host, + DetectorType: detector_typepb.DetectorType_Host, Raw: []byte(resMatch), } @@ -65,8 +65,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Host +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Host } func (s Scanner) Description() string { diff --git a/pkg/detectors/host/host_integration_test.go b/pkg/detectors/host/host_integration_test.go index d86587ba6707..b95f9dcf7d4f 100644 --- a/pkg/detectors/host/host_integration_test.go +++ b/pkg/detectors/host/host_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestHost_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestHost_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Host, + DetectorType: detector_typepb.DetectorType_Host, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestHost_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Host, + DetectorType: detector_typepb.DetectorType_Host, Verified: false, }, }, diff --git a/pkg/detectors/html2pdf/html2pdf.go b/pkg/detectors/html2pdf/html2pdf.go index 21c10b992a25..de6c9961b212 100644 --- a/pkg/detectors/html2pdf/html2pdf.go +++ b/pkg/detectors/html2pdf/html2pdf.go @@ -10,7 +10,7 @@ import ( regexp "github.com/wasilibs/go-re2" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -44,7 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Html2Pdf, + DetectorType: detector_typepb.DetectorType_Html2Pdf, Raw: []byte(resMatch), } @@ -71,8 +71,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Html2Pdf +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Html2Pdf } func (s Scanner) Description() string { diff --git a/pkg/detectors/html2pdf/html2pdf_integration_test.go b/pkg/detectors/html2pdf/html2pdf_integration_test.go index 8eabe715c004..f20259bfb3aa 100644 --- a/pkg/detectors/html2pdf/html2pdf_integration_test.go +++ b/pkg/detectors/html2pdf/html2pdf_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestHtml2Pdf_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestHtml2Pdf_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Html2Pdf, + DetectorType: detector_typepb.DetectorType_Html2Pdf, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestHtml2Pdf_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Html2Pdf, + DetectorType: detector_typepb.DetectorType_Html2Pdf, Verified: false, }, }, diff --git a/pkg/detectors/hubspot_apikey/v1/apikey.go b/pkg/detectors/hubspot_apikey/v1/apikey.go index 200a67e4249f..9e84e35061bb 100644 --- a/pkg/detectors/hubspot_apikey/v1/apikey.go +++ b/pkg/detectors/hubspot_apikey/v1/apikey.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -48,7 +48,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for token := range uniqueMatches { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_HubSpotApiKey, + DetectorType: detector_typepb.DetectorType_HubSpotApiKey, Raw: []byte(token), } @@ -98,8 +98,8 @@ func verifyToken(ctx context.Context, client *http.Client, token string) (bool, } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_HubSpotApiKey +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_HubSpotApiKey } func (s Scanner) Description() string { diff --git a/pkg/detectors/hubspot_apikey/v1/apikey_integration_test.go b/pkg/detectors/hubspot_apikey/v1/apikey_integration_test.go index 20deb1b9bbc0..e26cd61443b5 100644 --- a/pkg/detectors/hubspot_apikey/v1/apikey_integration_test.go +++ b/pkg/detectors/hubspot_apikey/v1/apikey_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestHubSpotApiKey_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestHubSpotApiKey_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_HubSpotApiKey, + DetectorType: detector_typepb.DetectorType_HubSpotApiKey, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestHubSpotApiKey_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_HubSpotApiKey, + DetectorType: detector_typepb.DetectorType_HubSpotApiKey, Verified: false, }, }, diff --git a/pkg/detectors/hubspot_apikey/v2/apikey.go b/pkg/detectors/hubspot_apikey/v2/apikey.go index 54695df1bebe..abee414db21a 100644 --- a/pkg/detectors/hubspot_apikey/v2/apikey.go +++ b/pkg/detectors/hubspot_apikey/v2/apikey.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -48,7 +48,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for token := range uniqueMatches { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_HubSpotApiKey, + DetectorType: detector_typepb.DetectorType_HubSpotApiKey, Raw: []byte(token), Redacted: token[8:] + "...", } @@ -97,8 +97,8 @@ func verifyToken(ctx context.Context, client *http.Client, token string) (bool, } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_HubSpotApiKey +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_HubSpotApiKey } func (s Scanner) Description() string { diff --git a/pkg/detectors/hubspot_apikey/v2/apikey_integration_test.go b/pkg/detectors/hubspot_apikey/v2/apikey_integration_test.go index 1ef20436d446..435ebce85113 100644 --- a/pkg/detectors/hubspot_apikey/v2/apikey_integration_test.go +++ b/pkg/detectors/hubspot_apikey/v2/apikey_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestHubSpotApiKey_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestHubSpotApiKey_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_HubSpotApiKey, + DetectorType: detector_typepb.DetectorType_HubSpotApiKey, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestHubSpotApiKey_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_HubSpotApiKey, + DetectorType: detector_typepb.DetectorType_HubSpotApiKey, Verified: false, }, }, diff --git a/pkg/detectors/huggingface/huggingface.go b/pkg/detectors/huggingface/huggingface.go index 04b610dee135..30e9cffcd37d 100644 --- a/pkg/detectors/huggingface/huggingface.go +++ b/pkg/detectors/huggingface/huggingface.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -43,7 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[0]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_HuggingFace, + DetectorType: detector_typepb.DetectorType_HuggingFace, Raw: []byte(resMatch), } @@ -125,8 +125,8 @@ func (s Scanner) verifyResult(ctx context.Context, apiKey string) (bool, map[str } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_HuggingFace +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_HuggingFace } func (s Scanner) Description() string { diff --git a/pkg/detectors/huggingface/huggingface_integration_test.go b/pkg/detectors/huggingface/huggingface_integration_test.go index 61d5e095b15a..656af98a1e15 100644 --- a/pkg/detectors/huggingface/huggingface_integration_test.go +++ b/pkg/detectors/huggingface/huggingface_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestHuggingface_FromChunk(t *testing.T) { @@ -50,7 +50,7 @@ func TestHuggingface_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_HuggingFace, + DetectorType: detector_typepb.DetectorType_HuggingFace, Verified: true, ExtraData: map[string]string{ "Email": "zubair.khan@trufflesec.com", @@ -72,7 +72,7 @@ func TestHuggingface_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_HuggingFace, + DetectorType: detector_typepb.DetectorType_HuggingFace, Verified: false, }, }, @@ -101,7 +101,7 @@ func TestHuggingface_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_HuggingFace, + DetectorType: detector_typepb.DetectorType_HuggingFace, Verified: false, }, }, @@ -118,7 +118,7 @@ func TestHuggingface_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_HuggingFace, + DetectorType: detector_typepb.DetectorType_HuggingFace, Verified: false, }, }, @@ -162,7 +162,7 @@ func TestHuggingface_FromChunk(t *testing.T) { want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_HuggingFace, + DetectorType: detector_typepb.DetectorType_HuggingFace, Verified: true, ExtraData: map[string]string{ "Email": "zubair.khan@trufflesec.com", diff --git a/pkg/detectors/humanity/humanity.go b/pkg/detectors/humanity/humanity.go index bb60ee95d9ad..0353c8fee3da 100644 --- a/pkg/detectors/humanity/humanity.go +++ b/pkg/detectors/humanity/humanity.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -41,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Humanity, + DetectorType: detector_typepb.DetectorType_Humanity, Raw: []byte(resMatch), } @@ -73,8 +73,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Humanity +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Humanity } func (s Scanner) Description() string { diff --git a/pkg/detectors/humanity/humanity_integration_test.go b/pkg/detectors/humanity/humanity_integration_test.go index fbc2600c6c7a..9088e662181a 100644 --- a/pkg/detectors/humanity/humanity_integration_test.go +++ b/pkg/detectors/humanity/humanity_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestHumanity_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestHumanity_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Humanity, + DetectorType: detector_typepb.DetectorType_Humanity, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestHumanity_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Humanity, + DetectorType: detector_typepb.DetectorType_Humanity, Verified: false, }, }, diff --git a/pkg/detectors/hunter/hunter.go b/pkg/detectors/hunter/hunter.go index df2ada6ab3d8..f651566332d4 100644 --- a/pkg/detectors/hunter/hunter.go +++ b/pkg/detectors/hunter/hunter.go @@ -9,7 +9,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -39,7 +39,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Hunter, + DetectorType: detector_typepb.DetectorType_Hunter, Raw: []byte(resMatch), } @@ -63,8 +63,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Hunter +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Hunter } func (s Scanner) Description() string { diff --git a/pkg/detectors/hunter/hunter_integration_test.go b/pkg/detectors/hunter/hunter_integration_test.go index 4c21cde0f2b7..ec367ecdef99 100644 --- a/pkg/detectors/hunter/hunter_integration_test.go +++ b/pkg/detectors/hunter/hunter_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestHunter_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestHunter_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Hunter, + DetectorType: detector_typepb.DetectorType_Hunter, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestHunter_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Hunter, + DetectorType: detector_typepb.DetectorType_Hunter, Verified: false, }, }, diff --git a/pkg/detectors/hybiscus/hybiscus.go b/pkg/detectors/hybiscus/hybiscus.go index 08430ab4ccef..aadc2f612b9f 100644 --- a/pkg/detectors/hybiscus/hybiscus.go +++ b/pkg/detectors/hybiscus/hybiscus.go @@ -9,7 +9,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Hybiscus, + DetectorType: detector_typepb.DetectorType_Hybiscus, Raw: []byte(resMatch), } @@ -66,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Hybiscus +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Hybiscus } func (s Scanner) Description() string { diff --git a/pkg/detectors/hybiscus/hybiscus_integration_test.go b/pkg/detectors/hybiscus/hybiscus_integration_test.go index 155584ec81d6..5cdd9bba25fa 100644 --- a/pkg/detectors/hybiscus/hybiscus_integration_test.go +++ b/pkg/detectors/hybiscus/hybiscus_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestHybiscus_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestHybiscus_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Hybiscus, + DetectorType: detector_typepb.DetectorType_Hybiscus, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestHybiscus_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Hybiscus, + DetectorType: detector_typepb.DetectorType_Hybiscus, Verified: false, }, }, diff --git a/pkg/detectors/hypertrack/hypertrack.go b/pkg/detectors/hypertrack/hypertrack.go index b554b70382a7..d62844bafd68 100644 --- a/pkg/detectors/hypertrack/hypertrack.go +++ b/pkg/detectors/hypertrack/hypertrack.go @@ -9,7 +9,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -47,7 +47,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Hypertrack, + DetectorType: detector_typepb.DetectorType_Hypertrack, Raw: []byte(resMatch), } @@ -74,8 +74,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Hypertrack +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Hypertrack } func (s Scanner) Description() string { diff --git a/pkg/detectors/hypertrack/hypertrack_integration_test.go b/pkg/detectors/hypertrack/hypertrack_integration_test.go index 26fa7d74e5b3..4710453c2c87 100644 --- a/pkg/detectors/hypertrack/hypertrack_integration_test.go +++ b/pkg/detectors/hypertrack/hypertrack_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestHypertrack_FromChunk(t *testing.T) { @@ -50,7 +50,7 @@ func TestHypertrack_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Hypertrack, + DetectorType: detector_typepb.DetectorType_Hypertrack, Verified: true, }, }, @@ -66,7 +66,7 @@ func TestHypertrack_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Hypertrack, + DetectorType: detector_typepb.DetectorType_Hypertrack, Verified: false, }, }, diff --git a/pkg/detectors/ibmclouduserkey/ibmclouduserkey.go b/pkg/detectors/ibmclouduserkey/ibmclouduserkey.go index b339dbe27a83..cc5dcf42b12d 100644 --- a/pkg/detectors/ibmclouduserkey/ibmclouduserkey.go +++ b/pkg/detectors/ibmclouduserkey/ibmclouduserkey.go @@ -9,7 +9,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_IbmCloudUserKey, + DetectorType: detector_typepb.DetectorType_IbmCloudUserKey, Raw: []byte(resMatch), } @@ -67,8 +67,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_IbmCloudUserKey +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_IbmCloudUserKey } func (s Scanner) Description() string { diff --git a/pkg/detectors/ibmclouduserkey/ibmclouduserkey_integration_test.go b/pkg/detectors/ibmclouduserkey/ibmclouduserkey_integration_test.go index d872fa905217..5173277de1dd 100644 --- a/pkg/detectors/ibmclouduserkey/ibmclouduserkey_integration_test.go +++ b/pkg/detectors/ibmclouduserkey/ibmclouduserkey_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestIbmCloudUserKey_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestIbmCloudUserKey_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_IbmCloudUserKey, + DetectorType: detector_typepb.DetectorType_IbmCloudUserKey, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestIbmCloudUserKey_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_IbmCloudUserKey, + DetectorType: detector_typepb.DetectorType_IbmCloudUserKey, Verified: false, }, }, diff --git a/pkg/detectors/iconfinder/iconfinder.go b/pkg/detectors/iconfinder/iconfinder.go index ecca5a00267e..692034e5d4f4 100644 --- a/pkg/detectors/iconfinder/iconfinder.go +++ b/pkg/detectors/iconfinder/iconfinder.go @@ -3,13 +3,14 @@ package iconfinder import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_IconFinder, + DetectorType: detector_typepb.DetectorType_IconFinder, Raw: []byte(resMatch), } @@ -65,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_IconFinder +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_IconFinder } func (s Scanner) Description() string { diff --git a/pkg/detectors/iconfinder/iconfinder_integreation_test.go b/pkg/detectors/iconfinder/iconfinder_integreation_test.go index 2f1fcdf149de..2851a122d5d6 100644 --- a/pkg/detectors/iconfinder/iconfinder_integreation_test.go +++ b/pkg/detectors/iconfinder/iconfinder_integreation_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestIconFinder_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestIconFinder_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_IconFinder, + DetectorType: detector_typepb.DetectorType_IconFinder, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestIconFinder_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_IconFinder, + DetectorType: detector_typepb.DetectorType_IconFinder, Verified: false, }, }, diff --git a/pkg/detectors/iexapis/iexapis.go b/pkg/detectors/iexapis/iexapis.go index 5624d7d7351a..871c08290fbf 100644 --- a/pkg/detectors/iexapis/iexapis.go +++ b/pkg/detectors/iexapis/iexapis.go @@ -2,13 +2,14 @@ package iexapis import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -39,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Iexapis, + DetectorType: detector_typepb.DetectorType_Iexapis, Raw: []byte(resMatch), } @@ -63,8 +64,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Iexapis +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Iexapis } func (s Scanner) Description() string { diff --git a/pkg/detectors/iexapis/iexapis_integration_test.go b/pkg/detectors/iexapis/iexapis_integration_test.go index 10471c9b69b6..530fcb89a516 100644 --- a/pkg/detectors/iexapis/iexapis_integration_test.go +++ b/pkg/detectors/iexapis/iexapis_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestIexapis_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestIexapis_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Iexapis, + DetectorType: detector_typepb.DetectorType_Iexapis, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestIexapis_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Iexapis, + DetectorType: detector_typepb.DetectorType_Iexapis, Verified: false, }, }, diff --git a/pkg/detectors/iexcloud/iexcloud.go b/pkg/detectors/iexcloud/iexcloud.go index ec4a0b77ae94..2ee43836ced6 100644 --- a/pkg/detectors/iexcloud/iexcloud.go +++ b/pkg/detectors/iexcloud/iexcloud.go @@ -3,13 +3,14 @@ package iexcloud import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Iexcloud, + DetectorType: detector_typepb.DetectorType_Iexcloud, Raw: []byte(resMatch), } @@ -64,8 +65,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Iexcloud +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Iexcloud } func (s Scanner) Description() string { diff --git a/pkg/detectors/iexcloud/iexcloud_integration_test.go b/pkg/detectors/iexcloud/iexcloud_integration_test.go index 29285bc6a56e..7ef8f265bb17 100644 --- a/pkg/detectors/iexcloud/iexcloud_integration_test.go +++ b/pkg/detectors/iexcloud/iexcloud_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestIexcloud_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestIexcloud_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Iexcloud, + DetectorType: detector_typepb.DetectorType_Iexcloud, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestIexcloud_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Iexcloud, + DetectorType: detector_typepb.DetectorType_Iexcloud, Verified: false, }, }, diff --git a/pkg/detectors/imagekit/imagekit.go b/pkg/detectors/imagekit/imagekit.go index bedbb95d0b11..551fde160e64 100644 --- a/pkg/detectors/imagekit/imagekit.go +++ b/pkg/detectors/imagekit/imagekit.go @@ -2,13 +2,14 @@ package imagekit import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -39,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Imagekit, + DetectorType: detector_typepb.DetectorType_Imagekit, Raw: []byte(resMatch), } if verify { @@ -64,8 +65,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Imagekit +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Imagekit } func (s Scanner) Description() string { diff --git a/pkg/detectors/imagekit/imagekit_integration_test.go b/pkg/detectors/imagekit/imagekit_integration_test.go index 50a5bb40e811..a7c5d885c17b 100644 --- a/pkg/detectors/imagekit/imagekit_integration_test.go +++ b/pkg/detectors/imagekit/imagekit_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestImagekit_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestImagekit_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Imagekit, + DetectorType: detector_typepb.DetectorType_Imagekit, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestImagekit_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Imagekit, + DetectorType: detector_typepb.DetectorType_Imagekit, Verified: false, }, }, diff --git a/pkg/detectors/imagga/imagga.go b/pkg/detectors/imagga/imagga.go index de0e2fb5af70..3a8449040276 100644 --- a/pkg/detectors/imagga/imagga.go +++ b/pkg/detectors/imagga/imagga.go @@ -3,13 +3,14 @@ package imagga import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -39,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Imagga, + DetectorType: detector_typepb.DetectorType_Imagga, Raw: []byte(resMatch), } @@ -65,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Imagga +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Imagga } func (s Scanner) Description() string { diff --git a/pkg/detectors/imagga/imagga_integration_test.go b/pkg/detectors/imagga/imagga_integration_test.go index b46d71050bb7..122c3d5eb29b 100644 --- a/pkg/detectors/imagga/imagga_integration_test.go +++ b/pkg/detectors/imagga/imagga_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestImagga_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestImagga_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Imagga, + DetectorType: detector_typepb.DetectorType_Imagga, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestImagga_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Imagga, + DetectorType: detector_typepb.DetectorType_Imagga, Verified: false, }, }, diff --git a/pkg/detectors/impala/impala.go b/pkg/detectors/impala/impala.go index e94a1dfdbbf5..cca714fc3364 100644 --- a/pkg/detectors/impala/impala.go +++ b/pkg/detectors/impala/impala.go @@ -2,13 +2,14 @@ package impala import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -39,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Impala, + DetectorType: detector_typepb.DetectorType_Impala, Raw: []byte(resMatch), } @@ -64,8 +65,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Impala +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Impala } func (s Scanner) Description() string { diff --git a/pkg/detectors/impala/impala_integration_test.go b/pkg/detectors/impala/impala_integration_test.go index 1590112a9703..1abd87fa8fc7 100644 --- a/pkg/detectors/impala/impala_integration_test.go +++ b/pkg/detectors/impala/impala_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestImpala_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestImpala_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Impala, + DetectorType: detector_typepb.DetectorType_Impala, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestImpala_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Impala, + DetectorType: detector_typepb.DetectorType_Impala, Verified: false, }, }, diff --git a/pkg/detectors/infura/infura.go b/pkg/detectors/infura/infura.go index 0d04cef02f53..23b2a6de9a22 100644 --- a/pkg/detectors/infura/infura.go +++ b/pkg/detectors/infura/infura.go @@ -2,14 +2,15 @@ package infura import ( "context" - regexp "github.com/wasilibs/go-re2" "io" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Infura, + DetectorType: detector_typepb.DetectorType_Infura, Raw: []byte(resMatch), } @@ -71,8 +72,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Infura +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Infura } func (s Scanner) Description() string { diff --git a/pkg/detectors/infura/infura_integration_test.go b/pkg/detectors/infura/infura_integration_test.go index 1e3864413cb0..263f0d28b922 100644 --- a/pkg/detectors/infura/infura_integration_test.go +++ b/pkg/detectors/infura/infura_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestInfura_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestInfura_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Infura, + DetectorType: detector_typepb.DetectorType_Infura, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestInfura_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Infura, + DetectorType: detector_typepb.DetectorType_Infura, Verified: false, }, }, diff --git a/pkg/detectors/insightly/insightly.go b/pkg/detectors/insightly/insightly.go index a985c8ae6faa..ff8b13b67a34 100644 --- a/pkg/detectors/insightly/insightly.go +++ b/pkg/detectors/insightly/insightly.go @@ -2,13 +2,14 @@ package insightly import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -39,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Insightly, + DetectorType: detector_typepb.DetectorType_Insightly, Raw: []byte(resMatch), } @@ -64,8 +65,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Insightly +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Insightly } func (s Scanner) Description() string { diff --git a/pkg/detectors/insightly/insightly_integration_test.go b/pkg/detectors/insightly/insightly_integration_test.go index bcaa17ae6763..f0eae323baf3 100644 --- a/pkg/detectors/insightly/insightly_integration_test.go +++ b/pkg/detectors/insightly/insightly_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestInsightly_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestInsightly_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Insightly, + DetectorType: detector_typepb.DetectorType_Insightly, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestInsightly_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Insightly, + DetectorType: detector_typepb.DetectorType_Insightly, Verified: false, }, }, diff --git a/pkg/detectors/instabot/instabot.go b/pkg/detectors/instabot/instabot.go index 4ee0f89e41a0..bba2966d16d5 100644 --- a/pkg/detectors/instabot/instabot.go +++ b/pkg/detectors/instabot/instabot.go @@ -2,13 +2,14 @@ package instabot import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -38,7 +39,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Instabot, + DetectorType: detector_typepb.DetectorType_Instabot, Raw: []byte(resMatch), } @@ -63,8 +64,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Instabot +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Instabot } func (s Scanner) Description() string { diff --git a/pkg/detectors/instabot/instabot_integration_test.go b/pkg/detectors/instabot/instabot_integration_test.go index 82f593e154f1..e077e62ab6e4 100644 --- a/pkg/detectors/instabot/instabot_integration_test.go +++ b/pkg/detectors/instabot/instabot_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestInstabot_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestInstabot_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Instabot, + DetectorType: detector_typepb.DetectorType_Instabot, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestInstabot_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Instabot, + DetectorType: detector_typepb.DetectorType_Instabot, Verified: false, }, }, diff --git a/pkg/detectors/instamojo/instamojo.go b/pkg/detectors/instamojo/instamojo.go index 3ec7af82061d..fe1d4ba22928 100644 --- a/pkg/detectors/instamojo/instamojo.go +++ b/pkg/detectors/instamojo/instamojo.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -51,7 +51,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resClientId := strings.TrimSpace(clientIdMatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Instamojo, + DetectorType: detector_typepb.DetectorType_Instamojo, Raw: []byte(resClientId), } @@ -93,8 +93,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Instamojo +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Instamojo } func (s Scanner) Description() string { diff --git a/pkg/detectors/instamojo/instamojo_integration_test.go b/pkg/detectors/instamojo/instamojo_integration_test.go index 81bacaaac907..61ea0d8b0a52 100644 --- a/pkg/detectors/instamojo/instamojo_integration_test.go +++ b/pkg/detectors/instamojo/instamojo_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestInstamojo_FromChunk(t *testing.T) { @@ -50,7 +50,7 @@ func TestInstamojo_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Instamojo, + DetectorType: detector_typepb.DetectorType_Instamojo, Verified: true, }, }, @@ -67,7 +67,7 @@ func TestInstamojo_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Instamojo, + DetectorType: detector_typepb.DetectorType_Instamojo, }, }, wantErr: false, diff --git a/pkg/detectors/intercom/intercom.go b/pkg/detectors/intercom/intercom.go index 5e16eca58092..192dbe4366eb 100644 --- a/pkg/detectors/intercom/intercom.go +++ b/pkg/detectors/intercom/intercom.go @@ -3,13 +3,14 @@ package intercom import ( "context" "encoding/base64" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -48,7 +49,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Intercom, + DetectorType: detector_typepb.DetectorType_Intercom, Raw: []byte(resMatch), } @@ -75,8 +76,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Intercom +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Intercom } func (s Scanner) Description() string { diff --git a/pkg/detectors/intercom/intercom_integration_test.go b/pkg/detectors/intercom/intercom_integration_test.go index 1c738cbf5f50..432e1e7f70c4 100644 --- a/pkg/detectors/intercom/intercom_integration_test.go +++ b/pkg/detectors/intercom/intercom_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestInterCom_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestInterCom_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Intercom, + DetectorType: detector_typepb.DetectorType_Intercom, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestInterCom_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Intercom, + DetectorType: detector_typepb.DetectorType_Intercom, Verified: false, }, }, diff --git a/pkg/detectors/interseller/interseller.go b/pkg/detectors/interseller/interseller.go index 1fdf6d6c6f0b..bff6109cf306 100644 --- a/pkg/detectors/interseller/interseller.go +++ b/pkg/detectors/interseller/interseller.go @@ -9,7 +9,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Interseller, + DetectorType: detector_typepb.DetectorType_Interseller, Raw: []byte(resMatch), } if verify { @@ -65,8 +65,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Interseller +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Interseller } func (s Scanner) Description() string { diff --git a/pkg/detectors/interseller/interseller_integration_test.go b/pkg/detectors/interseller/interseller_integration_test.go index 58d662e57607..9d4c2615b002 100644 --- a/pkg/detectors/interseller/interseller_integration_test.go +++ b/pkg/detectors/interseller/interseller_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestInterseller_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestInterseller_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Interseller, + DetectorType: detector_typepb.DetectorType_Interseller, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestInterseller_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Interseller, + DetectorType: detector_typepb.DetectorType_Interseller, Verified: false, }, }, diff --git a/pkg/detectors/intra42/intra42.go b/pkg/detectors/intra42/intra42.go index 16014174120d..4f14d38ce594 100644 --- a/pkg/detectors/intra42/intra42.go +++ b/pkg/detectors/intra42/intra42.go @@ -12,7 +12,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -59,7 +59,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resIdMatch := strings.TrimSpace(idMatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Intra42, + DetectorType: detector_typepb.DetectorType_Intra42, Raw: []byte(resMatch), } @@ -113,8 +113,8 @@ func verifyIntra42(ctx context.Context, client *http.Client, resMatch string, re } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Intra42 +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Intra42 } func (s Scanner) Description() string { diff --git a/pkg/detectors/intra42/intra42_integration_test.go b/pkg/detectors/intra42/intra42_integration_test.go index 3bc7f28fb550..5b275288d70e 100644 --- a/pkg/detectors/intra42/intra42_integration_test.go +++ b/pkg/detectors/intra42/intra42_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestIntra42_FromChunk(t *testing.T) { @@ -51,7 +51,7 @@ func TestIntra42_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Intra42, + DetectorType: detector_typepb.DetectorType_Intra42, Verified: true, }, }, @@ -67,7 +67,7 @@ func TestIntra42_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Intra42, + DetectorType: detector_typepb.DetectorType_Intra42, Verified: false, }, }, @@ -84,7 +84,7 @@ func TestIntra42_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Intra42, + DetectorType: detector_typepb.DetectorType_Intra42, Verified: false, }, }, @@ -101,7 +101,7 @@ func TestIntra42_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Intra42, + DetectorType: detector_typepb.DetectorType_Intra42, Verified: false, }, }, diff --git a/pkg/detectors/intrinio/intrinio.go b/pkg/detectors/intrinio/intrinio.go index 6296ed92031e..78346b52e927 100644 --- a/pkg/detectors/intrinio/intrinio.go +++ b/pkg/detectors/intrinio/intrinio.go @@ -3,13 +3,14 @@ package intrinio import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Intrinio, + DetectorType: detector_typepb.DetectorType_Intrinio, Raw: []byte(resMatch), } @@ -64,8 +65,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Intrinio +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Intrinio } func (s Scanner) Description() string { diff --git a/pkg/detectors/intrinio/intrinio_integration_test.go b/pkg/detectors/intrinio/intrinio_integration_test.go index 3b68683ca012..731ae418086d 100644 --- a/pkg/detectors/intrinio/intrinio_integration_test.go +++ b/pkg/detectors/intrinio/intrinio_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestIntrinio_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestIntrinio_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Intrinio, + DetectorType: detector_typepb.DetectorType_Intrinio, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestIntrinio_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Intrinio, + DetectorType: detector_typepb.DetectorType_Intrinio, Verified: false, }, }, diff --git a/pkg/detectors/invoiceocean/invoiceocean.go b/pkg/detectors/invoiceocean/invoiceocean.go index 56108eb363d3..9ae8875d940e 100644 --- a/pkg/detectors/invoiceocean/invoiceocean.go +++ b/pkg/detectors/invoiceocean/invoiceocean.go @@ -9,10 +9,10 @@ import ( regexp "github.com/wasilibs/go-re2" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) -type Scanner struct{ +type Scanner struct { detectors.DefaultMultiPartCredentialProvider } @@ -47,7 +47,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resURL := strings.TrimSpace(urlMatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_InvoiceOcean, + DetectorType: detector_typepb.DetectorType_InvoiceOcean, Raw: []byte(resMatch), } @@ -73,8 +73,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_InvoiceOcean +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_InvoiceOcean } func (s Scanner) Description() string { diff --git a/pkg/detectors/invoiceocean/invoiceocean_integration_test.go b/pkg/detectors/invoiceocean/invoiceocean_integration_test.go index 0631669aac5b..c5d6ac94b2ea 100644 --- a/pkg/detectors/invoiceocean/invoiceocean_integration_test.go +++ b/pkg/detectors/invoiceocean/invoiceocean_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestInvoiceocean_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestInvoiceocean_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_InvoiceOcean, + DetectorType: detector_typepb.DetectorType_InvoiceOcean, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestInvoiceocean_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_InvoiceOcean, + DetectorType: detector_typepb.DetectorType_InvoiceOcean, Verified: false, }, }, diff --git a/pkg/detectors/ip2location/ip2location.go b/pkg/detectors/ip2location/ip2location.go index 29695fe5e335..cf1507664d98 100644 --- a/pkg/detectors/ip2location/ip2location.go +++ b/pkg/detectors/ip2location/ip2location.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Ip2location, + DetectorType: detector_typepb.DetectorType_Ip2location, Raw: []byte(resMatch), } @@ -72,8 +72,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Ip2location +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Ip2location } func (s Scanner) Description() string { diff --git a/pkg/detectors/ip2location/ip2location_integration_test.go b/pkg/detectors/ip2location/ip2location_integration_test.go index 2e40cdefdfcc..768c728c1ef9 100644 --- a/pkg/detectors/ip2location/ip2location_integration_test.go +++ b/pkg/detectors/ip2location/ip2location_integration_test.go @@ -15,7 +15,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestIp2location_FromChunk(t *testing.T) { @@ -51,7 +51,7 @@ func TestIp2location_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Ip2location, + DetectorType: detector_typepb.DetectorType_Ip2location, Verified: true, }, }, @@ -68,7 +68,7 @@ func TestIp2location_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Ip2location, + DetectorType: detector_typepb.DetectorType_Ip2location, Verified: false, }, }, diff --git a/pkg/detectors/ipapi/ipapi.go b/pkg/detectors/ipapi/ipapi.go index 2f8f944d6fb8..bbabd5ab2439 100644 --- a/pkg/detectors/ipapi/ipapi.go +++ b/pkg/detectors/ipapi/ipapi.go @@ -3,14 +3,15 @@ package ipapi import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "io" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -41,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Ipapi, + DetectorType: detector_typepb.DetectorType_Ipapi, Raw: []byte(resMatch), } @@ -76,8 +77,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Ipapi +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Ipapi } func (s Scanner) Description() string { diff --git a/pkg/detectors/ipapi/ipapi_integration_test.go b/pkg/detectors/ipapi/ipapi_integration_test.go index 4750a530b76c..3901afefd67e 100644 --- a/pkg/detectors/ipapi/ipapi_integration_test.go +++ b/pkg/detectors/ipapi/ipapi_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestIpapi_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestIpapi_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Ipapi, + DetectorType: detector_typepb.DetectorType_Ipapi, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestIpapi_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Ipapi, + DetectorType: detector_typepb.DetectorType_Ipapi, Verified: false, }, }, diff --git a/pkg/detectors/ipgeolocation/ipgeolocation.go b/pkg/detectors/ipgeolocation/ipgeolocation.go index 3c12cae1ee9c..dc73f2fd1ef6 100644 --- a/pkg/detectors/ipgeolocation/ipgeolocation.go +++ b/pkg/detectors/ipgeolocation/ipgeolocation.go @@ -3,13 +3,14 @@ package ipgeolocation import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_IPGeolocation, + DetectorType: detector_typepb.DetectorType_IPGeolocation, Raw: []byte(resMatch), } @@ -64,8 +65,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_IPGeolocation +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_IPGeolocation } func (s Scanner) Description() string { diff --git a/pkg/detectors/ipgeolocation/ipgeolocation_integration_test.go b/pkg/detectors/ipgeolocation/ipgeolocation_integration_test.go index 374d290f196f..edfdb589a336 100644 --- a/pkg/detectors/ipgeolocation/ipgeolocation_integration_test.go +++ b/pkg/detectors/ipgeolocation/ipgeolocation_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestIPGeolocation_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestIPGeolocation_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_IPGeolocation, + DetectorType: detector_typepb.DetectorType_IPGeolocation, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestIPGeolocation_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_IPGeolocation, + DetectorType: detector_typepb.DetectorType_IPGeolocation, Verified: false, }, }, diff --git a/pkg/detectors/ipinfo/ipinfo.go b/pkg/detectors/ipinfo/ipinfo.go index 83b60b8580a7..1079ba82ad10 100644 --- a/pkg/detectors/ipinfo/ipinfo.go +++ b/pkg/detectors/ipinfo/ipinfo.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -42,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_IPInfo, + DetectorType: detector_typepb.DetectorType_IPInfo, Raw: []byte(resMatch), } @@ -77,8 +77,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_IPInfo +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_IPInfo } func (s Scanner) Description() string { diff --git a/pkg/detectors/ipinfo/ipinfo_integration_test.go b/pkg/detectors/ipinfo/ipinfo_integration_test.go index abdcac517986..1d1ccda12f4b 100644 --- a/pkg/detectors/ipinfo/ipinfo_integration_test.go +++ b/pkg/detectors/ipinfo/ipinfo_integration_test.go @@ -15,7 +15,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestIpinfo_FromChunk(t *testing.T) { @@ -51,7 +51,7 @@ func TestIpinfo_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_IPInfo, + DetectorType: detector_typepb.DetectorType_IPInfo, Verified: true, }, }, @@ -68,7 +68,7 @@ func TestIpinfo_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_IPInfo, + DetectorType: detector_typepb.DetectorType_IPInfo, Verified: false, }, }, @@ -97,7 +97,7 @@ func TestIpinfo_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_IPInfo, + DetectorType: detector_typepb.DetectorType_IPInfo, Verified: false, }, }, @@ -114,7 +114,7 @@ func TestIpinfo_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_IPInfo, + DetectorType: detector_typepb.DetectorType_IPInfo, Verified: false, }, }, diff --git a/pkg/detectors/ipinfodb/ipinfodb.go b/pkg/detectors/ipinfodb/ipinfodb.go index 435686bdd3c3..488e1909bbcc 100644 --- a/pkg/detectors/ipinfodb/ipinfodb.go +++ b/pkg/detectors/ipinfodb/ipinfodb.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -42,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_IPinfoDB, + DetectorType: detector_typepb.DetectorType_IPinfoDB, Raw: []byte(resMatch), } @@ -75,8 +75,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_IPinfoDB +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_IPinfoDB } func (s Scanner) Description() string { diff --git a/pkg/detectors/ipinfodb/ipinfodb_integration_test.go b/pkg/detectors/ipinfodb/ipinfodb_integration_test.go index 14c2ec5bf10a..9d4e0657762d 100644 --- a/pkg/detectors/ipinfodb/ipinfodb_integration_test.go +++ b/pkg/detectors/ipinfodb/ipinfodb_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestIPinfoDB_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestIPinfoDB_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_IPinfoDB, + DetectorType: detector_typepb.DetectorType_IPinfoDB, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestIPinfoDB_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_IPinfoDB, + DetectorType: detector_typepb.DetectorType_IPinfoDB, Verified: false, }, }, diff --git a/pkg/detectors/ipquality/ipquality.go b/pkg/detectors/ipquality/ipquality.go index 25c9e3b31f6b..6dcc3d987d27 100644 --- a/pkg/detectors/ipquality/ipquality.go +++ b/pkg/detectors/ipquality/ipquality.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -55,7 +55,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_IPQuality, + DetectorType: detector_typepb.DetectorType_IPQuality, Raw: []byte(resMatch), } @@ -72,8 +72,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_IPQuality +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_IPQuality } func (s Scanner) Description() string { diff --git a/pkg/detectors/ipquality/ipquality_integration_test.go b/pkg/detectors/ipquality/ipquality_integration_test.go index 219742dce668..3f1d8dec3059 100644 --- a/pkg/detectors/ipquality/ipquality_integration_test.go +++ b/pkg/detectors/ipquality/ipquality_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestIpquality_FromChunk(t *testing.T) { @@ -27,7 +27,7 @@ func TestIpquality_FromChunk(t *testing.T) { secret := testSecrets.MustGetField("IPQUALITY") inactiveSecret := testSecrets.MustGetField("IPQUALITY_INACTIVE") - invalidResult := detectors.Result{DetectorType: detectorspb.DetectorType_IPQuality, Verified: false} + invalidResult := detectors.Result{DetectorType: detector_typepb.DetectorType_IPQuality, Verified: false} invalidResult.SetVerificationError(errors.New("couldn't verify; API Key has " + insufficientCreditMessage)) type args struct { @@ -52,7 +52,7 @@ func TestIpquality_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_IPQuality, + DetectorType: detector_typepb.DetectorType_IPQuality, Verified: true, }, }, diff --git a/pkg/detectors/ipstack/ipstack.go b/pkg/detectors/ipstack/ipstack.go index afdfa3ccd62a..1e71d79dd6a3 100644 --- a/pkg/detectors/ipstack/ipstack.go +++ b/pkg/detectors/ipstack/ipstack.go @@ -2,14 +2,15 @@ package ipstack import ( "context" - regexp "github.com/wasilibs/go-re2" "io" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -39,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for _, match := range matches { resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_IpStack, + DetectorType: detector_typepb.DetectorType_IpStack, Raw: []byte(resMatch), } @@ -71,8 +72,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_IpStack +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_IpStack } func (s Scanner) Description() string { diff --git a/pkg/detectors/ipstack/ipstack_integration_test.go b/pkg/detectors/ipstack/ipstack_integration_test.go index 6d64f772a921..3e15c4da8d0f 100644 --- a/pkg/detectors/ipstack/ipstack_integration_test.go +++ b/pkg/detectors/ipstack/ipstack_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestIpStack_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestIpStack_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_IpStack, + DetectorType: detector_typepb.DetectorType_IpStack, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestIpStack_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_IpStack, + DetectorType: detector_typepb.DetectorType_IpStack, Verified: false, }, }, diff --git a/pkg/detectors/jdbc/jdbc.go b/pkg/detectors/jdbc/jdbc.go index e0a249409101..df90917e676b 100644 --- a/pkg/detectors/jdbc/jdbc.go +++ b/pkg/detectors/jdbc/jdbc.go @@ -11,7 +11,7 @@ import ( logContext "github.com/trufflesecurity/trufflehog/v3/pkg/context" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -80,7 +80,7 @@ matchLoop: jdbcConn := match[0] result := detectors.Result{ - DetectorType: detectorspb.DetectorType_JDBC, + DetectorType: detector_typepb.DetectorType_JDBC, Raw: []byte(jdbcConn), Redacted: tryRedactAnonymousJDBC(jdbcConn), } @@ -260,8 +260,8 @@ func pingErr(ctx context.Context, driverName, conn string) error { return nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_JDBC +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_JDBC } func (s Scanner) Description() string { diff --git a/pkg/detectors/jdbc/jdbc_integration_test.go b/pkg/detectors/jdbc/jdbc_integration_test.go index f1a3900296f4..db5709af97f7 100644 --- a/pkg/detectors/jdbc/jdbc_integration_test.go +++ b/pkg/detectors/jdbc/jdbc_integration_test.go @@ -20,7 +20,7 @@ import ( "github.com/testcontainers/testcontainers-go/modules/postgres" "github.com/testcontainers/testcontainers-go/wait" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestJdbcVerified(t *testing.T) { @@ -121,7 +121,7 @@ func TestJdbcVerified(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_JDBC, + DetectorType: detector_typepb.DetectorType_JDBC, Verified: true, Redacted: fmt.Sprintf("jdbc:postgresql://%s:%s/%s?sslmode=disable&password=%s&user=%s", postgresHost, postgresPort.Port(), postgresDB, strings.Repeat("*", len(postgresPass)), postgresUser), @@ -143,7 +143,7 @@ func TestJdbcVerified(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_JDBC, + DetectorType: detector_typepb.DetectorType_JDBC, Verified: true, Redacted: fmt.Sprintf(`jdbc:mysql://%s:%s@tcp(%s:%s)/%s`, mysqlUser, strings.Repeat("*", len(mysqlPass)), mysqlHost, mysqlPort.Port(), mysqlDatabase), @@ -165,7 +165,7 @@ func TestJdbcVerified(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_JDBC, + DetectorType: detector_typepb.DetectorType_JDBC, Verified: true, Redacted: fmt.Sprintf("jdbc:sqlserver://odbc:server=%s;port=%s;database=%s;password=%s", sqlServerHost, sqlServerPort.Port(), sqlServerDatabase, strings.Repeat("*", len(sqlServerPass))), @@ -224,7 +224,7 @@ func TestJdbc_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_JDBC, + DetectorType: detector_typepb.DetectorType_JDBC, Verified: false, Redacted: "jdbc:mysql://hello.test.us-east-1.rds.amazonaws.com:3306/testdb?password=************", }, @@ -240,7 +240,7 @@ func TestJdbc_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_JDBC, + DetectorType: detector_typepb.DetectorType_JDBC, Verified: false, Redacted: "jdbc:postgresql://host:5342/testdb?password=******", }, @@ -266,7 +266,7 @@ func TestJdbc_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_JDBC, + DetectorType: detector_typepb.DetectorType_JDBC, Verified: false, Redacted: "jdbc:postgres://hello.test.us-east-1.rds.amazonaws.com:3306/testdb?password=************", }, @@ -282,7 +282,7 @@ func TestJdbc_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_JDBC, + DetectorType: detector_typepb.DetectorType_JDBC, Verified: false, Redacted: "jdbc:postgres://hello.test.us-east-1.rds.amazonaws.com:3306/testdb?password=************", }, @@ -298,7 +298,7 @@ func TestJdbc_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_JDBC, + DetectorType: detector_typepb.DetectorType_JDBC, Verified: false, Redacted: "jdbc:sqlserver://a.b.c.net;database=database-name;spring.datasource.password=*********************", }, diff --git a/pkg/detectors/jiratoken/v1/jiratoken.go b/pkg/detectors/jiratoken/v1/jiratoken.go index a2a8c736993f..47b135a9296c 100644 --- a/pkg/detectors/jiratoken/v1/jiratoken.go +++ b/pkg/detectors/jiratoken/v1/jiratoken.go @@ -15,7 +15,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/cache/simple" "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -98,7 +98,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_JiraToken, + DetectorType: detector_typepb.DetectorType_JiraToken, Raw: []byte(token), RawV2: []byte(fmt.Sprintf("%s:%s:%s", email, token, domain)), ExtraData: map[string]string{ @@ -181,8 +181,8 @@ func VerifyJiraToken(ctx context.Context, client *http.Client, email, domain, to } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_JiraToken +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_JiraToken } func (s Scanner) Description() string { diff --git a/pkg/detectors/jiratoken/v1/jiratoken_integration_test.go b/pkg/detectors/jiratoken/v1/jiratoken_integration_test.go index aa6db9b8e0ce..cb97bf9626d2 100644 --- a/pkg/detectors/jiratoken/v1/jiratoken_integration_test.go +++ b/pkg/detectors/jiratoken/v1/jiratoken_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestJiraToken_FromChunk(t *testing.T) { @@ -52,7 +52,7 @@ func TestJiraToken_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_JiraToken, + DetectorType: detector_typepb.DetectorType_JiraToken, Verified: true, ExtraData: map[string]string{ "rotation_guide": "https://howtorotate.com/docs/tutorials/atlassian/", @@ -73,7 +73,7 @@ func TestJiraToken_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_JiraToken, + DetectorType: detector_typepb.DetectorType_JiraToken, Verified: false, ExtraData: map[string]string{ "rotation_guide": "https://howtorotate.com/docs/tutorials/atlassian/", @@ -106,7 +106,7 @@ func TestJiraToken_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_JiraToken, + DetectorType: detector_typepb.DetectorType_JiraToken, Verified: false, ExtraData: map[string]string{ "rotation_guide": "https://howtorotate.com/docs/tutorials/atlassian/", @@ -127,7 +127,7 @@ func TestJiraToken_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_JiraToken, + DetectorType: detector_typepb.DetectorType_JiraToken, Verified: false, ExtraData: map[string]string{ "rotation_guide": "https://howtorotate.com/docs/tutorials/atlassian/", diff --git a/pkg/detectors/jiratoken/v2/jiratoken_v2.go b/pkg/detectors/jiratoken/v2/jiratoken_v2.go index cddfa9a4532e..b39728fb2421 100644 --- a/pkg/detectors/jiratoken/v2/jiratoken_v2.go +++ b/pkg/detectors/jiratoken/v2/jiratoken_v2.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" v1 "github.com/trufflesecurity/trufflehog/v3/pkg/detectors/jiratoken/v1" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -76,7 +76,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for token := range uniqueTokens { for domain := range uniqueDomains { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_JiraToken, + DetectorType: detector_typepb.DetectorType_JiraToken, Raw: []byte(token), RawV2: []byte(fmt.Sprintf("%s:%s:%s", email, token, domain)), ExtraData: map[string]string{ @@ -100,8 +100,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_JiraToken +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_JiraToken } func (s Scanner) Description() string { diff --git a/pkg/detectors/jiratoken/v2/jiratoken_v2_integration_test.go b/pkg/detectors/jiratoken/v2/jiratoken_v2_integration_test.go index 6bf2ee3b252d..d72a7f331170 100644 --- a/pkg/detectors/jiratoken/v2/jiratoken_v2_integration_test.go +++ b/pkg/detectors/jiratoken/v2/jiratoken_v2_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestJiraToken_FromChunk(t *testing.T) { @@ -52,7 +52,7 @@ func TestJiraToken_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_JiraToken, + DetectorType: detector_typepb.DetectorType_JiraToken, Verified: true, ExtraData: map[string]string{ "rotation_guide": "https://howtorotate.com/docs/tutorials/atlassian/", @@ -73,7 +73,7 @@ func TestJiraToken_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_JiraToken, + DetectorType: detector_typepb.DetectorType_JiraToken, Verified: false, ExtraData: map[string]string{ "rotation_guide": "https://howtorotate.com/docs/tutorials/atlassian/", @@ -106,7 +106,7 @@ func TestJiraToken_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_JiraToken, + DetectorType: detector_typepb.DetectorType_JiraToken, Verified: false, ExtraData: map[string]string{ "rotation_guide": "https://howtorotate.com/docs/tutorials/atlassian/", @@ -127,7 +127,7 @@ func TestJiraToken_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_JiraToken, + DetectorType: detector_typepb.DetectorType_JiraToken, Verified: false, ExtraData: map[string]string{ "rotation_guide": "https://howtorotate.com/docs/tutorials/atlassian/", diff --git a/pkg/detectors/jotform/jotform.go b/pkg/detectors/jotform/jotform.go index dfaf133892c1..b62bff8a11e1 100644 --- a/pkg/detectors/jotform/jotform.go +++ b/pkg/detectors/jotform/jotform.go @@ -2,13 +2,14 @@ package jotform import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -39,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Jotform, + DetectorType: detector_typepb.DetectorType_Jotform, Raw: []byte(resMatch), } @@ -64,8 +65,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Jotform +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Jotform } func (s Scanner) Description() string { diff --git a/pkg/detectors/jotform/jotform_integration_test.go b/pkg/detectors/jotform/jotform_integration_test.go index 5f2674932c0d..aad849871248 100644 --- a/pkg/detectors/jotform/jotform_integration_test.go +++ b/pkg/detectors/jotform/jotform_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestJotform_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestJotform_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Jotform, + DetectorType: detector_typepb.DetectorType_Jotform, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestJotform_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Jotform, + DetectorType: detector_typepb.DetectorType_Jotform, Verified: false, }, }, diff --git a/pkg/detectors/jumpcloud/jumpcloud.go b/pkg/detectors/jumpcloud/jumpcloud.go index 098e47e75f61..8f3f548c87bd 100644 --- a/pkg/detectors/jumpcloud/jumpcloud.go +++ b/pkg/detectors/jumpcloud/jumpcloud.go @@ -2,13 +2,14 @@ package jumpcloud import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -38,7 +39,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for _, match := range matches { resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Jumpcloud, + DetectorType: detector_typepb.DetectorType_Jumpcloud, Raw: []byte(resMatch), } @@ -64,8 +65,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Jumpcloud +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Jumpcloud } func (s Scanner) Description() string { diff --git a/pkg/detectors/jumpcloud/jumpcloud_integration_test.go b/pkg/detectors/jumpcloud/jumpcloud_integration_test.go index fe9dfbc0487f..5a3f7146ae0d 100644 --- a/pkg/detectors/jumpcloud/jumpcloud_integration_test.go +++ b/pkg/detectors/jumpcloud/jumpcloud_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestJumpcloud_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestJumpcloud_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Jumpcloud, + DetectorType: detector_typepb.DetectorType_Jumpcloud, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestJumpcloud_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Jumpcloud, + DetectorType: detector_typepb.DetectorType_Jumpcloud, Verified: false, }, }, diff --git a/pkg/detectors/jupiterone/jupiterone.go b/pkg/detectors/jupiterone/jupiterone.go index 9fec23f63f49..a7346d88f1c8 100644 --- a/pkg/detectors/jupiterone/jupiterone.go +++ b/pkg/detectors/jupiterone/jupiterone.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -42,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_JupiterOne, + DetectorType: detector_typepb.DetectorType_JupiterOne, Raw: []byte(resMatch), } @@ -86,8 +86,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_JupiterOne +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_JupiterOne } func (s Scanner) Description() string { diff --git a/pkg/detectors/jupiterone/jupiterone_integration_test.go b/pkg/detectors/jupiterone/jupiterone_integration_test.go index c3a66395bb18..8b9a9c8fbdb0 100644 --- a/pkg/detectors/jupiterone/jupiterone_integration_test.go +++ b/pkg/detectors/jupiterone/jupiterone_integration_test.go @@ -15,7 +15,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestJupiterone_FromChunk(t *testing.T) { @@ -51,7 +51,7 @@ func TestJupiterone_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_JupiterOne, + DetectorType: detector_typepb.DetectorType_JupiterOne, Verified: true, }, }, @@ -68,7 +68,7 @@ func TestJupiterone_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_JupiterOne, + DetectorType: detector_typepb.DetectorType_JupiterOne, Verified: false, }, }, @@ -97,7 +97,7 @@ func TestJupiterone_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_JupiterOne, + DetectorType: detector_typepb.DetectorType_JupiterOne, Verified: false, }, }, @@ -114,7 +114,7 @@ func TestJupiterone_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_JupiterOne, + DetectorType: detector_typepb.DetectorType_JupiterOne, Verified: false, }, }, diff --git a/pkg/detectors/juro/juro.go b/pkg/detectors/juro/juro.go index f89a88760bfe..470c008d8d0c 100644 --- a/pkg/detectors/juro/juro.go +++ b/pkg/detectors/juro/juro.go @@ -2,13 +2,14 @@ package juro import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -39,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Juro, + DetectorType: detector_typepb.DetectorType_Juro, Raw: []byte(resMatch), } @@ -64,8 +65,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Juro +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Juro } func (s Scanner) Description() string { diff --git a/pkg/detectors/juro/juro_integration_test.go b/pkg/detectors/juro/juro_integration_test.go index 682aed80ed00..833223926f9c 100644 --- a/pkg/detectors/juro/juro_integration_test.go +++ b/pkg/detectors/juro/juro_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestJuro_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestJuro_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Juro, + DetectorType: detector_typepb.DetectorType_Juro, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestJuro_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Juro, + DetectorType: detector_typepb.DetectorType_Juro, Verified: false, }, }, diff --git a/pkg/detectors/jwt/jwt.go b/pkg/detectors/jwt/jwt.go index 8915a8b69567..8c2b975ca280 100644 --- a/pkg/detectors/jwt/jwt.go +++ b/pkg/detectors/jwt/jwt.go @@ -16,7 +16,7 @@ import ( regexp "github.com/wasilibs/go-re2" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -132,7 +132,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_JWT, + DetectorType: detector_typepb.DetectorType_JWT, Raw: []byte(match), ExtraData: extraData, } @@ -282,8 +282,8 @@ func verifyJWT(ctx context.Context, client *http.Client, tokenParts []string, pa return true, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_JWT +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_JWT } func (s Scanner) Description() string { diff --git a/pkg/detectors/kanban/kanban.go b/pkg/detectors/kanban/kanban.go index ba89de8db53b..e8f6b746aa31 100644 --- a/pkg/detectors/kanban/kanban.go +++ b/pkg/detectors/kanban/kanban.go @@ -9,10 +9,10 @@ import ( regexp "github.com/wasilibs/go-re2" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) -type Scanner struct{ +type Scanner struct { detectors.DefaultMultiPartCredentialProvider } @@ -46,7 +46,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resURL := strings.TrimSpace(urlMatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Kanban, + DetectorType: detector_typepb.DetectorType_Kanban, Raw: []byte(resMatch), } @@ -73,8 +73,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Kanban +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Kanban } func (s Scanner) Description() string { diff --git a/pkg/detectors/kanban/kanban_integration_test.go b/pkg/detectors/kanban/kanban_integration_test.go index 7f3bc6c10704..9eebbdc99705 100644 --- a/pkg/detectors/kanban/kanban_integration_test.go +++ b/pkg/detectors/kanban/kanban_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestKanban_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestKanban_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Kanban, + DetectorType: detector_typepb.DetectorType_Kanban, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestKanban_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Kanban, + DetectorType: detector_typepb.DetectorType_Kanban, Verified: false, }, }, diff --git a/pkg/detectors/kanbantool/kanbantool.go b/pkg/detectors/kanbantool/kanbantool.go index bca4fc8210a8..c1cb316729f0 100644 --- a/pkg/detectors/kanbantool/kanbantool.go +++ b/pkg/detectors/kanbantool/kanbantool.go @@ -9,7 +9,7 @@ import ( regexp "github.com/wasilibs/go-re2" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -46,7 +46,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resIdMatch := strings.TrimSpace(idMatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Kanbantool, + DetectorType: detector_typepb.DetectorType_Kanbantool, Raw: []byte(resMatch), } if verify { @@ -73,8 +73,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Kanbantool +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Kanbantool } func (s Scanner) Description() string { diff --git a/pkg/detectors/kanbantool/kanbantool_integration_test.go b/pkg/detectors/kanbantool/kanbantool_integration_test.go index 9562cad657dd..d7caf1bb1fed 100644 --- a/pkg/detectors/kanbantool/kanbantool_integration_test.go +++ b/pkg/detectors/kanbantool/kanbantool_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestKanbantool_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestKanbantool_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Kanbantool, + DetectorType: detector_typepb.DetectorType_Kanbantool, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestKanbantool_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Kanbantool, + DetectorType: detector_typepb.DetectorType_Kanbantool, Verified: false, }, }, diff --git a/pkg/detectors/karmacrm/karmacrm.go b/pkg/detectors/karmacrm/karmacrm.go index d32381c351f1..84472a1b003a 100644 --- a/pkg/detectors/karmacrm/karmacrm.go +++ b/pkg/detectors/karmacrm/karmacrm.go @@ -3,13 +3,14 @@ package karmacrm import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_KarmaCRM, + DetectorType: detector_typepb.DetectorType_KarmaCRM, Raw: []byte(resMatch), } @@ -66,8 +67,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_KarmaCRM +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_KarmaCRM } func (s Scanner) Description() string { diff --git a/pkg/detectors/karmacrm/karmacrm_integration_test.go b/pkg/detectors/karmacrm/karmacrm_integration_test.go index f072a58c0b37..ffb049e1ff4d 100644 --- a/pkg/detectors/karmacrm/karmacrm_integration_test.go +++ b/pkg/detectors/karmacrm/karmacrm_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestKarmaCRM_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestKarmaCRM_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_KarmaCRM, + DetectorType: detector_typepb.DetectorType_KarmaCRM, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestKarmaCRM_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_KarmaCRM, + DetectorType: detector_typepb.DetectorType_KarmaCRM, Verified: false, }, }, diff --git a/pkg/detectors/keenio/keenio.go b/pkg/detectors/keenio/keenio.go index bb8e2b529d0e..eb9b2167accc 100644 --- a/pkg/detectors/keenio/keenio.go +++ b/pkg/detectors/keenio/keenio.go @@ -2,13 +2,14 @@ package keenio import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -46,7 +47,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resIdMatch := strings.TrimSpace(idmatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_KeenIO, + DetectorType: detector_typepb.DetectorType_KeenIO, Raw: []byte(resMatch), } @@ -74,8 +75,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_KeenIO +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_KeenIO } func (s Scanner) Description() string { diff --git a/pkg/detectors/keenio/keenio_integration_test.go b/pkg/detectors/keenio/keenio_integration_test.go index 4275158c0017..6403dc9c32a4 100644 --- a/pkg/detectors/keenio/keenio_integration_test.go +++ b/pkg/detectors/keenio/keenio_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestKeenIO_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestKeenIO_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_KeenIO, + DetectorType: detector_typepb.DetectorType_KeenIO, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestKeenIO_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_KeenIO, + DetectorType: detector_typepb.DetectorType_KeenIO, Verified: false, }, }, diff --git a/pkg/detectors/kickbox/kickbox.go b/pkg/detectors/kickbox/kickbox.go index 3272d5828329..44a87e9c3620 100644 --- a/pkg/detectors/kickbox/kickbox.go +++ b/pkg/detectors/kickbox/kickbox.go @@ -2,13 +2,14 @@ package kickbox import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -39,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Kickbox, + DetectorType: detector_typepb.DetectorType_Kickbox, Raw: []byte(resMatch), } @@ -63,8 +64,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Kickbox +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Kickbox } func (s Scanner) Description() string { diff --git a/pkg/detectors/kickbox/kickbox_integration_test.go b/pkg/detectors/kickbox/kickbox_integration_test.go index 9827199929f8..2e6f7306659e 100644 --- a/pkg/detectors/kickbox/kickbox_integration_test.go +++ b/pkg/detectors/kickbox/kickbox_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestKickbox_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestKickbox_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Kickbox, + DetectorType: detector_typepb.DetectorType_Kickbox, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestKickbox_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Kickbox, + DetectorType: detector_typepb.DetectorType_Kickbox, Verified: false, }, }, diff --git a/pkg/detectors/klaviyo/klaviyo.go b/pkg/detectors/klaviyo/klaviyo.go index 9d934a96db70..5f8ed7daeecc 100644 --- a/pkg/detectors/klaviyo/klaviyo.go +++ b/pkg/detectors/klaviyo/klaviyo.go @@ -4,13 +4,14 @@ import ( "context" "encoding/json" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -55,7 +56,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Klaviyo, + DetectorType: detector_typepb.DetectorType_Klaviyo, Raw: []byte(resMatch), } @@ -107,8 +108,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Klaviyo +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Klaviyo } func (s Scanner) Description() string { diff --git a/pkg/detectors/klaviyo/klaviyo_integration_test.go b/pkg/detectors/klaviyo/klaviyo_integration_test.go index 1ade9e751f82..c7d2fbe1c017 100644 --- a/pkg/detectors/klaviyo/klaviyo_integration_test.go +++ b/pkg/detectors/klaviyo/klaviyo_integration_test.go @@ -15,7 +15,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestKlaviyo_FromChunk(t *testing.T) { @@ -51,7 +51,7 @@ func TestKlaviyo_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Klaviyo, + DetectorType: detector_typepb.DetectorType_Klaviyo, Verified: true, }, }, @@ -68,7 +68,7 @@ func TestKlaviyo_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Klaviyo, + DetectorType: detector_typepb.DetectorType_Klaviyo, Verified: false, }, }, @@ -97,7 +97,7 @@ func TestKlaviyo_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Klaviyo, + DetectorType: detector_typepb.DetectorType_Klaviyo, Verified: false, }, }, @@ -114,7 +114,7 @@ func TestKlaviyo_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Klaviyo, + DetectorType: detector_typepb.DetectorType_Klaviyo, Verified: false, }, }, diff --git a/pkg/detectors/klipfolio/klipfolio.go b/pkg/detectors/klipfolio/klipfolio.go index 7b55dcce4412..1bd563061b13 100644 --- a/pkg/detectors/klipfolio/klipfolio.go +++ b/pkg/detectors/klipfolio/klipfolio.go @@ -2,13 +2,14 @@ package klipfolio import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -39,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Klipfolio, + DetectorType: detector_typepb.DetectorType_Klipfolio, Raw: []byte(resMatch), } @@ -64,8 +65,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Klipfolio +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Klipfolio } func (s Scanner) Description() string { diff --git a/pkg/detectors/klipfolio/klipfolio_integration_test.go b/pkg/detectors/klipfolio/klipfolio_integration_test.go index 5cde6d3458f0..7b18d271ff92 100644 --- a/pkg/detectors/klipfolio/klipfolio_integration_test.go +++ b/pkg/detectors/klipfolio/klipfolio_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestKlipfolio_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestKlipfolio_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Klipfolio, + DetectorType: detector_typepb.DetectorType_Klipfolio, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestKlipfolio_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Klipfolio, + DetectorType: detector_typepb.DetectorType_Klipfolio, Verified: false, }, }, diff --git a/pkg/detectors/knapsackpro/knapsackpro.go b/pkg/detectors/knapsackpro/knapsackpro.go index fa3e1d3eff84..d7f997f51683 100644 --- a/pkg/detectors/knapsackpro/knapsackpro.go +++ b/pkg/detectors/knapsackpro/knapsackpro.go @@ -2,13 +2,14 @@ package knapsackpro import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -39,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_KnapsackPro, + DetectorType: detector_typepb.DetectorType_KnapsackPro, Raw: []byte(resMatch), } @@ -66,8 +67,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_KnapsackPro +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_KnapsackPro } func (s Scanner) Description() string { diff --git a/pkg/detectors/knapsackpro/knapsackpro_integration_test.go b/pkg/detectors/knapsackpro/knapsackpro_integration_test.go index 84f746efe10b..9192aeea1b28 100644 --- a/pkg/detectors/knapsackpro/knapsackpro_integration_test.go +++ b/pkg/detectors/knapsackpro/knapsackpro_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestKnapsackPro_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestKnapsackPro_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_KnapsackPro, + DetectorType: detector_typepb.DetectorType_KnapsackPro, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestKnapsackPro_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_KnapsackPro, + DetectorType: detector_typepb.DetectorType_KnapsackPro, Verified: false, }, }, diff --git a/pkg/detectors/kontent/kontent.go b/pkg/detectors/kontent/kontent.go index 06c09eb45c52..051cb85a1c28 100644 --- a/pkg/detectors/kontent/kontent.go +++ b/pkg/detectors/kontent/kontent.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -60,7 +60,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for apiKey := range uniqueAPIKeys { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Kontent, + DetectorType: detector_typepb.DetectorType_Kontent, Raw: []byte(envID), RawV2: []byte(envID + apiKey), } @@ -78,8 +78,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Kontent +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Kontent } func (s Scanner) Description() string { diff --git a/pkg/detectors/kontent/kontent_integration_test.go b/pkg/detectors/kontent/kontent_integration_test.go index 2554e4cc075b..9059c276fecb 100644 --- a/pkg/detectors/kontent/kontent_integration_test.go +++ b/pkg/detectors/kontent/kontent_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestKontent_FromChunk(t *testing.T) { @@ -50,7 +50,7 @@ func TestKontent_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Kontent, + DetectorType: detector_typepb.DetectorType_Kontent, Verified: true, }, }, @@ -66,7 +66,7 @@ func TestKontent_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Kontent, + DetectorType: detector_typepb.DetectorType_Kontent, Verified: false, }, }, diff --git a/pkg/detectors/kraken/kraken.go b/pkg/detectors/kraken/kraken.go index 673bf71bb0e2..20488cd0d0fc 100644 --- a/pkg/detectors/kraken/kraken.go +++ b/pkg/detectors/kraken/kraken.go @@ -17,7 +17,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -56,7 +56,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resPrivKeyMatch := strings.TrimSpace(privKeyMatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Kraken, + DetectorType: detector_typepb.DetectorType_Kraken, Raw: []byte(resMatch), RawV2: []byte(resMatch + resPrivKeyMatch), } @@ -111,8 +111,8 @@ func getKrakenSignature(url_path string, values url.Values, secret []byte) strin return base64.StdEncoding.EncodeToString(macsum) } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Kraken +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Kraken } func (s Scanner) Description() string { diff --git a/pkg/detectors/kraken/kraken_integration_test.go b/pkg/detectors/kraken/kraken_integration_test.go index 2a6de9a01625..12157ca1ea6b 100644 --- a/pkg/detectors/kraken/kraken_integration_test.go +++ b/pkg/detectors/kraken/kraken_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestKraken_FromChunk(t *testing.T) { @@ -50,7 +50,7 @@ func TestKraken_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Kraken, + DetectorType: detector_typepb.DetectorType_Kraken, Verified: true, }, }, @@ -66,7 +66,7 @@ func TestKraken_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Kraken, + DetectorType: detector_typepb.DetectorType_Kraken, Verified: false, }, }, diff --git a/pkg/detectors/kucoin/kucoin.go b/pkg/detectors/kucoin/kucoin.go index e8f7291d816e..da63410fd98b 100644 --- a/pkg/detectors/kucoin/kucoin.go +++ b/pkg/detectors/kucoin/kucoin.go @@ -5,18 +5,19 @@ import ( "crypto/hmac" "crypto/sha256" "encoding/base64" - regexp "github.com/wasilibs/go-re2" "net/http" "strconv" "strings" "time" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) -type Scanner struct{ +type Scanner struct { detectors.DefaultMultiPartCredentialProvider } @@ -56,7 +57,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resPassphraseMatch := strings.TrimSpace(passphraseMatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_KuCoin, + DetectorType: detector_typepb.DetectorType_KuCoin, Raw: []byte(resKeyMatch), RawV2: []byte(resKeyMatch + resPassphraseMatch), } @@ -116,8 +117,8 @@ func getKucoinSignature(apiSecret string, timestamp string, method string, endpo return base64.StdEncoding.EncodeToString(macsum) } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_KuCoin +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_KuCoin } func (s Scanner) Description() string { diff --git a/pkg/detectors/kucoin/kucoin_integration_test.go b/pkg/detectors/kucoin/kucoin_integration_test.go index a6e833b7a74d..a0b6406bf351 100644 --- a/pkg/detectors/kucoin/kucoin_integration_test.go +++ b/pkg/detectors/kucoin/kucoin_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestKuCoin_FromChunk(t *testing.T) { @@ -52,7 +52,7 @@ func TestKuCoin_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_KuCoin, + DetectorType: detector_typepb.DetectorType_KuCoin, Verified: true, }, }, @@ -68,7 +68,7 @@ func TestKuCoin_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_KuCoin, + DetectorType: detector_typepb.DetectorType_KuCoin, Verified: false, }, }, diff --git a/pkg/detectors/kylas/kylas.go b/pkg/detectors/kylas/kylas.go index b7e1534312f1..47f464d0739d 100644 --- a/pkg/detectors/kylas/kylas.go +++ b/pkg/detectors/kylas/kylas.go @@ -2,13 +2,14 @@ package kylas import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -39,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Kylas, + DetectorType: detector_typepb.DetectorType_Kylas, Raw: []byte(resMatch), } @@ -65,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Kylas +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Kylas } func (s Scanner) Description() string { diff --git a/pkg/detectors/kylas/kylas_integration_test.go b/pkg/detectors/kylas/kylas_integration_test.go index 613363dcf4c9..4073a297885a 100644 --- a/pkg/detectors/kylas/kylas_integration_test.go +++ b/pkg/detectors/kylas/kylas_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestKylas_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestKylas_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Kylas, + DetectorType: detector_typepb.DetectorType_Kylas, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestKylas_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Kylas, + DetectorType: detector_typepb.DetectorType_Kylas, Verified: false, }, }, diff --git a/pkg/detectors/langfuse/langfuse.go b/pkg/detectors/langfuse/langfuse.go index a0067cd48d1f..c9e5a51351f1 100755 --- a/pkg/detectors/langfuse/langfuse.go +++ b/pkg/detectors/langfuse/langfuse.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -22,8 +22,8 @@ var _ detectors.Detector = (*Scanner)(nil) var ( defaultClient = common.SaneHttpClient() - publicKey = regexp.MustCompile(detectors.PrefixRegex([]string{"langfuse"}) + `\b(pk-lf-[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})\b`) - secretKey = regexp.MustCompile(detectors.PrefixRegex([]string{"langfuse"}) + `\b(sk-lf-[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})\b`) + publicKey = regexp.MustCompile(detectors.PrefixRegex([]string{"langfuse"}) + `\b(pk-lf-[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})\b`) + secretKey = regexp.MustCompile(detectors.PrefixRegex([]string{"langfuse"}) + `\b(sk-lf-[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})\b`) ) func (s Scanner) Keywords() []string { @@ -47,7 +47,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for pkMatch := range publicKeyMatches { for skMatch := range secretKeyMatches { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Langfuse, + DetectorType: detector_typepb.DetectorType_Langfuse, Raw: []byte(skMatch), } @@ -97,8 +97,8 @@ func verifyMatch(ctx context.Context, client *http.Client, pkMatch string, skMat } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Langfuse +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Langfuse } func (s Scanner) Description() string { diff --git a/pkg/detectors/langfuse/langfuse_integration_test.go b/pkg/detectors/langfuse/langfuse_integration_test.go index d462b178c76c..1d98729dcc30 100644 --- a/pkg/detectors/langfuse/langfuse_integration_test.go +++ b/pkg/detectors/langfuse/langfuse_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestLangfuse_FromChunk(t *testing.T) { @@ -29,7 +29,6 @@ func TestLangfuse_FromChunk(t *testing.T) { inactivePublicKey := testSecrets.MustGetField("LANGFUSE_INACTIVE_PUBLIC_KEY") inactiveSecretKey := testSecrets.MustGetField("LANGFUSE_INACTIVE_SECRET_KEY") - type args struct { ctx context.Context data []byte @@ -53,7 +52,7 @@ func TestLangfuse_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Langfuse, + DetectorType: detector_typepb.DetectorType_Langfuse, Verified: true, }, }, @@ -70,7 +69,7 @@ func TestLangfuse_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Langfuse, + DetectorType: detector_typepb.DetectorType_Langfuse, Verified: false, }, }, @@ -99,7 +98,7 @@ func TestLangfuse_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Langfuse, + DetectorType: detector_typepb.DetectorType_Langfuse, Verified: false, }, }, @@ -116,7 +115,7 @@ func TestLangfuse_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Langfuse, + DetectorType: detector_typepb.DetectorType_Langfuse, Verified: false, }, }, diff --git a/pkg/detectors/langsmith/langsmith.go b/pkg/detectors/langsmith/langsmith.go index 5314b9ecba9b..c5e4cf0643d5 100644 --- a/pkg/detectors/langsmith/langsmith.go +++ b/pkg/detectors/langsmith/langsmith.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -43,7 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for apiKey := range uniqueAPIKeys { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_LangSmith, + DetectorType: detector_typepb.DetectorType_LangSmith, Raw: []byte(apiKey), } @@ -91,8 +91,8 @@ func verifyMatch(ctx context.Context, client *http.Client, apiKey string) (bool, } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_LangSmith +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_LangSmith } func (s Scanner) Description() string { diff --git a/pkg/detectors/langsmith/langsmith_integration_test.go b/pkg/detectors/langsmith/langsmith_integration_test.go index 44c9f904d1e6..d0968f7b8037 100644 --- a/pkg/detectors/langsmith/langsmith_integration_test.go +++ b/pkg/detectors/langsmith/langsmith_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestLangsmith_FromChunk(t *testing.T) { @@ -50,7 +50,7 @@ func TestLangsmith_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_LangSmith, + DetectorType: detector_typepb.DetectorType_LangSmith, Verified: true, }, }, @@ -67,7 +67,7 @@ func TestLangsmith_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_LangSmith, + DetectorType: detector_typepb.DetectorType_LangSmith, Verified: false, }, }, diff --git a/pkg/detectors/languagelayer/languagelayer.go b/pkg/detectors/languagelayer/languagelayer.go index 9ceee6dea70c..2263e163c2ee 100644 --- a/pkg/detectors/languagelayer/languagelayer.go +++ b/pkg/detectors/languagelayer/languagelayer.go @@ -3,14 +3,15 @@ package languagelayer import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "io" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -41,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_LanguageLayer, + DetectorType: detector_typepb.DetectorType_LanguageLayer, Raw: []byte(resMatch), } @@ -74,8 +75,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_LanguageLayer +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_LanguageLayer } func (s Scanner) Description() string { diff --git a/pkg/detectors/languagelayer/languagelayer_integration_test.go b/pkg/detectors/languagelayer/languagelayer_integration_test.go index 56083fa13d24..423e6eee8d43 100644 --- a/pkg/detectors/languagelayer/languagelayer_integration_test.go +++ b/pkg/detectors/languagelayer/languagelayer_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestLanguageLayer_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestLanguageLayer_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_LanguageLayer, + DetectorType: detector_typepb.DetectorType_LanguageLayer, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestLanguageLayer_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_LanguageLayer, + DetectorType: detector_typepb.DetectorType_LanguageLayer, Verified: false, }, }, diff --git a/pkg/detectors/larksuite/larksuite.go b/pkg/detectors/larksuite/larksuite.go index ebd18fe936cf..da14de5466a1 100644 --- a/pkg/detectors/larksuite/larksuite.go +++ b/pkg/detectors/larksuite/larksuite.go @@ -12,7 +12,7 @@ import ( regexp "github.com/wasilibs/go-re2" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" "github.com/trufflesecurity/trufflehog/v3/pkg/common" ) @@ -82,8 +82,8 @@ func (s Scanner) Keywords() []string { return []string{"lark", "larksuite"} } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_LarkSuite +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_LarkSuite } func (s Scanner) Description() string { @@ -102,7 +102,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for token := range uniqueMatches { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_LarkSuite, + DetectorType: detector_typepb.DetectorType_LarkSuite, Raw: []byte(token), } s1.ExtraData = map[string]string{ diff --git a/pkg/detectors/larksuite/larksuite_integration_test.go b/pkg/detectors/larksuite/larksuite_integration_test.go index c98fd813d663..ca38491e06b5 100644 --- a/pkg/detectors/larksuite/larksuite_integration_test.go +++ b/pkg/detectors/larksuite/larksuite_integration_test.go @@ -12,7 +12,7 @@ import ( "github.com/kylelemons/godebug/pretty" "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestLarksuite_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestLarksuite_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_LarkSuite, + DetectorType: detector_typepb.DetectorType_LarkSuite, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestLarksuite_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_LarkSuite, + DetectorType: detector_typepb.DetectorType_LarkSuite, Verified: true, }, }, @@ -80,7 +80,7 @@ func TestLarksuite_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_LarkSuite, + DetectorType: detector_typepb.DetectorType_LarkSuite, Verified: false, }, }, diff --git a/pkg/detectors/larksuiteapikey/larksuiteapikey.go b/pkg/detectors/larksuiteapikey/larksuiteapikey.go index bf6adee1bd02..12c154f753e7 100644 --- a/pkg/detectors/larksuiteapikey/larksuiteapikey.go +++ b/pkg/detectors/larksuiteapikey/larksuiteapikey.go @@ -12,7 +12,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -57,7 +57,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resSecretMatch := strings.TrimSpace(appSecret) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_LarkSuiteApiKey, + DetectorType: detector_typepb.DetectorType_LarkSuiteApiKey, Raw: []byte(resMatch), RawV2: []byte(resMatch + resSecretMatch), } @@ -79,8 +79,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_LarkSuiteApiKey +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_LarkSuiteApiKey } func (s Scanner) Description() string { diff --git a/pkg/detectors/larksuiteapikey/larksuiteapikey_integration_test.go b/pkg/detectors/larksuiteapikey/larksuiteapikey_integration_test.go index c4ca9049ee2f..8193d3e2db7a 100644 --- a/pkg/detectors/larksuiteapikey/larksuiteapikey_integration_test.go +++ b/pkg/detectors/larksuiteapikey/larksuiteapikey_integration_test.go @@ -12,7 +12,7 @@ import ( "github.com/kylelemons/godebug/pretty" "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestLarksuiteApiKey_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestLarksuiteApiKey_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_LarkSuiteApiKey, + DetectorType: detector_typepb.DetectorType_LarkSuiteApiKey, Verified: true, Raw: []byte(id), RawV2: []byte(id + secret), @@ -66,7 +66,7 @@ func TestLarksuiteApiKey_FromChunk(t *testing.T) { }, want: func() []detectors.Result { r := detectors.Result{ - DetectorType: detectorspb.DetectorType_LarkSuiteApiKey, + DetectorType: detector_typepb.DetectorType_LarkSuiteApiKey, Verified: false, Raw: []byte(id), RawV2: []byte(id + inactiveSecret), diff --git a/pkg/detectors/launchdarkly/launchdarkly.go b/pkg/detectors/launchdarkly/launchdarkly.go index 16568fca2eb7..ed71e30baefb 100644 --- a/pkg/detectors/launchdarkly/launchdarkly.go +++ b/pkg/detectors/launchdarkly/launchdarkly.go @@ -12,7 +12,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -69,7 +69,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_LaunchDarkly, + DetectorType: detector_typepb.DetectorType_LaunchDarkly, Raw: []byte(resMatch), ExtraData: make(map[string]string), } @@ -94,8 +94,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_LaunchDarkly +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_LaunchDarkly } func (s Scanner) Description() string { diff --git a/pkg/detectors/launchdarkly/launchdarkly_integration_test.go b/pkg/detectors/launchdarkly/launchdarkly_integration_test.go index 1f840b97e15c..7eb56352b2cf 100644 --- a/pkg/detectors/launchdarkly/launchdarkly_integration_test.go +++ b/pkg/detectors/launchdarkly/launchdarkly_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestLaunchDarkly_FromChunk(t *testing.T) { @@ -50,7 +50,7 @@ func TestLaunchDarkly_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_LaunchDarkly, + DetectorType: detector_typepb.DetectorType_LaunchDarkly, Verified: true, }, }, @@ -66,7 +66,7 @@ func TestLaunchDarkly_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_LaunchDarkly, + DetectorType: detector_typepb.DetectorType_LaunchDarkly, Verified: false, }, }, @@ -93,7 +93,7 @@ func TestLaunchDarkly_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_LaunchDarkly, + DetectorType: detector_typepb.DetectorType_LaunchDarkly, Verified: false, }, }, @@ -110,7 +110,7 @@ func TestLaunchDarkly_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_LaunchDarkly, + DetectorType: detector_typepb.DetectorType_LaunchDarkly, Verified: true, }, }, diff --git a/pkg/detectors/ldap/ldap.go b/pkg/detectors/ldap/ldap.go index d0640f4fada7..9bfa1b1b71ce 100644 --- a/pkg/detectors/ldap/ldap.go +++ b/pkg/detectors/ldap/ldap.go @@ -14,7 +14,7 @@ import ( regexp "github.com/wasilibs/go-re2" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -68,7 +68,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result passwordMatches := passwordPat.FindAllStringSubmatch(dataStr, -1) for _, password := range passwordMatches { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_LDAP, + DetectorType: detector_typepb.DetectorType_LDAP, Raw: []byte(strings.Join([]string{ldapURL.String(), username[1], password[1]}, "\t")), } @@ -98,7 +98,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_LDAP, + DetectorType: detector_typepb.DetectorType_LDAP, Raw: []byte(strings.Join([]string{ldapURL.String(), username, password}, "\t")), } @@ -173,8 +173,8 @@ func verifyLDAP(ctx context.Context, username, password string, ldapURL *url.URL } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_LDAP +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_LDAP } func (s Scanner) Description() string { diff --git a/pkg/detectors/ldap/ldap_integration_test.go b/pkg/detectors/ldap/ldap_integration_test.go index 94aaff77b6f3..7808860e2c00 100644 --- a/pkg/detectors/ldap/ldap_integration_test.go +++ b/pkg/detectors/ldap/ldap_integration_test.go @@ -19,7 +19,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestMain(m *testing.M) { @@ -83,7 +83,7 @@ func TestLdap_Integration_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_LDAP, + DetectorType: detector_typepb.DetectorType_LDAP, Verified: true, }, }, @@ -102,7 +102,7 @@ func TestLdap_Integration_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_LDAP, + DetectorType: detector_typepb.DetectorType_LDAP, Verified: false, }, }, @@ -118,7 +118,7 @@ func TestLdap_Integration_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_LDAP, + DetectorType: detector_typepb.DetectorType_LDAP, Verified: true, }, }, @@ -134,7 +134,7 @@ func TestLdap_Integration_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_LDAP, + DetectorType: detector_typepb.DetectorType_LDAP, Verified: true, }, }, @@ -150,7 +150,7 @@ func TestLdap_Integration_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_LDAP, + DetectorType: detector_typepb.DetectorType_LDAP, Verified: false, }, }, @@ -169,7 +169,7 @@ func TestLdap_Integration_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_LDAP, + DetectorType: detector_typepb.DetectorType_LDAP, Verified: false, }, }, @@ -263,7 +263,7 @@ func TestLdap_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_LDAP, + DetectorType: detector_typepb.DetectorType_LDAP, Verified: false, }, }, diff --git a/pkg/detectors/leadfeeder/leadfeeder.go b/pkg/detectors/leadfeeder/leadfeeder.go index d38d62931ef6..6dba173b8f1e 100644 --- a/pkg/detectors/leadfeeder/leadfeeder.go +++ b/pkg/detectors/leadfeeder/leadfeeder.go @@ -3,13 +3,14 @@ package leadfeeder import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Leadfeeder, + DetectorType: detector_typepb.DetectorType_Leadfeeder, Raw: []byte(resMatch), } @@ -65,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Leadfeeder +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Leadfeeder } func (s Scanner) Description() string { diff --git a/pkg/detectors/leadfeeder/leadfeeder_integration_test.go b/pkg/detectors/leadfeeder/leadfeeder_integration_test.go index 7af05a73a15c..eb7875b86135 100644 --- a/pkg/detectors/leadfeeder/leadfeeder_integration_test.go +++ b/pkg/detectors/leadfeeder/leadfeeder_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestLeadfeeder_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestLeadfeeder_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Leadfeeder, + DetectorType: detector_typepb.DetectorType_Leadfeeder, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestLeadfeeder_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Leadfeeder, + DetectorType: detector_typepb.DetectorType_Leadfeeder, Verified: false, }, }, diff --git a/pkg/detectors/lemlist/lemlist.go b/pkg/detectors/lemlist/lemlist.go index 9a9205501274..14ab56fc1992 100644 --- a/pkg/detectors/lemlist/lemlist.go +++ b/pkg/detectors/lemlist/lemlist.go @@ -4,13 +4,14 @@ import ( "context" b64 "encoding/base64" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -41,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Lemlist, + DetectorType: detector_typepb.DetectorType_Lemlist, Raw: []byte(resMatch), } @@ -68,8 +69,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Lemlist +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Lemlist } func (s Scanner) Description() string { diff --git a/pkg/detectors/lemlist/lemlist_integration_test.go b/pkg/detectors/lemlist/lemlist_integration_test.go index b93e0472ded8..d6930f6b5e22 100644 --- a/pkg/detectors/lemlist/lemlist_integration_test.go +++ b/pkg/detectors/lemlist/lemlist_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestLemlist_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestLemlist_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Lemlist, + DetectorType: detector_typepb.DetectorType_Lemlist, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestLemlist_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Lemlist, + DetectorType: detector_typepb.DetectorType_Lemlist, Verified: false, }, }, diff --git a/pkg/detectors/lemonsqueezy/lemonsqueezy.go b/pkg/detectors/lemonsqueezy/lemonsqueezy.go index 0a4482fca019..e1d1a01bba14 100644 --- a/pkg/detectors/lemonsqueezy/lemonsqueezy.go +++ b/pkg/detectors/lemonsqueezy/lemonsqueezy.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -42,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_LemonSqueezy, + DetectorType: detector_typepb.DetectorType_LemonSqueezy, Raw: []byte(resMatch), } @@ -78,8 +78,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_LemonSqueezy +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_LemonSqueezy } func (s Scanner) Description() string { diff --git a/pkg/detectors/lemonsqueezy/lemonsqueezy_integration_test.go b/pkg/detectors/lemonsqueezy/lemonsqueezy_integration_test.go index 4152f7e1f772..85f2d30110c8 100644 --- a/pkg/detectors/lemonsqueezy/lemonsqueezy_integration_test.go +++ b/pkg/detectors/lemonsqueezy/lemonsqueezy_integration_test.go @@ -15,7 +15,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestLemonsqueezy_FromChunk(t *testing.T) { @@ -51,7 +51,7 @@ func TestLemonsqueezy_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_LemonSqueezy, + DetectorType: detector_typepb.DetectorType_LemonSqueezy, Verified: true, }, }, @@ -68,7 +68,7 @@ func TestLemonsqueezy_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_LemonSqueezy, + DetectorType: detector_typepb.DetectorType_LemonSqueezy, Verified: false, }, }, diff --git a/pkg/detectors/lendflow/lendflow.go b/pkg/detectors/lendflow/lendflow.go index d8efb4e47afe..a341119cc146 100644 --- a/pkg/detectors/lendflow/lendflow.go +++ b/pkg/detectors/lendflow/lendflow.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -44,7 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Lendflow, + DetectorType: detector_typepb.DetectorType_Lendflow, Raw: []byte(resMatch), } @@ -73,8 +73,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Lendflow +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Lendflow } func (s Scanner) Description() string { diff --git a/pkg/detectors/lendflow/lendflow_integration_test.go b/pkg/detectors/lendflow/lendflow_integration_test.go index b98272467ef5..04c0806e36c3 100644 --- a/pkg/detectors/lendflow/lendflow_integration_test.go +++ b/pkg/detectors/lendflow/lendflow_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestLendflow_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestLendflow_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Lendflow, + DetectorType: detector_typepb.DetectorType_Lendflow, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestLendflow_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Lendflow, + DetectorType: detector_typepb.DetectorType_Lendflow, Verified: false, }, }, diff --git a/pkg/detectors/lessannoyingcrm/lessannoyingcrm.go b/pkg/detectors/lessannoyingcrm/lessannoyingcrm.go index fa2065f37b46..4192c9e29826 100644 --- a/pkg/detectors/lessannoyingcrm/lessannoyingcrm.go +++ b/pkg/detectors/lessannoyingcrm/lessannoyingcrm.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -41,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_LessAnnoyingCRM, + DetectorType: detector_typepb.DetectorType_LessAnnoyingCRM, Raw: []byte(resMatch), } @@ -67,8 +67,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_LessAnnoyingCRM +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_LessAnnoyingCRM } func (s Scanner) Description() string { diff --git a/pkg/detectors/lessannoyingcrm/lessannoyingcrm_integration_test.go b/pkg/detectors/lessannoyingcrm/lessannoyingcrm_integration_test.go index f4e7540caa40..838c065504d0 100644 --- a/pkg/detectors/lessannoyingcrm/lessannoyingcrm_integration_test.go +++ b/pkg/detectors/lessannoyingcrm/lessannoyingcrm_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestLessAnnoyingCRM_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestLessAnnoyingCRM_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_LessAnnoyingCRM, + DetectorType: detector_typepb.DetectorType_LessAnnoyingCRM, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestLessAnnoyingCRM_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_LessAnnoyingCRM, + DetectorType: detector_typepb.DetectorType_LessAnnoyingCRM, Verified: false, }, }, diff --git a/pkg/detectors/lexigram/lexigram.go b/pkg/detectors/lexigram/lexigram.go index 5175c5faf592..e2629d5cbb41 100644 --- a/pkg/detectors/lexigram/lexigram.go +++ b/pkg/detectors/lexigram/lexigram.go @@ -3,13 +3,14 @@ package lexigram import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Lexigram, + DetectorType: detector_typepb.DetectorType_Lexigram, Raw: []byte(resMatch), } @@ -65,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Lexigram +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Lexigram } func (s Scanner) Description() string { diff --git a/pkg/detectors/lexigram/lexigram_integration_test.go b/pkg/detectors/lexigram/lexigram_integration_test.go index 2ce5b9aaa45d..b1683bbd1800 100644 --- a/pkg/detectors/lexigram/lexigram_integration_test.go +++ b/pkg/detectors/lexigram/lexigram_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestLexigram_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestLexigram_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Lexigram, + DetectorType: detector_typepb.DetectorType_Lexigram, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestLexigram_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Lexigram, + DetectorType: detector_typepb.DetectorType_Lexigram, Verified: false, }, }, diff --git a/pkg/detectors/linearapi/linearapi.go b/pkg/detectors/linearapi/linearapi.go index 62816cae73af..850082319c5a 100644 --- a/pkg/detectors/linearapi/linearapi.go +++ b/pkg/detectors/linearapi/linearapi.go @@ -2,14 +2,15 @@ package linearapi import ( "context" - regexp "github.com/wasilibs/go-re2" "io" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_LinearAPI, + DetectorType: detector_typepb.DetectorType_LinearAPI, Raw: []byte(resMatch), } @@ -73,8 +74,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_LinearAPI +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_LinearAPI } func (s Scanner) Description() string { diff --git a/pkg/detectors/linearapi/linearapi_integration_test.go b/pkg/detectors/linearapi/linearapi_integration_test.go index fee39c012dcc..d429c564ee17 100644 --- a/pkg/detectors/linearapi/linearapi_integration_test.go +++ b/pkg/detectors/linearapi/linearapi_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestLinearAPI_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestLinearAPI_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_LinearAPI, + DetectorType: detector_typepb.DetectorType_LinearAPI, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestLinearAPI_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_LinearAPI, + DetectorType: detector_typepb.DetectorType_LinearAPI, Verified: false, }, }, diff --git a/pkg/detectors/linemessaging/linemessaging.go b/pkg/detectors/linemessaging/linemessaging.go index a6bc394c0d5a..1166de42f979 100644 --- a/pkg/detectors/linemessaging/linemessaging.go +++ b/pkg/detectors/linemessaging/linemessaging.go @@ -3,13 +3,14 @@ package linemessaging import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_LineMessaging, + DetectorType: detector_typepb.DetectorType_LineMessaging, Raw: []byte(resMatch), } @@ -65,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_LineMessaging +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_LineMessaging } func (s Scanner) Description() string { diff --git a/pkg/detectors/linemessaging/linemessaging_integration_test.go b/pkg/detectors/linemessaging/linemessaging_integration_test.go index fe92c70a03ff..b83a18678f51 100644 --- a/pkg/detectors/linemessaging/linemessaging_integration_test.go +++ b/pkg/detectors/linemessaging/linemessaging_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestLineMessaging_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestLineMessaging_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_LineMessaging, + DetectorType: detector_typepb.DetectorType_LineMessaging, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestLineMessaging_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_LineMessaging, + DetectorType: detector_typepb.DetectorType_LineMessaging, Verified: false, }, }, diff --git a/pkg/detectors/linenotify/linenotify.go b/pkg/detectors/linenotify/linenotify.go index 9f2ad42f4b08..20d007d0e5cc 100644 --- a/pkg/detectors/linenotify/linenotify.go +++ b/pkg/detectors/linenotify/linenotify.go @@ -3,13 +3,14 @@ package linenotify import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_LineNotify, + DetectorType: detector_typepb.DetectorType_LineNotify, Raw: []byte(resMatch), } @@ -65,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_LineNotify +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_LineNotify } func (s Scanner) Description() string { diff --git a/pkg/detectors/linenotify/linenotify_integration_test.go b/pkg/detectors/linenotify/linenotify_integration_test.go index f9e31453f748..467b82582a3c 100644 --- a/pkg/detectors/linenotify/linenotify_integration_test.go +++ b/pkg/detectors/linenotify/linenotify_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestLineNotify_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestLineNotify_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_LineNotify, + DetectorType: detector_typepb.DetectorType_LineNotify, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestLineNotify_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_LineNotify, + DetectorType: detector_typepb.DetectorType_LineNotify, Verified: false, }, }, diff --git a/pkg/detectors/linkpreview/linkpreview.go b/pkg/detectors/linkpreview/linkpreview.go index 51f567a81dad..d59ed1d7e7b4 100644 --- a/pkg/detectors/linkpreview/linkpreview.go +++ b/pkg/detectors/linkpreview/linkpreview.go @@ -3,13 +3,14 @@ package linkpreview import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -38,7 +39,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_LinkPreview, + DetectorType: detector_typepb.DetectorType_LinkPreview, Raw: []byte(resMatch), } @@ -60,8 +61,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_LinkPreview +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_LinkPreview } func (s Scanner) Description() string { diff --git a/pkg/detectors/linkpreview/linkpreview_integration_test.go b/pkg/detectors/linkpreview/linkpreview_integration_test.go index a19aafae0fa2..2c09ab51bf51 100644 --- a/pkg/detectors/linkpreview/linkpreview_integration_test.go +++ b/pkg/detectors/linkpreview/linkpreview_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestLinkPreview_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestLinkPreview_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_LinkPreview, + DetectorType: detector_typepb.DetectorType_LinkPreview, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestLinkPreview_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_LinkPreview, + DetectorType: detector_typepb.DetectorType_LinkPreview, Verified: false, }, }, diff --git a/pkg/detectors/liveagent/liveagent.go b/pkg/detectors/liveagent/liveagent.go index de655732d2c8..f5f1bc83ed88 100644 --- a/pkg/detectors/liveagent/liveagent.go +++ b/pkg/detectors/liveagent/liveagent.go @@ -9,10 +9,10 @@ import ( regexp "github.com/wasilibs/go-re2" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) -type Scanner struct{ +type Scanner struct { detectors.DefaultMultiPartCredentialProvider } @@ -51,7 +51,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for _, domainMatch := range domainMatches { domainRes := strings.TrimSpace(domainMatch[0]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_LiveAgent, + DetectorType: detector_typepb.DetectorType_LiveAgent, Raw: []byte(resMatch), ExtraData: map[string]string{ "domain": domainRes, @@ -91,8 +91,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_LiveAgent +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_LiveAgent } func (s Scanner) Description() string { diff --git a/pkg/detectors/liveagent/liveagent_integration_test.go b/pkg/detectors/liveagent/liveagent_integration_test.go index 083387f18100..645a90a82ced 100644 --- a/pkg/detectors/liveagent/liveagent_integration_test.go +++ b/pkg/detectors/liveagent/liveagent_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestLiveAgent_FromChunk(t *testing.T) { @@ -55,7 +55,7 @@ func TestLiveAgent_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_LiveAgent, + DetectorType: detector_typepb.DetectorType_LiveAgent, Verified: true, ExtraData: map[string]string{ "domain": wantUrl, @@ -74,7 +74,7 @@ func TestLiveAgent_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_LiveAgent, + DetectorType: detector_typepb.DetectorType_LiveAgent, Verified: false, ExtraData: map[string]string{ "domain": wantUrl, diff --git a/pkg/detectors/livestorm/livestorm.go b/pkg/detectors/livestorm/livestorm.go index 5250abc7d8d1..578fbd833433 100644 --- a/pkg/detectors/livestorm/livestorm.go +++ b/pkg/detectors/livestorm/livestorm.go @@ -2,13 +2,14 @@ package livestorm import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -39,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Livestorm, + DetectorType: detector_typepb.DetectorType_Livestorm, Raw: []byte(resMatch), } @@ -64,8 +65,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Livestorm +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Livestorm } func (s Scanner) Description() string { diff --git a/pkg/detectors/livestorm/livestorm_integration_test.go b/pkg/detectors/livestorm/livestorm_integration_test.go index a922a225ff3b..47a91931c780 100644 --- a/pkg/detectors/livestorm/livestorm_integration_test.go +++ b/pkg/detectors/livestorm/livestorm_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestLivestorm_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestLivestorm_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Livestorm, + DetectorType: detector_typepb.DetectorType_Livestorm, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestLivestorm_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Livestorm, + DetectorType: detector_typepb.DetectorType_Livestorm, Verified: false, }, }, diff --git a/pkg/detectors/loadmill/loadmill.go b/pkg/detectors/loadmill/loadmill.go index eeda8ba15839..2c5bd361c91e 100644 --- a/pkg/detectors/loadmill/loadmill.go +++ b/pkg/detectors/loadmill/loadmill.go @@ -3,13 +3,14 @@ package loadmill import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Loadmill, + DetectorType: detector_typepb.DetectorType_Loadmill, Raw: []byte(resMatch), } @@ -66,8 +67,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Loadmill +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Loadmill } func (s Scanner) Description() string { diff --git a/pkg/detectors/loadmill/loadmill_integration_test.go b/pkg/detectors/loadmill/loadmill_integration_test.go index a06fa98c739f..0314eef3f22f 100644 --- a/pkg/detectors/loadmill/loadmill_integration_test.go +++ b/pkg/detectors/loadmill/loadmill_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestLoadmill_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestLoadmill_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Loadmill, + DetectorType: detector_typepb.DetectorType_Loadmill, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestLoadmill_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Loadmill, + DetectorType: detector_typepb.DetectorType_Loadmill, Verified: false, }, }, diff --git a/pkg/detectors/lob/lob.go b/pkg/detectors/lob/lob.go index 945c91b0223b..80c89b42f625 100644 --- a/pkg/detectors/lob/lob.go +++ b/pkg/detectors/lob/lob.go @@ -2,13 +2,14 @@ package lob import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -39,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Lob, + DetectorType: detector_typepb.DetectorType_Lob, Raw: []byte(resMatch), } @@ -64,8 +65,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Lob +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Lob } func (s Scanner) Description() string { diff --git a/pkg/detectors/lob/lob_integration_test.go b/pkg/detectors/lob/lob_integration_test.go index d51ab8d49636..97180296a14b 100644 --- a/pkg/detectors/lob/lob_integration_test.go +++ b/pkg/detectors/lob/lob_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestLob_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestLob_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Lob, + DetectorType: detector_typepb.DetectorType_Lob, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestLob_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Lob, + DetectorType: detector_typepb.DetectorType_Lob, Verified: false, }, }, diff --git a/pkg/detectors/locationiq/locationiq.go b/pkg/detectors/locationiq/locationiq.go index d8814cbe339a..3a4f9b9bf5d8 100644 --- a/pkg/detectors/locationiq/locationiq.go +++ b/pkg/detectors/locationiq/locationiq.go @@ -2,13 +2,14 @@ package locationiq import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -39,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_LocationIQ, + DetectorType: detector_typepb.DetectorType_LocationIQ, Raw: []byte(resMatch), } @@ -63,8 +64,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_LocationIQ +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_LocationIQ } func (s Scanner) Description() string { diff --git a/pkg/detectors/locationiq/locationiq_integration_test.go b/pkg/detectors/locationiq/locationiq_integration_test.go index d3f9e2a4c28b..05b620150189 100644 --- a/pkg/detectors/locationiq/locationiq_integration_test.go +++ b/pkg/detectors/locationiq/locationiq_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestLocationIQ_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestLocationIQ_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_LocationIQ, + DetectorType: detector_typepb.DetectorType_LocationIQ, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestLocationIQ_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_LocationIQ, + DetectorType: detector_typepb.DetectorType_LocationIQ, Verified: false, }, }, diff --git a/pkg/detectors/loggly/loggly.go b/pkg/detectors/loggly/loggly.go index 7023e53d41f3..3ab25d8d43a5 100644 --- a/pkg/detectors/loggly/loggly.go +++ b/pkg/detectors/loggly/loggly.go @@ -9,7 +9,7 @@ import ( regexp "github.com/wasilibs/go-re2" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -48,7 +48,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result domainRes := strings.TrimSpace(domainMatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Loggly, + DetectorType: detector_typepb.DetectorType_Loggly, Raw: []byte(key), RawV2: []byte(fmt.Sprintf("%s:%s", domainRes, key)), } @@ -86,8 +86,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Loggly +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Loggly } func (s Scanner) Description() string { diff --git a/pkg/detectors/loggly/loggly_integration_test.go b/pkg/detectors/loggly/loggly_integration_test.go index 7c37d6b2f096..11d91d4f58e4 100644 --- a/pkg/detectors/loggly/loggly_integration_test.go +++ b/pkg/detectors/loggly/loggly_integration_test.go @@ -15,7 +15,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestLoggly_FromChunk(t *testing.T) { @@ -52,7 +52,7 @@ func TestLoggly_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Loggly, + DetectorType: detector_typepb.DetectorType_Loggly, Verified: true, }, }, @@ -69,7 +69,7 @@ func TestLoggly_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Loggly, + DetectorType: detector_typepb.DetectorType_Loggly, Verified: false, }, }, @@ -98,7 +98,7 @@ func TestLoggly_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Loggly, + DetectorType: detector_typepb.DetectorType_Loggly, Verified: false, }, }, @@ -115,7 +115,7 @@ func TestLoggly_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Loggly, + DetectorType: detector_typepb.DetectorType_Loggly, Verified: false, }, }, diff --git a/pkg/detectors/loginradius/loginradius.go b/pkg/detectors/loginradius/loginradius.go index 18df0a467931..534aad4f826d 100644 --- a/pkg/detectors/loginradius/loginradius.go +++ b/pkg/detectors/loginradius/loginradius.go @@ -9,7 +9,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Loginradius, + DetectorType: detector_typepb.DetectorType_Loginradius, Raw: []byte(resMatch), } @@ -64,8 +64,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Loginradius +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Loginradius } func (s Scanner) Description() string { diff --git a/pkg/detectors/loginradius/loginradius_integration_test.go b/pkg/detectors/loginradius/loginradius_integration_test.go index 4d124751d9e6..0fd2d267ffff 100644 --- a/pkg/detectors/loginradius/loginradius_integration_test.go +++ b/pkg/detectors/loginradius/loginradius_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestLoginradius_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestLoginradius_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Loginradius, + DetectorType: detector_typepb.DetectorType_Loginradius, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestLoginradius_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Loginradius, + DetectorType: detector_typepb.DetectorType_Loginradius, Verified: false, }, }, diff --git a/pkg/detectors/logzio/logzio.go b/pkg/detectors/logzio/logzio.go index a70c7e00d449..98263ee0c935 100644 --- a/pkg/detectors/logzio/logzio.go +++ b/pkg/detectors/logzio/logzio.go @@ -3,13 +3,14 @@ package logzio import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -41,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_LogzIO, + DetectorType: detector_typepb.DetectorType_LogzIO, Raw: []byte(resMatch), } @@ -78,8 +79,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_LogzIO +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_LogzIO } func (s Scanner) Description() string { diff --git a/pkg/detectors/logzio/logzio_integration_test.go b/pkg/detectors/logzio/logzio_integration_test.go index a4f6c53c3709..ff1373ceb4ae 100644 --- a/pkg/detectors/logzio/logzio_integration_test.go +++ b/pkg/detectors/logzio/logzio_integration_test.go @@ -15,7 +15,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestLogzIO_FromChunk(t *testing.T) { @@ -51,7 +51,7 @@ func TestLogzIO_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_LogzIO, + DetectorType: detector_typepb.DetectorType_LogzIO, Verified: true, }, }, @@ -68,7 +68,7 @@ func TestLogzIO_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_LogzIO, + DetectorType: detector_typepb.DetectorType_LogzIO, Verified: false, }, }, @@ -97,7 +97,7 @@ func TestLogzIO_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_LogzIO, + DetectorType: detector_typepb.DetectorType_LogzIO, Verified: false, }, }, @@ -114,7 +114,7 @@ func TestLogzIO_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_LogzIO, + DetectorType: detector_typepb.DetectorType_LogzIO, Verified: false, }, }, diff --git a/pkg/detectors/lokalisetoken/lokalisetoken.go b/pkg/detectors/lokalisetoken/lokalisetoken.go index 5285747e1905..69f0053839b0 100644 --- a/pkg/detectors/lokalisetoken/lokalisetoken.go +++ b/pkg/detectors/lokalisetoken/lokalisetoken.go @@ -12,7 +12,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -33,8 +33,8 @@ func (s Scanner) Keywords() []string { return []string{"lokalise"} } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_LokaliseToken +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_LokaliseToken } func (s Scanner) Description() string { @@ -51,7 +51,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_LokaliseToken, + DetectorType: detector_typepb.DetectorType_LokaliseToken, Raw: []byte(resMatch), ExtraData: make(map[string]string), } diff --git a/pkg/detectors/lokalisetoken/lokalisetoken_integration_test.go b/pkg/detectors/lokalisetoken/lokalisetoken_integration_test.go index e02d9ccbaeaa..2c95950ec34c 100644 --- a/pkg/detectors/lokalisetoken/lokalisetoken_integration_test.go +++ b/pkg/detectors/lokalisetoken/lokalisetoken_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestLokaliseToken_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestLokaliseToken_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_LokaliseToken, + DetectorType: detector_typepb.DetectorType_LokaliseToken, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestLokaliseToken_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_LokaliseToken, + DetectorType: detector_typepb.DetectorType_LokaliseToken, Verified: false, }, }, diff --git a/pkg/detectors/loyverse/loyverse.go b/pkg/detectors/loyverse/loyverse.go index 8d1a4ec1b084..40bf16644ab0 100644 --- a/pkg/detectors/loyverse/loyverse.go +++ b/pkg/detectors/loyverse/loyverse.go @@ -3,13 +3,14 @@ package loyverse import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Loyverse, + DetectorType: detector_typepb.DetectorType_Loyverse, Raw: []byte(resMatch), } @@ -65,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Loyverse +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Loyverse } func (s Scanner) Description() string { diff --git a/pkg/detectors/loyverse/loyverse_integration_test.go b/pkg/detectors/loyverse/loyverse_integration_test.go index 064b6aa48b4b..74a8ef640dab 100644 --- a/pkg/detectors/loyverse/loyverse_integration_test.go +++ b/pkg/detectors/loyverse/loyverse_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestLoyverse_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestLoyverse_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Loyverse, + DetectorType: detector_typepb.DetectorType_Loyverse, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestLoyverse_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Loyverse, + DetectorType: detector_typepb.DetectorType_Loyverse, Verified: false, }, }, diff --git a/pkg/detectors/lunchmoney/lunchmoney.go b/pkg/detectors/lunchmoney/lunchmoney.go index c380ceaa1158..79f3f876706a 100644 --- a/pkg/detectors/lunchmoney/lunchmoney.go +++ b/pkg/detectors/lunchmoney/lunchmoney.go @@ -3,13 +3,14 @@ package lunchmoney import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_LunchMoney, + DetectorType: detector_typepb.DetectorType_LunchMoney, Raw: []byte(resMatch), } @@ -66,8 +67,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_LunchMoney +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_LunchMoney } func (s Scanner) Description() string { diff --git a/pkg/detectors/lunchmoney/lunchmoney_integration_test.go b/pkg/detectors/lunchmoney/lunchmoney_integration_test.go index 43695e6cc2a4..d5dda3090a37 100644 --- a/pkg/detectors/lunchmoney/lunchmoney_integration_test.go +++ b/pkg/detectors/lunchmoney/lunchmoney_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestLunchMoney_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestLunchMoney_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_LunchMoney, + DetectorType: detector_typepb.DetectorType_LunchMoney, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestLunchMoney_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_LunchMoney, + DetectorType: detector_typepb.DetectorType_LunchMoney, Verified: false, }, }, diff --git a/pkg/detectors/luno/luno.go b/pkg/detectors/luno/luno.go index b9a199606bfd..38157096fa2d 100644 --- a/pkg/detectors/luno/luno.go +++ b/pkg/detectors/luno/luno.go @@ -2,16 +2,17 @@ package luno import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) -type Scanner struct{ +type Scanner struct { detectors.DefaultMultiPartCredentialProvider } @@ -47,7 +48,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result userPatMatch := strings.TrimSpace(idMatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Luno, + DetectorType: detector_typepb.DetectorType_Luno, Raw: []byte(tokenPatMatch), } @@ -73,8 +74,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Luno +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Luno } func (s Scanner) Description() string { diff --git a/pkg/detectors/luno/luno_integration_test.go b/pkg/detectors/luno/luno_integration_test.go index 7417286672bc..a40533330113 100644 --- a/pkg/detectors/luno/luno_integration_test.go +++ b/pkg/detectors/luno/luno_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestLuno_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestLuno_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Luno, + DetectorType: detector_typepb.DetectorType_Luno, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestLuno_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Luno, + DetectorType: detector_typepb.DetectorType_Luno, Verified: false, }, }, diff --git a/pkg/detectors/m3o/m3o.go b/pkg/detectors/m3o/m3o.go index ac618d16b650..74dcc85c12b4 100644 --- a/pkg/detectors/m3o/m3o.go +++ b/pkg/detectors/m3o/m3o.go @@ -3,13 +3,14 @@ package m3o import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_M3o, + DetectorType: detector_typepb.DetectorType_M3o, Raw: []byte(resMatch), } @@ -70,8 +71,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_M3o +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_M3o } func (s Scanner) Description() string { diff --git a/pkg/detectors/m3o/m3o_integration_test.go b/pkg/detectors/m3o/m3o_integration_test.go index 14fc9f2871cd..70e61a9a1456 100644 --- a/pkg/detectors/m3o/m3o_integration_test.go +++ b/pkg/detectors/m3o/m3o_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestM3o_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestM3o_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_M3o, + DetectorType: detector_typepb.DetectorType_M3o, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestM3o_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_M3o, + DetectorType: detector_typepb.DetectorType_M3o, Verified: false, }, }, diff --git a/pkg/detectors/madkudu/madkudu.go b/pkg/detectors/madkudu/madkudu.go index c82bd6765bee..d6a458d8d409 100644 --- a/pkg/detectors/madkudu/madkudu.go +++ b/pkg/detectors/madkudu/madkudu.go @@ -2,13 +2,14 @@ package madkudu import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -39,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_MadKudu, + DetectorType: detector_typepb.DetectorType_MadKudu, Raw: []byte(resMatch), } @@ -64,8 +65,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_MadKudu +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_MadKudu } func (s Scanner) Description() string { diff --git a/pkg/detectors/madkudu/madkudu_integration_test.go b/pkg/detectors/madkudu/madkudu_integration_test.go index 4e66763317a4..ade142bb9879 100644 --- a/pkg/detectors/madkudu/madkudu_integration_test.go +++ b/pkg/detectors/madkudu/madkudu_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestMadKudu_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestMadKudu_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_MadKudu, + DetectorType: detector_typepb.DetectorType_MadKudu, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestMadKudu_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_MadKudu, + DetectorType: detector_typepb.DetectorType_MadKudu, Verified: false, }, }, diff --git a/pkg/detectors/magicbell/magicbell.go b/pkg/detectors/magicbell/magicbell.go index a1c761fa8b9a..f53103651a05 100644 --- a/pkg/detectors/magicbell/magicbell.go +++ b/pkg/detectors/magicbell/magicbell.go @@ -9,7 +9,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -49,7 +49,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for emailMatch := range uniqueEmailMatches { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_MagicBell, + DetectorType: detector_typepb.DetectorType_MagicBell, Raw: []byte(apiKeyRes), } @@ -76,8 +76,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_MagicBell +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_MagicBell } func (s Scanner) Description() string { diff --git a/pkg/detectors/magicbell/magicbell_integration_test.go b/pkg/detectors/magicbell/magicbell_integration_test.go index ad8b34a18a6b..bc327bae79e8 100644 --- a/pkg/detectors/magicbell/magicbell_integration_test.go +++ b/pkg/detectors/magicbell/magicbell_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestMagicBell_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestMagicBell_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_MagicBell, + DetectorType: detector_typepb.DetectorType_MagicBell, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestMagicBell_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_MagicBell, + DetectorType: detector_typepb.DetectorType_MagicBell, Verified: false, }, }, diff --git a/pkg/detectors/magnetic/magnetic.go b/pkg/detectors/magnetic/magnetic.go index c543cbe9243b..8374bb104b09 100644 --- a/pkg/detectors/magnetic/magnetic.go +++ b/pkg/detectors/magnetic/magnetic.go @@ -2,13 +2,14 @@ package magnetic import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -39,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Magnetic, + DetectorType: detector_typepb.DetectorType_Magnetic, Raw: []byte(resMatch), } @@ -63,8 +64,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Magnetic +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Magnetic } func (s Scanner) Description() string { diff --git a/pkg/detectors/magnetic/magnetic_integration_test.go b/pkg/detectors/magnetic/magnetic_integration_test.go index 86386b8179f6..d66ae722f553 100644 --- a/pkg/detectors/magnetic/magnetic_integration_test.go +++ b/pkg/detectors/magnetic/magnetic_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestMagnetic_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestMagnetic_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Magnetic, + DetectorType: detector_typepb.DetectorType_Magnetic, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestMagnetic_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Magnetic, + DetectorType: detector_typepb.DetectorType_Magnetic, Verified: false, }, }, diff --git a/pkg/detectors/mailboxlayer/mailboxlayer.go b/pkg/detectors/mailboxlayer/mailboxlayer.go index 5a82eb29ff0d..a61b61af4930 100644 --- a/pkg/detectors/mailboxlayer/mailboxlayer.go +++ b/pkg/detectors/mailboxlayer/mailboxlayer.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -41,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Mailboxlayer, + DetectorType: detector_typepb.DetectorType_Mailboxlayer, Raw: []byte(resMatch), } @@ -77,8 +77,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Mailboxlayer +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Mailboxlayer } func (s Scanner) Description() string { diff --git a/pkg/detectors/mailboxlayer/mailboxlayer_integration_test.go b/pkg/detectors/mailboxlayer/mailboxlayer_integration_test.go index e6cbc1ba42b1..a8f158f85838 100644 --- a/pkg/detectors/mailboxlayer/mailboxlayer_integration_test.go +++ b/pkg/detectors/mailboxlayer/mailboxlayer_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestMailboxplayer_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestMailboxplayer_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Mailboxlayer, + DetectorType: detector_typepb.DetectorType_Mailboxlayer, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestMailboxplayer_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Mailboxlayer, + DetectorType: detector_typepb.DetectorType_Mailboxlayer, Verified: false, }, }, diff --git a/pkg/detectors/mailchimp/mailchimp.go b/pkg/detectors/mailchimp/mailchimp.go index 51b7b345b897..85896b6a0620 100644 --- a/pkg/detectors/mailchimp/mailchimp.go +++ b/pkg/detectors/mailchimp/mailchimp.go @@ -9,7 +9,7 @@ import ( regexp "github.com/wasilibs/go-re2" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" "github.com/trufflesecurity/trufflehog/v3/pkg/common" ) @@ -40,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for _, match := range matches { result := detectors.Result{ - DetectorType: detectorspb.DetectorType_Mailchimp, + DetectorType: detector_typepb.DetectorType_Mailchimp, Raw: []byte(match), } result.ExtraData = map[string]string{ @@ -75,8 +75,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Mailchimp +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Mailchimp } func (s Scanner) Description() string { diff --git a/pkg/detectors/mailchimp/mailchimp_integration_test.go b/pkg/detectors/mailchimp/mailchimp_integration_test.go index d524439ef7f9..5fadc6ed6673 100644 --- a/pkg/detectors/mailchimp/mailchimp_integration_test.go +++ b/pkg/detectors/mailchimp/mailchimp_integration_test.go @@ -12,7 +12,7 @@ import ( "github.com/kylelemons/godebug/pretty" "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestMailchimp_FromChunk(t *testing.T) { @@ -46,7 +46,7 @@ func TestMailchimp_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Mailchimp, + DetectorType: detector_typepb.DetectorType_Mailchimp, Verified: true, }, }, @@ -62,7 +62,7 @@ func TestMailchimp_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Mailchimp, + DetectorType: detector_typepb.DetectorType_Mailchimp, Verified: false, }, }, diff --git a/pkg/detectors/mailerlite/mailerlite.go b/pkg/detectors/mailerlite/mailerlite.go index 7a61a394e66d..8a969f0b7238 100644 --- a/pkg/detectors/mailerlite/mailerlite.go +++ b/pkg/detectors/mailerlite/mailerlite.go @@ -2,13 +2,14 @@ package mailerlite import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -39,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Mailerlite, + DetectorType: detector_typepb.DetectorType_Mailerlite, Raw: []byte(resMatch), } @@ -64,8 +65,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Mailerlite +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Mailerlite } func (s Scanner) Description() string { diff --git a/pkg/detectors/mailerlite/mailerlite_integration_test.go b/pkg/detectors/mailerlite/mailerlite_integration_test.go index 21a04bfc065a..da21960eb8ca 100644 --- a/pkg/detectors/mailerlite/mailerlite_integration_test.go +++ b/pkg/detectors/mailerlite/mailerlite_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestMailerlite_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestMailerlite_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Mailerlite, + DetectorType: detector_typepb.DetectorType_Mailerlite, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestMailerlite_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Mailerlite, + DetectorType: detector_typepb.DetectorType_Mailerlite, Verified: false, }, }, diff --git a/pkg/detectors/mailgun/mailgun.go b/pkg/detectors/mailgun/mailgun.go index b9d29ecef81d..8e1734365eaa 100644 --- a/pkg/detectors/mailgun/mailgun.go +++ b/pkg/detectors/mailgun/mailgun.go @@ -12,7 +12,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -152,8 +152,8 @@ type item struct { Type string `json:"type"` } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Mailgun +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Mailgun } func (s Scanner) Description() string { diff --git a/pkg/detectors/mailgun/mailgun_integration_test.go b/pkg/detectors/mailgun/mailgun_integration_test.go index 65f7934ec377..4446bf710728 100644 --- a/pkg/detectors/mailgun/mailgun_integration_test.go +++ b/pkg/detectors/mailgun/mailgun_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestMailgun_FromChunk(t *testing.T) { @@ -50,7 +50,7 @@ func TestMailgun_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Mailgun, + DetectorType: detector_typepb.DetectorType_Mailgun, Verified: true, }, }, @@ -66,7 +66,7 @@ func TestMailgun_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Mailgun, + DetectorType: detector_typepb.DetectorType_Mailgun, Verified: true, }, }, @@ -82,7 +82,7 @@ func TestMailgun_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Mailgun, + DetectorType: detector_typepb.DetectorType_Mailgun, Verified: false, }, }, @@ -98,7 +98,7 @@ func TestMailgun_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Mailgun, + DetectorType: detector_typepb.DetectorType_Mailgun, Verified: false, }, }, diff --git a/pkg/detectors/mailjetbasicauth/mailjetbasicauth.go b/pkg/detectors/mailjetbasicauth/mailjetbasicauth.go index c61dd09887a7..d298f02c151d 100644 --- a/pkg/detectors/mailjetbasicauth/mailjetbasicauth.go +++ b/pkg/detectors/mailjetbasicauth/mailjetbasicauth.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_MailJetBasicAuth, + DetectorType: detector_typepb.DetectorType_MailJetBasicAuth, Raw: []byte(resMatch), } @@ -65,8 +65,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_MailJetBasicAuth +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_MailJetBasicAuth } func (s Scanner) Description() string { diff --git a/pkg/detectors/mailjetbasicauth/mailjetbasicauth_integration_test.go b/pkg/detectors/mailjetbasicauth/mailjetbasicauth_integration_test.go index 9df8b97abdcb..60871a0e3fc0 100644 --- a/pkg/detectors/mailjetbasicauth/mailjetbasicauth_integration_test.go +++ b/pkg/detectors/mailjetbasicauth/mailjetbasicauth_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestMailJetBasicAuth_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestMailJetBasicAuth_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_MailJetBasicAuth, + DetectorType: detector_typepb.DetectorType_MailJetBasicAuth, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestMailJetBasicAuth_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_MailJetBasicAuth, + DetectorType: detector_typepb.DetectorType_MailJetBasicAuth, Verified: false, }, }, diff --git a/pkg/detectors/mailjetsms/mailjetsms.go b/pkg/detectors/mailjetsms/mailjetsms.go index 63cf568722c7..14c1f5ba39d1 100644 --- a/pkg/detectors/mailjetsms/mailjetsms.go +++ b/pkg/detectors/mailjetsms/mailjetsms.go @@ -3,13 +3,14 @@ package mailjetsms import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -39,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_MailJetSMS, + DetectorType: detector_typepb.DetectorType_MailJetSMS, Raw: []byte(resMatch), } @@ -65,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_MailJetSMS +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_MailJetSMS } func (s Scanner) Description() string { diff --git a/pkg/detectors/mailjetsms/mailjetsms_integration_test.go b/pkg/detectors/mailjetsms/mailjetsms_integration_test.go index 01c184013b18..90965f3ace9c 100644 --- a/pkg/detectors/mailjetsms/mailjetsms_integration_test.go +++ b/pkg/detectors/mailjetsms/mailjetsms_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestMailJetSMS_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestMailJetSMS_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_MailJetSMS, + DetectorType: detector_typepb.DetectorType_MailJetSMS, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestMailJetSMS_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_MailJetSMS, + DetectorType: detector_typepb.DetectorType_MailJetSMS, Verified: false, }, }, diff --git a/pkg/detectors/mailmodo/mailmodo.go b/pkg/detectors/mailmodo/mailmodo.go index 0a8f66cf7988..99878eb244e9 100644 --- a/pkg/detectors/mailmodo/mailmodo.go +++ b/pkg/detectors/mailmodo/mailmodo.go @@ -9,7 +9,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Mailmodo, + DetectorType: detector_typepb.DetectorType_Mailmodo, Raw: []byte(resMatch), } @@ -66,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Mailmodo +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Mailmodo } func (s Scanner) Description() string { diff --git a/pkg/detectors/mailmodo/mailmodo_integration_test.go b/pkg/detectors/mailmodo/mailmodo_integration_test.go index 8c1093a63d99..b6b430c1e0a6 100644 --- a/pkg/detectors/mailmodo/mailmodo_integration_test.go +++ b/pkg/detectors/mailmodo/mailmodo_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestMailmodo_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestMailmodo_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Mailmodo, + DetectorType: detector_typepb.DetectorType_Mailmodo, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestMailmodo_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Mailmodo, + DetectorType: detector_typepb.DetectorType_Mailmodo, Verified: false, }, }, diff --git a/pkg/detectors/mailsac/mailsac.go b/pkg/detectors/mailsac/mailsac.go index de2330d48b7b..053f08b97b7a 100644 --- a/pkg/detectors/mailsac/mailsac.go +++ b/pkg/detectors/mailsac/mailsac.go @@ -2,13 +2,14 @@ package mailsac import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -39,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Mailsac, + DetectorType: detector_typepb.DetectorType_Mailsac, Raw: []byte(resMatch), } @@ -65,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Mailsac +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Mailsac } func (s Scanner) Description() string { diff --git a/pkg/detectors/mailsac/mailsac_integration_test.go b/pkg/detectors/mailsac/mailsac_integration_test.go index 0eb882535522..9c80a3580a93 100644 --- a/pkg/detectors/mailsac/mailsac_integration_test.go +++ b/pkg/detectors/mailsac/mailsac_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestMailsac_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestMailsac_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Mailsac, + DetectorType: detector_typepb.DetectorType_Mailsac, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestMailsac_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Mailsac, + DetectorType: detector_typepb.DetectorType_Mailsac, Verified: false, }, }, diff --git a/pkg/detectors/mandrill/mandrill.go b/pkg/detectors/mandrill/mandrill.go index affe5ad7f7f9..cc86f3273650 100644 --- a/pkg/detectors/mandrill/mandrill.go +++ b/pkg/detectors/mandrill/mandrill.go @@ -3,13 +3,14 @@ package mandrill import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Mandrill, + DetectorType: detector_typepb.DetectorType_Mandrill, Raw: []byte(resMatch), } @@ -66,8 +67,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Mandrill +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Mandrill } func (s Scanner) Description() string { diff --git a/pkg/detectors/mandrill/mandrill_integration_test.go b/pkg/detectors/mandrill/mandrill_integration_test.go index dd04d93fc6f5..7e9d4e507306 100644 --- a/pkg/detectors/mandrill/mandrill_integration_test.go +++ b/pkg/detectors/mandrill/mandrill_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestMandrill_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestMandrill_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Mandrill, + DetectorType: detector_typepb.DetectorType_Mandrill, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestMandrill_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Mandrill, + DetectorType: detector_typepb.DetectorType_Mandrill, Verified: false, }, }, diff --git a/pkg/detectors/manifest/manifest.go b/pkg/detectors/manifest/manifest.go index 918e1cbc5c04..1bd0de104488 100644 --- a/pkg/detectors/manifest/manifest.go +++ b/pkg/detectors/manifest/manifest.go @@ -2,13 +2,14 @@ package manifest import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -39,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Manifest, + DetectorType: detector_typepb.DetectorType_Manifest, Raw: []byte(resMatch), } @@ -64,8 +65,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Manifest +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Manifest } func (s Scanner) Description() string { diff --git a/pkg/detectors/manifest/manifest_integration_test.go b/pkg/detectors/manifest/manifest_integration_test.go index 33d3cbc1892f..d85eb7bb1dab 100644 --- a/pkg/detectors/manifest/manifest_integration_test.go +++ b/pkg/detectors/manifest/manifest_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestManifest_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestManifest_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Manifest, + DetectorType: detector_typepb.DetectorType_Manifest, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestManifest_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Manifest, + DetectorType: detector_typepb.DetectorType_Manifest, Verified: false, }, }, diff --git a/pkg/detectors/mapbox/mapbox.go b/pkg/detectors/mapbox/mapbox.go index 9e39ef9f27c0..12b4158c4eda 100644 --- a/pkg/detectors/mapbox/mapbox.go +++ b/pkg/detectors/mapbox/mapbox.go @@ -9,7 +9,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -45,7 +45,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resId := strings.TrimSpace(idMatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_MapBox, + DetectorType: detector_typepb.DetectorType_MapBox, Raw: []byte(resMatch), } @@ -72,8 +72,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_MapBox +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_MapBox } func (s Scanner) Description() string { diff --git a/pkg/detectors/mapbox/mapbox_integration_test.go b/pkg/detectors/mapbox/mapbox_integration_test.go index 93860db8e4e7..ee19b8b3ef3d 100644 --- a/pkg/detectors/mapbox/mapbox_integration_test.go +++ b/pkg/detectors/mapbox/mapbox_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestMapBox_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestMapBox_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_MapBox, + DetectorType: detector_typepb.DetectorType_MapBox, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestMapBox_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_MapBox, + DetectorType: detector_typepb.DetectorType_MapBox, Verified: false, }, }, diff --git a/pkg/detectors/mapquest/mapquest.go b/pkg/detectors/mapquest/mapquest.go index a2ae821e910b..2f0ac7942c59 100644 --- a/pkg/detectors/mapquest/mapquest.go +++ b/pkg/detectors/mapquest/mapquest.go @@ -2,13 +2,14 @@ package mapquest import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -39,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Mapquest, + DetectorType: detector_typepb.DetectorType_Mapquest, Raw: []byte(resMatch), } @@ -63,8 +64,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Mapquest +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Mapquest } func (s Scanner) Description() string { diff --git a/pkg/detectors/mapquest/mapquest_integration_test.go b/pkg/detectors/mapquest/mapquest_integration_test.go index 81abcc727c30..12b3c0962808 100644 --- a/pkg/detectors/mapquest/mapquest_integration_test.go +++ b/pkg/detectors/mapquest/mapquest_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestMapquest_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestMapquest_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Mapquest, + DetectorType: detector_typepb.DetectorType_Mapquest, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestMapquest_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Mapquest, + DetectorType: detector_typepb.DetectorType_Mapquest, Verified: false, }, }, diff --git a/pkg/detectors/marketstack/marketstack.go b/pkg/detectors/marketstack/marketstack.go index 11f7f11e043b..41b419dd6d07 100644 --- a/pkg/detectors/marketstack/marketstack.go +++ b/pkg/detectors/marketstack/marketstack.go @@ -3,13 +3,14 @@ package marketstack import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Marketstack, + DetectorType: detector_typepb.DetectorType_Marketstack, Raw: []byte(resMatch), } @@ -64,8 +65,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Marketstack +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Marketstack } func (s Scanner) Description() string { diff --git a/pkg/detectors/marketstack/marketstack_integration_test.go b/pkg/detectors/marketstack/marketstack_integration_test.go index fb5ceaa8b1b6..dc6119f539c7 100644 --- a/pkg/detectors/marketstack/marketstack_integration_test.go +++ b/pkg/detectors/marketstack/marketstack_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestMarketstack_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestMarketstack_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Marketstack, + DetectorType: detector_typepb.DetectorType_Marketstack, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestMarketstack_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Marketstack, + DetectorType: detector_typepb.DetectorType_Marketstack, Verified: false, }, }, diff --git a/pkg/detectors/mattermostpersonaltoken/mattermostpersonaltoken.go b/pkg/detectors/mattermostpersonaltoken/mattermostpersonaltoken.go index ff488e84a876..4503f83e3a9c 100644 --- a/pkg/detectors/mattermostpersonaltoken/mattermostpersonaltoken.go +++ b/pkg/detectors/mattermostpersonaltoken/mattermostpersonaltoken.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -48,7 +48,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result serverRes := strings.TrimSpace(serverMatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_MattermostPersonalToken, + DetectorType: detector_typepb.DetectorType_MattermostPersonalToken, Raw: []byte(resMatch), RawV2: []byte(resMatch + serverRes), } @@ -75,8 +75,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_MattermostPersonalToken +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_MattermostPersonalToken } func (s Scanner) Description() string { diff --git a/pkg/detectors/mattermostpersonaltoken/mattermostpersonaltoken_integration_test.go b/pkg/detectors/mattermostpersonaltoken/mattermostpersonaltoken_integration_test.go index 26b9605619d0..9f097bcc3da4 100644 --- a/pkg/detectors/mattermostpersonaltoken/mattermostpersonaltoken_integration_test.go +++ b/pkg/detectors/mattermostpersonaltoken/mattermostpersonaltoken_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestMattermostPersonalToken_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestMattermostPersonalToken_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_MattermostPersonalToken, + DetectorType: detector_typepb.DetectorType_MattermostPersonalToken, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestMattermostPersonalToken_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_MattermostPersonalToken, + DetectorType: detector_typepb.DetectorType_MattermostPersonalToken, Verified: false, }, }, diff --git a/pkg/detectors/mavenlink/mavenlink.go b/pkg/detectors/mavenlink/mavenlink.go index 8fa62b8a860f..a34832234d1a 100644 --- a/pkg/detectors/mavenlink/mavenlink.go +++ b/pkg/detectors/mavenlink/mavenlink.go @@ -3,13 +3,14 @@ package mavenlink import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Mavenlink, + DetectorType: detector_typepb.DetectorType_Mavenlink, Raw: []byte(resMatch), } @@ -65,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Mavenlink +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Mavenlink } func (s Scanner) Description() string { diff --git a/pkg/detectors/mavenlink/mavenlink_integration_test.go b/pkg/detectors/mavenlink/mavenlink_integration_test.go index 56ed7c646b03..1d546188d421 100644 --- a/pkg/detectors/mavenlink/mavenlink_integration_test.go +++ b/pkg/detectors/mavenlink/mavenlink_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestMavenlink_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestMavenlink_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Mavenlink, + DetectorType: detector_typepb.DetectorType_Mavenlink, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestMavenlink_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Mavenlink, + DetectorType: detector_typepb.DetectorType_Mavenlink, Verified: false, }, }, diff --git a/pkg/detectors/maxmindlicense/v1/maxmindlicense.go b/pkg/detectors/maxmindlicense/v1/maxmindlicense.go index a7c2b3d4a999..f48feb4c5408 100644 --- a/pkg/detectors/maxmindlicense/v1/maxmindlicense.go +++ b/pkg/detectors/maxmindlicense/v1/maxmindlicense.go @@ -10,10 +10,10 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) -type Scanner struct{ +type Scanner struct { detectors.DefaultMultiPartCredentialProvider } @@ -49,7 +49,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result idRes := strings.TrimSpace(idMatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_MaxMindLicense, + DetectorType: detector_typepb.DetectorType_MaxMindLicense, Redacted: idRes, Raw: []byte(keyRes), ExtraData: map[string]string{ @@ -80,8 +80,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_MaxMindLicense +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_MaxMindLicense } func (s Scanner) Description() string { diff --git a/pkg/detectors/maxmindlicense/v1/maxmindlicense_integration_test.go b/pkg/detectors/maxmindlicense/v1/maxmindlicense_integration_test.go index f64d67994ccf..3a137ba0d759 100644 --- a/pkg/detectors/maxmindlicense/v1/maxmindlicense_integration_test.go +++ b/pkg/detectors/maxmindlicense/v1/maxmindlicense_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestMaxMindLicense_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestMaxMindLicense_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_MaxMindLicense, + DetectorType: detector_typepb.DetectorType_MaxMindLicense, Redacted: "510124", Verified: true, ExtraData: map[string]string{ @@ -70,7 +70,7 @@ func TestMaxMindLicense_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_MaxMindLicense, + DetectorType: detector_typepb.DetectorType_MaxMindLicense, Redacted: "510124", Verified: false, ExtraData: map[string]string{ diff --git a/pkg/detectors/maxmindlicense/v2/maxmindlicense_v2.go b/pkg/detectors/maxmindlicense/v2/maxmindlicense_v2.go index 48ba282fb272..3e9153606ce3 100644 --- a/pkg/detectors/maxmindlicense/v2/maxmindlicense_v2.go +++ b/pkg/detectors/maxmindlicense/v2/maxmindlicense_v2.go @@ -12,7 +12,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -46,7 +46,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for key := range uniqueMatches { r := detectors.Result{ - DetectorType: detectorspb.DetectorType_MaxMindLicense, + DetectorType: detector_typepb.DetectorType_MaxMindLicense, Raw: []byte(key), ExtraData: map[string]string{ "rotation_guide": "https://howtorotate.com/docs/tutorials/maxmind/", @@ -103,8 +103,8 @@ func (s Scanner) verify(ctx context.Context, client *http.Client, key string) (b } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_MaxMindLicense +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_MaxMindLicense } func (s Scanner) Description() string { diff --git a/pkg/detectors/maxmindlicense/v2/maxmindlicense_v2_integration_test.go b/pkg/detectors/maxmindlicense/v2/maxmindlicense_v2_integration_test.go index 9c919dc513eb..3ffc47bcb30d 100644 --- a/pkg/detectors/maxmindlicense/v2/maxmindlicense_v2_integration_test.go +++ b/pkg/detectors/maxmindlicense/v2/maxmindlicense_v2_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestMaxMindLicense(t *testing.T) { @@ -48,7 +48,7 @@ func TestMaxMindLicense(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_MaxMindLicense, + DetectorType: detector_typepb.DetectorType_MaxMindLicense, Verified: true, ExtraData: map[string]string{ "rotation_guide": "https://howtorotate.com/docs/tutorials/maxmind/", @@ -68,7 +68,7 @@ func TestMaxMindLicense(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_MaxMindLicense, + DetectorType: detector_typepb.DetectorType_MaxMindLicense, Verified: false, ExtraData: map[string]string{ "rotation_guide": "https://howtorotate.com/docs/tutorials/maxmind/", diff --git a/pkg/detectors/meaningcloud/meaningcloud.go b/pkg/detectors/meaningcloud/meaningcloud.go index ee5543b0eb28..096e9bb366df 100644 --- a/pkg/detectors/meaningcloud/meaningcloud.go +++ b/pkg/detectors/meaningcloud/meaningcloud.go @@ -4,15 +4,16 @@ import ( "bytes" "context" "encoding/json" - regexp "github.com/wasilibs/go-re2" "io" "mime/multipart" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -47,7 +48,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_MeaningCloud, + DetectorType: detector_typepb.DetectorType_MeaningCloud, Raw: []byte(resMatch), } @@ -98,8 +99,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_MeaningCloud +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_MeaningCloud } func (s Scanner) Description() string { diff --git a/pkg/detectors/meaningcloud/meaningcloud_integration_test.go b/pkg/detectors/meaningcloud/meaningcloud_integration_test.go index b446614e52b1..a432e8948c5f 100644 --- a/pkg/detectors/meaningcloud/meaningcloud_integration_test.go +++ b/pkg/detectors/meaningcloud/meaningcloud_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestMeaningCloud_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestMeaningCloud_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_MeaningCloud, + DetectorType: detector_typepb.DetectorType_MeaningCloud, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestMeaningCloud_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_MeaningCloud, + DetectorType: detector_typepb.DetectorType_MeaningCloud, Verified: false, }, }, diff --git a/pkg/detectors/mediastack/mediastack.go b/pkg/detectors/mediastack/mediastack.go index ea9a27d13d3e..31e6b69e08b9 100644 --- a/pkg/detectors/mediastack/mediastack.go +++ b/pkg/detectors/mediastack/mediastack.go @@ -3,14 +3,15 @@ package mediastack import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" "time" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -41,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_MediaStack, + DetectorType: detector_typepb.DetectorType_MediaStack, Raw: []byte(resMatch), } @@ -67,8 +68,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_MediaStack +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_MediaStack } func (s Scanner) Description() string { diff --git a/pkg/detectors/mediastack/mediastack_integration_test.go b/pkg/detectors/mediastack/mediastack_integration_test.go index 88c2ee2ac586..51178005c04a 100644 --- a/pkg/detectors/mediastack/mediastack_integration_test.go +++ b/pkg/detectors/mediastack/mediastack_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestMediaStack_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestMediaStack_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_MediaStack, + DetectorType: detector_typepb.DetectorType_MediaStack, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestMediaStack_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_MediaStack, + DetectorType: detector_typepb.DetectorType_MediaStack, Verified: false, }, }, diff --git a/pkg/detectors/meistertask/meistertask.go b/pkg/detectors/meistertask/meistertask.go index 50d8087456f1..1292d7ba676f 100644 --- a/pkg/detectors/meistertask/meistertask.go +++ b/pkg/detectors/meistertask/meistertask.go @@ -3,13 +3,14 @@ package meistertask import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Meistertask, + DetectorType: detector_typepb.DetectorType_Meistertask, Raw: []byte(resMatch), } @@ -65,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Meistertask +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Meistertask } func (s Scanner) Description() string { diff --git a/pkg/detectors/meistertask/meistertask_integration_test.go b/pkg/detectors/meistertask/meistertask_integration_test.go index c12b9885eeb4..f70610e70bea 100644 --- a/pkg/detectors/meistertask/meistertask_integration_test.go +++ b/pkg/detectors/meistertask/meistertask_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestMeistertask_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestMeistertask_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Meistertask, + DetectorType: detector_typepb.DetectorType_Meistertask, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestMeistertask_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Meistertask, + DetectorType: detector_typepb.DetectorType_Meistertask, Verified: false, }, }, diff --git a/pkg/detectors/meraki/meraki.go b/pkg/detectors/meraki/meraki.go index e326e84ced34..c776984602f6 100644 --- a/pkg/detectors/meraki/meraki.go +++ b/pkg/detectors/meraki/meraki.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -66,7 +66,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for match := range uniqueMatches { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Meraki, + DetectorType: detector_typepb.DetectorType_Meraki, Raw: []byte(match), ExtraData: make(map[string]string), } @@ -93,8 +93,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Meraki +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Meraki } /* diff --git a/pkg/detectors/meraki/meraki_integration_test.go b/pkg/detectors/meraki/meraki_integration_test.go index 3f6fb92e8d74..5b67b4bafc8f 100644 --- a/pkg/detectors/meraki/meraki_integration_test.go +++ b/pkg/detectors/meraki/meraki_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestMeraki_FromChunk(t *testing.T) { @@ -50,7 +50,7 @@ func TestMeraki_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Meraki, + DetectorType: detector_typepb.DetectorType_Meraki, Verified: true, }, }, @@ -67,7 +67,7 @@ func TestMeraki_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Meraki, + DetectorType: detector_typepb.DetectorType_Meraki, Verified: false, }, }, @@ -96,7 +96,7 @@ func TestMeraki_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Meraki, + DetectorType: detector_typepb.DetectorType_Meraki, Verified: false, }, }, @@ -113,7 +113,7 @@ func TestMeraki_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Meraki, + DetectorType: detector_typepb.DetectorType_Meraki, Verified: false, }, }, diff --git a/pkg/detectors/mesibo/mesibo.go b/pkg/detectors/mesibo/mesibo.go index 2fb5a61b46ae..4ef42337e14e 100644 --- a/pkg/detectors/mesibo/mesibo.go +++ b/pkg/detectors/mesibo/mesibo.go @@ -2,14 +2,15 @@ package mesibo import ( "context" - regexp "github.com/wasilibs/go-re2" "io" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Mesibo, + DetectorType: detector_typepb.DetectorType_Mesibo, Raw: []byte(resMatch), } @@ -70,8 +71,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Mesibo +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Mesibo } func (s Scanner) Description() string { diff --git a/pkg/detectors/mesibo/mesibo_integration_test.go b/pkg/detectors/mesibo/mesibo_integration_test.go index 7f73d769de88..29d335cc50b1 100644 --- a/pkg/detectors/mesibo/mesibo_integration_test.go +++ b/pkg/detectors/mesibo/mesibo_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestMesibo_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestMesibo_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Mesibo, + DetectorType: detector_typepb.DetectorType_Mesibo, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestMesibo_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Mesibo, + DetectorType: detector_typepb.DetectorType_Mesibo, Verified: false, }, }, diff --git a/pkg/detectors/messagebird/messagebird.go b/pkg/detectors/messagebird/messagebird.go index c1873bd34c12..ea0af51e6d1f 100644 --- a/pkg/detectors/messagebird/messagebird.go +++ b/pkg/detectors/messagebird/messagebird.go @@ -3,13 +3,14 @@ package messagebird import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -39,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_MessageBird, + DetectorType: detector_typepb.DetectorType_MessageBird, Raw: []byte(resMatch), } @@ -64,8 +65,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_MessageBird +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_MessageBird } func (s Scanner) Description() string { diff --git a/pkg/detectors/messagebird/messagebird_integration_test.go b/pkg/detectors/messagebird/messagebird_integration_test.go index e07856312fde..a1bd65505bcd 100644 --- a/pkg/detectors/messagebird/messagebird_integration_test.go +++ b/pkg/detectors/messagebird/messagebird_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestMessageBird_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestMessageBird_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_MessageBird, + DetectorType: detector_typepb.DetectorType_MessageBird, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestMessageBird_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_MessageBird, + DetectorType: detector_typepb.DetectorType_MessageBird, Verified: false, }, }, diff --git a/pkg/detectors/metaapi/metaapi.go b/pkg/detectors/metaapi/metaapi.go index bc4b38e7b796..ca426845ee9a 100644 --- a/pkg/detectors/metaapi/metaapi.go +++ b/pkg/detectors/metaapi/metaapi.go @@ -3,14 +3,15 @@ package metaapi import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "io" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -48,7 +49,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_MetaAPI, + DetectorType: detector_typepb.DetectorType_MetaAPI, Raw: []byte(resMatch), } @@ -81,8 +82,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_MetaAPI +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_MetaAPI } func (s Scanner) Description() string { diff --git a/pkg/detectors/metaapi/metaapi_integration_test.go b/pkg/detectors/metaapi/metaapi_integration_test.go index c9fd6eed934d..86a1f851e4e2 100644 --- a/pkg/detectors/metaapi/metaapi_integration_test.go +++ b/pkg/detectors/metaapi/metaapi_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestMetaAPI_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestMetaAPI_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_MetaAPI, + DetectorType: detector_typepb.DetectorType_MetaAPI, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestMetaAPI_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_MetaAPI, + DetectorType: detector_typepb.DetectorType_MetaAPI, Verified: false, }, }, diff --git a/pkg/detectors/metabase/metabase.go b/pkg/detectors/metabase/metabase.go index dec38f06b817..dbf6f76880c7 100644 --- a/pkg/detectors/metabase/metabase.go +++ b/pkg/detectors/metabase/metabase.go @@ -10,10 +10,10 @@ import ( regexp "github.com/wasilibs/go-re2" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) -type Scanner struct{ +type Scanner struct { detectors.DefaultMultiPartCredentialProvider } @@ -55,7 +55,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Metabase, + DetectorType: detector_typepb.DetectorType_Metabase, Raw: []byte(resMatch), RawV2: []byte(resMatch + resURLMatch), } @@ -87,8 +87,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Metabase +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Metabase } func (s Scanner) Description() string { diff --git a/pkg/detectors/metabase/metabase_integration_test.go b/pkg/detectors/metabase/metabase_integration_test.go index 76a07cf302b5..130fc9d348cd 100644 --- a/pkg/detectors/metabase/metabase_integration_test.go +++ b/pkg/detectors/metabase/metabase_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestMetabase_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestMetabase_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Metabase, + DetectorType: detector_typepb.DetectorType_Metabase, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestMetabase_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Metabase, + DetectorType: detector_typepb.DetectorType_Metabase, Verified: false, }, }, diff --git a/pkg/detectors/metrilo/metrilo.go b/pkg/detectors/metrilo/metrilo.go index 1d340ae15daa..93799ee46684 100644 --- a/pkg/detectors/metrilo/metrilo.go +++ b/pkg/detectors/metrilo/metrilo.go @@ -2,13 +2,14 @@ package metrilo import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -39,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Metrilo, + DetectorType: detector_typepb.DetectorType_Metrilo, Raw: []byte(resMatch), } @@ -66,8 +67,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Metrilo +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Metrilo } func (s Scanner) Description() string { diff --git a/pkg/detectors/metrilo/metrilo_integration_test.go b/pkg/detectors/metrilo/metrilo_integration_test.go index be56d5d02f7b..fb91032440f6 100644 --- a/pkg/detectors/metrilo/metrilo_integration_test.go +++ b/pkg/detectors/metrilo/metrilo_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestMetrilo_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestMetrilo_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Metrilo, + DetectorType: detector_typepb.DetectorType_Metrilo, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestMetrilo_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Metrilo, + DetectorType: detector_typepb.DetectorType_Metrilo, Verified: false, }, }, diff --git a/pkg/detectors/microsoftteamswebhook/microsoftteamswebhook.go b/pkg/detectors/microsoftteamswebhook/microsoftteamswebhook.go index f444e037431c..49aa5a826be3 100644 --- a/pkg/detectors/microsoftteamswebhook/microsoftteamswebhook.go +++ b/pkg/detectors/microsoftteamswebhook/microsoftteamswebhook.go @@ -10,7 +10,7 @@ import ( regexp "github.com/wasilibs/go-re2" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -44,7 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_MicrosoftTeamsWebhook, + DetectorType: detector_typepb.DetectorType_MicrosoftTeamsWebhook, Raw: []byte(resMatch), } s1.ExtraData = map[string]string{ @@ -100,8 +100,8 @@ func verifyWebhook(ctx context.Context, client *http.Client, webhookURL string) } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_MicrosoftTeamsWebhook +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_MicrosoftTeamsWebhook } func (s Scanner) Description() string { diff --git a/pkg/detectors/microsoftteamswebhook/microsoftteamswebhook_integration_test.go b/pkg/detectors/microsoftteamswebhook/microsoftteamswebhook_integration_test.go index 6aaa243f3623..33a7970d0c5f 100644 --- a/pkg/detectors/microsoftteamswebhook/microsoftteamswebhook_integration_test.go +++ b/pkg/detectors/microsoftteamswebhook/microsoftteamswebhook_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestMicrosoftTeamsWebhook_FromChunk(t *testing.T) { @@ -50,7 +50,7 @@ func TestMicrosoftTeamsWebhook_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_MicrosoftTeamsWebhook, + DetectorType: detector_typepb.DetectorType_MicrosoftTeamsWebhook, Verified: true, }, }, @@ -66,7 +66,7 @@ func TestMicrosoftTeamsWebhook_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_MicrosoftTeamsWebhook, + DetectorType: detector_typepb.DetectorType_MicrosoftTeamsWebhook, Verified: false, }, }, @@ -83,7 +83,7 @@ func TestMicrosoftTeamsWebhook_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_MicrosoftTeamsWebhook, + DetectorType: detector_typepb.DetectorType_MicrosoftTeamsWebhook, Verified: false, }, }, @@ -100,7 +100,7 @@ func TestMicrosoftTeamsWebhook_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_MicrosoftTeamsWebhook, + DetectorType: detector_typepb.DetectorType_MicrosoftTeamsWebhook, Verified: false, }, }, @@ -117,7 +117,7 @@ func TestMicrosoftTeamsWebhook_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_MicrosoftTeamsWebhook, + DetectorType: detector_typepb.DetectorType_MicrosoftTeamsWebhook, Verified: false, }, }, diff --git a/pkg/detectors/mindmeister/mindmeister.go b/pkg/detectors/mindmeister/mindmeister.go index 2bcb1bdf5afc..7170d605bfd4 100644 --- a/pkg/detectors/mindmeister/mindmeister.go +++ b/pkg/detectors/mindmeister/mindmeister.go @@ -3,14 +3,15 @@ package mindmeister import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "io" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -41,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Mindmeister, + DetectorType: detector_typepb.DetectorType_Mindmeister, Raw: []byte(resMatch), } @@ -64,7 +65,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } else { s1.Verified = false } - } + } } } } @@ -75,8 +76,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Mindmeister +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Mindmeister } func (s Scanner) Description() string { diff --git a/pkg/detectors/mindmeister/mindmeister_integration_test.go b/pkg/detectors/mindmeister/mindmeister_integration_test.go index ff737f463e7d..62b54f4f5b0b 100644 --- a/pkg/detectors/mindmeister/mindmeister_integration_test.go +++ b/pkg/detectors/mindmeister/mindmeister_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestMindmeister_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestMindmeister_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Mindmeister, + DetectorType: detector_typepb.DetectorType_Mindmeister, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestMindmeister_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Mindmeister, + DetectorType: detector_typepb.DetectorType_Mindmeister, Verified: false, }, }, diff --git a/pkg/detectors/miro/miro.go b/pkg/detectors/miro/miro.go index 7e82342b350c..1c056210b749 100644 --- a/pkg/detectors/miro/miro.go +++ b/pkg/detectors/miro/miro.go @@ -3,13 +3,14 @@ package miro import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Miro, + DetectorType: detector_typepb.DetectorType_Miro, Raw: []byte(resMatch), } @@ -66,8 +67,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Miro +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Miro } func (s Scanner) Description() string { diff --git a/pkg/detectors/miro/miro_integration_test.go b/pkg/detectors/miro/miro_integration_test.go index 1fa7093a28bb..c298a135d94e 100644 --- a/pkg/detectors/miro/miro_integration_test.go +++ b/pkg/detectors/miro/miro_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestMiro_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestMiro_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Miro, + DetectorType: detector_typepb.DetectorType_Miro, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestMiro_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Miro, + DetectorType: detector_typepb.DetectorType_Miro, Verified: false, }, }, diff --git a/pkg/detectors/mite/mite.go b/pkg/detectors/mite/mite.go index d95dbc9b918e..4fb5205544d8 100644 --- a/pkg/detectors/mite/mite.go +++ b/pkg/detectors/mite/mite.go @@ -9,7 +9,7 @@ import ( regexp "github.com/wasilibs/go-re2" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -46,7 +46,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resURL := strings.TrimSpace(urlMatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Mite, + DetectorType: detector_typepb.DetectorType_Mite, Raw: []byte(resMatch), } @@ -73,8 +73,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Mite +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Mite } func (s Scanner) Description() string { diff --git a/pkg/detectors/mite/mite_integration_test.go b/pkg/detectors/mite/mite_integration_test.go index 6d456d15176c..74840f2f4f7f 100644 --- a/pkg/detectors/mite/mite_integration_test.go +++ b/pkg/detectors/mite/mite_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestMite_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestMite_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Mite, + DetectorType: detector_typepb.DetectorType_Mite, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestMite_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Mite, + DetectorType: detector_typepb.DetectorType_Mite, Verified: false, }, }, diff --git a/pkg/detectors/mixmax/mixmax.go b/pkg/detectors/mixmax/mixmax.go index 3a7681c785af..52b03fdf7f13 100644 --- a/pkg/detectors/mixmax/mixmax.go +++ b/pkg/detectors/mixmax/mixmax.go @@ -2,13 +2,14 @@ package mixmax import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -39,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Mixmax, + DetectorType: detector_typepb.DetectorType_Mixmax, Raw: []byte(resMatch), } @@ -65,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Mixmax +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Mixmax } func (s Scanner) Description() string { diff --git a/pkg/detectors/mixmax/mixmax_integration_test.go b/pkg/detectors/mixmax/mixmax_integration_test.go index c4f70cddcc77..78548bea9af1 100644 --- a/pkg/detectors/mixmax/mixmax_integration_test.go +++ b/pkg/detectors/mixmax/mixmax_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestMixmax_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestMixmax_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Mixmax, + DetectorType: detector_typepb.DetectorType_Mixmax, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestMixmax_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Mixmax, + DetectorType: detector_typepb.DetectorType_Mixmax, Verified: false, }, }, diff --git a/pkg/detectors/mixpanel/mixpanel.go b/pkg/detectors/mixpanel/mixpanel.go index 33925438938f..e00a16d3ba58 100644 --- a/pkg/detectors/mixpanel/mixpanel.go +++ b/pkg/detectors/mixpanel/mixpanel.go @@ -2,13 +2,14 @@ package mixpanel import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -47,7 +48,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result userPatMatch := strings.TrimSpace(idMatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Mixpanel, + DetectorType: detector_typepb.DetectorType_Mixpanel, Raw: []byte(tokenPatMatch), } @@ -73,8 +74,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Mixpanel +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Mixpanel } func (s Scanner) Description() string { diff --git a/pkg/detectors/mixpanel/mixpanel_integration_test.go b/pkg/detectors/mixpanel/mixpanel_integration_test.go index eecccd0fd022..b8111ebead08 100644 --- a/pkg/detectors/mixpanel/mixpanel_integration_test.go +++ b/pkg/detectors/mixpanel/mixpanel_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestMixpanel_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestMixpanel_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Mixpanel, + DetectorType: detector_typepb.DetectorType_Mixpanel, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestMixpanel_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Mixpanel, + DetectorType: detector_typepb.DetectorType_Mixpanel, Verified: false, }, }, diff --git a/pkg/detectors/mockaroo/mockaroo.go b/pkg/detectors/mockaroo/mockaroo.go index 6967c2e7c4d7..5c43c716a784 100644 --- a/pkg/detectors/mockaroo/mockaroo.go +++ b/pkg/detectors/mockaroo/mockaroo.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -42,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Mockaroo, + DetectorType: detector_typepb.DetectorType_Mockaroo, Raw: []byte(resMatch), } @@ -70,8 +70,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Mockaroo +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Mockaroo } func (s Scanner) Description() string { diff --git a/pkg/detectors/mockaroo/mockaroo_integration_test.go b/pkg/detectors/mockaroo/mockaroo_integration_test.go index e3121d181eb6..d5748c9013cd 100644 --- a/pkg/detectors/mockaroo/mockaroo_integration_test.go +++ b/pkg/detectors/mockaroo/mockaroo_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestMockaroo_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestMockaroo_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Mockaroo, + DetectorType: detector_typepb.DetectorType_Mockaroo, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestMockaroo_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Mockaroo, + DetectorType: detector_typepb.DetectorType_Mockaroo, Verified: false, }, }, diff --git a/pkg/detectors/moderation/moderation.go b/pkg/detectors/moderation/moderation.go index fcadef71d1ea..9a4dc986d5b7 100644 --- a/pkg/detectors/moderation/moderation.go +++ b/pkg/detectors/moderation/moderation.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -42,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Moderation, + DetectorType: detector_typepb.DetectorType_Moderation, Raw: []byte(resMatch), } @@ -72,8 +72,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Moderation +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Moderation } func (s Scanner) Description() string { diff --git a/pkg/detectors/moderation/moderation_integration_test.go b/pkg/detectors/moderation/moderation_integration_test.go index 2d822752720d..f14d082722d9 100644 --- a/pkg/detectors/moderation/moderation_integration_test.go +++ b/pkg/detectors/moderation/moderation_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestModeration_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestModeration_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Moderation, + DetectorType: detector_typepb.DetectorType_Moderation, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestModeration_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Moderation, + DetectorType: detector_typepb.DetectorType_Moderation, Verified: false, }, }, diff --git a/pkg/detectors/monday/monday.go b/pkg/detectors/monday/monday.go index 6acc746cbaab..ed53d040b739 100644 --- a/pkg/detectors/monday/monday.go +++ b/pkg/detectors/monday/monday.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -42,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Monday, + DetectorType: detector_typepb.DetectorType_Monday, Raw: []byte(resMatch), } @@ -64,8 +64,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Monday +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Monday } func (s Scanner) Description() string { diff --git a/pkg/detectors/monday/monday_integration_test.go b/pkg/detectors/monday/monday_integration_test.go index be92662ab425..3c32b441694f 100644 --- a/pkg/detectors/monday/monday_integration_test.go +++ b/pkg/detectors/monday/monday_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestMonday_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestMonday_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Monday, + DetectorType: detector_typepb.DetectorType_Monday, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestMonday_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Monday, + DetectorType: detector_typepb.DetectorType_Monday, Verified: false, }, }, diff --git a/pkg/detectors/mongodb/mongodb.go b/pkg/detectors/mongodb/mongodb.go index df507d75f2a0..f69f5a59b4c8 100644 --- a/pkg/detectors/mongodb/mongodb.go +++ b/pkg/detectors/mongodb/mongodb.go @@ -9,7 +9,7 @@ import ( logContext "github.com/trufflesecurity/trufflehog/v3/pkg/context" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" regexp "github.com/wasilibs/go-re2" "go.mongodb.org/mongo-driver/mongo" @@ -83,7 +83,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for connStr, password := range uniqueMatches { r := detectors.Result{ - DetectorType: detectorspb.DetectorType_MongoDB, + DetectorType: detector_typepb.DetectorType_MongoDB, Raw: []byte(connStr), ExtraData: map[string]string{ "rotation_guide": "https://howtorotate.com/docs/tutorials/mongo/", @@ -148,6 +148,6 @@ func verifyUri(ctx context.Context, connStr string, timeout time.Duration) (bool return err == nil, err } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_MongoDB +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_MongoDB } diff --git a/pkg/detectors/mongodb/mongodb_integration_test.go b/pkg/detectors/mongodb/mongodb_integration_test.go index 17d219a2df88..fb72cd19dbc3 100644 --- a/pkg/detectors/mongodb/mongodb_integration_test.go +++ b/pkg/detectors/mongodb/mongodb_integration_test.go @@ -6,6 +6,7 @@ package mongodb import ( "context" "fmt" + "strings" "testing" "time" @@ -15,8 +16,9 @@ import ( "github.com/testcontainers/testcontainers-go" "github.com/testcontainers/testcontainers-go/modules/mongodb" "github.com/testcontainers/testcontainers-go/wait" + "github.com/trufflesecurity/integrations/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestIntegrationMongoDB_FromChunk(t *testing.T) { @@ -77,7 +79,7 @@ func TestIntegrationMongoDB_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_MongoDB, + DetectorType: detector_typepb.DetectorType_MongoDB, Verified: true, ExtraData: map[string]string{ "rotation_guide": "https://howtorotate.com/docs/tutorials/mongo/", @@ -96,7 +98,7 @@ func TestIntegrationMongoDB_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_MongoDB, + DetectorType: detector_typepb.DetectorType_MongoDB, Verified: false, ExtraData: map[string]string{ "rotation_guide": "https://howtorotate.com/docs/tutorials/mongo/", @@ -115,7 +117,7 @@ func TestIntegrationMongoDB_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_MongoDB, + DetectorType: detector_typepb.DetectorType_MongoDB, Verified: false, ExtraData: map[string]string{ "rotation_guide": "https://howtorotate.com/docs/tutorials/mongo/", @@ -135,7 +137,7 @@ func TestIntegrationMongoDB_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_MongoDB, + DetectorType: detector_typepb.DetectorType_MongoDB, Verified: false, ExtraData: map[string]string{ "rotation_guide": "https://howtorotate.com/docs/tutorials/mongo/", @@ -214,7 +216,7 @@ func TestMongoDB_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_MongoDB, + DetectorType: detector_typepb.DetectorType_MongoDB, Verified: true, ExtraData: map[string]string{ "rotation_guide": "https://howtorotate.com/docs/tutorials/mongo/", @@ -233,7 +235,7 @@ func TestMongoDB_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_MongoDB, + DetectorType: detector_typepb.DetectorType_MongoDB, Verified: false, ExtraData: map[string]string{ "rotation_guide": "https://howtorotate.com/docs/tutorials/mongo/", @@ -252,7 +254,7 @@ func TestMongoDB_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_MongoDB, + DetectorType: detector_typepb.DetectorType_MongoDB, Verified: false, ExtraData: map[string]string{ "rotation_guide": "https://howtorotate.com/docs/tutorials/mongo/", @@ -272,7 +274,7 @@ func TestMongoDB_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_MongoDB, + DetectorType: detector_typepb.DetectorType_MongoDB, Verified: false, ExtraData: map[string]string{ "rotation_guide": "https://howtorotate.com/docs/tutorials/mongo/", diff --git a/pkg/detectors/monkeylearn/monkeylearn.go b/pkg/detectors/monkeylearn/monkeylearn.go index d354c6d41cd3..0fc442afff04 100644 --- a/pkg/detectors/monkeylearn/monkeylearn.go +++ b/pkg/detectors/monkeylearn/monkeylearn.go @@ -3,13 +3,14 @@ package monkeylearn import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_MonkeyLearn, + DetectorType: detector_typepb.DetectorType_MonkeyLearn, Raw: []byte(resMatch), } @@ -66,8 +67,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_MonkeyLearn +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_MonkeyLearn } func (s Scanner) Description() string { diff --git a/pkg/detectors/monkeylearn/monkeylearn_integration_test.go b/pkg/detectors/monkeylearn/monkeylearn_integration_test.go index 95083c2269af..88df843f2b25 100644 --- a/pkg/detectors/monkeylearn/monkeylearn_integration_test.go +++ b/pkg/detectors/monkeylearn/monkeylearn_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestMonkeyLearn_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestMonkeyLearn_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_MonkeyLearn, + DetectorType: detector_typepb.DetectorType_MonkeyLearn, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestMonkeyLearn_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_MonkeyLearn, + DetectorType: detector_typepb.DetectorType_MonkeyLearn, Verified: false, }, }, diff --git a/pkg/detectors/moonclerk/moonclerk.go b/pkg/detectors/moonclerk/moonclerk.go index b9b9ed88bed5..0f339191e10a 100644 --- a/pkg/detectors/moonclerk/moonclerk.go +++ b/pkg/detectors/moonclerk/moonclerk.go @@ -2,13 +2,14 @@ package moonclerk import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -39,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Moonclerk, + DetectorType: detector_typepb.DetectorType_Moonclerk, Raw: []byte(resMatch), } @@ -65,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Moonclerk +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Moonclerk } func (s Scanner) Description() string { diff --git a/pkg/detectors/moonclerk/moonclerk_integration_test.go b/pkg/detectors/moonclerk/moonclerk_integration_test.go index f02c55707eac..a1b1bfc55761 100644 --- a/pkg/detectors/moonclerk/moonclerk_integration_test.go +++ b/pkg/detectors/moonclerk/moonclerk_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestMoonclerk_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestMoonclerk_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Moonclerk, + DetectorType: detector_typepb.DetectorType_Moonclerk, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestMoonclerk_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Moonclerk, + DetectorType: detector_typepb.DetectorType_Moonclerk, Verified: false, }, }, diff --git a/pkg/detectors/moosend/moosend.go b/pkg/detectors/moosend/moosend.go index e5080750f59b..1fa659c00152 100644 --- a/pkg/detectors/moosend/moosend.go +++ b/pkg/detectors/moosend/moosend.go @@ -2,14 +2,15 @@ package moosend import ( "context" - regexp "github.com/wasilibs/go-re2" "io" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Moosend, + DetectorType: detector_typepb.DetectorType_Moosend, Raw: []byte(resMatch), } @@ -69,8 +70,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Moosend +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Moosend } func (s Scanner) Description() string { diff --git a/pkg/detectors/moosend/moosend_integration_test.go b/pkg/detectors/moosend/moosend_integration_test.go index e8844d7d06b3..0e9ed8834f6a 100644 --- a/pkg/detectors/moosend/moosend_integration_test.go +++ b/pkg/detectors/moosend/moosend_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestMoosend_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestMoosend_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Moosend, + DetectorType: detector_typepb.DetectorType_Moosend, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestMoosend_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Moosend, + DetectorType: detector_typepb.DetectorType_Moosend, Verified: false, }, }, diff --git a/pkg/detectors/moralis/moralis.go b/pkg/detectors/moralis/moralis.go index 5d4dfb22692b..b6fd84ba2244 100644 --- a/pkg/detectors/moralis/moralis.go +++ b/pkg/detectors/moralis/moralis.go @@ -2,13 +2,14 @@ package moralis import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -39,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Moralis, + DetectorType: detector_typepb.DetectorType_Moralis, Raw: []byte(resMatch), } @@ -65,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Moralis +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Moralis } func (s Scanner) Description() string { diff --git a/pkg/detectors/moralis/moralis_integration_test.go b/pkg/detectors/moralis/moralis_integration_test.go index b1c7bf355afb..c13314ef0557 100644 --- a/pkg/detectors/moralis/moralis_integration_test.go +++ b/pkg/detectors/moralis/moralis_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestMoralis_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestMoralis_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Moralis, + DetectorType: detector_typepb.DetectorType_Moralis, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestMoralis_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Moralis, + DetectorType: detector_typepb.DetectorType_Moralis, Verified: false, }, }, diff --git a/pkg/detectors/mrticktock/mrticktock.go b/pkg/detectors/mrticktock/mrticktock.go index 3240496aaea9..89e320d6541a 100644 --- a/pkg/detectors/mrticktock/mrticktock.go +++ b/pkg/detectors/mrticktock/mrticktock.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -51,7 +51,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resPassword := strings.TrimSpace(passwordMatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Mrticktock, + DetectorType: detector_typepb.DetectorType_Mrticktock, Raw: []byte(emailMatch), } @@ -82,8 +82,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Mrticktock +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Mrticktock } func (s Scanner) Description() string { diff --git a/pkg/detectors/mrticktock/mrticktok_integration_test.go b/pkg/detectors/mrticktock/mrticktok_integration_test.go index 0a9e09075f90..43afe763e231 100644 --- a/pkg/detectors/mrticktock/mrticktok_integration_test.go +++ b/pkg/detectors/mrticktock/mrticktok_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestMrticktock_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestMrticktock_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Mrticktock, + DetectorType: detector_typepb.DetectorType_Mrticktock, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestMrticktock_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Mrticktock, + DetectorType: detector_typepb.DetectorType_Mrticktock, Verified: false, }, }, diff --git a/pkg/detectors/mux/mux.go b/pkg/detectors/mux/mux.go index d0f8c002dae6..89fb6491e18a 100644 --- a/pkg/detectors/mux/mux.go +++ b/pkg/detectors/mux/mux.go @@ -9,7 +9,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -47,7 +47,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resSecretMatch := strings.TrimSpace(secretMatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Mux, + DetectorType: detector_typepb.DetectorType_Mux, Raw: []byte(resMatch), RawV2: []byte(resMatch + resSecretMatch), } @@ -81,8 +81,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Mux +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Mux } func (s Scanner) Description() string { diff --git a/pkg/detectors/mux/mux_integration_test.go b/pkg/detectors/mux/mux_integration_test.go index ec8427b86542..ab570e2fdb89 100644 --- a/pkg/detectors/mux/mux_integration_test.go +++ b/pkg/detectors/mux/mux_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestMux_FromChunk(t *testing.T) { @@ -50,7 +50,7 @@ func TestMux_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Mux, + DetectorType: detector_typepb.DetectorType_Mux, Verified: true, }, }, @@ -66,7 +66,7 @@ func TestMux_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Mux, + DetectorType: detector_typepb.DetectorType_Mux, Verified: false, }, }, diff --git a/pkg/detectors/myfreshworks/myfreshworks.go b/pkg/detectors/myfreshworks/myfreshworks.go index 008ef1df8457..0263db346a1d 100644 --- a/pkg/detectors/myfreshworks/myfreshworks.go +++ b/pkg/detectors/myfreshworks/myfreshworks.go @@ -4,14 +4,15 @@ import ( "context" "encoding/json" "fmt" - regexp "github.com/wasilibs/go-re2" "io" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -48,7 +49,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resIdMatch := strings.TrimSpace(idmatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Myfreshworks, + DetectorType: detector_typepb.DetectorType_Myfreshworks, Raw: []byte(resMatch), } @@ -101,8 +102,8 @@ func verifyMyfreshworks(ctx context.Context, client *http.Client, resMatch, resI return false, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Myfreshworks +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Myfreshworks } func (s Scanner) Description() string { diff --git a/pkg/detectors/myfreshworks/myfreshworks_integration_test.go b/pkg/detectors/myfreshworks/myfreshworks_integration_test.go index f3e2528e0b1d..6fb871f089e4 100644 --- a/pkg/detectors/myfreshworks/myfreshworks_integration_test.go +++ b/pkg/detectors/myfreshworks/myfreshworks_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestMyfreshworks_FromChunk(t *testing.T) { @@ -51,7 +51,7 @@ func TestMyfreshworks_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Myfreshworks, + DetectorType: detector_typepb.DetectorType_Myfreshworks, Verified: true, }, }, @@ -67,7 +67,7 @@ func TestMyfreshworks_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Myfreshworks, + DetectorType: detector_typepb.DetectorType_Myfreshworks, Verified: false, }, }, @@ -83,7 +83,7 @@ func TestMyfreshworks_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Myfreshworks, + DetectorType: detector_typepb.DetectorType_Myfreshworks, Verified: false, }, }, @@ -100,7 +100,7 @@ func TestMyfreshworks_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Myfreshworks, + DetectorType: detector_typepb.DetectorType_Myfreshworks, Verified: false, }, }, diff --git a/pkg/detectors/myintervals/myintervals.go b/pkg/detectors/myintervals/myintervals.go index 2cc727f376b7..69a7930f5759 100644 --- a/pkg/detectors/myintervals/myintervals.go +++ b/pkg/detectors/myintervals/myintervals.go @@ -4,13 +4,14 @@ import ( "context" b64 "encoding/base64" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -41,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_MyIntervals, + DetectorType: detector_typepb.DetectorType_MyIntervals, Raw: []byte(resMatch), } @@ -69,8 +70,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_MyIntervals +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_MyIntervals } func (s Scanner) Description() string { diff --git a/pkg/detectors/myintervals/myintervals_integration_test.go b/pkg/detectors/myintervals/myintervals_integration_test.go index 18af6689df39..c305bb617c2c 100644 --- a/pkg/detectors/myintervals/myintervals_integration_test.go +++ b/pkg/detectors/myintervals/myintervals_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestMyintervals_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestMyintervals_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_MyIntervals, + DetectorType: detector_typepb.DetectorType_MyIntervals, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestMyintervals_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_MyIntervals, + DetectorType: detector_typepb.DetectorType_MyIntervals, Verified: false, }, }, diff --git a/pkg/detectors/nasdaqdatalink/nasdaqdatalink.go b/pkg/detectors/nasdaqdatalink/nasdaqdatalink.go index 920f58e08711..757c4e1e5f92 100644 --- a/pkg/detectors/nasdaqdatalink/nasdaqdatalink.go +++ b/pkg/detectors/nasdaqdatalink/nasdaqdatalink.go @@ -3,14 +3,15 @@ package nasdaqdatalink import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" "time" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -41,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_NasdaqDataLink, + DetectorType: detector_typepb.DetectorType_NasdaqDataLink, Raw: []byte(resMatch), } @@ -67,8 +68,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_NasdaqDataLink +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_NasdaqDataLink } func (s Scanner) Description() string { diff --git a/pkg/detectors/nasdaqdatalink/nasdaqdatalink_integration_test.go b/pkg/detectors/nasdaqdatalink/nasdaqdatalink_integration_test.go index 831a5a523151..3c71255068e5 100644 --- a/pkg/detectors/nasdaqdatalink/nasdaqdatalink_integration_test.go +++ b/pkg/detectors/nasdaqdatalink/nasdaqdatalink_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestNasdaqDataLink_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestNasdaqDataLink_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_NasdaqDataLink, + DetectorType: detector_typepb.DetectorType_NasdaqDataLink, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestNasdaqDataLink_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_NasdaqDataLink, + DetectorType: detector_typepb.DetectorType_NasdaqDataLink, Verified: false, }, }, diff --git a/pkg/detectors/nethunt/nethunt.go b/pkg/detectors/nethunt/nethunt.go index 94c6f8c20c12..08d7ea900a4f 100644 --- a/pkg/detectors/nethunt/nethunt.go +++ b/pkg/detectors/nethunt/nethunt.go @@ -2,16 +2,17 @@ package nethunt import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) -type Scanner struct{ +type Scanner struct { detectors.DefaultMultiPartCredentialProvider } @@ -47,7 +48,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result userPatMatch := strings.TrimSpace(idMatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Nethunt, + DetectorType: detector_typepb.DetectorType_Nethunt, Raw: []byte(tokenPatMatch), } @@ -73,8 +74,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Nethunt +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Nethunt } func (s Scanner) Description() string { diff --git a/pkg/detectors/nethunt/nethunt_integration_test.go b/pkg/detectors/nethunt/nethunt_integration_test.go index 89d5ff7499cb..88bef7f5ecdd 100644 --- a/pkg/detectors/nethunt/nethunt_integration_test.go +++ b/pkg/detectors/nethunt/nethunt_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestNethunt_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestNethunt_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Nethunt, + DetectorType: detector_typepb.DetectorType_Nethunt, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestNethunt_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Nethunt, + DetectorType: detector_typepb.DetectorType_Nethunt, Verified: false, }, }, diff --git a/pkg/detectors/netlify/v1/netlify_v1.go b/pkg/detectors/netlify/v1/netlify_v1.go index 1e648b0f3604..b4863c98b14a 100644 --- a/pkg/detectors/netlify/v1/netlify_v1.go +++ b/pkg/detectors/netlify/v1/netlify_v1.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -50,7 +50,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for match := range uniqueMatches { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Netlify, + DetectorType: detector_typepb.DetectorType_Netlify, Raw: []byte(match), } s1.ExtraData = map[string]string{ @@ -101,8 +101,8 @@ func verifyMatch(ctx context.Context, client *http.Client, token string) (bool, } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Netlify +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Netlify } func (s Scanner) Description() string { diff --git a/pkg/detectors/netlify/v1/netlify_v1_integration_test.go b/pkg/detectors/netlify/v1/netlify_v1_integration_test.go index 31bfac0b9992..51a814793252 100644 --- a/pkg/detectors/netlify/v1/netlify_v1_integration_test.go +++ b/pkg/detectors/netlify/v1/netlify_v1_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestNetlify_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestNetlify_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Netlify, + DetectorType: detector_typepb.DetectorType_Netlify, Verified: true, ExtraData: map[string]string{ "rotation_guide": "https://howtorotate.com/docs/tutorials/netlify/", @@ -68,7 +68,7 @@ func TestNetlify_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Netlify, + DetectorType: detector_typepb.DetectorType_Netlify, Verified: false, ExtraData: map[string]string{ "rotation_guide": "https://howtorotate.com/docs/tutorials/netlify/", diff --git a/pkg/detectors/netlify/v2/netlify_v2.go b/pkg/detectors/netlify/v2/netlify_v2.go index 536f3bab0e2d..3baf0a58b482 100644 --- a/pkg/detectors/netlify/v2/netlify_v2.go +++ b/pkg/detectors/netlify/v2/netlify_v2.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -50,7 +50,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for match := range uniqueMatches { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Netlify, + DetectorType: detector_typepb.DetectorType_Netlify, Raw: []byte(match), } s1.ExtraData = map[string]string{ @@ -101,8 +101,8 @@ func verifyMatch(ctx context.Context, client *http.Client, token string) (bool, } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Netlify +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Netlify } func (s Scanner) Description() string { diff --git a/pkg/detectors/netlify/v2/netlify_v2_integration_test.go b/pkg/detectors/netlify/v2/netlify_v2_integration_test.go index 0684556d2080..b141d7622798 100644 --- a/pkg/detectors/netlify/v2/netlify_v2_integration_test.go +++ b/pkg/detectors/netlify/v2/netlify_v2_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestNetlify_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestNetlify_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Netlify, + DetectorType: detector_typepb.DetectorType_Netlify, Verified: true, ExtraData: map[string]string{ "rotation_guide": "https://howtorotate.com/docs/tutorials/netlify/", @@ -68,7 +68,7 @@ func TestNetlify_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Netlify, + DetectorType: detector_typepb.DetectorType_Netlify, Verified: false, ExtraData: map[string]string{ "rotation_guide": "https://howtorotate.com/docs/tutorials/netlify/", diff --git a/pkg/detectors/netsuite/netsuite.go b/pkg/detectors/netsuite/netsuite.go index 9544ab7b8746..1eb43aab2d4d 100644 --- a/pkg/detectors/netsuite/netsuite.go +++ b/pkg/detectors/netsuite/netsuite.go @@ -18,7 +18,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -86,7 +86,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Netsuite, + DetectorType: detector_typepb.DetectorType_Netsuite, Raw: []byte(consumerKey), RawV2: []byte(consumerKey + consumerSecret), } @@ -113,8 +113,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Netsuite +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Netsuite } func (s Scanner) Description() string { diff --git a/pkg/detectors/neutrinoapi/neutrinoapi.go b/pkg/detectors/neutrinoapi/neutrinoapi.go index 54ef332f5129..2a39ab0f6315 100644 --- a/pkg/detectors/neutrinoapi/neutrinoapi.go +++ b/pkg/detectors/neutrinoapi/neutrinoapi.go @@ -4,18 +4,19 @@ import ( "bytes" "context" "fmt" - regexp "github.com/wasilibs/go-re2" "io" "mime/multipart" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) -type Scanner struct{ +type Scanner struct { detectors.DefaultMultiPartCredentialProvider } @@ -51,7 +52,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resIdMatch := strings.TrimSpace(idMatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_NeutrinoApi, + DetectorType: detector_typepb.DetectorType_NeutrinoApi, Raw: []byte(resMatch), } @@ -88,8 +89,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_NeutrinoApi +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_NeutrinoApi } func (s Scanner) Description() string { diff --git a/pkg/detectors/neutrinoapi/neutrinoapi_integration_test.go b/pkg/detectors/neutrinoapi/neutrinoapi_integration_test.go index 72aceff9797c..b43d8ba14c45 100644 --- a/pkg/detectors/neutrinoapi/neutrinoapi_integration_test.go +++ b/pkg/detectors/neutrinoapi/neutrinoapi_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestNeutrinoApi_FromChunk(t *testing.T) { @@ -49,11 +49,11 @@ func TestNeutrinoApi_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_NeutrinoApi, + DetectorType: detector_typepb.DetectorType_NeutrinoApi, Verified: false, }, { - DetectorType: detectorspb.DetectorType_NeutrinoApi, + DetectorType: detector_typepb.DetectorType_NeutrinoApi, Verified: true, }, }, @@ -69,11 +69,11 @@ func TestNeutrinoApi_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_NeutrinoApi, + DetectorType: detector_typepb.DetectorType_NeutrinoApi, Verified: false, }, { - DetectorType: detectorspb.DetectorType_NeutrinoApi, + DetectorType: detector_typepb.DetectorType_NeutrinoApi, Verified: false, }, }, diff --git a/pkg/detectors/newrelicpersonalapikey/newrelicpersonalapikey.go b/pkg/detectors/newrelicpersonalapikey/newrelicpersonalapikey.go index ce1b72017cfa..f9ad3a69e743 100644 --- a/pkg/detectors/newrelicpersonalapikey/newrelicpersonalapikey.go +++ b/pkg/detectors/newrelicpersonalapikey/newrelicpersonalapikey.go @@ -9,7 +9,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_NewRelicPersonalApiKey, + DetectorType: detector_typepb.DetectorType_NewRelicPersonalApiKey, Raw: []byte(resMatch), } @@ -75,8 +75,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_NewRelicPersonalApiKey +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_NewRelicPersonalApiKey } func (s Scanner) Description() string { diff --git a/pkg/detectors/newrelicpersonalapikey/newrelicpersonalapikey_integration_test.go b/pkg/detectors/newrelicpersonalapikey/newrelicpersonalapikey_integration_test.go index fbed22239ef5..b6c9e8ee39c9 100644 --- a/pkg/detectors/newrelicpersonalapikey/newrelicpersonalapikey_integration_test.go +++ b/pkg/detectors/newrelicpersonalapikey/newrelicpersonalapikey_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestNewRelicPersonalApiKey_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestNewRelicPersonalApiKey_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_NewRelicPersonalApiKey, + DetectorType: detector_typepb.DetectorType_NewRelicPersonalApiKey, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestNewRelicPersonalApiKey_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_NewRelicPersonalApiKey, + DetectorType: detector_typepb.DetectorType_NewRelicPersonalApiKey, Verified: false, }, }, diff --git a/pkg/detectors/newsapi/newsapi.go b/pkg/detectors/newsapi/newsapi.go index 785e137f26e4..499ff3e188be 100644 --- a/pkg/detectors/newsapi/newsapi.go +++ b/pkg/detectors/newsapi/newsapi.go @@ -2,13 +2,14 @@ package newsapi import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -39,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Newsapi, + DetectorType: detector_typepb.DetectorType_Newsapi, Raw: []byte(resMatch), } @@ -63,8 +64,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Newsapi +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Newsapi } func (s Scanner) Description() string { diff --git a/pkg/detectors/newsapi/newsapi_integration_test.go b/pkg/detectors/newsapi/newsapi_integration_test.go index 179b6cd9ec44..e6f247969ffd 100644 --- a/pkg/detectors/newsapi/newsapi_integration_test.go +++ b/pkg/detectors/newsapi/newsapi_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestNewsapi_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestNewsapi_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Newsapi, + DetectorType: detector_typepb.DetectorType_Newsapi, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestNewsapi_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Newsapi, + DetectorType: detector_typepb.DetectorType_Newsapi, Verified: false, }, }, diff --git a/pkg/detectors/newscatcher/newscatcher.go b/pkg/detectors/newscatcher/newscatcher.go index 3c70f4fd2108..1872c7f0230b 100644 --- a/pkg/detectors/newscatcher/newscatcher.go +++ b/pkg/detectors/newscatcher/newscatcher.go @@ -2,13 +2,14 @@ package newscatcher import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -39,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Newscatcher, + DetectorType: detector_typepb.DetectorType_Newscatcher, Raw: []byte(resMatch), } @@ -64,8 +65,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Newscatcher +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Newscatcher } func (s Scanner) Description() string { diff --git a/pkg/detectors/newscatcher/newscatcher_integration_test.go b/pkg/detectors/newscatcher/newscatcher_integration_test.go index 67799c9d2e6a..8ffbde1c621f 100644 --- a/pkg/detectors/newscatcher/newscatcher_integration_test.go +++ b/pkg/detectors/newscatcher/newscatcher_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestNewscatcher_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestNewscatcher_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Newscatcher, + DetectorType: detector_typepb.DetectorType_Newscatcher, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestNewscatcher_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Newscatcher, + DetectorType: detector_typepb.DetectorType_Newscatcher, Verified: false, }, }, diff --git a/pkg/detectors/nexmoapikey/nexmoapikey.go b/pkg/detectors/nexmoapikey/nexmoapikey.go index a7a5d7715609..51bf8c3bdc5c 100644 --- a/pkg/detectors/nexmoapikey/nexmoapikey.go +++ b/pkg/detectors/nexmoapikey/nexmoapikey.go @@ -2,13 +2,14 @@ package nexmoapikey import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -45,7 +46,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resSecret := strings.TrimSpace(secretMatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_NexmoApiKey, + DetectorType: detector_typepb.DetectorType_NexmoApiKey, Raw: []byte(resMatch), RawV2: []byte(resMatch + resSecret), } @@ -72,8 +73,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_NexmoApiKey +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_NexmoApiKey } func (s Scanner) Description() string { diff --git a/pkg/detectors/nexmoapikey/nexmoapikey_integration_test.go b/pkg/detectors/nexmoapikey/nexmoapikey_integration_test.go index 40f145b55e25..dcd073543cba 100644 --- a/pkg/detectors/nexmoapikey/nexmoapikey_integration_test.go +++ b/pkg/detectors/nexmoapikey/nexmoapikey_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestNexmoApiKey_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestNexmoApiKey_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_NexmoApiKey, + DetectorType: detector_typepb.DetectorType_NexmoApiKey, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestNexmoApiKey_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_NexmoApiKey, + DetectorType: detector_typepb.DetectorType_NexmoApiKey, Verified: false, }, }, diff --git a/pkg/detectors/nftport/nftport.go b/pkg/detectors/nftport/nftport.go index 5fea08fa4ddf..1c994599d815 100644 --- a/pkg/detectors/nftport/nftport.go +++ b/pkg/detectors/nftport/nftport.go @@ -2,13 +2,14 @@ package nftport import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -39,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Nftport, + DetectorType: detector_typepb.DetectorType_Nftport, Raw: []byte(resMatch), } @@ -65,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Nftport +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Nftport } func (s Scanner) Description() string { diff --git a/pkg/detectors/nftport/nftport_integration_test.go b/pkg/detectors/nftport/nftport_integration_test.go index 5e4d2dc50510..680eda909e6a 100644 --- a/pkg/detectors/nftport/nftport_integration_test.go +++ b/pkg/detectors/nftport/nftport_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestNftport_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestNftport_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Nftport, + DetectorType: detector_typepb.DetectorType_Nftport, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestNftport_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Nftport, + DetectorType: detector_typepb.DetectorType_Nftport, Verified: false, }, }, diff --git a/pkg/detectors/ngc/ngc.go b/pkg/detectors/ngc/ngc.go index 4a25909647d1..c70d921212d0 100644 --- a/pkg/detectors/ngc/ngc.go +++ b/pkg/detectors/ngc/ngc.go @@ -3,16 +3,17 @@ package ngc import ( "context" "encoding/base64" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) -type Scanner struct{ +type Scanner struct { detectors.DefaultMultiPartCredentialProvider } @@ -46,7 +47,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result containsKey := keyPat2.MatchString(string(decode)) if containsKey { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_NGC, + DetectorType: detector_typepb.DetectorType_NGC, Raw: []byte(resMatch), } @@ -76,8 +77,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_NGC +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_NGC } func (s Scanner) Description() string { diff --git a/pkg/detectors/ngc/ngc_integration_test.go b/pkg/detectors/ngc/ngc_integration_test.go index 647c1c055994..3a30f5210a67 100644 --- a/pkg/detectors/ngc/ngc_integration_test.go +++ b/pkg/detectors/ngc/ngc_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestNGC_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestNGC_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_NGC, + DetectorType: detector_typepb.DetectorType_NGC, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestNGC_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_NGC, + DetectorType: detector_typepb.DetectorType_NGC, Verified: false, }, }, diff --git a/pkg/detectors/ngrok/ngrok.go b/pkg/detectors/ngrok/ngrok.go index 6208575050a5..6361aa141a3f 100644 --- a/pkg/detectors/ngrok/ngrok.go +++ b/pkg/detectors/ngrok/ngrok.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -20,8 +20,8 @@ type Scanner struct { var _ detectors.Detector = (*Scanner)(nil) -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Ngrok +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Ngrok } func (s Scanner) Description() string { @@ -55,7 +55,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for token := range uniqueMatches { r := detectors.Result{ - DetectorType: detectorspb.DetectorType_Ngrok, + DetectorType: detector_typepb.DetectorType_Ngrok, Raw: []byte(token), } diff --git a/pkg/detectors/ngrok/ngrok_integration_test.go b/pkg/detectors/ngrok/ngrok_integration_test.go index 4882b2110f5b..3cca3cc1039b 100644 --- a/pkg/detectors/ngrok/ngrok_integration_test.go +++ b/pkg/detectors/ngrok/ngrok_integration_test.go @@ -15,7 +15,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestNgrok_FromChunk(t *testing.T) { @@ -52,7 +52,7 @@ func TestNgrok_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Ngrok, + DetectorType: detector_typepb.DetectorType_Ngrok, Verified: true, }, }, @@ -69,7 +69,7 @@ func TestNgrok_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Ngrok, + DetectorType: detector_typepb.DetectorType_Ngrok, Verified: true, }, }, @@ -86,7 +86,7 @@ func TestNgrok_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Ngrok, + DetectorType: detector_typepb.DetectorType_Ngrok, Verified: false, }, }, diff --git a/pkg/detectors/nicereply/nicereply.go b/pkg/detectors/nicereply/nicereply.go index d2e3376d7cac..38dfc4831756 100644 --- a/pkg/detectors/nicereply/nicereply.go +++ b/pkg/detectors/nicereply/nicereply.go @@ -4,13 +4,14 @@ import ( "context" b64 "encoding/base64" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -41,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Nicereply, + DetectorType: detector_typepb.DetectorType_Nicereply, Raw: []byte(resMatch), } @@ -68,8 +69,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Nicereply +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Nicereply } func (s Scanner) Description() string { diff --git a/pkg/detectors/nicereply/nicereply_integration_test.go b/pkg/detectors/nicereply/nicereply_integration_test.go index 5111a81cfd2f..45d6c491cfc0 100644 --- a/pkg/detectors/nicereply/nicereply_integration_test.go +++ b/pkg/detectors/nicereply/nicereply_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestNicereply_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestNicereply_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Nicereply, + DetectorType: detector_typepb.DetectorType_Nicereply, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestNicereply_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Nicereply, + DetectorType: detector_typepb.DetectorType_Nicereply, Verified: false, }, }, diff --git a/pkg/detectors/nightfall/nightfall.go b/pkg/detectors/nightfall/nightfall.go index ce147fd8f037..a773076a3bcd 100644 --- a/pkg/detectors/nightfall/nightfall.go +++ b/pkg/detectors/nightfall/nightfall.go @@ -3,13 +3,14 @@ package nightfall import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Nightfall, + DetectorType: detector_typepb.DetectorType_Nightfall, Raw: []byte(resMatch), } @@ -68,8 +69,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Nightfall +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Nightfall } func (s Scanner) Description() string { diff --git a/pkg/detectors/nightfall/nightfall_integration_test.go b/pkg/detectors/nightfall/nightfall_integration_test.go index b3f88c6a3539..df76f2b0caa2 100644 --- a/pkg/detectors/nightfall/nightfall_integration_test.go +++ b/pkg/detectors/nightfall/nightfall_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestNightfall_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestNightfall_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Nightfall, + DetectorType: detector_typepb.DetectorType_Nightfall, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestNightfall_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Nightfall, + DetectorType: detector_typepb.DetectorType_Nightfall, Verified: false, }, }, diff --git a/pkg/detectors/nimble/nimble.go b/pkg/detectors/nimble/nimble.go index 134d8bc942c0..b259ebe48940 100644 --- a/pkg/detectors/nimble/nimble.go +++ b/pkg/detectors/nimble/nimble.go @@ -3,13 +3,14 @@ package nimble import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Nimble, + DetectorType: detector_typepb.DetectorType_Nimble, Raw: []byte(resMatch), } @@ -65,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Nimble +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Nimble } func (s Scanner) Description() string { diff --git a/pkg/detectors/nimble/nimble_integration_test.go b/pkg/detectors/nimble/nimble_integration_test.go index 0803942cb672..148204fd4032 100644 --- a/pkg/detectors/nimble/nimble_integration_test.go +++ b/pkg/detectors/nimble/nimble_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestNimble_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestNimble_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Nimble, + DetectorType: detector_typepb.DetectorType_Nimble, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestNimble_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Nimble, + DetectorType: detector_typepb.DetectorType_Nimble, Verified: false, }, }, diff --git a/pkg/detectors/noticeable/noticeable.go b/pkg/detectors/noticeable/noticeable.go index ac244ad56d12..c007261aa43f 100644 --- a/pkg/detectors/noticeable/noticeable.go +++ b/pkg/detectors/noticeable/noticeable.go @@ -3,13 +3,14 @@ package noticeable import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Noticeable, + DetectorType: detector_typepb.DetectorType_Noticeable, Raw: []byte(resMatch), } @@ -67,8 +68,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Noticeable +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Noticeable } func (s Scanner) Description() string { diff --git a/pkg/detectors/noticeable/noticeable_integration_test.go b/pkg/detectors/noticeable/noticeable_integration_test.go index 97aaf32b8d86..8343a711f7ff 100644 --- a/pkg/detectors/noticeable/noticeable_integration_test.go +++ b/pkg/detectors/noticeable/noticeable_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestNoticeable_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestNoticeable_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Noticeable, + DetectorType: detector_typepb.DetectorType_Noticeable, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestNoticeable_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Noticeable, + DetectorType: detector_typepb.DetectorType_Noticeable, Verified: false, }, }, diff --git a/pkg/detectors/notion/notion.go b/pkg/detectors/notion/notion.go index 614981e8689b..3e80ff1106ee 100644 --- a/pkg/detectors/notion/notion.go +++ b/pkg/detectors/notion/notion.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for _, match := range matches { resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Notion, + DetectorType: detector_typepb.DetectorType_Notion, Raw: []byte(resMatch), } @@ -74,8 +74,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Notion +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Notion } func (s Scanner) Description() string { diff --git a/pkg/detectors/notion/notion_integration_test.go b/pkg/detectors/notion/notion_integration_test.go index e4947d90be54..f0fbb35ab5f8 100644 --- a/pkg/detectors/notion/notion_integration_test.go +++ b/pkg/detectors/notion/notion_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestNotion_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestNotion_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Notion, + DetectorType: detector_typepb.DetectorType_Notion, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestNotion_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Notion, + DetectorType: detector_typepb.DetectorType_Notion, Verified: false, }, }, diff --git a/pkg/detectors/nozbeteams/nozbeteams.go b/pkg/detectors/nozbeteams/nozbeteams.go index 39b90d25aaf6..f29a4b1daa6a 100644 --- a/pkg/detectors/nozbeteams/nozbeteams.go +++ b/pkg/detectors/nozbeteams/nozbeteams.go @@ -9,7 +9,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_NozbeTeams, + DetectorType: detector_typepb.DetectorType_NozbeTeams, Raw: []byte(resMatch), } @@ -66,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_NozbeTeams +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_NozbeTeams } func (s Scanner) Description() string { diff --git a/pkg/detectors/nozbeteams/nozbeteams_integration_test.go b/pkg/detectors/nozbeteams/nozbeteams_integration_test.go index 62051d31ebf5..4a6861aeae9c 100644 --- a/pkg/detectors/nozbeteams/nozbeteams_integration_test.go +++ b/pkg/detectors/nozbeteams/nozbeteams_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestNozbeTeams_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestNozbeTeams_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_NozbeTeams, + DetectorType: detector_typepb.DetectorType_NozbeTeams, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestNozbeTeams_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_NozbeTeams, + DetectorType: detector_typepb.DetectorType_NozbeTeams, Verified: false, }, }, diff --git a/pkg/detectors/npmtoken/npmtoken.go b/pkg/detectors/npmtoken/npmtoken.go index b4cb3a422a1c..8b96490ad5ba 100644 --- a/pkg/detectors/npmtoken/npmtoken.go +++ b/pkg/detectors/npmtoken/npmtoken.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -42,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_NpmToken, + DetectorType: detector_typepb.DetectorType_NpmToken, Raw: []byte(resMatch), } s1.ExtraData = map[string]string{ @@ -73,8 +73,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_NpmToken +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_NpmToken } func (s Scanner) Description() string { diff --git a/pkg/detectors/npmtoken/npmtoken_integration_test.go b/pkg/detectors/npmtoken/npmtoken_integration_test.go index a2d2b2357366..de5bfde9e9fd 100644 --- a/pkg/detectors/npmtoken/npmtoken_integration_test.go +++ b/pkg/detectors/npmtoken/npmtoken_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestNpmToken_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestNpmToken_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_NpmToken, + DetectorType: detector_typepb.DetectorType_NpmToken, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestNpmToken_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_NpmToken, + DetectorType: detector_typepb.DetectorType_NpmToken, Verified: false, }, }, diff --git a/pkg/detectors/npmtokenv2/npmtokenv2.go b/pkg/detectors/npmtokenv2/npmtokenv2.go index 76f740e8e6f4..f08d73a8632b 100644 --- a/pkg/detectors/npmtokenv2/npmtokenv2.go +++ b/pkg/detectors/npmtokenv2/npmtokenv2.go @@ -9,7 +9,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -43,7 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := match[1] s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_NpmToken, + DetectorType: detector_typepb.DetectorType_NpmToken, Raw: []byte(resMatch), } s1.ExtraData = map[string]string{ @@ -74,8 +74,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_NpmToken +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_NpmToken } func (s Scanner) Description() string { diff --git a/pkg/detectors/npmtokenv2/npmtokenv2_integration_test.go b/pkg/detectors/npmtokenv2/npmtokenv2_integration_test.go index 0a9d285c8d2e..1434941118cd 100644 --- a/pkg/detectors/npmtokenv2/npmtokenv2_integration_test.go +++ b/pkg/detectors/npmtokenv2/npmtokenv2_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestNpmToken_New_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestNpmToken_New_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_NpmToken, + DetectorType: detector_typepb.DetectorType_NpmToken, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestNpmToken_New_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_NpmToken, + DetectorType: detector_typepb.DetectorType_NpmToken, Verified: false, }, }, diff --git a/pkg/detectors/nugetapikey/nugetapikey.go b/pkg/detectors/nugetapikey/nugetapikey.go index 550c3d02a6a8..a90f3bd72be2 100644 --- a/pkg/detectors/nugetapikey/nugetapikey.go +++ b/pkg/detectors/nugetapikey/nugetapikey.go @@ -2,13 +2,14 @@ package nugetapikey import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -39,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_NuGetApiKey, + DetectorType: detector_typepb.DetectorType_NuGetApiKey, Raw: []byte(resMatch), } @@ -66,8 +67,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_NuGetApiKey +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_NuGetApiKey } func (s Scanner) Description() string { diff --git a/pkg/detectors/nugetapikey/nugetapikey_integration_test.go b/pkg/detectors/nugetapikey/nugetapikey_integration_test.go index ea742effdeb1..dcf3262934ca 100644 --- a/pkg/detectors/nugetapikey/nugetapikey_integration_test.go +++ b/pkg/detectors/nugetapikey/nugetapikey_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestNugetapikey_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestNugetapikey_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_NuGetApiKey, + DetectorType: detector_typepb.DetectorType_NuGetApiKey, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestNugetapikey_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_NuGetApiKey, + DetectorType: detector_typepb.DetectorType_NuGetApiKey, Verified: false, }, }, diff --git a/pkg/detectors/numverify/numverify.go b/pkg/detectors/numverify/numverify.go index 114caea08be9..7537b5e43abb 100644 --- a/pkg/detectors/numverify/numverify.go +++ b/pkg/detectors/numverify/numverify.go @@ -3,14 +3,15 @@ package numverify import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "io" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -37,7 +38,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for _, match := range matches { resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Numverify, + DetectorType: detector_typepb.DetectorType_Numverify, Raw: []byte(resMatch), } if verify { @@ -68,8 +69,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Numverify +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Numverify } func (s Scanner) Description() string { diff --git a/pkg/detectors/numverify/numverify_integration_test.go b/pkg/detectors/numverify/numverify_integration_test.go index 7de6d15bf6ce..645f0d2cb3fe 100644 --- a/pkg/detectors/numverify/numverify_integration_test.go +++ b/pkg/detectors/numverify/numverify_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestNumverify_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestNumverify_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Numverify, + DetectorType: detector_typepb.DetectorType_Numverify, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestNumverify_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Numverify, + DetectorType: detector_typepb.DetectorType_Numverify, Verified: false, }, }, diff --git a/pkg/detectors/nutritionix/nutritionix.go b/pkg/detectors/nutritionix/nutritionix.go index c3c7584390bb..e6e048bcda15 100644 --- a/pkg/detectors/nutritionix/nutritionix.go +++ b/pkg/detectors/nutritionix/nutritionix.go @@ -2,16 +2,17 @@ package nutritionix import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) -type Scanner struct{ +type Scanner struct { detectors.DefaultMultiPartCredentialProvider } @@ -47,7 +48,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resIdMatch := strings.TrimSpace(idMatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Nutritionix, + DetectorType: detector_typepb.DetectorType_Nutritionix, Raw: []byte(resMatch), } @@ -76,8 +77,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Nutritionix +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Nutritionix } func (s Scanner) Description() string { diff --git a/pkg/detectors/nutritionix/nutritionix_integration_test.go b/pkg/detectors/nutritionix/nutritionix_integration_test.go index 8e37e878e5aa..810a3ac27bc6 100644 --- a/pkg/detectors/nutritionix/nutritionix_integration_test.go +++ b/pkg/detectors/nutritionix/nutritionix_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestNutritionix_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestNutritionix_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Nutritionix, + DetectorType: detector_typepb.DetectorType_Nutritionix, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestNutritionix_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Nutritionix, + DetectorType: detector_typepb.DetectorType_Nutritionix, Verified: false, }, }, diff --git a/pkg/detectors/nvapi/nvapi.go b/pkg/detectors/nvapi/nvapi.go index 27cf72f2c1b1..6bd46ff3156b 100644 --- a/pkg/detectors/nvapi/nvapi.go +++ b/pkg/detectors/nvapi/nvapi.go @@ -12,7 +12,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -45,7 +45,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for match := range uniqueMatches { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_NVAPI, + DetectorType: detector_typepb.DetectorType_NVAPI, Raw: []byte(match), } @@ -99,8 +99,8 @@ func verifyMatch(ctx context.Context, client *http.Client, token string) (bool, } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_NVAPI +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_NVAPI } func (s Scanner) Description() string { diff --git a/pkg/detectors/nvapi/nvapi_integration_test.go b/pkg/detectors/nvapi/nvapi_integration_test.go index 2185782b9d52..f135602945ba 100644 --- a/pkg/detectors/nvapi/nvapi_integration_test.go +++ b/pkg/detectors/nvapi/nvapi_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestNvapi_FromChunk(t *testing.T) { @@ -50,7 +50,7 @@ func TestNvapi_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_NVAPI, + DetectorType: detector_typepb.DetectorType_NVAPI, Verified: true, }, }, @@ -67,7 +67,7 @@ func TestNvapi_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_NVAPI, + DetectorType: detector_typepb.DetectorType_NVAPI, Verified: false, }, }, @@ -96,7 +96,7 @@ func TestNvapi_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_NVAPI, + DetectorType: detector_typepb.DetectorType_NVAPI, Verified: false, }, }, @@ -113,7 +113,7 @@ func TestNvapi_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_NVAPI, + DetectorType: detector_typepb.DetectorType_NVAPI, Verified: false, }, }, diff --git a/pkg/detectors/nylas/nylas.go b/pkg/detectors/nylas/nylas.go index 10f98ed5502e..2f704000f2f1 100644 --- a/pkg/detectors/nylas/nylas.go +++ b/pkg/detectors/nylas/nylas.go @@ -3,13 +3,14 @@ package nylas import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Nylas, + DetectorType: detector_typepb.DetectorType_Nylas, Raw: []byte(resMatch), } @@ -66,8 +67,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Nylas +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Nylas } func (s Scanner) Description() string { diff --git a/pkg/detectors/nylas/nylas_integration_test.go b/pkg/detectors/nylas/nylas_integration_test.go index 0e64d99d6709..ef57c27b29ef 100644 --- a/pkg/detectors/nylas/nylas_integration_test.go +++ b/pkg/detectors/nylas/nylas_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestNylas_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestNylas_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Nylas, + DetectorType: detector_typepb.DetectorType_Nylas, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestNylas_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Nylas, + DetectorType: detector_typepb.DetectorType_Nylas, Verified: false, }, }, diff --git a/pkg/detectors/oanda/oanda.go b/pkg/detectors/oanda/oanda.go index 1cfce104c702..2541ff654e55 100644 --- a/pkg/detectors/oanda/oanda.go +++ b/pkg/detectors/oanda/oanda.go @@ -3,13 +3,14 @@ package oanda import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Oanda, + DetectorType: detector_typepb.DetectorType_Oanda, Raw: []byte(resMatch), } @@ -65,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Oanda +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Oanda } func (s Scanner) Description() string { diff --git a/pkg/detectors/oanda/oanda_integration_test.go b/pkg/detectors/oanda/oanda_integration_test.go index adbbee09f7b6..1d1bc602210e 100644 --- a/pkg/detectors/oanda/oanda_integration_test.go +++ b/pkg/detectors/oanda/oanda_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestOanda_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestOanda_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Oanda, + DetectorType: detector_typepb.DetectorType_Oanda, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestOanda_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Oanda, + DetectorType: detector_typepb.DetectorType_Oanda, Verified: false, }, }, diff --git a/pkg/detectors/okta/okta.go b/pkg/detectors/okta/okta.go index 50899e6f80ad..011b7279a3f0 100644 --- a/pkg/detectors/okta/okta.go +++ b/pkg/detectors/okta/okta.go @@ -10,7 +10,7 @@ import ( regexp "github.com/wasilibs/go-re2" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -51,7 +51,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for token := range uniqueTokens { for domain := range uniqueDomains { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Okta, + DetectorType: detector_typepb.DetectorType_Okta, Raw: []byte(token), RawV2: []byte(fmt.Sprintf("%s:%s", domain, token)), } @@ -107,8 +107,8 @@ func verifyOktaToken(ctx context.Context, client *http.Client, domain, token str } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Okta +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Okta } func (s Scanner) Description() string { diff --git a/pkg/detectors/okta/okta_integration_test.go b/pkg/detectors/okta/okta_integration_test.go index 75b7ee0d906c..7d94a2285731 100644 --- a/pkg/detectors/okta/okta_integration_test.go +++ b/pkg/detectors/okta/okta_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestOkta_FromChunk(t *testing.T) { @@ -51,7 +51,7 @@ func TestOkta_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Okta, + DetectorType: detector_typepb.DetectorType_Okta, Verified: true, }, }, @@ -68,7 +68,7 @@ func TestOkta_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Okta, + DetectorType: detector_typepb.DetectorType_Okta, Verified: false, }, }, @@ -97,7 +97,7 @@ func TestOkta_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Okta, + DetectorType: detector_typepb.DetectorType_Okta, Verified: false, }, }, diff --git a/pkg/detectors/omnisend/omnisend.go b/pkg/detectors/omnisend/omnisend.go index e2f38ed499aa..1e3bfa171e9e 100644 --- a/pkg/detectors/omnisend/omnisend.go +++ b/pkg/detectors/omnisend/omnisend.go @@ -2,13 +2,14 @@ package omnisend import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -39,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Omnisend, + DetectorType: detector_typepb.DetectorType_Omnisend, Raw: []byte(resMatch), } @@ -64,8 +65,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Omnisend +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Omnisend } func (s Scanner) Description() string { diff --git a/pkg/detectors/omnisend/omnisend_integration_test.go b/pkg/detectors/omnisend/omnisend_integration_test.go index 180fb37a3c39..8f7ea88d37a5 100644 --- a/pkg/detectors/omnisend/omnisend_integration_test.go +++ b/pkg/detectors/omnisend/omnisend_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestOmnisend_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestOmnisend_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Omnisend, + DetectorType: detector_typepb.DetectorType_Omnisend, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestOmnisend_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Omnisend, + DetectorType: detector_typepb.DetectorType_Omnisend, Verified: false, }, }, diff --git a/pkg/detectors/onedesk/onedesk.go b/pkg/detectors/onedesk/onedesk.go index 6776cf1c0bd5..094e18184164 100644 --- a/pkg/detectors/onedesk/onedesk.go +++ b/pkg/detectors/onedesk/onedesk.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -51,7 +51,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resPword := strings.TrimSpace(pwordMatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Onedesk, + DetectorType: detector_typepb.DetectorType_Onedesk, Raw: []byte(emailMatch), } @@ -82,8 +82,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Onedesk +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Onedesk } func (s Scanner) Description() string { diff --git a/pkg/detectors/onedesk/onedesk_integration_test.go b/pkg/detectors/onedesk/onedesk_integration_test.go index 1fdd5e72385a..68e19ca6dac9 100644 --- a/pkg/detectors/onedesk/onedesk_integration_test.go +++ b/pkg/detectors/onedesk/onedesk_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestOnedesk_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestOnedesk_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Onedesk, + DetectorType: detector_typepb.DetectorType_Onedesk, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestOnedesk_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Onedesk, + DetectorType: detector_typepb.DetectorType_Onedesk, Verified: false, }, }, diff --git a/pkg/detectors/onelogin/onelogin.go b/pkg/detectors/onelogin/onelogin.go index f3606c9cafba..98a6b32ad89e 100644 --- a/pkg/detectors/onelogin/onelogin.go +++ b/pkg/detectors/onelogin/onelogin.go @@ -3,16 +3,17 @@ package onelogin import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" "time" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) -type Scanner struct{ +type Scanner struct { detectors.DefaultMultiPartCredentialProvider } @@ -44,7 +45,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for _, clientSecret := range oauthClientSecretPat.FindAllStringSubmatch(dataStr, -1) { result := detectors.Result{ - DetectorType: detectorspb.DetectorType_OneLogin, + DetectorType: detector_typepb.DetectorType_OneLogin, Raw: []byte(clientID[1]), RawV2: []byte(fmt.Sprintf("%s:%s", clientID[1], clientSecret[1])), Redacted: clientID[1], @@ -77,8 +78,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_OneLogin +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_OneLogin } func (s Scanner) Description() string { diff --git a/pkg/detectors/onelogin/onelogin_integration_test.go b/pkg/detectors/onelogin/onelogin_integration_test.go index 39b2897c76a2..b78003abb2f1 100644 --- a/pkg/detectors/onelogin/onelogin_integration_test.go +++ b/pkg/detectors/onelogin/onelogin_integration_test.go @@ -12,7 +12,7 @@ import ( "github.com/kylelemons/godebug/pretty" "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestOnelogin_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestOnelogin_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_OneLogin, + DetectorType: detector_typepb.DetectorType_OneLogin, Verified: true, Redacted: id, }, @@ -65,7 +65,7 @@ func TestOnelogin_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_OneLogin, + DetectorType: detector_typepb.DetectorType_OneLogin, Verified: false, Redacted: id, }, diff --git a/pkg/detectors/onepagecrm/onepagecrm.go b/pkg/detectors/onepagecrm/onepagecrm.go index fd1a35da1eb0..67ec4615fec8 100644 --- a/pkg/detectors/onepagecrm/onepagecrm.go +++ b/pkg/detectors/onepagecrm/onepagecrm.go @@ -2,13 +2,14 @@ package onepagecrm import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -47,7 +48,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result userPatMatch := strings.TrimSpace(idMatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_OnepageCRM, + DetectorType: detector_typepb.DetectorType_OnepageCRM, Raw: []byte(tokenPatMatch), } if verify { @@ -71,8 +72,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_OnepageCRM +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_OnepageCRM } func (s Scanner) Description() string { diff --git a/pkg/detectors/onepagecrm/onepagecrm_integration_test.go b/pkg/detectors/onepagecrm/onepagecrm_integration_test.go index 357d062d0959..0b754d5ca54b 100644 --- a/pkg/detectors/onepagecrm/onepagecrm_integration_test.go +++ b/pkg/detectors/onepagecrm/onepagecrm_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestOnepageCRM_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestOnepageCRM_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_OnepageCRM, + DetectorType: detector_typepb.DetectorType_OnepageCRM, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestOnepageCRM_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_OnepageCRM, + DetectorType: detector_typepb.DetectorType_OnepageCRM, Verified: false, }, }, diff --git a/pkg/detectors/onesignal/onesignal.go b/pkg/detectors/onesignal/onesignal.go index e7a35f7101b6..13abcde9b6ad 100644 --- a/pkg/detectors/onesignal/onesignal.go +++ b/pkg/detectors/onesignal/onesignal.go @@ -4,13 +4,14 @@ import ( "context" b64 "encoding/base64" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -41,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Onesignal, + DetectorType: detector_typepb.DetectorType_Onesignal, Raw: []byte(resMatch), } @@ -69,8 +70,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Onesignal +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Onesignal } func (s Scanner) Description() string { diff --git a/pkg/detectors/onesignal/onesignal_integration_test.go b/pkg/detectors/onesignal/onesignal_integration_test.go index 30d1508a04f6..a947eea82f51 100644 --- a/pkg/detectors/onesignal/onesignal_integration_test.go +++ b/pkg/detectors/onesignal/onesignal_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestOnesignal_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestOnesignal_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Onesignal, + DetectorType: detector_typepb.DetectorType_Onesignal, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestOnesignal_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Onesignal, + DetectorType: detector_typepb.DetectorType_Onesignal, Verified: false, }, }, diff --git a/pkg/detectors/onfleet/onfleet.go b/pkg/detectors/onfleet/onfleet.go index d3b6717e70ec..147d062a4ff9 100644 --- a/pkg/detectors/onfleet/onfleet.go +++ b/pkg/detectors/onfleet/onfleet.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -44,7 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for match := range uniqueMatches { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Onfleet, + DetectorType: detector_typepb.DetectorType_Onfleet, Raw: []byte(match), } @@ -95,8 +95,8 @@ func verifyMatch(ctx context.Context, client *http.Client, token string) (bool, } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Onfleet +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Onfleet } func (s Scanner) Description() string { diff --git a/pkg/detectors/onfleet/onfleet_integration_test.go b/pkg/detectors/onfleet/onfleet_integration_test.go index d5b527a4f9d0..b044b0b03312 100644 --- a/pkg/detectors/onfleet/onfleet_integration_test.go +++ b/pkg/detectors/onfleet/onfleet_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestOnfleet_FromChunk(t *testing.T) { @@ -50,7 +50,7 @@ func TestOnfleet_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Onfleet, + DetectorType: detector_typepb.DetectorType_Onfleet, Verified: true, }, }, @@ -67,7 +67,7 @@ func TestOnfleet_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Onfleet, + DetectorType: detector_typepb.DetectorType_Onfleet, Verified: false, }, }, @@ -96,7 +96,7 @@ func TestOnfleet_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Onfleet, + DetectorType: detector_typepb.DetectorType_Onfleet, Verified: false, }, }, @@ -113,7 +113,7 @@ func TestOnfleet_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Onfleet, + DetectorType: detector_typepb.DetectorType_Onfleet, Verified: false, }, }, diff --git a/pkg/detectors/oopspam/oopspam.go b/pkg/detectors/oopspam/oopspam.go index a77f66585898..f395dc393679 100644 --- a/pkg/detectors/oopspam/oopspam.go +++ b/pkg/detectors/oopspam/oopspam.go @@ -2,13 +2,14 @@ package oopspam import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -39,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_OOPSpam, + DetectorType: detector_typepb.DetectorType_OOPSpam, Raw: []byte(resMatch), } @@ -66,8 +67,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_OOPSpam +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_OOPSpam } func (s Scanner) Description() string { diff --git a/pkg/detectors/oopspam/oopspam_integration_test.go b/pkg/detectors/oopspam/oopspam_integration_test.go index 5c5a32d4eddf..d854bb092c3a 100644 --- a/pkg/detectors/oopspam/oopspam_integration_test.go +++ b/pkg/detectors/oopspam/oopspam_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestOOPSpam_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestOOPSpam_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_OOPSpam, + DetectorType: detector_typepb.DetectorType_OOPSpam, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestOOPSpam_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_OOPSpam, + DetectorType: detector_typepb.DetectorType_OOPSpam, Verified: false, }, }, diff --git a/pkg/detectors/openai/openai.go b/pkg/detectors/openai/openai.go index 09dd703b17b1..dbb6233cb338 100644 --- a/pkg/detectors/openai/openai.go +++ b/pkg/detectors/openai/openai.go @@ -12,7 +12,7 @@ import ( regexp "github.com/wasilibs/go-re2" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" "github.com/trufflesecurity/trufflehog/v3/pkg/common" ) @@ -51,7 +51,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for token := range uniqueMatches { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_OpenAI, + DetectorType: detector_typepb.DetectorType_OpenAI, Redacted: token[:3] + "..." + token[min(len(token)-1, 47):], Raw: []byte(token), } @@ -120,8 +120,8 @@ func verifyToken(ctx context.Context, client *http.Client, token string) (bool, } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_OpenAI +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_OpenAI } func (s Scanner) Description() string { diff --git a/pkg/detectors/openai/openai_integration_test.go b/pkg/detectors/openai/openai_integration_test.go index 770b127948df..07b548f3a0b1 100644 --- a/pkg/detectors/openai/openai_integration_test.go +++ b/pkg/detectors/openai/openai_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestOpenAI_FromChunk(t *testing.T) { @@ -50,7 +50,7 @@ func TestOpenAI_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_OpenAI, + DetectorType: detector_typepb.DetectorType_OpenAI, Redacted: "sk-...gOPc", Verified: false, }, @@ -67,7 +67,7 @@ func TestOpenAI_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_OpenAI, + DetectorType: detector_typepb.DetectorType_OpenAI, Verified: true, Redacted: "sk-...gOPb", }, diff --git a/pkg/detectors/openaiadmin/openaiadmin.go b/pkg/detectors/openaiadmin/openaiadmin.go index cddc53c673c8..5b210b9d2fa2 100644 --- a/pkg/detectors/openaiadmin/openaiadmin.go +++ b/pkg/detectors/openaiadmin/openaiadmin.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -45,7 +45,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for token := range uniqueMatches { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_OpenAIAdmin, + DetectorType: detector_typepb.DetectorType_OpenAIAdmin, Redacted: token[:11] + "..." + token[len(token)-4:], Raw: []byte(token), } @@ -102,8 +102,8 @@ func verifyMatch(ctx context.Context, client *http.Client, token string) (bool, } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_OpenAIAdmin +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_OpenAIAdmin } func (s Scanner) Description() string { diff --git a/pkg/detectors/openaiadmin/openaiadmin_integration_test.go b/pkg/detectors/openaiadmin/openaiadmin_integration_test.go index 33515562032e..69769d262501 100644 --- a/pkg/detectors/openaiadmin/openaiadmin_integration_test.go +++ b/pkg/detectors/openaiadmin/openaiadmin_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestOpenAIAdmin_FromChunk(t *testing.T) { @@ -50,7 +50,7 @@ func TestOpenAIAdmin_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_OpenAIAdmin, + DetectorType: detector_typepb.DetectorType_OpenAIAdmin, Verified: true, }, }, @@ -67,7 +67,7 @@ func TestOpenAIAdmin_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_OpenAIAdmin, + DetectorType: detector_typepb.DetectorType_OpenAIAdmin, Verified: false, }, }, @@ -96,7 +96,7 @@ func TestOpenAIAdmin_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_OpenAIAdmin, + DetectorType: detector_typepb.DetectorType_OpenAIAdmin, Verified: false, }, }, @@ -113,7 +113,7 @@ func TestOpenAIAdmin_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_OpenAIAdmin, + DetectorType: detector_typepb.DetectorType_OpenAIAdmin, Verified: false, }, }, diff --git a/pkg/detectors/opencagedata/opencagedata.go b/pkg/detectors/opencagedata/opencagedata.go index 89dc18d958d7..ce02acf4712f 100644 --- a/pkg/detectors/opencagedata/opencagedata.go +++ b/pkg/detectors/opencagedata/opencagedata.go @@ -3,13 +3,14 @@ package opencagedata import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_OpenCageData, + DetectorType: detector_typepb.DetectorType_OpenCageData, Raw: []byte(resMatch), } @@ -64,8 +65,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_OpenCageData +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_OpenCageData } func (s Scanner) Description() string { diff --git a/pkg/detectors/opencagedata/opencagedata_integration_test.go b/pkg/detectors/opencagedata/opencagedata_integration_test.go index ed11edcd25b3..c338e8fdc1ac 100644 --- a/pkg/detectors/opencagedata/opencagedata_integration_test.go +++ b/pkg/detectors/opencagedata/opencagedata_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestOpenCageData_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestOpenCageData_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_OpenCageData, + DetectorType: detector_typepb.DetectorType_OpenCageData, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestOpenCageData_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_OpenCageData, + DetectorType: detector_typepb.DetectorType_OpenCageData, Verified: false, }, }, diff --git a/pkg/detectors/openuv/openuv.go b/pkg/detectors/openuv/openuv.go index cf50b0a17674..fe408feec11d 100644 --- a/pkg/detectors/openuv/openuv.go +++ b/pkg/detectors/openuv/openuv.go @@ -2,13 +2,14 @@ package openuv import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -39,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Openuv, + DetectorType: detector_typepb.DetectorType_Openuv, Raw: []byte(resMatch), } @@ -54,7 +55,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result defer res.Body.Close() if res.StatusCode >= 200 && res.StatusCode < 300 { s1.Verified = true - } + } } } @@ -64,8 +65,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Openuv +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Openuv } func (s Scanner) Description() string { diff --git a/pkg/detectors/openuv/openuv_integration_test.go b/pkg/detectors/openuv/openuv_integration_test.go index e1ff7bf380b3..88fbf6181cfc 100644 --- a/pkg/detectors/openuv/openuv_integration_test.go +++ b/pkg/detectors/openuv/openuv_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestOpenuv_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestOpenuv_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Openuv, + DetectorType: detector_typepb.DetectorType_Openuv, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestOpenuv_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Openuv, + DetectorType: detector_typepb.DetectorType_Openuv, Verified: false, }, }, diff --git a/pkg/detectors/openvpn/openvpn.go b/pkg/detectors/openvpn/openvpn.go index 21900342097c..3bdc37d8e571 100644 --- a/pkg/detectors/openvpn/openvpn.go +++ b/pkg/detectors/openvpn/openvpn.go @@ -10,7 +10,7 @@ import ( regexp "github.com/wasilibs/go-re2" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -51,7 +51,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result domainRes := strings.TrimSpace(domainMatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_OpenVpn, + DetectorType: detector_typepb.DetectorType_OpenVpn, Raw: []byte(clientSecretRes), RawV2: []byte(clientIDRes + clientSecretRes), } @@ -100,8 +100,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_OpenVpn +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_OpenVpn } func (s Scanner) Description() string { diff --git a/pkg/detectors/openvpn/openvpn_integration_test.go b/pkg/detectors/openvpn/openvpn_integration_test.go index b1521d2cfdf5..430e5289e243 100644 --- a/pkg/detectors/openvpn/openvpn_integration_test.go +++ b/pkg/detectors/openvpn/openvpn_integration_test.go @@ -15,7 +15,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestOpenvpn_FromChunk(t *testing.T) { @@ -54,7 +54,7 @@ func TestOpenvpn_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_OpenVpn, + DetectorType: detector_typepb.DetectorType_OpenVpn, Verified: true, RawV2: []byte(clientId + clientSecret), }, @@ -72,7 +72,7 @@ func TestOpenvpn_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_OpenVpn, + DetectorType: detector_typepb.DetectorType_OpenVpn, Verified: false, RawV2: []byte(clientId + inactiveClientSecret), }, diff --git a/pkg/detectors/openweather/openweather.go b/pkg/detectors/openweather/openweather.go index b3458e160fbf..bc0b1fc38805 100644 --- a/pkg/detectors/openweather/openweather.go +++ b/pkg/detectors/openweather/openweather.go @@ -2,13 +2,14 @@ package openweather import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -39,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_OpenWeather, + DetectorType: detector_typepb.DetectorType_OpenWeather, Raw: []byte(resMatch), } @@ -64,8 +65,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_OpenWeather +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_OpenWeather } func (s Scanner) Description() string { diff --git a/pkg/detectors/openweather/openweather_integration_test.go b/pkg/detectors/openweather/openweather_integration_test.go index d15a14d56f64..8054ebbeb74a 100644 --- a/pkg/detectors/openweather/openweather_integration_test.go +++ b/pkg/detectors/openweather/openweather_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestOpenWeather_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestOpenWeather_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_OpenWeather, + DetectorType: detector_typepb.DetectorType_OpenWeather, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestOpenWeather_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_OpenWeather, + DetectorType: detector_typepb.DetectorType_OpenWeather, Verified: false, }, }, diff --git a/pkg/detectors/opsgenie/opsgenie.go b/pkg/detectors/opsgenie/opsgenie.go index 519021478372..afbc5b4abf80 100644 --- a/pkg/detectors/opsgenie/opsgenie.go +++ b/pkg/detectors/opsgenie/opsgenie.go @@ -12,7 +12,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -28,8 +28,8 @@ var ( keyPat = regexp.MustCompile(detectors.PrefixRegex([]string{"opsgenie"}) + `\b([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})\b`) ) -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Opsgenie +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Opsgenie } // Keywords are used for efficiently pre-filtering chunks. @@ -62,7 +62,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for key := range keyMatches { r := detectors.Result{ - DetectorType: detectorspb.DetectorType_Opsgenie, + DetectorType: detector_typepb.DetectorType_Opsgenie, Raw: []byte(key), } diff --git a/pkg/detectors/opsgenie/opsgenie_integration_test.go b/pkg/detectors/opsgenie/opsgenie_integration_test.go index 5426290b3eab..6aeacad3b4f8 100644 --- a/pkg/detectors/opsgenie/opsgenie_integration_test.go +++ b/pkg/detectors/opsgenie/opsgenie_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestOpsgenie_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestOpsgenie_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Opsgenie, + DetectorType: detector_typepb.DetectorType_Opsgenie, Verified: true, ExtraData: map[string]string{ "account": "secretdetectors", @@ -68,7 +68,7 @@ func TestOpsgenie_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Opsgenie, + DetectorType: detector_typepb.DetectorType_Opsgenie, Verified: false, }, }, diff --git a/pkg/detectors/optimizely/optimizely.go b/pkg/detectors/optimizely/optimizely.go index ea1106f02f5a..76d8db7fe92e 100644 --- a/pkg/detectors/optimizely/optimizely.go +++ b/pkg/detectors/optimizely/optimizely.go @@ -3,13 +3,14 @@ package optimizely import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Optimizely, + DetectorType: detector_typepb.DetectorType_Optimizely, Raw: []byte(resMatch), } @@ -65,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Optimizely +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Optimizely } func (s Scanner) Description() string { diff --git a/pkg/detectors/optimizely/optimizely_integration_test.go b/pkg/detectors/optimizely/optimizely_integration_test.go index 02050ad82c28..8d52cd7ffb92 100644 --- a/pkg/detectors/optimizely/optimizely_integration_test.go +++ b/pkg/detectors/optimizely/optimizely_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestOptimizely_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestOptimizely_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Optimizely, + DetectorType: detector_typepb.DetectorType_Optimizely, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestOptimizely_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Optimizely, + DetectorType: detector_typepb.DetectorType_Optimizely, Verified: false, }, }, diff --git a/pkg/detectors/overloop/overloop.go b/pkg/detectors/overloop/overloop.go index b63c6d5a4f9b..5a3cb72af4ea 100644 --- a/pkg/detectors/overloop/overloop.go +++ b/pkg/detectors/overloop/overloop.go @@ -3,13 +3,14 @@ package overloop import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -41,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Overloop, + DetectorType: detector_typepb.DetectorType_Overloop, Raw: []byte(resMatch), } @@ -77,8 +78,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Overloop +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Overloop } func (s Scanner) Description() string { diff --git a/pkg/detectors/overloop/overloop_integration_test.go b/pkg/detectors/overloop/overloop_integration_test.go index 7b5d499fd675..786bb113b545 100644 --- a/pkg/detectors/overloop/overloop_integration_test.go +++ b/pkg/detectors/overloop/overloop_integration_test.go @@ -15,7 +15,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestOverloop_FromChunk(t *testing.T) { @@ -51,7 +51,7 @@ func TestOverloop_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Overloop, + DetectorType: detector_typepb.DetectorType_Overloop, Verified: true, }, }, @@ -68,7 +68,7 @@ func TestOverloop_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Overloop, + DetectorType: detector_typepb.DetectorType_Overloop, Verified: false, }, }, @@ -97,7 +97,7 @@ func TestOverloop_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Overloop, + DetectorType: detector_typepb.DetectorType_Overloop, Verified: false, }, }, @@ -114,7 +114,7 @@ func TestOverloop_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Overloop, + DetectorType: detector_typepb.DetectorType_Overloop, Verified: false, }, }, diff --git a/pkg/detectors/owlbot/owlbot.go b/pkg/detectors/owlbot/owlbot.go index dcccb808585e..00841cd50e62 100644 --- a/pkg/detectors/owlbot/owlbot.go +++ b/pkg/detectors/owlbot/owlbot.go @@ -3,13 +3,14 @@ package owlbot import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Owlbot, + DetectorType: detector_typepb.DetectorType_Owlbot, Raw: []byte(resMatch), } @@ -65,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Owlbot +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Owlbot } func (s Scanner) Description() string { diff --git a/pkg/detectors/owlbot/owlbot_integration_test.go b/pkg/detectors/owlbot/owlbot_integration_test.go index cb4fc3be699a..8fc7c5e0d722 100644 --- a/pkg/detectors/owlbot/owlbot_integration_test.go +++ b/pkg/detectors/owlbot/owlbot_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestOwlbot_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestOwlbot_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Owlbot, + DetectorType: detector_typepb.DetectorType_Owlbot, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestOwlbot_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Owlbot, + DetectorType: detector_typepb.DetectorType_Owlbot, Verified: false, }, }, diff --git a/pkg/detectors/packagecloud/packagecloud.go b/pkg/detectors/packagecloud/packagecloud.go index a348e1c1e6f7..2eae3296e18d 100644 --- a/pkg/detectors/packagecloud/packagecloud.go +++ b/pkg/detectors/packagecloud/packagecloud.go @@ -2,13 +2,14 @@ package packagecloud import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -39,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_PackageCloud, + DetectorType: detector_typepb.DetectorType_PackageCloud, Raw: []byte(resMatch), } @@ -64,8 +65,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_PackageCloud +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_PackageCloud } func (s Scanner) Description() string { diff --git a/pkg/detectors/packagecloud/packagecloud_integration_test.go b/pkg/detectors/packagecloud/packagecloud_integration_test.go index ca8dc5c7972b..385f3de85b00 100644 --- a/pkg/detectors/packagecloud/packagecloud_integration_test.go +++ b/pkg/detectors/packagecloud/packagecloud_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestPackageCloud_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestPackageCloud_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_PackageCloud, + DetectorType: detector_typepb.DetectorType_PackageCloud, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestPackageCloud_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_PackageCloud, + DetectorType: detector_typepb.DetectorType_PackageCloud, Verified: false, }, }, diff --git a/pkg/detectors/pagarme/pagarme.go b/pkg/detectors/pagarme/pagarme.go index bed2f49717b4..cc923dede1dd 100644 --- a/pkg/detectors/pagarme/pagarme.go +++ b/pkg/detectors/pagarme/pagarme.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -44,7 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for match := range uniqueMatches { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Pagarme, + DetectorType: detector_typepb.DetectorType_Pagarme, Raw: []byte(match), } @@ -99,8 +99,8 @@ func verifyMatch(ctx context.Context, client *http.Client, token string) (bool, } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Pagarme +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Pagarme } func (s Scanner) Description() string { diff --git a/pkg/detectors/pagarme/pagarme_integration_test.go b/pkg/detectors/pagarme/pagarme_integration_test.go index 8cf1361f15f1..a2d292f299b8 100644 --- a/pkg/detectors/pagarme/pagarme_integration_test.go +++ b/pkg/detectors/pagarme/pagarme_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestPagarme_FromChunk(t *testing.T) { @@ -50,7 +50,7 @@ func TestPagarme_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Pagarme, + DetectorType: detector_typepb.DetectorType_Pagarme, Verified: true, }, }, @@ -67,7 +67,7 @@ func TestPagarme_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Pagarme, + DetectorType: detector_typepb.DetectorType_Pagarme, Verified: false, }, }, @@ -96,7 +96,7 @@ func TestPagarme_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Pagarme, + DetectorType: detector_typepb.DetectorType_Pagarme, Verified: false, }, }, @@ -113,7 +113,7 @@ func TestPagarme_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Pagarme, + DetectorType: detector_typepb.DetectorType_Pagarme, Verified: false, }, }, diff --git a/pkg/detectors/pagerdutyapikey/pagerdutyapikey.go b/pkg/detectors/pagerdutyapikey/pagerdutyapikey.go index 09c72e17892a..d970bd9c96fa 100644 --- a/pkg/detectors/pagerdutyapikey/pagerdutyapikey.go +++ b/pkg/detectors/pagerdutyapikey/pagerdutyapikey.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -43,7 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_PagerDutyApiKey, + DetectorType: detector_typepb.DetectorType_PagerDutyApiKey, Raw: []byte(resMatch), } @@ -91,8 +91,8 @@ func verifyPagerdutyapikey(ctx context.Context, client *http.Client, token strin } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_PagerDutyApiKey +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_PagerDutyApiKey } func (s Scanner) Description() string { diff --git a/pkg/detectors/pagerdutyapikey/pagerdutyapikey_integration_test.go b/pkg/detectors/pagerdutyapikey/pagerdutyapikey_integration_test.go index f3a1ff55cc54..bb57ddf6c31e 100644 --- a/pkg/detectors/pagerdutyapikey/pagerdutyapikey_integration_test.go +++ b/pkg/detectors/pagerdutyapikey/pagerdutyapikey_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/google/go-cmp/cmp/cmpopts" "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestPagerDutyApiKey_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestPagerDutyApiKey_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_PagerDutyApiKey, + DetectorType: detector_typepb.DetectorType_PagerDutyApiKey, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestPagerDutyApiKey_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_PagerDutyApiKey, + DetectorType: detector_typepb.DetectorType_PagerDutyApiKey, Verified: false, }, }, @@ -82,7 +82,7 @@ func TestPagerDutyApiKey_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_PagerDutyApiKey, + DetectorType: detector_typepb.DetectorType_PagerDutyApiKey, Verified: false, }, }, @@ -99,7 +99,7 @@ func TestPagerDutyApiKey_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_PagerDutyApiKey, + DetectorType: detector_typepb.DetectorType_PagerDutyApiKey, Verified: false, }, }, diff --git a/pkg/detectors/pandadoc/pandadoc.go b/pkg/detectors/pandadoc/pandadoc.go index 14249c1b3b0a..dc4b5c456c56 100644 --- a/pkg/detectors/pandadoc/pandadoc.go +++ b/pkg/detectors/pandadoc/pandadoc.go @@ -3,13 +3,14 @@ package pandadoc import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Pandadoc, + DetectorType: detector_typepb.DetectorType_Pandadoc, Raw: []byte(resMatch), } @@ -65,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Pandadoc +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Pandadoc } func (s Scanner) Description() string { diff --git a/pkg/detectors/pandadoc/pandadoc_integration_test.go b/pkg/detectors/pandadoc/pandadoc_integration_test.go index 52f140a88ea0..4a548e25408e 100644 --- a/pkg/detectors/pandadoc/pandadoc_integration_test.go +++ b/pkg/detectors/pandadoc/pandadoc_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestPandadoc_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestPandadoc_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Pandadoc, + DetectorType: detector_typepb.DetectorType_Pandadoc, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestPandadoc_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Pandadoc, + DetectorType: detector_typepb.DetectorType_Pandadoc, Verified: false, }, }, diff --git a/pkg/detectors/pandascore/pandascore.go b/pkg/detectors/pandascore/pandascore.go index aa37413b9f0b..d207fba42830 100644 --- a/pkg/detectors/pandascore/pandascore.go +++ b/pkg/detectors/pandascore/pandascore.go @@ -3,13 +3,14 @@ package pandascore import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_PandaScore, + DetectorType: detector_typepb.DetectorType_PandaScore, Raw: []byte(resMatch), } @@ -68,8 +69,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_PandaScore +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_PandaScore } func (s Scanner) Description() string { diff --git a/pkg/detectors/pandascore/pandascore_integration_test.go b/pkg/detectors/pandascore/pandascore_integration_test.go index b6d5d005b934..dde54801e0a7 100644 --- a/pkg/detectors/pandascore/pandascore_integration_test.go +++ b/pkg/detectors/pandascore/pandascore_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestPandaScore_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestPandaScore_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_PandaScore, + DetectorType: detector_typepb.DetectorType_PandaScore, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestPandaScore_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_PandaScore, + DetectorType: detector_typepb.DetectorType_PandaScore, Verified: false, }, }, diff --git a/pkg/detectors/paperform/paperform.go b/pkg/detectors/paperform/paperform.go index 269c4961986b..63f51a45f335 100644 --- a/pkg/detectors/paperform/paperform.go +++ b/pkg/detectors/paperform/paperform.go @@ -3,13 +3,14 @@ package paperform import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Paperform, + DetectorType: detector_typepb.DetectorType_Paperform, Raw: []byte(resMatch), } @@ -65,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Paperform +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Paperform } func (s Scanner) Description() string { diff --git a/pkg/detectors/paperform/paperform_integration_test.go b/pkg/detectors/paperform/paperform_integration_test.go index 2b3de57e298f..39e8090252e1 100644 --- a/pkg/detectors/paperform/paperform_integration_test.go +++ b/pkg/detectors/paperform/paperform_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestPaperform_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestPaperform_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Paperform, + DetectorType: detector_typepb.DetectorType_Paperform, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestPaperform_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Paperform, + DetectorType: detector_typepb.DetectorType_Paperform, Verified: false, }, }, diff --git a/pkg/detectors/paralleldots/paralleldots.go b/pkg/detectors/paralleldots/paralleldots.go index efd45ecb47ea..2159e175cb44 100644 --- a/pkg/detectors/paralleldots/paralleldots.go +++ b/pkg/detectors/paralleldots/paralleldots.go @@ -3,15 +3,16 @@ package paralleldots import ( "bytes" "context" - regexp "github.com/wasilibs/go-re2" "io" "mime/multipart" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -42,7 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_ParallelDots, + DetectorType: detector_typepb.DetectorType_ParallelDots, Raw: []byte(resMatch), } @@ -91,8 +92,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_ParallelDots +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_ParallelDots } func (s Scanner) Description() string { diff --git a/pkg/detectors/paralleldots/paralleldots_integration_test.go b/pkg/detectors/paralleldots/paralleldots_integration_test.go index e5931de4d773..7d8e4be1d183 100644 --- a/pkg/detectors/paralleldots/paralleldots_integration_test.go +++ b/pkg/detectors/paralleldots/paralleldots_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestParalleldots_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestParalleldots_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ParallelDots, + DetectorType: detector_typepb.DetectorType_ParallelDots, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestParalleldots_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ParallelDots, + DetectorType: detector_typepb.DetectorType_ParallelDots, Verified: false, }, }, diff --git a/pkg/detectors/parsehub/parsehub.go b/pkg/detectors/parsehub/parsehub.go index 85ea5e82b187..c4a3fb2dca5b 100644 --- a/pkg/detectors/parsehub/parsehub.go +++ b/pkg/detectors/parsehub/parsehub.go @@ -3,13 +3,14 @@ package parsehub import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Parsehub, + DetectorType: detector_typepb.DetectorType_Parsehub, Raw: []byte(resMatch), } @@ -64,8 +65,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Parsehub +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Parsehub } func (s Scanner) Description() string { diff --git a/pkg/detectors/parsehub/parsehub_integration_test.go b/pkg/detectors/parsehub/parsehub_integration_test.go index 0e3cd456016c..631a727583b4 100644 --- a/pkg/detectors/parsehub/parsehub_integration_test.go +++ b/pkg/detectors/parsehub/parsehub_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestParsehub_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestParsehub_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Parsehub, + DetectorType: detector_typepb.DetectorType_Parsehub, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestParsehub_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Parsehub, + DetectorType: detector_typepb.DetectorType_Parsehub, Verified: false, }, }, diff --git a/pkg/detectors/parsers/parsers.go b/pkg/detectors/parsers/parsers.go index 514ecfe485c0..395a1296dd45 100644 --- a/pkg/detectors/parsers/parsers.go +++ b/pkg/detectors/parsers/parsers.go @@ -2,13 +2,14 @@ package parsers import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -39,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Parsers, + DetectorType: detector_typepb.DetectorType_Parsers, Raw: []byte(resMatch), } @@ -66,8 +67,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Parsers +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Parsers } func (s Scanner) Description() string { diff --git a/pkg/detectors/parsers/parsers_integration_test.go b/pkg/detectors/parsers/parsers_integration_test.go index a396b9ef38ea..31453d8d7895 100644 --- a/pkg/detectors/parsers/parsers_integration_test.go +++ b/pkg/detectors/parsers/parsers_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestParsers_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestParsers_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Parsers, + DetectorType: detector_typepb.DetectorType_Parsers, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestParsers_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Parsers, + DetectorType: detector_typepb.DetectorType_Parsers, Verified: false, }, }, diff --git a/pkg/detectors/parseur/parseur.go b/pkg/detectors/parseur/parseur.go index 1f9ac3ffe584..3998dfdd3026 100644 --- a/pkg/detectors/parseur/parseur.go +++ b/pkg/detectors/parseur/parseur.go @@ -3,13 +3,14 @@ package parseur import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -41,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Parseur, + DetectorType: detector_typepb.DetectorType_Parseur, Raw: []byte(resMatch), } @@ -79,8 +80,8 @@ func verifyResult(ctx context.Context, client *http.Client, token string) (bool, return false, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Parseur +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Parseur } func (s Scanner) Description() string { diff --git a/pkg/detectors/parseur/parseur_integration_test.go b/pkg/detectors/parseur/parseur_integration_test.go index b5466b428a4a..c75457c06105 100644 --- a/pkg/detectors/parseur/parseur_integration_test.go +++ b/pkg/detectors/parseur/parseur_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestParseur_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestParseur_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Parseur, + DetectorType: detector_typepb.DetectorType_Parseur, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestParseur_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Parseur, + DetectorType: detector_typepb.DetectorType_Parseur, Verified: false, }, }, diff --git a/pkg/detectors/partnerstack/partnerstack.go b/pkg/detectors/partnerstack/partnerstack.go index 5cbee8fb2496..1d8f3f5c9f25 100644 --- a/pkg/detectors/partnerstack/partnerstack.go +++ b/pkg/detectors/partnerstack/partnerstack.go @@ -3,13 +3,14 @@ package partnerstack import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Partnerstack, + DetectorType: detector_typepb.DetectorType_Partnerstack, Raw: []byte(resMatch), } @@ -66,8 +67,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Partnerstack +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Partnerstack } func (s Scanner) Description() string { diff --git a/pkg/detectors/partnerstack/partnerstack_integration_test.go b/pkg/detectors/partnerstack/partnerstack_integration_test.go index e5bcfb7770b7..86b1f3e5fac2 100644 --- a/pkg/detectors/partnerstack/partnerstack_integration_test.go +++ b/pkg/detectors/partnerstack/partnerstack_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestPartnerstack_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestPartnerstack_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Partnerstack, + DetectorType: detector_typepb.DetectorType_Partnerstack, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestPartnerstack_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Partnerstack, + DetectorType: detector_typepb.DetectorType_Partnerstack, Verified: false, }, }, diff --git a/pkg/detectors/pastebin/pastebin.go b/pkg/detectors/pastebin/pastebin.go index 50a98c3007b9..1fb7f56f8f93 100644 --- a/pkg/detectors/pastebin/pastebin.go +++ b/pkg/detectors/pastebin/pastebin.go @@ -3,15 +3,16 @@ package pastebin import ( "bytes" "context" - regexp "github.com/wasilibs/go-re2" "io" "mime/multipart" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -42,7 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Pastebin, + DetectorType: detector_typepb.DetectorType_Pastebin, Raw: []byte(resMatch), } @@ -94,8 +95,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Pastebin +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Pastebin } func (s Scanner) Description() string { diff --git a/pkg/detectors/pastebin/pastebin_integration_test.go b/pkg/detectors/pastebin/pastebin_integration_test.go index e7aca2670088..c66f6205ebfe 100644 --- a/pkg/detectors/pastebin/pastebin_integration_test.go +++ b/pkg/detectors/pastebin/pastebin_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestPastebin_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestPastebin_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Pastebin, + DetectorType: detector_typepb.DetectorType_Pastebin, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestPastebin_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Pastebin, + DetectorType: detector_typepb.DetectorType_Pastebin, Verified: false, }, }, diff --git a/pkg/detectors/paydirtapp/paydirtapp.go b/pkg/detectors/paydirtapp/paydirtapp.go index c25bab4b30b3..802123c33a9b 100644 --- a/pkg/detectors/paydirtapp/paydirtapp.go +++ b/pkg/detectors/paydirtapp/paydirtapp.go @@ -2,13 +2,14 @@ package paydirtapp import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -39,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Paydirtapp, + DetectorType: detector_typepb.DetectorType_Paydirtapp, Raw: []byte(resMatch), } @@ -63,8 +64,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Paydirtapp +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Paydirtapp } func (s Scanner) Description() string { diff --git a/pkg/detectors/paydirtapp/paydirtapp_integration_test.go b/pkg/detectors/paydirtapp/paydirtapp_integration_test.go index 950cab1a1cdc..861fc3ab4487 100644 --- a/pkg/detectors/paydirtapp/paydirtapp_integration_test.go +++ b/pkg/detectors/paydirtapp/paydirtapp_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestPaydirtyapp_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestPaydirtyapp_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Paydirtapp, + DetectorType: detector_typepb.DetectorType_Paydirtapp, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestPaydirtyapp_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Paydirtapp, + DetectorType: detector_typepb.DetectorType_Paydirtapp, Verified: false, }, }, diff --git a/pkg/detectors/paymoapp/paymoapp.go b/pkg/detectors/paymoapp/paymoapp.go index 5f5d18de1e4e..2cacb4db3279 100644 --- a/pkg/detectors/paymoapp/paymoapp.go +++ b/pkg/detectors/paymoapp/paymoapp.go @@ -3,13 +3,14 @@ package paymoapp import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Paymoapp, + DetectorType: detector_typepb.DetectorType_Paymoapp, Raw: []byte(resMatch), } @@ -66,8 +67,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Paymoapp +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Paymoapp } func (s Scanner) Description() string { diff --git a/pkg/detectors/paymoapp/paymoapp_integration_test.go b/pkg/detectors/paymoapp/paymoapp_integration_test.go index 371bda62b1a3..601cbd881054 100644 --- a/pkg/detectors/paymoapp/paymoapp_integration_test.go +++ b/pkg/detectors/paymoapp/paymoapp_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestPaymoapp_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestPaymoapp_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Paymoapp, + DetectorType: detector_typepb.DetectorType_Paymoapp, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestPaymoapp_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Paymoapp, + DetectorType: detector_typepb.DetectorType_Paymoapp, Verified: false, }, }, diff --git a/pkg/detectors/paymongo/paymongo.go b/pkg/detectors/paymongo/paymongo.go index aacf74cd7172..837abd690e9b 100644 --- a/pkg/detectors/paymongo/paymongo.go +++ b/pkg/detectors/paymongo/paymongo.go @@ -9,7 +9,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Paymongo, + DetectorType: detector_typepb.DetectorType_Paymongo, Raw: []byte(resMatch), } @@ -67,8 +67,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Paymongo +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Paymongo } func (s Scanner) Description() string { diff --git a/pkg/detectors/paymongo/paymongo_integration_test.go b/pkg/detectors/paymongo/paymongo_integration_test.go index cd7daf81e269..d22f9e3bccab 100644 --- a/pkg/detectors/paymongo/paymongo_integration_test.go +++ b/pkg/detectors/paymongo/paymongo_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestPaymongo_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestPaymongo_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Paymongo, + DetectorType: detector_typepb.DetectorType_Paymongo, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestPaymongo_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Paymongo, + DetectorType: detector_typepb.DetectorType_Paymongo, Verified: false, }, }, diff --git a/pkg/detectors/paypaloauth/paypaloauth.go b/pkg/detectors/paypaloauth/paypaloauth.go index 6b2dfb07f56f..4cd4a839afc3 100644 --- a/pkg/detectors/paypaloauth/paypaloauth.go +++ b/pkg/detectors/paypaloauth/paypaloauth.go @@ -4,16 +4,17 @@ import ( "context" b64 "encoding/base64" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) -type Scanner struct{ +type Scanner struct { detectors.DefaultMultiPartCredentialProvider } @@ -47,7 +48,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resSecretMatch := strings.TrimSpace(secretMatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_PaypalOauth, + DetectorType: detector_typepb.DetectorType_PaypalOauth, Raw: []byte(resSecretMatch), } @@ -80,8 +81,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_PaypalOauth +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_PaypalOauth } func (s Scanner) Description() string { diff --git a/pkg/detectors/paypaloauth/paypaloauth_integration_test.go b/pkg/detectors/paypaloauth/paypaloauth_integration_test.go index f2c8e02630ae..65ba4cd945bd 100644 --- a/pkg/detectors/paypaloauth/paypaloauth_integration_test.go +++ b/pkg/detectors/paypaloauth/paypaloauth_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestPaypalOauth_FromChunk(t *testing.T) { @@ -52,11 +52,11 @@ func TestPaypalOauth_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_PaypalOauth, + DetectorType: detector_typepb.DetectorType_PaypalOauth, Verified: true, }, { - DetectorType: detectorspb.DetectorType_PaypalOauth, + DetectorType: detector_typepb.DetectorType_PaypalOauth, Verified: false, }, }, @@ -72,11 +72,11 @@ func TestPaypalOauth_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_PaypalOauth, + DetectorType: detector_typepb.DetectorType_PaypalOauth, Verified: false, }, { - DetectorType: detectorspb.DetectorType_PaypalOauth, + DetectorType: detector_typepb.DetectorType_PaypalOauth, Verified: false, }, }, @@ -92,11 +92,11 @@ func TestPaypalOauth_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_PaypalOauth, + DetectorType: detector_typepb.DetectorType_PaypalOauth, Verified: false, }, { - DetectorType: detectorspb.DetectorType_PaypalOauth, + DetectorType: detector_typepb.DetectorType_PaypalOauth, Verified: false, }, }, diff --git a/pkg/detectors/paystack/paystack.go b/pkg/detectors/paystack/paystack.go index 8814f95059b5..e8b48fa1e76a 100644 --- a/pkg/detectors/paystack/paystack.go +++ b/pkg/detectors/paystack/paystack.go @@ -3,13 +3,14 @@ package paystack import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -39,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Paystack, + DetectorType: detector_typepb.DetectorType_Paystack, Raw: []byte(resMatch), } @@ -64,8 +65,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Paystack +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Paystack } func (s Scanner) Description() string { diff --git a/pkg/detectors/paystack/paystack_integration_test.go b/pkg/detectors/paystack/paystack_integration_test.go index 19d5531aeaf7..c5fee043d3c1 100644 --- a/pkg/detectors/paystack/paystack_integration_test.go +++ b/pkg/detectors/paystack/paystack_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestPaystack_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestPaystack_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Paystack, + DetectorType: detector_typepb.DetectorType_Paystack, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestPaystack_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Paystack, + DetectorType: detector_typepb.DetectorType_Paystack, Verified: false, }, }, diff --git a/pkg/detectors/pdflayer/pdflayer.go b/pkg/detectors/pdflayer/pdflayer.go index c20cf4af3a94..891580934c7b 100644 --- a/pkg/detectors/pdflayer/pdflayer.go +++ b/pkg/detectors/pdflayer/pdflayer.go @@ -3,14 +3,15 @@ package pdflayer import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "io" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -41,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_PdfLayer, + DetectorType: detector_typepb.DetectorType_PdfLayer, Raw: []byte(resMatch), } @@ -74,8 +75,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_PdfLayer +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_PdfLayer } func (s Scanner) Description() string { diff --git a/pkg/detectors/pdflayer/pdflayer_integration_test.go b/pkg/detectors/pdflayer/pdflayer_integration_test.go index d803ff92151b..2de9816783af 100644 --- a/pkg/detectors/pdflayer/pdflayer_integration_test.go +++ b/pkg/detectors/pdflayer/pdflayer_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestPdfLayer_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestPdfLayer_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_PdfLayer, + DetectorType: detector_typepb.DetectorType_PdfLayer, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestPdfLayer_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_PdfLayer, + DetectorType: detector_typepb.DetectorType_PdfLayer, Verified: false, }, }, diff --git a/pkg/detectors/pdfshift/pdfshift.go b/pkg/detectors/pdfshift/pdfshift.go index d08c3b21bbd3..bfcd153d8de4 100644 --- a/pkg/detectors/pdfshift/pdfshift.go +++ b/pkg/detectors/pdfshift/pdfshift.go @@ -2,13 +2,14 @@ package pdfshift import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -39,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_PdfShift, + DetectorType: detector_typepb.DetectorType_PdfShift, Raw: []byte(resMatch), } @@ -65,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_PdfShift +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_PdfShift } func (s Scanner) Description() string { diff --git a/pkg/detectors/pdfshift/pdfshift_integration_test.go b/pkg/detectors/pdfshift/pdfshift_integration_test.go index bbddc1251efa..57d3eb6c4c3b 100644 --- a/pkg/detectors/pdfshift/pdfshift_integration_test.go +++ b/pkg/detectors/pdfshift/pdfshift_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestPdfShift_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestPdfShift_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_PdfShift, + DetectorType: detector_typepb.DetectorType_PdfShift, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestPdfShift_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_PdfShift, + DetectorType: detector_typepb.DetectorType_PdfShift, Verified: false, }, }, diff --git a/pkg/detectors/peopledatalabs/peopledatalabs.go b/pkg/detectors/peopledatalabs/peopledatalabs.go index 83a276d99dc7..63ce4a7292e7 100644 --- a/pkg/detectors/peopledatalabs/peopledatalabs.go +++ b/pkg/detectors/peopledatalabs/peopledatalabs.go @@ -2,13 +2,14 @@ package peopledatalabs import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -39,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_PeopleDataLabs, + DetectorType: detector_typepb.DetectorType_PeopleDataLabs, Raw: []byte(resMatch), } @@ -64,8 +65,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_PeopleDataLabs +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_PeopleDataLabs } func (s Scanner) Description() string { diff --git a/pkg/detectors/peopledatalabs/peopledatalabs_integration_test.go b/pkg/detectors/peopledatalabs/peopledatalabs_integration_test.go index c913f7f0493c..d5034ea666ea 100644 --- a/pkg/detectors/peopledatalabs/peopledatalabs_integration_test.go +++ b/pkg/detectors/peopledatalabs/peopledatalabs_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestPeopleDataLabs_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestPeopleDataLabs_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_PeopleDataLabs, + DetectorType: detector_typepb.DetectorType_PeopleDataLabs, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestPeopleDataLabs_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_PeopleDataLabs, + DetectorType: detector_typepb.DetectorType_PeopleDataLabs, Verified: false, }, }, diff --git a/pkg/detectors/pepipost/pepipost.go b/pkg/detectors/pepipost/pepipost.go index 1e3ac1cbf55d..730cf8ac9409 100644 --- a/pkg/detectors/pepipost/pepipost.go +++ b/pkg/detectors/pepipost/pepipost.go @@ -2,13 +2,14 @@ package pepipost import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -39,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Pepipost, + DetectorType: detector_typepb.DetectorType_Pepipost, Raw: []byte(resMatch), } @@ -64,8 +65,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Pepipost +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Pepipost } func (s Scanner) Description() string { diff --git a/pkg/detectors/pepipost/pepipost_integration_test.go b/pkg/detectors/pepipost/pepipost_integration_test.go index ced4dc843769..9eaa064f4108 100644 --- a/pkg/detectors/pepipost/pepipost_integration_test.go +++ b/pkg/detectors/pepipost/pepipost_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestPepipost_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestPepipost_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Pepipost, + DetectorType: detector_typepb.DetectorType_Pepipost, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestPepipost_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Pepipost, + DetectorType: detector_typepb.DetectorType_Pepipost, Verified: false, }, }, diff --git a/pkg/detectors/percy/percy.go b/pkg/detectors/percy/percy.go index 64bece6f214e..629a4155b1d1 100644 --- a/pkg/detectors/percy/percy.go +++ b/pkg/detectors/percy/percy.go @@ -3,13 +3,14 @@ package percy import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Percy, + DetectorType: detector_typepb.DetectorType_Percy, Raw: []byte(resMatch), } @@ -66,8 +67,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Percy +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Percy } func (s Scanner) Description() string { diff --git a/pkg/detectors/percy/percy_integration_test.go b/pkg/detectors/percy/percy_integration_test.go index aad571e5b1dd..62bdcc8a23e9 100644 --- a/pkg/detectors/percy/percy_integration_test.go +++ b/pkg/detectors/percy/percy_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestPercy_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestPercy_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Percy, + DetectorType: detector_typepb.DetectorType_Percy, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestPercy_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Percy, + DetectorType: detector_typepb.DetectorType_Percy, Verified: false, }, }, diff --git a/pkg/detectors/photoroom/photoroom.go b/pkg/detectors/photoroom/photoroom.go index 0603881f28e5..dc1337e26b37 100644 --- a/pkg/detectors/photoroom/photoroom.go +++ b/pkg/detectors/photoroom/photoroom.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -43,7 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for match := range uniqueMatches { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Photoroom, + DetectorType: detector_typepb.DetectorType_Photoroom, Raw: []byte(match), } @@ -93,8 +93,8 @@ func verifyMatch(ctx context.Context, client *http.Client, key string) (bool, er } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Photoroom +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Photoroom } func (s Scanner) Description() string { diff --git a/pkg/detectors/photoroom/photoroom_integration_test.go b/pkg/detectors/photoroom/photoroom_integration_test.go index 01ff689ba018..03e39153abfa 100644 --- a/pkg/detectors/photoroom/photoroom_integration_test.go +++ b/pkg/detectors/photoroom/photoroom_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestPhotoroom_FromChunk(t *testing.T) { @@ -50,7 +50,7 @@ func TestPhotoroom_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Photoroom, + DetectorType: detector_typepb.DetectorType_Photoroom, Verified: true, }, }, @@ -67,7 +67,7 @@ func TestPhotoroom_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Photoroom, + DetectorType: detector_typepb.DetectorType_Photoroom, Verified: false, }, }, @@ -96,7 +96,7 @@ func TestPhotoroom_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Photoroom, + DetectorType: detector_typepb.DetectorType_Photoroom, Verified: false, }, }, @@ -113,7 +113,7 @@ func TestPhotoroom_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Photoroom, + DetectorType: detector_typepb.DetectorType_Photoroom, Verified: false, }, }, diff --git a/pkg/detectors/phraseaccesstoken/phraseaccesstoken.go b/pkg/detectors/phraseaccesstoken/phraseaccesstoken.go index 3cf94c81ebe7..afc4975b9988 100644 --- a/pkg/detectors/phraseaccesstoken/phraseaccesstoken.go +++ b/pkg/detectors/phraseaccesstoken/phraseaccesstoken.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -43,7 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for token := range tokens { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_PhraseAccessToken, + DetectorType: detector_typepb.DetectorType_PhraseAccessToken, Raw: []byte(token), } @@ -92,8 +92,8 @@ func verifyMatch(ctx context.Context, client *http.Client, token string) (bool, } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_PhraseAccessToken +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_PhraseAccessToken } func (s Scanner) Description() string { diff --git a/pkg/detectors/phraseaccesstoken/phraseaccesstoken_integration_test.go b/pkg/detectors/phraseaccesstoken/phraseaccesstoken_integration_test.go index 4cc37a8f4b27..1bc633eaeff4 100644 --- a/pkg/detectors/phraseaccesstoken/phraseaccesstoken_integration_test.go +++ b/pkg/detectors/phraseaccesstoken/phraseaccesstoken_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestPhrase_FromChunk(t *testing.T) { @@ -50,7 +50,7 @@ func TestPhrase_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_PhraseAccessToken, + DetectorType: detector_typepb.DetectorType_PhraseAccessToken, Verified: true, Raw: []byte(secret), }, @@ -68,7 +68,7 @@ func TestPhrase_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_PhraseAccessToken, + DetectorType: detector_typepb.DetectorType_PhraseAccessToken, Verified: false, Raw: []byte(inactiveSecret), }, @@ -98,7 +98,7 @@ func TestPhrase_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_PhraseAccessToken, + DetectorType: detector_typepb.DetectorType_PhraseAccessToken, Verified: false, Raw: []byte(secret), }, @@ -116,7 +116,7 @@ func TestPhrase_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_PhraseAccessToken, + DetectorType: detector_typepb.DetectorType_PhraseAccessToken, Verified: false, Raw: []byte(secret), }, diff --git a/pkg/detectors/pinata/pinata.go b/pkg/detectors/pinata/pinata.go index 13626b2505c3..c30e3f2d2edf 100644 --- a/pkg/detectors/pinata/pinata.go +++ b/pkg/detectors/pinata/pinata.go @@ -2,17 +2,18 @@ package pinata import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" "time" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) -type Scanner struct{ +type Scanner struct { detectors.DefaultMultiPartCredentialProvider } @@ -47,7 +48,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resIdMatch := strings.TrimSpace(idMatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Pinata, + DetectorType: detector_typepb.DetectorType_Pinata, Raw: []byte(resMatch), } @@ -78,8 +79,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Pinata +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Pinata } func (s Scanner) Description() string { diff --git a/pkg/detectors/pinata/pinata_integration_test.go b/pkg/detectors/pinata/pinata_integration_test.go index 9231cef77902..c49440e4667a 100644 --- a/pkg/detectors/pinata/pinata_integration_test.go +++ b/pkg/detectors/pinata/pinata_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestPinata_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestPinata_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Pinata, + DetectorType: detector_typepb.DetectorType_Pinata, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestPinata_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Pinata, + DetectorType: detector_typepb.DetectorType_Pinata, Verified: false, }, }, diff --git a/pkg/detectors/pipedream/pipedream.go b/pkg/detectors/pipedream/pipedream.go index bfe8183d87f4..e148bdcfb339 100644 --- a/pkg/detectors/pipedream/pipedream.go +++ b/pkg/detectors/pipedream/pipedream.go @@ -3,14 +3,15 @@ package pipedream import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" "time" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -41,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Pipedream, + DetectorType: detector_typepb.DetectorType_Pipedream, Raw: []byte(resMatch), } @@ -68,8 +69,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Pipedream +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Pipedream } func (s Scanner) Description() string { diff --git a/pkg/detectors/pipedream/pipedream_integration_test.go b/pkg/detectors/pipedream/pipedream_integration_test.go index 202da5a57c40..ad04af006c16 100644 --- a/pkg/detectors/pipedream/pipedream_integration_test.go +++ b/pkg/detectors/pipedream/pipedream_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestPipedream_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestPipedream_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Pipedream, + DetectorType: detector_typepb.DetectorType_Pipedream, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestPipedream_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Pipedream, + DetectorType: detector_typepb.DetectorType_Pipedream, Verified: false, }, }, diff --git a/pkg/detectors/pipedrive/pipedrive.go b/pkg/detectors/pipedrive/pipedrive.go index 8db75fdaa25b..bde2e7b4362b 100644 --- a/pkg/detectors/pipedrive/pipedrive.go +++ b/pkg/detectors/pipedrive/pipedrive.go @@ -3,13 +3,14 @@ package pipedrive import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Pipedrive, + DetectorType: detector_typepb.DetectorType_Pipedrive, Raw: []byte(resMatch), } @@ -65,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Pipedrive +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Pipedrive } func (s Scanner) Description() string { diff --git a/pkg/detectors/pipedrive/pipedrive_integration_test.go b/pkg/detectors/pipedrive/pipedrive_integration_test.go index 271a4a3f0aea..13663b59efc4 100644 --- a/pkg/detectors/pipedrive/pipedrive_integration_test.go +++ b/pkg/detectors/pipedrive/pipedrive_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestPipedrive_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestPipedrive_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Pipedrive, + DetectorType: detector_typepb.DetectorType_Pipedrive, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestPipedrive_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Pipedrive, + DetectorType: detector_typepb.DetectorType_Pipedrive, Verified: false, }, }, diff --git a/pkg/detectors/pivotaltracker/pivotaltracker.go b/pkg/detectors/pivotaltracker/pivotaltracker.go index bbb139277330..0bf1869027c5 100644 --- a/pkg/detectors/pivotaltracker/pivotaltracker.go +++ b/pkg/detectors/pivotaltracker/pivotaltracker.go @@ -2,12 +2,13 @@ package pivotaltracker import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -39,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result token := match[1] result := detectors.Result{ - DetectorType: detectorspb.DetectorType_PivotalTracker, + DetectorType: detector_typepb.DetectorType_PivotalTracker, Raw: []byte(token), } @@ -68,8 +69,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_PivotalTracker +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_PivotalTracker } func (s Scanner) Description() string { diff --git a/pkg/detectors/pivotaltracker/pivotaltracker_integration_test.go b/pkg/detectors/pivotaltracker/pivotaltracker_integration_test.go index 5e2809a56d8e..261ce30ed675 100644 --- a/pkg/detectors/pivotaltracker/pivotaltracker_integration_test.go +++ b/pkg/detectors/pivotaltracker/pivotaltracker_integration_test.go @@ -12,7 +12,7 @@ import ( "github.com/kylelemons/godebug/pretty" "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestPivotalTracker_FromChunk(t *testing.T) { @@ -47,7 +47,7 @@ func TestPivotalTracker_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_PivotalTracker, + DetectorType: detector_typepb.DetectorType_PivotalTracker, Verified: true, }, }, @@ -63,7 +63,7 @@ func TestPivotalTracker_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_PivotalTracker, + DetectorType: detector_typepb.DetectorType_PivotalTracker, Verified: false, }, }, diff --git a/pkg/detectors/pixabay/pixabay.go b/pkg/detectors/pixabay/pixabay.go index 862b139b3e15..7a4a86538b30 100644 --- a/pkg/detectors/pixabay/pixabay.go +++ b/pkg/detectors/pixabay/pixabay.go @@ -3,13 +3,14 @@ package pixabay import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Pixabay, + DetectorType: detector_typepb.DetectorType_Pixabay, Raw: []byte(resMatch), } @@ -64,8 +65,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Pixabay +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Pixabay } func (s Scanner) Description() string { diff --git a/pkg/detectors/pixabay/pixabay_integration_test.go b/pkg/detectors/pixabay/pixabay_integration_test.go index 62c962ec3f96..b3b8833ed2e8 100644 --- a/pkg/detectors/pixabay/pixabay_integration_test.go +++ b/pkg/detectors/pixabay/pixabay_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestPixabay_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestPixabay_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Pixabay, + DetectorType: detector_typepb.DetectorType_Pixabay, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestPixabay_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Pixabay, + DetectorType: detector_typepb.DetectorType_Pixabay, Verified: false, }, }, diff --git a/pkg/detectors/plaidkey/plaidkey.go b/pkg/detectors/plaidkey/plaidkey.go index 2fc4742c3fbb..cf581a4ac6de 100644 --- a/pkg/detectors/plaidkey/plaidkey.go +++ b/pkg/detectors/plaidkey/plaidkey.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -73,7 +73,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for id := range uniqueIds { for token := range uniqueTokens { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_PlaidKey, + DetectorType: detector_typepb.DetectorType_PlaidKey, Raw: []byte(secret), RawV2: []byte(fmt.Sprintf(`%s:%s:%s`, secret, id, token)), } @@ -128,8 +128,8 @@ func verifyMatch(ctx context.Context, client *http.Client, id string, secret str } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_PlaidKey +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_PlaidKey } func (s Scanner) Description() string { diff --git a/pkg/detectors/plaidkey/plaidkey_integration_test.go b/pkg/detectors/plaidkey/plaidkey_integration_test.go index 824cb2113e0c..6dfd88dd288c 100644 --- a/pkg/detectors/plaidkey/plaidkey_integration_test.go +++ b/pkg/detectors/plaidkey/plaidkey_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestPlaidKey_FromChunk(t *testing.T) { @@ -52,7 +52,7 @@ func TestPlaidKey_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_PlaidKey, + DetectorType: detector_typepb.DetectorType_PlaidKey, Verified: true, RawV2: []byte(fmt.Sprintf("%s:%s:%s", secret, id, token)), AnalysisInfo: map[string]string{ @@ -77,7 +77,7 @@ func TestPlaidKey_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_PlaidKey, + DetectorType: detector_typepb.DetectorType_PlaidKey, Verified: false, RawV2: []byte(fmt.Sprintf("%s:%s:%s", inactiveSecret, id, token)), ExtraData: map[string]string{ diff --git a/pkg/detectors/planetscale/planetscale.go b/pkg/detectors/planetscale/planetscale.go index 3226ec37c1a1..de73b69c3f87 100644 --- a/pkg/detectors/planetscale/planetscale.go +++ b/pkg/detectors/planetscale/planetscale.go @@ -9,7 +9,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -43,7 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result credentials := fmt.Sprintf("%s:%s", username, password) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_PlanetScale, + DetectorType: detector_typepb.DetectorType_PlanetScale, Raw: []byte(credentials), } @@ -90,8 +90,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_PlanetScale +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_PlanetScale } func (s Scanner) Description() string { diff --git a/pkg/detectors/planetscale/planetscale_integration_test.go b/pkg/detectors/planetscale/planetscale_integration_test.go index 5742a568cb5c..d0f4e263fd49 100644 --- a/pkg/detectors/planetscale/planetscale_integration_test.go +++ b/pkg/detectors/planetscale/planetscale_integration_test.go @@ -15,7 +15,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestPlanetscale_FromChunk(t *testing.T) { @@ -53,7 +53,7 @@ func TestPlanetscale_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_PlanetScale, + DetectorType: detector_typepb.DetectorType_PlanetScale, Verified: true, }, }, @@ -70,7 +70,7 @@ func TestPlanetscale_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_PlanetScale, + DetectorType: detector_typepb.DetectorType_PlanetScale, Verified: false, }, }, @@ -99,7 +99,7 @@ func TestPlanetscale_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_PlanetScale, + DetectorType: detector_typepb.DetectorType_PlanetScale, Verified: false, }, }, @@ -116,7 +116,7 @@ func TestPlanetscale_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_PlanetScale, + DetectorType: detector_typepb.DetectorType_PlanetScale, Verified: false, }, }, diff --git a/pkg/detectors/planetscaledb/planetscaledb.go b/pkg/detectors/planetscaledb/planetscaledb.go index 13cef6e0cf26..4011480cf127 100644 --- a/pkg/detectors/planetscaledb/planetscaledb.go +++ b/pkg/detectors/planetscaledb/planetscaledb.go @@ -3,16 +3,17 @@ package planetscaledb import ( "context" "database/sql" - regexp "github.com/wasilibs/go-re2" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/go-sql-driver/mysql" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) -type Scanner struct{ +type Scanner struct { detectors.DefaultMultiPartCredentialProvider } @@ -42,7 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for _, password := range passwordMatches { for _, host := range hostMatches { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_PlanetScaleDb, + DetectorType: detector_typepb.DetectorType_PlanetScaleDb, Raw: []byte(strings.Join([]string{host, username[0], password[0]}, "\t")), } @@ -77,8 +78,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_PlanetScaleDb +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_PlanetScaleDb } func (s Scanner) Description() string { diff --git a/pkg/detectors/planetscaledb/planetscaledb_integration_test.go b/pkg/detectors/planetscaledb/planetscaledb_integration_test.go index 57a1ae3c44ab..f458156b6edd 100644 --- a/pkg/detectors/planetscaledb/planetscaledb_integration_test.go +++ b/pkg/detectors/planetscaledb/planetscaledb_integration_test.go @@ -15,7 +15,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestPlanetscaledb_FromChunk(t *testing.T) { @@ -53,7 +53,7 @@ func TestPlanetscaledb_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_PlanetScaleDb, + DetectorType: detector_typepb.DetectorType_PlanetScaleDb, Verified: true, }, }, @@ -69,7 +69,7 @@ func TestPlanetscaledb_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_PlanetScaleDb, + DetectorType: detector_typepb.DetectorType_PlanetScaleDb, Verified: false, }, }, diff --git a/pkg/detectors/planviewleankit/planviewleankit.go b/pkg/detectors/planviewleankit/planviewleankit.go index 53bde8c853bf..691953631350 100644 --- a/pkg/detectors/planviewleankit/planviewleankit.go +++ b/pkg/detectors/planviewleankit/planviewleankit.go @@ -9,7 +9,7 @@ import ( regexp "github.com/wasilibs/go-re2" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -47,7 +47,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_PlanviewLeanKit, + DetectorType: detector_typepb.DetectorType_PlanviewLeanKit, Raw: []byte(resMatch), } @@ -73,8 +73,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_PlanviewLeanKit +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_PlanviewLeanKit } func (s Scanner) Description() string { diff --git a/pkg/detectors/planviewleankit/planviewleankit_integration_test.go b/pkg/detectors/planviewleankit/planviewleankit_integration_test.go index 99a39767f79a..bd42522c1857 100644 --- a/pkg/detectors/planviewleankit/planviewleankit_integration_test.go +++ b/pkg/detectors/planviewleankit/planviewleankit_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestPlanviewLeanKit_FromChunk(t *testing.T) { @@ -53,7 +53,7 @@ func TestPlanviewLeanKit_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_PlanviewLeanKit, + DetectorType: detector_typepb.DetectorType_PlanviewLeanKit, Verified: true, }, }, @@ -69,7 +69,7 @@ func TestPlanviewLeanKit_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_PlanviewLeanKit, + DetectorType: detector_typepb.DetectorType_PlanviewLeanKit, Verified: false, }, }, diff --git a/pkg/detectors/planyo/planyo.go b/pkg/detectors/planyo/planyo.go index 6b1854115717..aadf6b4285f5 100644 --- a/pkg/detectors/planyo/planyo.go +++ b/pkg/detectors/planyo/planyo.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -42,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Planyo, + DetectorType: detector_typepb.DetectorType_Planyo, Raw: []byte(resMatch), } @@ -73,8 +73,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Planyo +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Planyo } func (s Scanner) Description() string { diff --git a/pkg/detectors/planyo/planyo_integration_test.go b/pkg/detectors/planyo/planyo_integration_test.go index 03730cd2f983..95b38d720470 100644 --- a/pkg/detectors/planyo/planyo_integration_test.go +++ b/pkg/detectors/planyo/planyo_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestPlanyo_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestPlanyo_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Planyo, + DetectorType: detector_typepb.DetectorType_Planyo, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestPlanyo_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Planyo, + DetectorType: detector_typepb.DetectorType_Planyo, Verified: false, }, }, diff --git a/pkg/detectors/plivo/plivo.go b/pkg/detectors/plivo/plivo.go index 495279075ca5..e076031b64e0 100644 --- a/pkg/detectors/plivo/plivo.go +++ b/pkg/detectors/plivo/plivo.go @@ -4,16 +4,17 @@ import ( "context" b64 "encoding/base64" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) -type Scanner struct{ +type Scanner struct { detectors.DefaultMultiPartCredentialProvider } @@ -45,7 +46,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result id := strings.TrimSpace(idMatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Plivo, + DetectorType: detector_typepb.DetectorType_Plivo, Redacted: id, Raw: []byte(resMatch), RawV2: []byte(resMatch + id), @@ -76,8 +77,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Plivo +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Plivo } func (s Scanner) Description() string { diff --git a/pkg/detectors/plivo/plivo_integration_test.go b/pkg/detectors/plivo/plivo_integration_test.go index af254874ba29..76c90208674f 100644 --- a/pkg/detectors/plivo/plivo_integration_test.go +++ b/pkg/detectors/plivo/plivo_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestPlivo_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestPlivo_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Plivo, + DetectorType: detector_typepb.DetectorType_Plivo, Redacted: id, Verified: true, RawV2: []byte(secret + id), @@ -67,7 +67,7 @@ func TestPlivo_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Plivo, + DetectorType: detector_typepb.DetectorType_Plivo, Redacted: id, Verified: false, RawV2: []byte(inactiveSecret + id), diff --git a/pkg/detectors/podio/podio.go b/pkg/detectors/podio/podio.go index e57ccf87fdec..0fba5541554d 100644 --- a/pkg/detectors/podio/podio.go +++ b/pkg/detectors/podio/podio.go @@ -3,13 +3,14 @@ package podio import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Podio, + DetectorType: detector_typepb.DetectorType_Podio, Raw: []byte(resMatch), } @@ -65,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Podio +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Podio } func (s Scanner) Description() string { diff --git a/pkg/detectors/podio/podio_integration_test.go b/pkg/detectors/podio/podio_integration_test.go index b7a162f03239..50f9c500e989 100644 --- a/pkg/detectors/podio/podio_integration_test.go +++ b/pkg/detectors/podio/podio_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestPodio_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestPodio_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Podio, + DetectorType: detector_typepb.DetectorType_Podio, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestPodio_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Podio, + DetectorType: detector_typepb.DetectorType_Podio, Verified: false, }, }, diff --git a/pkg/detectors/pollsapi/pollsapi.go b/pkg/detectors/pollsapi/pollsapi.go index 3b336eeadfd9..1fa414f7f82d 100644 --- a/pkg/detectors/pollsapi/pollsapi.go +++ b/pkg/detectors/pollsapi/pollsapi.go @@ -9,7 +9,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_PollsAPI, + DetectorType: detector_typepb.DetectorType_PollsAPI, Raw: []byte(resMatch), } @@ -65,8 +65,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_PollsAPI +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_PollsAPI } func (s Scanner) Description() string { diff --git a/pkg/detectors/pollsapi/pollsapi_integration_test.go b/pkg/detectors/pollsapi/pollsapi_integration_test.go index 7e28de28d7e2..d14a30e37ecf 100644 --- a/pkg/detectors/pollsapi/pollsapi_integration_test.go +++ b/pkg/detectors/pollsapi/pollsapi_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestPollsAPI_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestPollsAPI_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_PollsAPI, + DetectorType: detector_typepb.DetectorType_PollsAPI, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestPollsAPI_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_PollsAPI, + DetectorType: detector_typepb.DetectorType_PollsAPI, Verified: false, }, }, diff --git a/pkg/detectors/poloniex/poloniex.go b/pkg/detectors/poloniex/poloniex.go index d485627e0d85..7b3802f1813f 100644 --- a/pkg/detectors/poloniex/poloniex.go +++ b/pkg/detectors/poloniex/poloniex.go @@ -5,19 +5,20 @@ import ( "crypto/hmac" "crypto/sha512" "encoding/hex" - regexp "github.com/wasilibs/go-re2" "net/http" "net/url" "strconv" "strings" "time" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) -type Scanner struct{ +type Scanner struct { detectors.DefaultMultiPartCredentialProvider } @@ -52,7 +53,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resSecretMatch := strings.TrimSpace(secretMatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Poloniex, + DetectorType: detector_typepb.DetectorType_Poloniex, Raw: []byte(resSecretMatch), RawV2: []byte(resMatch + resSecretMatch), } @@ -97,8 +98,8 @@ func getPoloniexSignature(secret string, payload string) string { return hex.EncodeToString(macsum) } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Poloniex +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Poloniex } func (s Scanner) Description() string { diff --git a/pkg/detectors/poloniex/poloniex_integration_test.go b/pkg/detectors/poloniex/poloniex_integration_test.go index 22dd53d4a4aa..06914200c48a 100644 --- a/pkg/detectors/poloniex/poloniex_integration_test.go +++ b/pkg/detectors/poloniex/poloniex_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestPoloniex_FromChunk(t *testing.T) { @@ -50,7 +50,7 @@ func TestPoloniex_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Poloniex, + DetectorType: detector_typepb.DetectorType_Poloniex, Verified: true, }, }, @@ -66,7 +66,7 @@ func TestPoloniex_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Poloniex, + DetectorType: detector_typepb.DetectorType_Poloniex, Verified: false, }, }, diff --git a/pkg/detectors/polygon/polygon.go b/pkg/detectors/polygon/polygon.go index bdf88a3498d5..8483ff54dbc6 100644 --- a/pkg/detectors/polygon/polygon.go +++ b/pkg/detectors/polygon/polygon.go @@ -2,13 +2,14 @@ package polygon import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -39,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Polygon, + DetectorType: detector_typepb.DetectorType_Polygon, Raw: []byte(resMatch), } @@ -64,8 +65,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Polygon +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Polygon } func (s Scanner) Description() string { diff --git a/pkg/detectors/polygon/polygon_integration_test.go b/pkg/detectors/polygon/polygon_integration_test.go index 3565f38e41ce..5c8e910332b4 100644 --- a/pkg/detectors/polygon/polygon_integration_test.go +++ b/pkg/detectors/polygon/polygon_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestPolygon_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestPolygon_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Polygon, + DetectorType: detector_typepb.DetectorType_Polygon, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestPolygon_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Polygon, + DetectorType: detector_typepb.DetectorType_Polygon, Verified: false, }, }, diff --git a/pkg/detectors/portainer/portainer.go b/pkg/detectors/portainer/portainer.go index 47f132854421..92056779849a 100644 --- a/pkg/detectors/portainer/portainer.go +++ b/pkg/detectors/portainer/portainer.go @@ -9,7 +9,7 @@ import ( regexp "github.com/wasilibs/go-re2" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -54,7 +54,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result u.Path = "/api/endpoints" s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Portainer, + DetectorType: detector_typepb.DetectorType_Portainer, Raw: []byte(resMatch), RawV2: []byte(resMatch + resEndpointMatch), } @@ -95,8 +95,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Portainer +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Portainer } func (s Scanner) Description() string { diff --git a/pkg/detectors/portainer/portainer_integration_test.go b/pkg/detectors/portainer/portainer_integration_test.go index 49ca42d4a9d5..3e62460ec29a 100644 --- a/pkg/detectors/portainer/portainer_integration_test.go +++ b/pkg/detectors/portainer/portainer_integration_test.go @@ -15,7 +15,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestPortainer_FromChunk(t *testing.T) { @@ -52,7 +52,7 @@ func TestPortainer_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Portainer, + DetectorType: detector_typepb.DetectorType_Portainer, Verified: true, RawV2: []byte(secret + endpoint), }, @@ -70,7 +70,7 @@ func TestPortainer_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Portainer, + DetectorType: detector_typepb.DetectorType_Portainer, Verified: false, RawV2: []byte(inactiveSecret + endpoint), }, diff --git a/pkg/detectors/portainertoken/portainertoken.go b/pkg/detectors/portainertoken/portainertoken.go index fd02c0714ff1..157d3b442e09 100644 --- a/pkg/detectors/portainertoken/portainertoken.go +++ b/pkg/detectors/portainertoken/portainertoken.go @@ -9,7 +9,7 @@ import ( regexp "github.com/wasilibs/go-re2" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -55,7 +55,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result u.Path = "/api/stacks" s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_PortainerToken, + DetectorType: detector_typepb.DetectorType_PortainerToken, Raw: []byte(resMatch), RawV2: []byte(resMatch + resEndpointMatch), } @@ -97,8 +97,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_PortainerToken +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_PortainerToken } func (s Scanner) Description() string { diff --git a/pkg/detectors/portainertoken/portainertoken_integration_test.go b/pkg/detectors/portainertoken/portainertoken_integration_test.go index cf2c35d222e3..fc0649d6c9c0 100644 --- a/pkg/detectors/portainertoken/portainertoken_integration_test.go +++ b/pkg/detectors/portainertoken/portainertoken_integration_test.go @@ -15,7 +15,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestPortainertoken_FromChunk(t *testing.T) { @@ -52,7 +52,7 @@ func TestPortainertoken_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_PortainerToken, + DetectorType: detector_typepb.DetectorType_PortainerToken, Verified: true, RawV2: []byte(secret + endpoint), }, @@ -70,7 +70,7 @@ func TestPortainertoken_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_PortainerToken, + DetectorType: detector_typepb.DetectorType_PortainerToken, Verified: false, RawV2: []byte(inactiveSecret + endpoint), }, diff --git a/pkg/detectors/positionstack/positionstack.go b/pkg/detectors/positionstack/positionstack.go index 831c2ba73a16..1b1846c1daa4 100644 --- a/pkg/detectors/positionstack/positionstack.go +++ b/pkg/detectors/positionstack/positionstack.go @@ -3,13 +3,14 @@ package positionstack import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_PositionStack, + DetectorType: detector_typepb.DetectorType_PositionStack, Raw: []byte(resMatch), } @@ -64,8 +65,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_PositionStack +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_PositionStack } func (s Scanner) Description() string { diff --git a/pkg/detectors/positionstack/positionstack_integration_test.go b/pkg/detectors/positionstack/positionstack_integration_test.go index f7494337b072..c018818e72b0 100644 --- a/pkg/detectors/positionstack/positionstack_integration_test.go +++ b/pkg/detectors/positionstack/positionstack_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestPositionStack_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestPositionStack_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_PositionStack, + DetectorType: detector_typepb.DetectorType_PositionStack, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestPositionStack_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_PositionStack, + DetectorType: detector_typepb.DetectorType_PositionStack, Verified: false, }, }, diff --git a/pkg/detectors/postageapp/postageapp.go b/pkg/detectors/postageapp/postageapp.go index c6908cb165e1..d0dcfe02a5cf 100644 --- a/pkg/detectors/postageapp/postageapp.go +++ b/pkg/detectors/postageapp/postageapp.go @@ -2,13 +2,14 @@ package postageapp import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -39,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_PostageApp, + DetectorType: detector_typepb.DetectorType_PostageApp, Raw: []byte(resMatch), } @@ -64,8 +65,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_PostageApp +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_PostageApp } func (s Scanner) Description() string { diff --git a/pkg/detectors/postageapp/postageapp_integration_test.go b/pkg/detectors/postageapp/postageapp_integration_test.go index 37e7596f76cc..e1c212cac908 100644 --- a/pkg/detectors/postageapp/postageapp_integration_test.go +++ b/pkg/detectors/postageapp/postageapp_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestPostageApp_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestPostageApp_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_PostageApp, + DetectorType: detector_typepb.DetectorType_PostageApp, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestPostageApp_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_PostageApp, + DetectorType: detector_typepb.DetectorType_PostageApp, Verified: false, }, }, diff --git a/pkg/detectors/postbacks/postbacks.go b/pkg/detectors/postbacks/postbacks.go index 9e6a961e6ec3..f547a63349d8 100644 --- a/pkg/detectors/postbacks/postbacks.go +++ b/pkg/detectors/postbacks/postbacks.go @@ -2,14 +2,15 @@ package postbacks import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" "time" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Postbacks, + DetectorType: detector_typepb.DetectorType_Postbacks, Raw: []byte(resMatch), } @@ -69,8 +70,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Postbacks +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Postbacks } func (s Scanner) Description() string { diff --git a/pkg/detectors/postbacks/postbacks_integration_test.go b/pkg/detectors/postbacks/postbacks_integration_test.go index fd032f3f1a42..71412fef05c6 100644 --- a/pkg/detectors/postbacks/postbacks_integration_test.go +++ b/pkg/detectors/postbacks/postbacks_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestPostbacks_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestPostbacks_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Postbacks, + DetectorType: detector_typepb.DetectorType_Postbacks, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestPostbacks_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Postbacks, + DetectorType: detector_typepb.DetectorType_Postbacks, Verified: false, }, }, diff --git a/pkg/detectors/postgres/postgres.go b/pkg/detectors/postgres/postgres.go index 3a7449e052f5..88e66a24d45a 100644 --- a/pkg/detectors/postgres/postgres.go +++ b/pkg/detectors/postgres/postgres.go @@ -15,7 +15,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) const ( @@ -136,7 +136,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) ([]dete raw := []byte(fmt.Sprintf("%s://%s:%s@%s:%s", dbType, user, password, host, port)) result := detectors.Result{ - DetectorType: detectorspb.DetectorType_Postgres, + DetectorType: detector_typepb.DetectorType_Postgres, Raw: raw, RawV2: raw, } @@ -302,8 +302,8 @@ func verifyPostgres(params map[string]string) (bool, error) { } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Postgres +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Postgres } func (s Scanner) Description() string { diff --git a/pkg/detectors/postgres/postgres_integration_test.go b/pkg/detectors/postgres/postgres_integration_test.go index dd8aa4a89b69..ea0d3c9e036b 100644 --- a/pkg/detectors/postgres/postgres_integration_test.go +++ b/pkg/detectors/postgres/postgres_integration_test.go @@ -18,7 +18,7 @@ import ( "github.com/lib/pq" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) var postgresDockerHash string @@ -92,7 +92,7 @@ func TestPostgres_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Postgres, + DetectorType: detector_typepb.DetectorType_Postgres, Verified: true, Raw: []byte("postgresql://postgres:23201da=b56ca236f3dc6736c0f9afad@localhost:5434"), RawV2: []byte("postgresql://postgres:23201da=b56ca236f3dc6736c0f9afad@localhost:5434"), @@ -111,7 +111,7 @@ func TestPostgres_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Postgres, + DetectorType: detector_typepb.DetectorType_Postgres, Verified: true, Raw: []byte("postgresql://postgres:23201da=b56ca236f3dc6736c0f9afad@localhost:5434"), RawV2: []byte("postgresql://postgres:23201da=b56ca236f3dc6736c0f9afad@localhost:5434"), @@ -130,7 +130,7 @@ func TestPostgres_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Postgres, + DetectorType: detector_typepb.DetectorType_Postgres, Verified: true, Raw: []byte("postgresql://postgres:23201da=b56ca236f3dc6736c0f9afad@localhost:5434"), RawV2: []byte("postgresql://postgres:23201da=b56ca236f3dc6736c0f9afad@localhost:5434"), @@ -149,7 +149,7 @@ func TestPostgres_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Postgres, + DetectorType: detector_typepb.DetectorType_Postgres, Verified: true, Raw: []byte("postgresql://postgres:23201da=b56ca236f3dc6736c0f9afad@localhost:5434"), RawV2: []byte("postgresql://postgres:23201da=b56ca236f3dc6736c0f9afad@localhost:5434"), @@ -168,7 +168,7 @@ func TestPostgres_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Postgres, + DetectorType: detector_typepb.DetectorType_Postgres, Verified: true, Raw: []byte("postgresql://postgres:23201da=b56ca236f3dc6736c0f9afad@localhost:5434"), RawV2: []byte("postgresql://postgres:23201da=b56ca236f3dc6736c0f9afad@localhost:5434"), @@ -187,7 +187,7 @@ func TestPostgres_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Postgres, + DetectorType: detector_typepb.DetectorType_Postgres, Verified: false, Raw: []byte("postgresql://postgres:inactive@localhost:5434"), RawV2: []byte("postgresql://postgres:inactive@localhost:5434"), @@ -229,7 +229,7 @@ func TestPostgres_FromChunk(t *testing.T) { }, want: func() []detectors.Result { r := detectors.Result{ - DetectorType: detectorspb.DetectorType_Postgres, + DetectorType: detector_typepb.DetectorType_Postgres, Verified: false, Raw: []byte("postgresql://postgres:23201da=b56ca236f3dc6736c0f9afad@192.0.2.0:5434"), RawV2: []byte("postgresql://postgres:23201da=b56ca236f3dc6736c0f9afad@192.0.2.0:5434"), @@ -251,7 +251,7 @@ func TestPostgres_FromChunk(t *testing.T) { }, want: func() []detectors.Result { r := detectors.Result{ - DetectorType: detectorspb.DetectorType_Postgres, + DetectorType: detector_typepb.DetectorType_Postgres, Verified: false, Raw: []byte("postgresql://postgres:23201da=b56ca236f3dc6736c0f9afad@localhost:5432"), RawV2: []byte("postgresql://postgres:23201da=b56ca236f3dc6736c0f9afad@localhost:5432"), @@ -273,7 +273,7 @@ func TestPostgres_FromChunk(t *testing.T) { }, want: func() []detectors.Result { r := detectors.Result{ - DetectorType: detectorspb.DetectorType_Postgres, + DetectorType: detector_typepb.DetectorType_Postgres, Verified: false, Raw: []byte("postgresql://postgres:23201da=b56ca236f3dc6736c0f9afad@localhost:5434"), RawV2: []byte("postgresql://postgres:23201da=b56ca236f3dc6736c0f9afad@localhost:5434"), @@ -294,7 +294,7 @@ func TestPostgres_FromChunk(t *testing.T) { }, want: func() []detectors.Result { r := detectors.Result{ - DetectorType: detectorspb.DetectorType_Postgres, + DetectorType: detector_typepb.DetectorType_Postgres, Verified: false, Raw: []byte("postgresql://postgres:23201da=b56ca236f3dc6736c0f9afad@localhost:5434"), RawV2: []byte("postgresql://postgres:23201da=b56ca236f3dc6736c0f9afad@localhost:5434"), diff --git a/pkg/detectors/posthog/posthog.go b/pkg/detectors/posthog/posthog.go index 275984a8f941..8f923304e280 100644 --- a/pkg/detectors/posthog/posthog.go +++ b/pkg/detectors/posthog/posthog.go @@ -9,7 +9,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_PosthogApp, + DetectorType: detector_typepb.DetectorType_PosthogApp, Raw: []byte(resMatch), } @@ -84,8 +84,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_PosthogApp +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_PosthogApp } func (s Scanner) Description() string { diff --git a/pkg/detectors/posthog/posthog_integration_test.go b/pkg/detectors/posthog/posthog_integration_test.go index 70091659e30f..edf4623d6ecd 100644 --- a/pkg/detectors/posthog/posthog_integration_test.go +++ b/pkg/detectors/posthog/posthog_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestAppPosthog_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestAppPosthog_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_PosthogApp, + DetectorType: detector_typepb.DetectorType_PosthogApp, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestAppPosthog_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_PosthogApp, + DetectorType: detector_typepb.DetectorType_PosthogApp, Verified: false, }, }, diff --git a/pkg/detectors/postman/postman.go b/pkg/detectors/postman/postman.go index f725ffb078f4..3dde114d4076 100644 --- a/pkg/detectors/postman/postman.go +++ b/pkg/detectors/postman/postman.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -45,7 +45,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Postman, + DetectorType: detector_typepb.DetectorType_Postman, Raw: []byte(resMatch), } @@ -94,8 +94,8 @@ func verifyPostman(ctx context.Context, client *http.Client, token string) (bool } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Postman +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Postman } func (s Scanner) Description() string { diff --git a/pkg/detectors/postman/postman_integration_test.go b/pkg/detectors/postman/postman_integration_test.go index 65ac16c97e4b..b51761ccdd10 100644 --- a/pkg/detectors/postman/postman_integration_test.go +++ b/pkg/detectors/postman/postman_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestPostman_FromChunk(t *testing.T) { @@ -50,7 +50,7 @@ func TestPostman_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Postman, + DetectorType: detector_typepb.DetectorType_Postman, Verified: true, }, }, @@ -66,7 +66,7 @@ func TestPostman_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Postman, + DetectorType: detector_typepb.DetectorType_Postman, Verified: false, }, }, @@ -83,7 +83,7 @@ func TestPostman_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Postman, + DetectorType: detector_typepb.DetectorType_Postman, Verified: false, }, }, @@ -100,7 +100,7 @@ func TestPostman_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Postman, + DetectorType: detector_typepb.DetectorType_Postman, Verified: false, }, }, diff --git a/pkg/detectors/postmark/postmark.go b/pkg/detectors/postmark/postmark.go index 1c4b5aff8048..259214af3fe5 100644 --- a/pkg/detectors/postmark/postmark.go +++ b/pkg/detectors/postmark/postmark.go @@ -12,7 +12,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -42,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Postmark, + DetectorType: detector_typepb.DetectorType_Postmark, Raw: []byte(resMatch), } @@ -146,8 +146,8 @@ func verifyKeyWithOptions(ctx context.Context, client *http.Client, key, endpoin } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Postmark +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Postmark } func (s Scanner) Description() string { diff --git a/pkg/detectors/postmark/postmark_integration_test.go b/pkg/detectors/postmark/postmark_integration_test.go index e666222f0e87..b62687434490 100644 --- a/pkg/detectors/postmark/postmark_integration_test.go +++ b/pkg/detectors/postmark/postmark_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestPostmark_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestPostmark_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Postmark, + DetectorType: detector_typepb.DetectorType_Postmark, Verified: true, ExtraData: map[string]string{"type": "server"}, }, @@ -66,7 +66,7 @@ func TestPostmark_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Postmark, + DetectorType: detector_typepb.DetectorType_Postmark, Verified: true, ExtraData: map[string]string{"type": "account"}, }, @@ -83,7 +83,7 @@ func TestPostmark_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Postmark, + DetectorType: detector_typepb.DetectorType_Postmark, Verified: false, }, }, diff --git a/pkg/detectors/powrbot/powrbot.go b/pkg/detectors/powrbot/powrbot.go index fbfa6f29ee97..7b00880e021a 100644 --- a/pkg/detectors/powrbot/powrbot.go +++ b/pkg/detectors/powrbot/powrbot.go @@ -3,13 +3,14 @@ package powrbot import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Powrbot, + DetectorType: detector_typepb.DetectorType_Powrbot, Raw: []byte(resMatch), } @@ -65,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Powrbot +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Powrbot } func (s Scanner) Description() string { diff --git a/pkg/detectors/powrbot/powrbot_integration_test.go b/pkg/detectors/powrbot/powrbot_integration_test.go index 0b7b184ab8c5..a21a60b79c0a 100644 --- a/pkg/detectors/powrbot/powrbot_integration_test.go +++ b/pkg/detectors/powrbot/powrbot_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestPowrbot_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestPowrbot_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Powrbot, + DetectorType: detector_typepb.DetectorType_Powrbot, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestPowrbot_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Powrbot, + DetectorType: detector_typepb.DetectorType_Powrbot, Verified: false, }, }, diff --git a/pkg/detectors/prefect/prefect.go b/pkg/detectors/prefect/prefect.go index b135f163d8a6..b65f6270c845 100644 --- a/pkg/detectors/prefect/prefect.go +++ b/pkg/detectors/prefect/prefect.go @@ -3,13 +3,14 @@ package prefect import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Prefect, + DetectorType: detector_typepb.DetectorType_Prefect, Raw: []byte(resMatch), } @@ -65,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Prefect +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Prefect } func (s Scanner) Description() string { diff --git a/pkg/detectors/prefect/prefect_integration_test.go b/pkg/detectors/prefect/prefect_integration_test.go index d748c86deb28..e25a24348c75 100644 --- a/pkg/detectors/prefect/prefect_integration_test.go +++ b/pkg/detectors/prefect/prefect_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestPrefect_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestPrefect_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Prefect, + DetectorType: detector_typepb.DetectorType_Prefect, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestPrefect_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Prefect, + DetectorType: detector_typepb.DetectorType_Prefect, Verified: false, }, }, diff --git a/pkg/detectors/privacy/privacy.go b/pkg/detectors/privacy/privacy.go index fb62f6c478af..80d014159cb6 100644 --- a/pkg/detectors/privacy/privacy.go +++ b/pkg/detectors/privacy/privacy.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -42,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Privacy, + DetectorType: detector_typepb.DetectorType_Privacy, Raw: []byte(resMatch), } @@ -78,8 +78,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Privacy +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Privacy } func (s Scanner) Description() string { diff --git a/pkg/detectors/privacy/privacy_integration_test.go b/pkg/detectors/privacy/privacy_integration_test.go index c17317ea6b5d..dec4f0553511 100644 --- a/pkg/detectors/privacy/privacy_integration_test.go +++ b/pkg/detectors/privacy/privacy_integration_test.go @@ -15,7 +15,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestPrivacy_FromChunk(t *testing.T) { @@ -51,7 +51,7 @@ func TestPrivacy_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Privacy, + DetectorType: detector_typepb.DetectorType_Privacy, Verified: true, }, }, @@ -68,7 +68,7 @@ func TestPrivacy_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Privacy, + DetectorType: detector_typepb.DetectorType_Privacy, Verified: false, }, }, @@ -97,7 +97,7 @@ func TestPrivacy_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Privacy, + DetectorType: detector_typepb.DetectorType_Privacy, Verified: false, }, }, @@ -114,7 +114,7 @@ func TestPrivacy_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Privacy, + DetectorType: detector_typepb.DetectorType_Privacy, Verified: false, }, }, diff --git a/pkg/detectors/privatekey/privatekey.go b/pkg/detectors/privatekey/privatekey.go index 8deaa05750d5..39b1d7999acb 100644 --- a/pkg/detectors/privatekey/privatekey.go +++ b/pkg/detectors/privatekey/privatekey.go @@ -15,7 +15,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) var ( @@ -65,7 +65,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_PrivateKey, + DetectorType: detector_typepb.DetectorType_PrivateKey, Raw: []byte(token), Redacted: token[0:64], ExtraData: make(map[string]string), @@ -290,6 +290,6 @@ func (e *VerificationErrors) Add(err error) { e.mutex.Unlock() } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_PrivateKey +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_PrivateKey } diff --git a/pkg/detectors/privatekey/privatekey_integration_test.go b/pkg/detectors/privatekey/privatekey_integration_test.go index cf80de52a993..965ee12e0814 100644 --- a/pkg/detectors/privatekey/privatekey_integration_test.go +++ b/pkg/detectors/privatekey/privatekey_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/kylelemons/godebug/pretty" "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestPrivatekey_FromChunk(t *testing.T) { @@ -52,12 +52,12 @@ func TestPrivatekey_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_PrivateKey, + DetectorType: detector_typepb.DetectorType_PrivateKey, Verified: false, Redacted: "-----BEGIN PRIVATE KEY-----\nMIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYw", }, { - DetectorType: detectorspb.DetectorType_PrivateKey, + DetectorType: detector_typepb.DetectorType_PrivateKey, Verified: false, Redacted: "-----BEGIN PRIVATE KEY-----\nMIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgw", }, @@ -74,7 +74,7 @@ func TestPrivatekey_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_PrivateKey, + DetectorType: detector_typepb.DetectorType_PrivateKey, Verified: true, Redacted: "-----BEGIN PRIVATE KEY-----\nMIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgw", ExtraData: map[string]string{ @@ -94,7 +94,7 @@ func TestPrivatekey_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_PrivateKey, + DetectorType: detector_typepb.DetectorType_PrivateKey, Verified: true, Redacted: "-----BEGIN OPENSSH PRIVATE KEY-----\nb3BlbnNzaC1rZXktdjEAAAAABG5v", ExtraData: map[string]string{ @@ -114,7 +114,7 @@ func TestPrivatekey_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_PrivateKey, + DetectorType: detector_typepb.DetectorType_PrivateKey, Verified: true, Redacted: "-----BEGIN OPENSSH PRIVATE KEY-----\nb3BlbnNzaC1rZXktdjEAAAAACmFl", ExtraData: map[string]string{ diff --git a/pkg/detectors/prodpad/prodpad.go b/pkg/detectors/prodpad/prodpad.go index b6e926e3ce35..505fe07d1b0f 100644 --- a/pkg/detectors/prodpad/prodpad.go +++ b/pkg/detectors/prodpad/prodpad.go @@ -3,13 +3,14 @@ package prodpad import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Prodpad, + DetectorType: detector_typepb.DetectorType_Prodpad, Raw: []byte(resMatch), } @@ -66,8 +67,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Prodpad +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Prodpad } func (s Scanner) Description() string { diff --git a/pkg/detectors/prodpad/prodpad_integration_test.go b/pkg/detectors/prodpad/prodpad_integration_test.go index d17a8632f152..b0e544e817fd 100644 --- a/pkg/detectors/prodpad/prodpad_integration_test.go +++ b/pkg/detectors/prodpad/prodpad_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestProdpad_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestProdpad_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Prodpad, + DetectorType: detector_typepb.DetectorType_Prodpad, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestProdpad_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Prodpad, + DetectorType: detector_typepb.DetectorType_Prodpad, Verified: false, }, }, diff --git a/pkg/detectors/prospectcrm/prospectcrm.go b/pkg/detectors/prospectcrm/prospectcrm.go index b26b99129fe3..1dfadf915f2d 100644 --- a/pkg/detectors/prospectcrm/prospectcrm.go +++ b/pkg/detectors/prospectcrm/prospectcrm.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -41,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_ProspectCRM, + DetectorType: detector_typepb.DetectorType_ProspectCRM, Raw: []byte(resMatch), } @@ -66,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_ProspectCRM +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_ProspectCRM } func (s Scanner) Description() string { diff --git a/pkg/detectors/prospectcrm/prospectcrm_integration_test.go b/pkg/detectors/prospectcrm/prospectcrm_integration_test.go index af0f8f0fb81f..cdece920b381 100644 --- a/pkg/detectors/prospectcrm/prospectcrm_integration_test.go +++ b/pkg/detectors/prospectcrm/prospectcrm_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestProspectCRM_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestProspectCRM_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ProspectCRM, + DetectorType: detector_typepb.DetectorType_ProspectCRM, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestProspectCRM_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ProspectCRM, + DetectorType: detector_typepb.DetectorType_ProspectCRM, Verified: false, }, }, diff --git a/pkg/detectors/protocolsio/protocolsio.go b/pkg/detectors/protocolsio/protocolsio.go index abc82e830d30..06b62894f9d2 100644 --- a/pkg/detectors/protocolsio/protocolsio.go +++ b/pkg/detectors/protocolsio/protocolsio.go @@ -3,13 +3,14 @@ package protocolsio import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_ProtocolsIO, + DetectorType: detector_typepb.DetectorType_ProtocolsIO, Raw: []byte(resMatch), } @@ -65,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_ProtocolsIO +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_ProtocolsIO } func (s Scanner) Description() string { diff --git a/pkg/detectors/protocolsio/protocolsio_integration_test.go b/pkg/detectors/protocolsio/protocolsio_integration_test.go index 495d2218f323..9e12b93d29e1 100644 --- a/pkg/detectors/protocolsio/protocolsio_integration_test.go +++ b/pkg/detectors/protocolsio/protocolsio_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestProtocolsIO_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestProtocolsIO_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ProtocolsIO, + DetectorType: detector_typepb.DetectorType_ProtocolsIO, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestProtocolsIO_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ProtocolsIO, + DetectorType: detector_typepb.DetectorType_ProtocolsIO, Verified: false, }, }, diff --git a/pkg/detectors/proxycrawl/proxycrawl.go b/pkg/detectors/proxycrawl/proxycrawl.go index 05a41820c7ec..7596758bccff 100644 --- a/pkg/detectors/proxycrawl/proxycrawl.go +++ b/pkg/detectors/proxycrawl/proxycrawl.go @@ -3,14 +3,15 @@ package proxycrawl import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" "time" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -41,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_ProxyCrawl, + DetectorType: detector_typepb.DetectorType_ProxyCrawl, Raw: []byte(resMatch), } @@ -67,8 +68,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_ProxyCrawl +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_ProxyCrawl } func (s Scanner) Description() string { diff --git a/pkg/detectors/proxycrawl/proxycrawl_integration_test.go b/pkg/detectors/proxycrawl/proxycrawl_integration_test.go index 7eea9e70aaa9..156f44497cb7 100644 --- a/pkg/detectors/proxycrawl/proxycrawl_integration_test.go +++ b/pkg/detectors/proxycrawl/proxycrawl_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestProxyCrawl_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestProxyCrawl_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ProxyCrawl, + DetectorType: detector_typepb.DetectorType_ProxyCrawl, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestProxyCrawl_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ProxyCrawl, + DetectorType: detector_typepb.DetectorType_ProxyCrawl, Verified: false, }, }, diff --git a/pkg/detectors/pubnubpublishkey/pubnubpublishkey.go b/pkg/detectors/pubnubpublishkey/pubnubpublishkey.go index 77c36c8d7953..987f71758d11 100644 --- a/pkg/detectors/pubnubpublishkey/pubnubpublishkey.go +++ b/pkg/detectors/pubnubpublishkey/pubnubpublishkey.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -49,7 +49,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result ressubMatch := strings.TrimSpace(subMatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_PubNubPublishKey, + DetectorType: detector_typepb.DetectorType_PubNubPublishKey, Raw: []byte(resMatch), RawV2: []byte(resMatch + "/" + ressubMatch), } @@ -99,8 +99,8 @@ func verifyPubNub(ctx context.Context, client *http.Client, resMatch, ressubMatc return false, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_PubNubPublishKey +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_PubNubPublishKey } func (s Scanner) Description() string { diff --git a/pkg/detectors/pubnubpublishkey/pubnubpublishkey_integration_test.go b/pkg/detectors/pubnubpublishkey/pubnubpublishkey_integration_test.go index 9caa04ae1746..784672a8cccb 100644 --- a/pkg/detectors/pubnubpublishkey/pubnubpublishkey_integration_test.go +++ b/pkg/detectors/pubnubpublishkey/pubnubpublishkey_integration_test.go @@ -15,7 +15,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestPubNubPublishKey_FromChunk(t *testing.T) { @@ -52,7 +52,7 @@ func TestPubNubPublishKey_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_PubNubPublishKey, + DetectorType: detector_typepb.DetectorType_PubNubPublishKey, Verified: true, }, }, @@ -68,7 +68,7 @@ func TestPubNubPublishKey_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_PubNubPublishKey, + DetectorType: detector_typepb.DetectorType_PubNubPublishKey, Verified: false, }, }, @@ -84,7 +84,7 @@ func TestPubNubPublishKey_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_PubNubPublishKey, + DetectorType: detector_typepb.DetectorType_PubNubPublishKey, Verified: false, }, }, @@ -101,7 +101,7 @@ func TestPubNubPublishKey_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_PubNubPublishKey, + DetectorType: detector_typepb.DetectorType_PubNubPublishKey, Verified: false, }, }, diff --git a/pkg/detectors/pubnubsubscriptionkey/pubnubsubscriptionkey.go b/pkg/detectors/pubnubsubscriptionkey/pubnubsubscriptionkey.go index ed4beae19276..6ead8420133a 100644 --- a/pkg/detectors/pubnubsubscriptionkey/pubnubsubscriptionkey.go +++ b/pkg/detectors/pubnubsubscriptionkey/pubnubsubscriptionkey.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -42,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_PubNubSubscriptionKey, + DetectorType: detector_typepb.DetectorType_PubNubSubscriptionKey, Raw: []byte(resMatch), } @@ -58,8 +58,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_PubNubSubscriptionKey +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_PubNubSubscriptionKey } func (s Scanner) Description() string { diff --git a/pkg/detectors/pubnubsubscriptionkey/pubnubsubscriptionkey_integration_test.go b/pkg/detectors/pubnubsubscriptionkey/pubnubsubscriptionkey_integration_test.go index bbeac7afb1cc..dd9d4dca2c6d 100644 --- a/pkg/detectors/pubnubsubscriptionkey/pubnubsubscriptionkey_integration_test.go +++ b/pkg/detectors/pubnubsubscriptionkey/pubnubsubscriptionkey_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestPubNubSubscriptionKey_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestPubNubSubscriptionKey_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_PubNubSubscriptionKey, + DetectorType: detector_typepb.DetectorType_PubNubSubscriptionKey, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestPubNubSubscriptionKey_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_PubNubSubscriptionKey, + DetectorType: detector_typepb.DetectorType_PubNubSubscriptionKey, Verified: false, }, }, diff --git a/pkg/detectors/pulumi/pulumi.go b/pkg/detectors/pulumi/pulumi.go index deb62097943a..5ea4676ffa58 100644 --- a/pkg/detectors/pulumi/pulumi.go +++ b/pkg/detectors/pulumi/pulumi.go @@ -3,13 +3,14 @@ package pulumi import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Pulumi, + DetectorType: detector_typepb.DetectorType_Pulumi, Raw: []byte(resMatch), } @@ -67,8 +68,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Pulumi +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Pulumi } func (s Scanner) Description() string { diff --git a/pkg/detectors/pulumi/pulumi_integration_test.go b/pkg/detectors/pulumi/pulumi_integration_test.go index 2276bddcfd20..c534de2d557e 100644 --- a/pkg/detectors/pulumi/pulumi_integration_test.go +++ b/pkg/detectors/pulumi/pulumi_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestPulumi_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestPulumi_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Pulumi, + DetectorType: detector_typepb.DetectorType_Pulumi, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestPulumi_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Pulumi, + DetectorType: detector_typepb.DetectorType_Pulumi, Verified: false, }, }, diff --git a/pkg/detectors/purestake/purestake.go b/pkg/detectors/purestake/purestake.go index 027cb060e593..09145709d6dc 100644 --- a/pkg/detectors/purestake/purestake.go +++ b/pkg/detectors/purestake/purestake.go @@ -2,13 +2,14 @@ package purestake import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -39,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_PureStake, + DetectorType: detector_typepb.DetectorType_PureStake, Raw: []byte(resMatch), } @@ -64,8 +65,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_PureStake +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_PureStake } func (s Scanner) Description() string { diff --git a/pkg/detectors/purestake/purestake_integration_test.go b/pkg/detectors/purestake/purestake_integration_test.go index 90c408e4262c..a95bbf794a31 100644 --- a/pkg/detectors/purestake/purestake_integration_test.go +++ b/pkg/detectors/purestake/purestake_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestPureStake_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestPureStake_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_PureStake, + DetectorType: detector_typepb.DetectorType_PureStake, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestPureStake_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_PureStake, + DetectorType: detector_typepb.DetectorType_PureStake, Verified: false, }, }, diff --git a/pkg/detectors/pushbulletapikey/pushbulletapikey.go b/pkg/detectors/pushbulletapikey/pushbulletapikey.go index 2eefea4b4b4d..904a7e7fb30b 100644 --- a/pkg/detectors/pushbulletapikey/pushbulletapikey.go +++ b/pkg/detectors/pushbulletapikey/pushbulletapikey.go @@ -9,7 +9,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_PushBulletApiKey, + DetectorType: detector_typepb.DetectorType_PushBulletApiKey, Raw: []byte(resMatch), } @@ -65,8 +65,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_PushBulletApiKey +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_PushBulletApiKey } func (s Scanner) Description() string { diff --git a/pkg/detectors/pushbulletapikey/pushbulletapikey_integration_test.go b/pkg/detectors/pushbulletapikey/pushbulletapikey_integration_test.go index 81aeb603dd46..0618d884d007 100644 --- a/pkg/detectors/pushbulletapikey/pushbulletapikey_integration_test.go +++ b/pkg/detectors/pushbulletapikey/pushbulletapikey_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestPushBulletApiKey_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestPushBulletApiKey_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_PushBulletApiKey, + DetectorType: detector_typepb.DetectorType_PushBulletApiKey, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestPushBulletApiKey_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_PushBulletApiKey, + DetectorType: detector_typepb.DetectorType_PushBulletApiKey, Verified: false, }, }, diff --git a/pkg/detectors/pusherchannelkey/pusherchannelkey.go b/pkg/detectors/pusherchannelkey/pusherchannelkey.go index 829878c91bba..c25b6d559a90 100644 --- a/pkg/detectors/pusherchannelkey/pusherchannelkey.go +++ b/pkg/detectors/pusherchannelkey/pusherchannelkey.go @@ -18,7 +18,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -70,7 +70,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for key := range uniqueKeyMatches { for secret := range uniqueSecretMatches { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_PusherChannelKey, + DetectorType: detector_typepb.DetectorType_PusherChannelKey, Raw: []byte(app), RawV2: []byte(app + key), } @@ -96,8 +96,8 @@ func hmacBytes(toSign, secret []byte) []byte { return _authSignature.Sum(nil) } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_PusherChannelKey +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_PusherChannelKey } func (s Scanner) Description() string { diff --git a/pkg/detectors/pusherchannelkey/pusherchannelkey_integration_test.go b/pkg/detectors/pusherchannelkey/pusherchannelkey_integration_test.go index e1c50947aed9..72f555e05acf 100644 --- a/pkg/detectors/pusherchannelkey/pusherchannelkey_integration_test.go +++ b/pkg/detectors/pusherchannelkey/pusherchannelkey_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestPusherChannelKey_FromChunk(t *testing.T) { @@ -50,12 +50,12 @@ func TestPusherChannelKey_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_PusherChannelKey, + DetectorType: detector_typepb.DetectorType_PusherChannelKey, Verified: true, RawV2: []byte(appId + key), }, { - DetectorType: detectorspb.DetectorType_PusherChannelKey, + DetectorType: detector_typepb.DetectorType_PusherChannelKey, Verified: false, RawV2: []byte(appId + key), }, @@ -72,12 +72,12 @@ func TestPusherChannelKey_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_PusherChannelKey, + DetectorType: detector_typepb.DetectorType_PusherChannelKey, Verified: false, RawV2: []byte(appId + key), }, { - DetectorType: detectorspb.DetectorType_PusherChannelKey, + DetectorType: detector_typepb.DetectorType_PusherChannelKey, Verified: false, RawV2: []byte(appId + key), }, diff --git a/pkg/detectors/pypi/pypi.go b/pkg/detectors/pypi/pypi.go index a0f3c55bcacf..684eb0811cd9 100644 --- a/pkg/detectors/pypi/pypi.go +++ b/pkg/detectors/pypi/pypi.go @@ -12,7 +12,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -45,7 +45,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for match := range uniqueMatches { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_PyPI, + DetectorType: detector_typepb.DetectorType_PyPI, Raw: []byte(match), } @@ -120,8 +120,8 @@ func verifyMatch(ctx context.Context, client *http.Client, token string) (bool, return false, nil, fmt.Errorf("unexpected HTTP response status %d", res.StatusCode) } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_PyPI +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_PyPI } func (s Scanner) Description() string { diff --git a/pkg/detectors/pypi/pypi_integration_test.go b/pkg/detectors/pypi/pypi_integration_test.go index dddf57e41d63..b8f83fea182e 100644 --- a/pkg/detectors/pypi/pypi_integration_test.go +++ b/pkg/detectors/pypi/pypi_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestPypi_FromChunk(t *testing.T) { @@ -50,7 +50,7 @@ func TestPypi_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_PyPI, + DetectorType: detector_typepb.DetectorType_PyPI, Verified: true, }, }, @@ -67,7 +67,7 @@ func TestPypi_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_PyPI, + DetectorType: detector_typepb.DetectorType_PyPI, Verified: false, }, }, @@ -96,7 +96,7 @@ func TestPypi_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_PyPI, + DetectorType: detector_typepb.DetectorType_PyPI, Verified: false, }, }, @@ -113,7 +113,7 @@ func TestPypi_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_PyPI, + DetectorType: detector_typepb.DetectorType_PyPI, Verified: false, }, }, diff --git a/pkg/detectors/qase/qase.go b/pkg/detectors/qase/qase.go index bda138031bc4..4d49f4c9c742 100644 --- a/pkg/detectors/qase/qase.go +++ b/pkg/detectors/qase/qase.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -42,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Qase, + DetectorType: detector_typepb.DetectorType_Qase, Raw: []byte(resMatch), } @@ -58,8 +58,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Qase +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Qase } func (s Scanner) Description() string { diff --git a/pkg/detectors/qase/qase_integration_test.go b/pkg/detectors/qase/qase_integration_test.go index 271d7d2f9fae..ffa67780516e 100644 --- a/pkg/detectors/qase/qase_integration_test.go +++ b/pkg/detectors/qase/qase_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestQase_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestQase_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Qase, + DetectorType: detector_typepb.DetectorType_Qase, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestQase_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Qase, + DetectorType: detector_typepb.DetectorType_Qase, Verified: false, }, }, diff --git a/pkg/detectors/qualaroo/qualaroo.go b/pkg/detectors/qualaroo/qualaroo.go index c6f1ee9fa7f6..dd501d7d9529 100644 --- a/pkg/detectors/qualaroo/qualaroo.go +++ b/pkg/detectors/qualaroo/qualaroo.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -42,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Qualaroo, + DetectorType: detector_typepb.DetectorType_Qualaroo, Raw: []byte(resMatch), } @@ -58,8 +58,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Qualaroo +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Qualaroo } func (s Scanner) Description() string { diff --git a/pkg/detectors/qualaroo/qualaroo_integration_test.go b/pkg/detectors/qualaroo/qualaroo_integration_test.go index 92637db43e13..f028e7e9ee62 100644 --- a/pkg/detectors/qualaroo/qualaroo_integration_test.go +++ b/pkg/detectors/qualaroo/qualaroo_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestQualaroo_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestQualaroo_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Qualaroo, + DetectorType: detector_typepb.DetectorType_Qualaroo, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestQualaroo_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Qualaroo, + DetectorType: detector_typepb.DetectorType_Qualaroo, Verified: false, }, }, diff --git a/pkg/detectors/qubole/qubole.go b/pkg/detectors/qubole/qubole.go index 9c68c8bb9910..759bb3120051 100644 --- a/pkg/detectors/qubole/qubole.go +++ b/pkg/detectors/qubole/qubole.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -42,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Qubole, + DetectorType: detector_typepb.DetectorType_Qubole, Raw: []byte(resMatch), } @@ -58,8 +58,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Qubole +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Qubole } func (s Scanner) Description() string { diff --git a/pkg/detectors/qubole/qubole_integration_test.go b/pkg/detectors/qubole/qubole_integration_test.go index ccd8c83e0bd2..2db0ad288b7e 100644 --- a/pkg/detectors/qubole/qubole_integration_test.go +++ b/pkg/detectors/qubole/qubole_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestQubole_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestQubole_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Qubole, + DetectorType: detector_typepb.DetectorType_Qubole, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestQubole_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Qubole, + DetectorType: detector_typepb.DetectorType_Qubole, Verified: false, }, }, diff --git a/pkg/detectors/rabbitmq/rabbitmq.go b/pkg/detectors/rabbitmq/rabbitmq.go index b6078386e070..241c09bc0644 100644 --- a/pkg/detectors/rabbitmq/rabbitmq.go +++ b/pkg/detectors/rabbitmq/rabbitmq.go @@ -11,7 +11,7 @@ import ( regexp "github.com/wasilibs/go-re2" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -60,7 +60,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } r := detectors.Result{ - DetectorType: detectorspb.DetectorType_RabbitMQ, + DetectorType: detector_typepb.DetectorType_RabbitMQ, Raw: []byte(urlMatch), Redacted: strings.TrimSpace(strings.Replace(parsedURL.String(), password, "********", -1)), } @@ -114,8 +114,8 @@ func (s Scanner) verify(url string) (bool, error) { return false, err } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_RabbitMQ +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_RabbitMQ } func (s Scanner) Description() string { diff --git a/pkg/detectors/rabbitmq/rabbitmq_integration_test.go b/pkg/detectors/rabbitmq/rabbitmq_integration_test.go index f71148ff104f..d63b352ccd37 100644 --- a/pkg/detectors/rabbitmq/rabbitmq_integration_test.go +++ b/pkg/detectors/rabbitmq/rabbitmq_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestRabbitMQ_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestRabbitMQ_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_RabbitMQ, + DetectorType: detector_typepb.DetectorType_RabbitMQ, Verified: true, Redacted: "amqp://rabbit123:*******************@127.0.0.1", }, @@ -65,7 +65,7 @@ func TestRabbitMQ_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_RabbitMQ, + DetectorType: detector_typepb.DetectorType_RabbitMQ, Verified: false, Redacted: "amqp://rabbituser:*******************@127.0.0.1", }, diff --git a/pkg/detectors/railwayapp/railwayapp.go b/pkg/detectors/railwayapp/railwayapp.go index 0408103c8ada..ee6bec093cfc 100644 --- a/pkg/detectors/railwayapp/railwayapp.go +++ b/pkg/detectors/railwayapp/railwayapp.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -71,7 +71,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for match := range uniqueMatches { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_RailwayApp, + DetectorType: detector_typepb.DetectorType_RailwayApp, Raw: []byte(match), ExtraData: map[string]string{ "rotation_guide": "https://howtorotate.com/docs/tutorials/railwayapp/", @@ -91,8 +91,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_RailwayApp +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_RailwayApp } /* diff --git a/pkg/detectors/railwayapp/railwayapp_integration_test.go b/pkg/detectors/railwayapp/railwayapp_integration_test.go index 0843267b9946..a139d29cd970 100644 --- a/pkg/detectors/railwayapp/railwayapp_integration_test.go +++ b/pkg/detectors/railwayapp/railwayapp_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestRailwayApp_FromChunk(t *testing.T) { @@ -50,7 +50,7 @@ func TestRailwayApp_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_RailwayApp, + DetectorType: detector_typepb.DetectorType_RailwayApp, Verified: true, ExtraData: map[string]string{ "rotation_guide": "https://howtorotate.com/docs/tutorials/railwayapp/", @@ -70,7 +70,7 @@ func TestRailwayApp_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_RailwayApp, + DetectorType: detector_typepb.DetectorType_RailwayApp, Verified: false, ExtraData: map[string]string{ "rotation_guide": "https://howtorotate.com/docs/tutorials/railwayapp/", @@ -102,7 +102,7 @@ func TestRailwayApp_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_RailwayApp, + DetectorType: detector_typepb.DetectorType_RailwayApp, Verified: false, ExtraData: map[string]string{ "rotation_guide": "https://howtorotate.com/docs/tutorials/railwayapp/", @@ -122,7 +122,7 @@ func TestRailwayApp_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_RailwayApp, + DetectorType: detector_typepb.DetectorType_RailwayApp, Verified: false, ExtraData: map[string]string{ "rotation_guide": "https://howtorotate.com/docs/tutorials/railwayapp/", diff --git a/pkg/detectors/ramp/ramp.go b/pkg/detectors/ramp/ramp.go index 204e602a119c..3295e91332b4 100644 --- a/pkg/detectors/ramp/ramp.go +++ b/pkg/detectors/ramp/ramp.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -50,7 +50,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resSecret := strings.TrimSpace(secretMatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Ramp, + DetectorType: detector_typepb.DetectorType_Ramp, Raw: []byte(resMatch), RawV2: []byte(resMatch + ":" + resSecret), } @@ -95,8 +95,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Ramp +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Ramp } func (s Scanner) Description() string { diff --git a/pkg/detectors/ramp/ramp_integration_test.go b/pkg/detectors/ramp/ramp_integration_test.go index 375ff3c51503..5954f085197b 100644 --- a/pkg/detectors/ramp/ramp_integration_test.go +++ b/pkg/detectors/ramp/ramp_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestRamp_FromChunk(t *testing.T) { @@ -52,7 +52,7 @@ func TestRamp_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Ramp, + DetectorType: detector_typepb.DetectorType_Ramp, Verified: true, }, }, @@ -69,7 +69,7 @@ func TestRamp_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Ramp, + DetectorType: detector_typepb.DetectorType_Ramp, Verified: false, }, }, @@ -98,7 +98,7 @@ func TestRamp_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Ramp, + DetectorType: detector_typepb.DetectorType_Ramp, Verified: false, }, }, @@ -115,7 +115,7 @@ func TestRamp_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Ramp, + DetectorType: detector_typepb.DetectorType_Ramp, Verified: false, }, }, diff --git a/pkg/detectors/rapidapi/rapidapi.go b/pkg/detectors/rapidapi/rapidapi.go index b177aa9910ae..10aef8c6d349 100644 --- a/pkg/detectors/rapidapi/rapidapi.go +++ b/pkg/detectors/rapidapi/rapidapi.go @@ -2,13 +2,14 @@ package rapidapi import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -38,7 +39,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_RapidApi, + DetectorType: detector_typepb.DetectorType_RapidApi, Raw: []byte(resMatch), } @@ -63,8 +64,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_RapidApi +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_RapidApi } func (s Scanner) Description() string { diff --git a/pkg/detectors/rapidapi/rapidapi_integration_test.go b/pkg/detectors/rapidapi/rapidapi_integration_test.go index 671894841d31..623f1a2b5561 100644 --- a/pkg/detectors/rapidapi/rapidapi_integration_test.go +++ b/pkg/detectors/rapidapi/rapidapi_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestRapidApi_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestRapidApi_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_RapidApi, + DetectorType: detector_typepb.DetectorType_RapidApi, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestRapidApi_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_RapidApi, + DetectorType: detector_typepb.DetectorType_RapidApi, Verified: false, }, }, diff --git a/pkg/detectors/raven/raven.go b/pkg/detectors/raven/raven.go index 097ff6065b23..8254e905e5e6 100644 --- a/pkg/detectors/raven/raven.go +++ b/pkg/detectors/raven/raven.go @@ -4,14 +4,15 @@ import ( "context" "encoding/json" "fmt" - regexp "github.com/wasilibs/go-re2" "io" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -42,7 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Raven, + DetectorType: detector_typepb.DetectorType_Raven, Raw: []byte(resMatch), } @@ -74,8 +75,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Raven +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Raven } func (s Scanner) Description() string { diff --git a/pkg/detectors/raven/raven_integration_test.go b/pkg/detectors/raven/raven_integration_test.go index ee8e9a9801c4..dc1682fad4f7 100644 --- a/pkg/detectors/raven/raven_integration_test.go +++ b/pkg/detectors/raven/raven_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestRaven_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestRaven_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Raven, + DetectorType: detector_typepb.DetectorType_Raven, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestRaven_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Raven, + DetectorType: detector_typepb.DetectorType_Raven, Verified: false, }, }, diff --git a/pkg/detectors/rawg/rawg.go b/pkg/detectors/rawg/rawg.go index a1db9bb68317..69ef4201ccc4 100644 --- a/pkg/detectors/rawg/rawg.go +++ b/pkg/detectors/rawg/rawg.go @@ -2,13 +2,14 @@ package rawg import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -39,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Rawg, + DetectorType: detector_typepb.DetectorType_Rawg, Raw: []byte(resMatch), } @@ -63,8 +64,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Rawg +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Rawg } func (s Scanner) Description() string { diff --git a/pkg/detectors/rawg/rawg_integration_test.go b/pkg/detectors/rawg/rawg_integration_test.go index 93b4b775243e..c5938e5311ef 100644 --- a/pkg/detectors/rawg/rawg_integration_test.go +++ b/pkg/detectors/rawg/rawg_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestRawg_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestRawg_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Rawg, + DetectorType: detector_typepb.DetectorType_Rawg, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestRawg_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Rawg, + DetectorType: detector_typepb.DetectorType_Rawg, Verified: false, }, }, diff --git a/pkg/detectors/razorpay/razorpay.go b/pkg/detectors/razorpay/razorpay.go index aaebbe1a770b..b85e46c4abc1 100644 --- a/pkg/detectors/razorpay/razorpay.go +++ b/pkg/detectors/razorpay/razorpay.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -46,7 +46,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for _, secret := range secMatches { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_RazorPay, + DetectorType: detector_typepb.DetectorType_RazorPay, Raw: []byte(key), RawV2: []byte(key + secret), Redacted: key, @@ -81,8 +81,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_RazorPay +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_RazorPay } func (s Scanner) Description() string { diff --git a/pkg/detectors/razorpay/razorpay_integration_test.go b/pkg/detectors/razorpay/razorpay_integration_test.go index 21703bfff6ea..13ff512ad913 100644 --- a/pkg/detectors/razorpay/razorpay_integration_test.go +++ b/pkg/detectors/razorpay/razorpay_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestRazorPay_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestRazorPay_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_RazorPay, + DetectorType: detector_typepb.DetectorType_RazorPay, Redacted: "rzp_live_SnDTaP1ncfliDt", Verified: false, }, diff --git a/pkg/detectors/reachmail/reachmail.go b/pkg/detectors/reachmail/reachmail.go index e1a3a3c252bf..62778ccd92d7 100644 --- a/pkg/detectors/reachmail/reachmail.go +++ b/pkg/detectors/reachmail/reachmail.go @@ -3,13 +3,14 @@ package reachmail import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Reachmail, + DetectorType: detector_typepb.DetectorType_Reachmail, Raw: []byte(resMatch), } @@ -67,8 +68,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Reachmail +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Reachmail } func (s Scanner) Description() string { diff --git a/pkg/detectors/reachmail/reachmail_integration_test.go b/pkg/detectors/reachmail/reachmail_integration_test.go index 215a224048ce..2d37d81c5ac2 100644 --- a/pkg/detectors/reachmail/reachmail_integration_test.go +++ b/pkg/detectors/reachmail/reachmail_integration_test.go @@ -12,7 +12,7 @@ import ( "github.com/kylelemons/godebug/pretty" "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestReachmail_FromChunk(t *testing.T) { @@ -47,7 +47,7 @@ func TestReachmail_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Reachmail, + DetectorType: detector_typepb.DetectorType_Reachmail, Verified: true, }, }, @@ -63,7 +63,7 @@ func TestReachmail_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Reachmail, + DetectorType: detector_typepb.DetectorType_Reachmail, Verified: false, }, }, diff --git a/pkg/detectors/readme/readme.go b/pkg/detectors/readme/readme.go index 9398b6feab94..fe829a0f2134 100644 --- a/pkg/detectors/readme/readme.go +++ b/pkg/detectors/readme/readme.go @@ -2,12 +2,13 @@ package readme import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -36,7 +37,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_ReadMe, + DetectorType: detector_typepb.DetectorType_ReadMe, Raw: []byte(resMatch), } @@ -62,8 +63,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_ReadMe +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_ReadMe } func (s Scanner) Description() string { diff --git a/pkg/detectors/readme/readme_integration_test.go b/pkg/detectors/readme/readme_integration_test.go index 1ef3c1fe125a..3ef198129a55 100644 --- a/pkg/detectors/readme/readme_integration_test.go +++ b/pkg/detectors/readme/readme_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestReadMe_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestReadMe_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ReadMe, + DetectorType: detector_typepb.DetectorType_ReadMe, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestReadMe_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ReadMe, + DetectorType: detector_typepb.DetectorType_ReadMe, Verified: false, }, }, diff --git a/pkg/detectors/reallysimplesystems/reallysimplesystems.go b/pkg/detectors/reallysimplesystems/reallysimplesystems.go index e3ca78dcfcda..dc8772ffb369 100644 --- a/pkg/detectors/reallysimplesystems/reallysimplesystems.go +++ b/pkg/detectors/reallysimplesystems/reallysimplesystems.go @@ -12,7 +12,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -43,7 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_ReallySimpleSystems, + DetectorType: detector_typepb.DetectorType_ReallySimpleSystems, Raw: []byte(resMatch), } @@ -76,8 +76,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_ReallySimpleSystems +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_ReallySimpleSystems } func (s Scanner) Description() string { diff --git a/pkg/detectors/reallysimplesystems/reallysimplesystems_integration_test.go b/pkg/detectors/reallysimplesystems/reallysimplesystems_integration_test.go index 197de11b3641..2fe40aed10d3 100644 --- a/pkg/detectors/reallysimplesystems/reallysimplesystems_integration_test.go +++ b/pkg/detectors/reallysimplesystems/reallysimplesystems_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestReallySimpleSystems_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestReallySimpleSystems_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ReallySimpleSystems, + DetectorType: detector_typepb.DetectorType_ReallySimpleSystems, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestReallySimpleSystems_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ReallySimpleSystems, + DetectorType: detector_typepb.DetectorType_ReallySimpleSystems, Verified: false, }, }, diff --git a/pkg/detectors/rebrandly/rebrandly.go b/pkg/detectors/rebrandly/rebrandly.go index e83d4bb14605..3814de718a2c 100644 --- a/pkg/detectors/rebrandly/rebrandly.go +++ b/pkg/detectors/rebrandly/rebrandly.go @@ -2,13 +2,14 @@ package rebrandly import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -39,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Rebrandly, + DetectorType: detector_typepb.DetectorType_Rebrandly, Raw: []byte(resMatch), } @@ -64,8 +65,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Rebrandly +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Rebrandly } func (s Scanner) Description() string { diff --git a/pkg/detectors/rebrandly/rebrandly_integration_test.go b/pkg/detectors/rebrandly/rebrandly_integration_test.go index a9abde619664..5566c6dd5c1b 100644 --- a/pkg/detectors/rebrandly/rebrandly_integration_test.go +++ b/pkg/detectors/rebrandly/rebrandly_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestRebrandly_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestRebrandly_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Rebrandly, + DetectorType: detector_typepb.DetectorType_Rebrandly, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestRebrandly_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Rebrandly, + DetectorType: detector_typepb.DetectorType_Rebrandly, Verified: false, }, }, diff --git a/pkg/detectors/rechargepayments/rechargepayments.go b/pkg/detectors/rechargepayments/rechargepayments.go index 46ed886b60e6..8b6bc6a3cf34 100644 --- a/pkg/detectors/rechargepayments/rechargepayments.go +++ b/pkg/detectors/rechargepayments/rechargepayments.go @@ -2,15 +2,16 @@ package rechargepayments import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) -type Scanner struct{ +type Scanner struct { detectors.DefaultMultiPartCredentialProvider } @@ -43,7 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for _, token := range tokens { result := detectors.Result{ - DetectorType: detectorspb.DetectorType_RechargePayments, + DetectorType: detector_typepb.DetectorType_RechargePayments, Raw: []byte(token), } if verify { @@ -71,8 +72,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_RechargePayments +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_RechargePayments } func (s Scanner) Description() string { diff --git a/pkg/detectors/rechargepayments/rechargepayments_integration_test.go b/pkg/detectors/rechargepayments/rechargepayments_integration_test.go index 57492ecee418..15198bc1bf31 100644 --- a/pkg/detectors/rechargepayments/rechargepayments_integration_test.go +++ b/pkg/detectors/rechargepayments/rechargepayments_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestRechargePayments_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestRechargePayments_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_RechargePayments, + DetectorType: detector_typepb.DetectorType_RechargePayments, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestRechargePayments_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_RechargePayments, + DetectorType: detector_typepb.DetectorType_RechargePayments, Verified: false, }, }, diff --git a/pkg/detectors/redis/redis.go b/pkg/detectors/redis/redis.go index 633c9834c157..a314f0bbc961 100644 --- a/pkg/detectors/redis/redis.go +++ b/pkg/detectors/redis/redis.go @@ -3,14 +3,15 @@ package redis import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/url" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/go-redis/redis" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -59,7 +60,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result redact := strings.TrimSpace(strings.Replace(urlMatch, password, "*******", -1)) s := detectors.Result{ - DetectorType: detectorspb.DetectorType_Redis, + DetectorType: detector_typepb.DetectorType_Redis, Raw: []byte(urlMatch), Redacted: redact, } @@ -98,7 +99,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result redact := strings.TrimSpace(strings.Replace(urlMatch, password, "*******", -1)) s := detectors.Result{ - DetectorType: detectorspb.DetectorType_Redis, + DetectorType: detector_typepb.DetectorType_Redis, Raw: []byte(urlMatch), Redacted: redact, } @@ -136,8 +137,8 @@ func verifyRedis(ctx context.Context, u *url.URL) bool { return false } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Redis +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Redis } func (s Scanner) Description() string { diff --git a/pkg/detectors/redis/redis_integration_test.go b/pkg/detectors/redis/redis_integration_test.go index 85ff1b8ff919..44380084e700 100644 --- a/pkg/detectors/redis/redis_integration_test.go +++ b/pkg/detectors/redis/redis_integration_test.go @@ -16,7 +16,7 @@ import ( "github.com/testcontainers/testcontainers-go" "github.com/testcontainers/testcontainers-go/wait" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func setupACLConfigFile(redisUser, redisPass string) (*os.File, error) { @@ -112,7 +112,7 @@ func TestRedisIntegration_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Redis, + DetectorType: detector_typepb.DetectorType_Redis, Verified: false, Redacted: fmt.Sprintf("redis://%s:*******@%s:%s", redisUser, host, port.Port()), }, @@ -129,7 +129,7 @@ func TestRedisIntegration_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Redis, + DetectorType: detector_typepb.DetectorType_Redis, Verified: true, Redacted: fmt.Sprintf("redis://%s:*******@%s:%s", redisUser, host, port.Port()), }, @@ -188,7 +188,7 @@ func TestURI_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Redis, + DetectorType: detector_typepb.DetectorType_Redis, Verified: false, Redacted: "redis://user:*******@redis.com", }, diff --git a/pkg/detectors/refiner/refiner.go b/pkg/detectors/refiner/refiner.go index 54e78792535e..f116a5dd6f5d 100644 --- a/pkg/detectors/refiner/refiner.go +++ b/pkg/detectors/refiner/refiner.go @@ -3,13 +3,14 @@ package refiner import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Refiner, + DetectorType: detector_typepb.DetectorType_Refiner, Raw: []byte(resMatch), } @@ -67,8 +68,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Refiner +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Refiner } func (s Scanner) Description() string { diff --git a/pkg/detectors/refiner/refiner_integration_test.go b/pkg/detectors/refiner/refiner_integration_test.go index 6bc0969cbac0..8603bd345cbe 100644 --- a/pkg/detectors/refiner/refiner_integration_test.go +++ b/pkg/detectors/refiner/refiner_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestRefiner_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestRefiner_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Refiner, + DetectorType: detector_typepb.DetectorType_Refiner, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestRefiner_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Refiner, + DetectorType: detector_typepb.DetectorType_Refiner, Verified: false, }, }, diff --git a/pkg/detectors/rentman/rentman.go b/pkg/detectors/rentman/rentman.go index 8cbec01af7d4..e7460733f109 100644 --- a/pkg/detectors/rentman/rentman.go +++ b/pkg/detectors/rentman/rentman.go @@ -3,13 +3,14 @@ package rentman import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Rentman, + DetectorType: detector_typepb.DetectorType_Rentman, Raw: []byte(resMatch), } @@ -66,8 +67,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Rentman +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Rentman } func (s Scanner) Description() string { diff --git a/pkg/detectors/rentman/rentman_integration_test.go b/pkg/detectors/rentman/rentman_integration_test.go index b7a04ede96e4..48f641ef0475 100644 --- a/pkg/detectors/rentman/rentman_integration_test.go +++ b/pkg/detectors/rentman/rentman_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestRentman_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestRentman_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Rentman, + DetectorType: detector_typepb.DetectorType_Rentman, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestRentman_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Rentman, + DetectorType: detector_typepb.DetectorType_Rentman, Verified: false, }, }, diff --git a/pkg/detectors/repairshopr/repairshopr.go b/pkg/detectors/repairshopr/repairshopr.go index 1dbebbb085f5..c57d7844b849 100644 --- a/pkg/detectors/repairshopr/repairshopr.go +++ b/pkg/detectors/repairshopr/repairshopr.go @@ -9,7 +9,7 @@ import ( regexp "github.com/wasilibs/go-re2" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -46,7 +46,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for _, domainmatch := range domainMatches { resDomainMatch := strings.TrimSpace(domainmatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Repairshopr, + DetectorType: detector_typepb.DetectorType_Repairshopr, Raw: []byte(resMatch), } @@ -75,8 +75,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Repairshopr +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Repairshopr } func (s Scanner) Description() string { diff --git a/pkg/detectors/repairshopr/repairshopr_integration_test.go b/pkg/detectors/repairshopr/repairshopr_integration_test.go index a6c59bddb670..93549ee0c0da 100644 --- a/pkg/detectors/repairshopr/repairshopr_integration_test.go +++ b/pkg/detectors/repairshopr/repairshopr_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestRepairshopr_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestRepairshopr_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Repairshopr, + DetectorType: detector_typepb.DetectorType_Repairshopr, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestRepairshopr_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Repairshopr, + DetectorType: detector_typepb.DetectorType_Repairshopr, Verified: false, }, }, diff --git a/pkg/detectors/replicate/replicate.go b/pkg/detectors/replicate/replicate.go index fe41a9c02507..9c564a937dfa 100644 --- a/pkg/detectors/replicate/replicate.go +++ b/pkg/detectors/replicate/replicate.go @@ -3,13 +3,14 @@ package replicate import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -37,7 +38,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Replicate, + DetectorType: detector_typepb.DetectorType_Replicate, Raw: []byte(resMatch), } @@ -73,8 +74,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Replicate +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Replicate } func (s Scanner) Description() string { diff --git a/pkg/detectors/replicate/replicate_integration_test.go b/pkg/detectors/replicate/replicate_integration_test.go index 1e9b4c90b003..1bf0390f6863 100644 --- a/pkg/detectors/replicate/replicate_integration_test.go +++ b/pkg/detectors/replicate/replicate_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestReplicate_FromChunk(t *testing.T) { @@ -50,7 +50,7 @@ func TestReplicate_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Replicate, + DetectorType: detector_typepb.DetectorType_Replicate, Verified: true, }, }, @@ -67,7 +67,7 @@ func TestReplicate_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Replicate, + DetectorType: detector_typepb.DetectorType_Replicate, Verified: false, }, }, diff --git a/pkg/detectors/replyio/replyio.go b/pkg/detectors/replyio/replyio.go index 4275dabd9da3..b47ffbc278ae 100644 --- a/pkg/detectors/replyio/replyio.go +++ b/pkg/detectors/replyio/replyio.go @@ -3,13 +3,14 @@ package replyio import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -38,7 +39,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_ReplyIO, + DetectorType: detector_typepb.DetectorType_ReplyIO, Raw: []byte(resMatch), } @@ -74,8 +75,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_ReplyIO +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_ReplyIO } func (s Scanner) Description() string { diff --git a/pkg/detectors/replyio/replyio_integration_test.go b/pkg/detectors/replyio/replyio_integration_test.go index 798fd20cf7f1..dfab4a5d1b95 100644 --- a/pkg/detectors/replyio/replyio_integration_test.go +++ b/pkg/detectors/replyio/replyio_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestReplyio_FromChunk(t *testing.T) { @@ -50,7 +50,7 @@ func TestReplyio_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ReplyIO, + DetectorType: detector_typepb.DetectorType_ReplyIO, Verified: true, }, }, @@ -67,7 +67,7 @@ func TestReplyio_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ReplyIO, + DetectorType: detector_typepb.DetectorType_ReplyIO, Verified: false, }, }, diff --git a/pkg/detectors/requestfinance/requestfinance.go b/pkg/detectors/requestfinance/requestfinance.go index 84db87a38c72..b9255e2dc97c 100644 --- a/pkg/detectors/requestfinance/requestfinance.go +++ b/pkg/detectors/requestfinance/requestfinance.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -41,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_RequestFinance, + DetectorType: detector_typepb.DetectorType_RequestFinance, Raw: []byte(resMatch), } @@ -77,8 +77,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_RequestFinance +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_RequestFinance } func (s Scanner) Description() string { diff --git a/pkg/detectors/requestfinance/requestfinance_integration_test.go b/pkg/detectors/requestfinance/requestfinance_integration_test.go index f6c79fb8f7bb..53adff515340 100644 --- a/pkg/detectors/requestfinance/requestfinance_integration_test.go +++ b/pkg/detectors/requestfinance/requestfinance_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestRequestfinance_FromChunk(t *testing.T) { @@ -50,7 +50,7 @@ func TestRequestfinance_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_RequestFinance, + DetectorType: detector_typepb.DetectorType_RequestFinance, Verified: true, }, }, @@ -67,7 +67,7 @@ func TestRequestfinance_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_RequestFinance, + DetectorType: detector_typepb.DetectorType_RequestFinance, Verified: false, }, }, diff --git a/pkg/detectors/restpackhtmltopdfapi/restpackhtmltopdfapi.go b/pkg/detectors/restpackhtmltopdfapi/restpackhtmltopdfapi.go index ef11f41685cf..11aea59e845d 100644 --- a/pkg/detectors/restpackhtmltopdfapi/restpackhtmltopdfapi.go +++ b/pkg/detectors/restpackhtmltopdfapi/restpackhtmltopdfapi.go @@ -9,7 +9,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_RestpackHtmlToPdfAPI, + DetectorType: detector_typepb.DetectorType_RestpackHtmlToPdfAPI, Raw: []byte(resMatch), } @@ -66,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_RestpackHtmlToPdfAPI +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_RestpackHtmlToPdfAPI } func (s Scanner) Description() string { diff --git a/pkg/detectors/restpackhtmltopdfapi/restpackhtmltopdfapi_integration_test.go b/pkg/detectors/restpackhtmltopdfapi/restpackhtmltopdfapi_integration_test.go index db81cb172c8d..9ce9fb8db8d3 100644 --- a/pkg/detectors/restpackhtmltopdfapi/restpackhtmltopdfapi_integration_test.go +++ b/pkg/detectors/restpackhtmltopdfapi/restpackhtmltopdfapi_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestRestpackHtmlToPdfAPI_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestRestpackHtmlToPdfAPI_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_RestpackHtmlToPdfAPI, + DetectorType: detector_typepb.DetectorType_RestpackHtmlToPdfAPI, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestRestpackHtmlToPdfAPI_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_RestpackHtmlToPdfAPI, + DetectorType: detector_typepb.DetectorType_RestpackHtmlToPdfAPI, Verified: false, }, }, diff --git a/pkg/detectors/restpackscreenshotapi/restpackscreenshotapi.go b/pkg/detectors/restpackscreenshotapi/restpackscreenshotapi.go index 8ba1b84b261b..001c2dd448e2 100644 --- a/pkg/detectors/restpackscreenshotapi/restpackscreenshotapi.go +++ b/pkg/detectors/restpackscreenshotapi/restpackscreenshotapi.go @@ -9,7 +9,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_RestpackScreenshotAPI, + DetectorType: detector_typepb.DetectorType_RestpackScreenshotAPI, Raw: []byte(resMatch), } @@ -66,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_RestpackScreenshotAPI +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_RestpackScreenshotAPI } func (s Scanner) Description() string { diff --git a/pkg/detectors/restpackscreenshotapi/restpackscreenshotapi_integration_test.go b/pkg/detectors/restpackscreenshotapi/restpackscreenshotapi_integration_test.go index 36a3816a5630..e03986716d94 100644 --- a/pkg/detectors/restpackscreenshotapi/restpackscreenshotapi_integration_test.go +++ b/pkg/detectors/restpackscreenshotapi/restpackscreenshotapi_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestRestpackScreenshotAPI_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestRestpackScreenshotAPI_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_RestpackScreenshotAPI, + DetectorType: detector_typepb.DetectorType_RestpackScreenshotAPI, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestRestpackScreenshotAPI_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_RestpackScreenshotAPI, + DetectorType: detector_typepb.DetectorType_RestpackScreenshotAPI, Verified: false, }, }, diff --git a/pkg/detectors/rev/rev.go b/pkg/detectors/rev/rev.go index f227d6ec12dd..b06f6f90dd19 100644 --- a/pkg/detectors/rev/rev.go +++ b/pkg/detectors/rev/rev.go @@ -3,16 +3,17 @@ package rev import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) -type Scanner struct{ +type Scanner struct { detectors.DefaultMultiPartCredentialProvider } @@ -47,7 +48,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resClientMatch := strings.TrimSpace(clientMatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Rev, + DetectorType: detector_typepb.DetectorType_Rev, Raw: []byte(resUserMatch), } @@ -73,8 +74,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Rev +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Rev } func (s Scanner) Description() string { diff --git a/pkg/detectors/rev/rev_integration_test.go b/pkg/detectors/rev/rev_integration_test.go index 4b9b34ef579d..3628811c49f8 100644 --- a/pkg/detectors/rev/rev_integration_test.go +++ b/pkg/detectors/rev/rev_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestRev_FromChunk(t *testing.T) { @@ -50,7 +50,7 @@ func TestRev_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Rev, + DetectorType: detector_typepb.DetectorType_Rev, Verified: true, }, }, @@ -66,7 +66,7 @@ func TestRev_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Rev, + DetectorType: detector_typepb.DetectorType_Rev, Verified: false, }, }, diff --git a/pkg/detectors/revampcrm/revampcrm.go b/pkg/detectors/revampcrm/revampcrm.go index 9e318b1c734e..9772af1b2260 100644 --- a/pkg/detectors/revampcrm/revampcrm.go +++ b/pkg/detectors/revampcrm/revampcrm.go @@ -2,16 +2,17 @@ package revampcrm import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) -type Scanner struct{ +type Scanner struct { detectors.DefaultMultiPartCredentialProvider } @@ -47,7 +48,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result userPatMatch := strings.TrimSpace(idMatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_RevampCRM, + DetectorType: detector_typepb.DetectorType_RevampCRM, Raw: []byte(tokenPatMatch), } if verify { @@ -72,8 +73,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_RevampCRM +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_RevampCRM } func (s Scanner) Description() string { diff --git a/pkg/detectors/revampcrm/revampcrm_integration_test.go b/pkg/detectors/revampcrm/revampcrm_integration_test.go index 84ab2dde4172..54dc09ea70bf 100644 --- a/pkg/detectors/revampcrm/revampcrm_integration_test.go +++ b/pkg/detectors/revampcrm/revampcrm_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestRevampCRM_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestRevampCRM_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_RevampCRM, + DetectorType: detector_typepb.DetectorType_RevampCRM, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestRevampCRM_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_RevampCRM, + DetectorType: detector_typepb.DetectorType_RevampCRM, Verified: false, }, }, diff --git a/pkg/detectors/ringcentral/ringcentral.go b/pkg/detectors/ringcentral/ringcentral.go index 661a38eaa99c..fb09bfdcd5d7 100644 --- a/pkg/detectors/ringcentral/ringcentral.go +++ b/pkg/detectors/ringcentral/ringcentral.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -48,7 +48,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for _, uriMatch := range uriMatches { resURI := strings.TrimSpace(uriMatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_RingCentral, + DetectorType: detector_typepb.DetectorType_RingCentral, Raw: []byte(resMatch), } @@ -74,8 +74,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_RingCentral +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_RingCentral } func (s Scanner) Description() string { diff --git a/pkg/detectors/ringcentral/ringcentral_integration_test.go b/pkg/detectors/ringcentral/ringcentral_integration_test.go index e27386f2c436..745fc71abcc3 100644 --- a/pkg/detectors/ringcentral/ringcentral_integration_test.go +++ b/pkg/detectors/ringcentral/ringcentral_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestRingcentral_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestRingcentral_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_RingCentral, + DetectorType: detector_typepb.DetectorType_RingCentral, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestRingcentral_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_RingCentral, + DetectorType: detector_typepb.DetectorType_RingCentral, Verified: false, }, }, diff --git a/pkg/detectors/ritekit/ritekit.go b/pkg/detectors/ritekit/ritekit.go index 68d6fecbb749..fb2afdf11e98 100644 --- a/pkg/detectors/ritekit/ritekit.go +++ b/pkg/detectors/ritekit/ritekit.go @@ -3,13 +3,14 @@ package ritekit import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_RiteKit, + DetectorType: detector_typepb.DetectorType_RiteKit, Raw: []byte(resMatch), } @@ -64,8 +65,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_RiteKit +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_RiteKit } func (s Scanner) Description() string { diff --git a/pkg/detectors/ritekit/ritekit_integration_test.go b/pkg/detectors/ritekit/ritekit_integration_test.go index 56bfcfd35b9e..42cc69f986f1 100644 --- a/pkg/detectors/ritekit/ritekit_integration_test.go +++ b/pkg/detectors/ritekit/ritekit_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestRiteKit_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestRiteKit_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_RiteKit, + DetectorType: detector_typepb.DetectorType_RiteKit, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestRiteKit_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_RiteKit, + DetectorType: detector_typepb.DetectorType_RiteKit, Verified: false, }, }, diff --git a/pkg/detectors/roaring/roaring.go b/pkg/detectors/roaring/roaring.go index 85457d47d486..9a49864ae952 100644 --- a/pkg/detectors/roaring/roaring.go +++ b/pkg/detectors/roaring/roaring.go @@ -4,16 +4,17 @@ import ( "context" b64 "encoding/base64" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) -type Scanner struct{ +type Scanner struct { detectors.DefaultMultiPartCredentialProvider } @@ -48,7 +49,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resSecret := strings.TrimSpace(secretMatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Roaring, + DetectorType: detector_typepb.DetectorType_Roaring, Raw: []byte(resClient), RawV2: []byte(resClient + resSecret), } @@ -78,8 +79,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Roaring +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Roaring } func (s Scanner) Description() string { diff --git a/pkg/detectors/roaring/roaring_integration_test.go b/pkg/detectors/roaring/roaring_integration_test.go index 2be07072f85a..296a0b11fcda 100644 --- a/pkg/detectors/roaring/roaring_integration_test.go +++ b/pkg/detectors/roaring/roaring_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestRoaring_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestRoaring_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Roaring, + DetectorType: detector_typepb.DetectorType_Roaring, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestRoaring_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Roaring, + DetectorType: detector_typepb.DetectorType_Roaring, Verified: false, }, }, diff --git a/pkg/detectors/robinhoodcrypto/robinhoodcrypto.go b/pkg/detectors/robinhoodcrypto/robinhoodcrypto.go index c7865bbea77d..cddec437b474 100644 --- a/pkg/detectors/robinhoodcrypto/robinhoodcrypto.go +++ b/pkg/detectors/robinhoodcrypto/robinhoodcrypto.go @@ -15,7 +15,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -59,7 +59,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for apiKey := range apiKeyMatches { for base64PrivateKey := range base64PrivateKeyMatches { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_RobinhoodCrypto, + DetectorType: detector_typepb.DetectorType_RobinhoodCrypto, Raw: []byte(apiKey), RawV2: []byte(apiKey + base64PrivateKey), } @@ -190,8 +190,8 @@ func verifyMatch(ctx context.Context, client *http.Client, apiKey, base64Private } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_RobinhoodCrypto +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_RobinhoodCrypto } func (s Scanner) Description() string { diff --git a/pkg/detectors/robinhoodcrypto/robinhoodcrypto_integration_test.go b/pkg/detectors/robinhoodcrypto/robinhoodcrypto_integration_test.go index cc9c9b5750d1..21ec8abea116 100644 --- a/pkg/detectors/robinhoodcrypto/robinhoodcrypto_integration_test.go +++ b/pkg/detectors/robinhoodcrypto/robinhoodcrypto_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestRobinhoodcrypto_FromChunk(t *testing.T) { @@ -62,7 +62,7 @@ func TestRobinhoodcrypto_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_RobinhoodCrypto, + DetectorType: detector_typepb.DetectorType_RobinhoodCrypto, Verified: true, }, }, @@ -82,7 +82,7 @@ func TestRobinhoodcrypto_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_RobinhoodCrypto, + DetectorType: detector_typepb.DetectorType_RobinhoodCrypto, Verified: true, }, }, @@ -102,7 +102,7 @@ func TestRobinhoodcrypto_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_RobinhoodCrypto, + DetectorType: detector_typepb.DetectorType_RobinhoodCrypto, Verified: false, }, }, @@ -133,7 +133,7 @@ func TestRobinhoodcrypto_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_RobinhoodCrypto, + DetectorType: detector_typepb.DetectorType_RobinhoodCrypto, Verified: false, }, }, @@ -152,7 +152,7 @@ func TestRobinhoodcrypto_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_RobinhoodCrypto, + DetectorType: detector_typepb.DetectorType_RobinhoodCrypto, Verified: false, }, }, diff --git a/pkg/detectors/rocketreach/rocketreach.go b/pkg/detectors/rocketreach/rocketreach.go index dea46e507e12..f540dcebab58 100644 --- a/pkg/detectors/rocketreach/rocketreach.go +++ b/pkg/detectors/rocketreach/rocketreach.go @@ -2,13 +2,14 @@ package rocketreach import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -39,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_RocketReach, + DetectorType: detector_typepb.DetectorType_RocketReach, Raw: []byte(resMatch), } @@ -64,8 +65,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_RocketReach +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_RocketReach } func (s Scanner) Description() string { diff --git a/pkg/detectors/rocketreach/rocketreach_integration_test.go b/pkg/detectors/rocketreach/rocketreach_integration_test.go index 651f1c2a8f4f..087e8ecf1be4 100644 --- a/pkg/detectors/rocketreach/rocketreach_integration_test.go +++ b/pkg/detectors/rocketreach/rocketreach_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestRocketReach_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestRocketReach_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_RocketReach, + DetectorType: detector_typepb.DetectorType_RocketReach, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestRocketReach_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_RocketReach, + DetectorType: detector_typepb.DetectorType_RocketReach, Verified: false, }, }, diff --git a/pkg/detectors/rootly/rootly.go b/pkg/detectors/rootly/rootly.go index 93fd7f3397a9..376061c888d2 100644 --- a/pkg/detectors/rootly/rootly.go +++ b/pkg/detectors/rootly/rootly.go @@ -8,7 +8,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" regexp "github.com/wasilibs/go-re2" ) @@ -40,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for match := range uniqueMatches { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Rootly, + DetectorType: detector_typepb.DetectorType_Rootly, Raw: []byte(match), } @@ -83,8 +83,8 @@ func verifyMatch(ctx context.Context, client *http.Client, token string) (bool, } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Rootly +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Rootly } func (s Scanner) Description() string { diff --git a/pkg/detectors/rootly/rootly_integration_test.go b/pkg/detectors/rootly/rootly_integration_test.go index 08152c358a98..16585717443d 100644 --- a/pkg/detectors/rootly/rootly_integration_test.go +++ b/pkg/detectors/rootly/rootly_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestRootly_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestRootly_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Rootly, + DetectorType: detector_typepb.DetectorType_Rootly, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestRootly_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Rootly, + DetectorType: detector_typepb.DetectorType_Rootly, Verified: false, }, }, diff --git a/pkg/detectors/route4me/route4me.go b/pkg/detectors/route4me/route4me.go index b424144aff00..08eec3094026 100644 --- a/pkg/detectors/route4me/route4me.go +++ b/pkg/detectors/route4me/route4me.go @@ -2,13 +2,14 @@ package route4me import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -39,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Route4me, + DetectorType: detector_typepb.DetectorType_Route4me, Raw: []byte(resMatch), } @@ -63,8 +64,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Route4me +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Route4me } func (s Scanner) Description() string { diff --git a/pkg/detectors/route4me/route4me_integration_test.go b/pkg/detectors/route4me/route4me_integration_test.go index 4f580fd25039..59d55e197791 100644 --- a/pkg/detectors/route4me/route4me_integration_test.go +++ b/pkg/detectors/route4me/route4me_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestRoute4me_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestRoute4me_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Route4me, + DetectorType: detector_typepb.DetectorType_Route4me, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestRoute4me_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Route4me, + DetectorType: detector_typepb.DetectorType_Route4me, Verified: false, }, }, diff --git a/pkg/detectors/rownd/rownd.go b/pkg/detectors/rownd/rownd.go index 1f4d301b4f2e..0eaed8c52228 100644 --- a/pkg/detectors/rownd/rownd.go +++ b/pkg/detectors/rownd/rownd.go @@ -2,13 +2,14 @@ package rownd import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -52,7 +53,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result secretMatch := strings.TrimSpace(secret[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Rownd, + DetectorType: detector_typepb.DetectorType_Rownd, Raw: []byte(keyMatch), RawV2: []byte(keyMatch + secretMatch), } @@ -81,8 +82,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Rownd +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Rownd } func (s Scanner) Description() string { diff --git a/pkg/detectors/rownd/rownd_integration_test.go b/pkg/detectors/rownd/rownd_integration_test.go index 1fbb340f1303..b29a5ec01df8 100644 --- a/pkg/detectors/rownd/rownd_integration_test.go +++ b/pkg/detectors/rownd/rownd_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestRownd_FromChunk(t *testing.T) { @@ -50,7 +50,7 @@ func TestRownd_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Rownd, + DetectorType: detector_typepb.DetectorType_Rownd, Verified: true, }, }, @@ -66,7 +66,7 @@ func TestRownd_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Rownd, + DetectorType: detector_typepb.DetectorType_Rownd, Verified: false, }, }, diff --git a/pkg/detectors/rubygems/rubygems.go b/pkg/detectors/rubygems/rubygems.go index 89581110ecdf..f08dee009968 100644 --- a/pkg/detectors/rubygems/rubygems.go +++ b/pkg/detectors/rubygems/rubygems.go @@ -2,13 +2,14 @@ package rubygems import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -39,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_RubyGems, + DetectorType: detector_typepb.DetectorType_RubyGems, Raw: []byte(resMatch), } @@ -65,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_RubyGems +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_RubyGems } func (s Scanner) Description() string { diff --git a/pkg/detectors/rubygems/rubygems_integration_test.go b/pkg/detectors/rubygems/rubygems_integration_test.go index bbb51c57f3bf..3bcf6581daf0 100644 --- a/pkg/detectors/rubygems/rubygems_integration_test.go +++ b/pkg/detectors/rubygems/rubygems_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestRubyGems_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestRubyGems_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_RubyGems, + DetectorType: detector_typepb.DetectorType_RubyGems, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestRubyGems_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_RubyGems, + DetectorType: detector_typepb.DetectorType_RubyGems, Verified: false, }, }, diff --git a/pkg/detectors/runrunit/runrunit.go b/pkg/detectors/runrunit/runrunit.go index 302fef0aac98..c17fcf813ffd 100644 --- a/pkg/detectors/runrunit/runrunit.go +++ b/pkg/detectors/runrunit/runrunit.go @@ -2,13 +2,14 @@ package runrunit import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -46,7 +47,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resUserTokenMatch := strings.TrimSpace(userTokenMatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_RunRunIt, + DetectorType: detector_typepb.DetectorType_RunRunIt, Raw: []byte(resMatch), } @@ -73,8 +74,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_RunRunIt +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_RunRunIt } func (s Scanner) Description() string { diff --git a/pkg/detectors/runrunit/runrunit_integration_test.go b/pkg/detectors/runrunit/runrunit_integration_test.go index a847f8f384ed..53c0c1b532f5 100644 --- a/pkg/detectors/runrunit/runrunit_integration_test.go +++ b/pkg/detectors/runrunit/runrunit_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestRunRunIt_FromChunk(t *testing.T) { @@ -50,7 +50,7 @@ func TestRunRunIt_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_RunRunIt, + DetectorType: detector_typepb.DetectorType_RunRunIt, Verified: true, }, }, @@ -66,7 +66,7 @@ func TestRunRunIt_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_RunRunIt, + DetectorType: detector_typepb.DetectorType_RunRunIt, Verified: false, }, }, diff --git a/pkg/detectors/saladcloudapikey/saladcloudapikey.go b/pkg/detectors/saladcloudapikey/saladcloudapikey.go index 983d1cfa9dd1..826a94734704 100644 --- a/pkg/detectors/saladcloudapikey/saladcloudapikey.go +++ b/pkg/detectors/saladcloudapikey/saladcloudapikey.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -46,7 +46,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for match := range uniqueMatches { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_SaladCloudApiKey, + DetectorType: detector_typepb.DetectorType_SaladCloudApiKey, Raw: []byte(match), ExtraData: map[string]string{ "rotation_guide": "https://howtorotate.com/docs/tutorials/saladcloudapikey/", @@ -97,6 +97,6 @@ func verifyMatch(ctx context.Context, client *http.Client, token string) (bool, } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_SaladCloudApiKey +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_SaladCloudApiKey } diff --git a/pkg/detectors/saladcloudapikey/saladcloudapikey_integration_test.go b/pkg/detectors/saladcloudapikey/saladcloudapikey_integration_test.go index 2a3ccda205df..a5b3e8232a30 100644 --- a/pkg/detectors/saladcloudapikey/saladcloudapikey_integration_test.go +++ b/pkg/detectors/saladcloudapikey/saladcloudapikey_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestSaladCloudApiKey_FromChunk(t *testing.T) { @@ -50,7 +50,7 @@ func TestSaladCloudApiKey_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_SaladCloudApiKey, + DetectorType: detector_typepb.DetectorType_SaladCloudApiKey, Verified: true, }, }, @@ -67,7 +67,7 @@ func TestSaladCloudApiKey_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_SaladCloudApiKey, + DetectorType: detector_typepb.DetectorType_SaladCloudApiKey, Verified: false, }, }, @@ -96,7 +96,7 @@ func TestSaladCloudApiKey_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_SaladCloudApiKey, + DetectorType: detector_typepb.DetectorType_SaladCloudApiKey, Verified: false, }, }, @@ -113,7 +113,7 @@ func TestSaladCloudApiKey_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_SaladCloudApiKey, + DetectorType: detector_typepb.DetectorType_SaladCloudApiKey, Verified: false, }, }, diff --git a/pkg/detectors/salesblink/salesblink.go b/pkg/detectors/salesblink/salesblink.go index c97f804706f2..1ab1a21917f7 100644 --- a/pkg/detectors/salesblink/salesblink.go +++ b/pkg/detectors/salesblink/salesblink.go @@ -2,13 +2,14 @@ package salesblink import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -39,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Salesblink, + DetectorType: detector_typepb.DetectorType_Salesblink, Raw: []byte(resMatch), } @@ -64,8 +65,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Salesblink +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Salesblink } func (s Scanner) Description() string { diff --git a/pkg/detectors/salesblink/salesblink_integration_test.go b/pkg/detectors/salesblink/salesblink_integration_test.go index b620ebd9c0dd..cbf739679fa5 100644 --- a/pkg/detectors/salesblink/salesblink_integration_test.go +++ b/pkg/detectors/salesblink/salesblink_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestSalesblink_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestSalesblink_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Salesblink, + DetectorType: detector_typepb.DetectorType_Salesblink, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestSalesblink_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Salesblink, + DetectorType: detector_typepb.DetectorType_Salesblink, Verified: false, }, }, diff --git a/pkg/detectors/salescookie/salescookie.go b/pkg/detectors/salescookie/salescookie.go index adb5cd2f851a..dbeabc43ee0d 100644 --- a/pkg/detectors/salescookie/salescookie.go +++ b/pkg/detectors/salescookie/salescookie.go @@ -2,13 +2,14 @@ package salescookie import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -39,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Salescookie, + DetectorType: detector_typepb.DetectorType_Salescookie, Raw: []byte(resMatch), } @@ -66,8 +67,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Salescookie +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Salescookie } func (s Scanner) Description() string { diff --git a/pkg/detectors/salescookie/salescookie_integration_test.go b/pkg/detectors/salescookie/salescookie_integration_test.go index 66bdccb03f68..383c0117c4b6 100644 --- a/pkg/detectors/salescookie/salescookie_integration_test.go +++ b/pkg/detectors/salescookie/salescookie_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestSalescookie_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestSalescookie_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Salescookie, + DetectorType: detector_typepb.DetectorType_Salescookie, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestSalescookie_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Salescookie, + DetectorType: detector_typepb.DetectorType_Salescookie, Verified: false, }, }, diff --git a/pkg/detectors/salesflare/salesflare.go b/pkg/detectors/salesflare/salesflare.go index c03c462898d1..bdba852eed3c 100644 --- a/pkg/detectors/salesflare/salesflare.go +++ b/pkg/detectors/salesflare/salesflare.go @@ -3,13 +3,14 @@ package salesflare import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Salesflare, + DetectorType: detector_typepb.DetectorType_Salesflare, Raw: []byte(resMatch), } @@ -65,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Salesflare +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Salesflare } func (s Scanner) Description() string { diff --git a/pkg/detectors/salesflare/salesflare_integration_test.go b/pkg/detectors/salesflare/salesflare_integration_test.go index a0a182538dc3..82de00d22142 100644 --- a/pkg/detectors/salesflare/salesflare_integration_test.go +++ b/pkg/detectors/salesflare/salesflare_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestSalesflare_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestSalesflare_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Salesflare, + DetectorType: detector_typepb.DetectorType_Salesflare, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestSalesflare_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Salesflare, + DetectorType: detector_typepb.DetectorType_Salesflare, Verified: false, }, }, diff --git a/pkg/detectors/salesforce/salesforce.go b/pkg/detectors/salesforce/salesforce.go index c3478f9d00c8..ef903d8e3ec6 100644 --- a/pkg/detectors/salesforce/salesforce.go +++ b/pkg/detectors/salesforce/salesforce.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) const ( @@ -54,7 +54,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result tokenMatch := strings.TrimSpace(token[0]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Salesforce, + DetectorType: detector_typepb.DetectorType_Salesforce, Raw: []byte(tokenMatch), } @@ -103,8 +103,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Salesforce +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Salesforce } func (s Scanner) Description() string { diff --git a/pkg/detectors/salesforce/salesforce_integration_test.go b/pkg/detectors/salesforce/salesforce_integration_test.go index fd5fde6f4949..c00057372b55 100644 --- a/pkg/detectors/salesforce/salesforce_integration_test.go +++ b/pkg/detectors/salesforce/salesforce_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestSalesforce_FromChunk(t *testing.T) { @@ -57,7 +57,7 @@ func TestSalesforce_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Salesforce, + DetectorType: detector_typepb.DetectorType_Salesforce, Verified: true, }, }, @@ -74,7 +74,7 @@ func TestSalesforce_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Salesforce, + DetectorType: detector_typepb.DetectorType_Salesforce, Verified: false, }, }, @@ -103,7 +103,7 @@ func TestSalesforce_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Salesforce, + DetectorType: detector_typepb.DetectorType_Salesforce, Verified: false, }, }, @@ -120,7 +120,7 @@ func TestSalesforce_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Salesforce, + DetectorType: detector_typepb.DetectorType_Salesforce, Verified: false, }, }, diff --git a/pkg/detectors/salesforceoauth2/salesforceoauth2.go b/pkg/detectors/salesforceoauth2/salesforceoauth2.go index 32728d75af1b..f1ba80ea9953 100644 --- a/pkg/detectors/salesforceoauth2/salesforceoauth2.go +++ b/pkg/detectors/salesforceoauth2/salesforceoauth2.go @@ -15,7 +15,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/cache/simple" "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -50,8 +50,8 @@ func (s Scanner) getClient() *http.Client { return defaultClient } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_SalesforceOauth2 +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_SalesforceOauth2 } func (s Scanner) Description() string { @@ -89,7 +89,7 @@ domainLoop: for key := range uniqueKeyMatches { for secret := range uniqueSecretMatches { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_SalesforceOauth2, + DetectorType: detector_typepb.DetectorType_SalesforceOauth2, Raw: []byte(secret), RawV2: fmt.Appendf([]byte{}, "%s:%s:%s", domain, key, secret), } diff --git a/pkg/detectors/salesforceoauth2/salesforceoauth2_integration_test.go b/pkg/detectors/salesforceoauth2/salesforceoauth2_integration_test.go index 9b05fc864134..6e7c08d73db8 100644 --- a/pkg/detectors/salesforceoauth2/salesforceoauth2_integration_test.go +++ b/pkg/detectors/salesforceoauth2/salesforceoauth2_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestSalesforceOauth2_FromData(t *testing.T) { @@ -52,7 +52,7 @@ func TestSalesforceOauth2_FromData(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_SalesforceOauth2, + DetectorType: detector_typepb.DetectorType_SalesforceOauth2, Verified: true, }, }, @@ -68,7 +68,7 @@ func TestSalesforceOauth2_FromData(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_SalesforceOauth2, + DetectorType: detector_typepb.DetectorType_SalesforceOauth2, Verified: false, }, }, @@ -84,11 +84,11 @@ func TestSalesforceOauth2_FromData(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_SalesforceOauth2, + DetectorType: detector_typepb.DetectorType_SalesforceOauth2, Verified: true, // The valid secret combination }, { - DetectorType: detectorspb.DetectorType_SalesforceOauth2, + DetectorType: detector_typepb.DetectorType_SalesforceOauth2, Verified: false, // The invalid secret combination }, }, @@ -115,7 +115,7 @@ func TestSalesforceOauth2_FromData(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_SalesforceOauth2, + DetectorType: detector_typepb.DetectorType_SalesforceOauth2, Verified: false, }, }, @@ -131,7 +131,7 @@ func TestSalesforceOauth2_FromData(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_SalesforceOauth2, + DetectorType: detector_typepb.DetectorType_SalesforceOauth2, Verified: false, }, }, diff --git a/pkg/detectors/salesforcerefreshtoken/salesforcerefreshtoken.go b/pkg/detectors/salesforcerefreshtoken/salesforcerefreshtoken.go index 47b9278d7edb..7839ef5fad5b 100644 --- a/pkg/detectors/salesforcerefreshtoken/salesforcerefreshtoken.go +++ b/pkg/detectors/salesforcerefreshtoken/salesforcerefreshtoken.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -45,8 +45,8 @@ func (s Scanner) getClient() *http.Client { return defaultClient } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_SalesforceRefreshToken +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_SalesforceRefreshToken } func (s Scanner) Description() string { @@ -74,7 +74,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for key := range uniqueKeyMatches { for secret := range uniqueSecretMatches { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_SalesforceRefreshToken, + DetectorType: detector_typepb.DetectorType_SalesforceRefreshToken, Raw: []byte(refreshToken), RawV2: fmt.Appendf([]byte{}, "%s:%s:%s", refreshToken, key, secret), } diff --git a/pkg/detectors/salesforcerefreshtoken/salesforcerefreshtoken_integration_test.go b/pkg/detectors/salesforcerefreshtoken/salesforcerefreshtoken_integration_test.go index 87c51e33b1c1..864d673828a9 100644 --- a/pkg/detectors/salesforcerefreshtoken/salesforcerefreshtoken_integration_test.go +++ b/pkg/detectors/salesforcerefreshtoken/salesforcerefreshtoken_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestSalesforcerefreshtoken_FromChunk(t *testing.T) { @@ -53,7 +53,7 @@ func TestSalesforcerefreshtoken_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_SalesforceRefreshToken, + DetectorType: detector_typepb.DetectorType_SalesforceRefreshToken, Verified: true, }, }, @@ -70,7 +70,7 @@ func TestSalesforcerefreshtoken_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_SalesforceRefreshToken, + DetectorType: detector_typepb.DetectorType_SalesforceRefreshToken, Verified: false, }, }, @@ -83,18 +83,18 @@ func TestSalesforcerefreshtoken_FromChunk(t *testing.T) { args: args{ ctx: context.Background(), data: []byte(fmt.Sprintf(` - refresh_token: %s, key: %s, valid_secret: %s, + refresh_token: %s, key: %s, valid_secret: %s, invalid_refresh_token: 5Aep861eN26Sp9j0R5QPjh0AAAABBBBCCCCjcNqfo5kVBplkpP5tzyWXyVGAivx26AAAABBBBjYE133BBBBAAAA`, refreshToken, consumerKey, consumerSecret)), verify: true, }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_SalesforceRefreshToken, + DetectorType: detector_typepb.DetectorType_SalesforceRefreshToken, Verified: true, // The valid refresh token combination }, { - DetectorType: detectorspb.DetectorType_SalesforceRefreshToken, + DetectorType: detector_typepb.DetectorType_SalesforceRefreshToken, Verified: false, // The invalid refresh token combination }, }, @@ -123,7 +123,7 @@ func TestSalesforcerefreshtoken_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_SalesforceRefreshToken, + DetectorType: detector_typepb.DetectorType_SalesforceRefreshToken, Verified: false, }, }, @@ -140,7 +140,7 @@ func TestSalesforcerefreshtoken_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_SalesforceRefreshToken, + DetectorType: detector_typepb.DetectorType_SalesforceRefreshToken, Verified: false, }, }, diff --git a/pkg/detectors/salesmate/salesmate.go b/pkg/detectors/salesmate/salesmate.go index 5071af3d0c5a..c945835f5e7b 100644 --- a/pkg/detectors/salesmate/salesmate.go +++ b/pkg/detectors/salesmate/salesmate.go @@ -9,10 +9,10 @@ import ( regexp "github.com/wasilibs/go-re2" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) -type Scanner struct{ +type Scanner struct { detectors.DefaultMultiPartCredentialProvider } @@ -45,7 +45,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for _, idmatch := range idmatches { resIdMatch := strings.TrimSpace(idmatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Salesmate, + DetectorType: detector_typepb.DetectorType_Salesmate, Raw: []byte(resMatch), } @@ -75,8 +75,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Salesmate +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Salesmate } func (s Scanner) Description() string { diff --git a/pkg/detectors/salesmate/salesmate_integration_test.go b/pkg/detectors/salesmate/salesmate_integration_test.go index 68f1b032253c..5005370a257d 100644 --- a/pkg/detectors/salesmate/salesmate_integration_test.go +++ b/pkg/detectors/salesmate/salesmate_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestSalesmate_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestSalesmate_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Salesmate, + DetectorType: detector_typepb.DetectorType_Salesmate, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestSalesmate_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Salesmate, + DetectorType: detector_typepb.DetectorType_Salesmate, Verified: false, }, }, diff --git a/pkg/detectors/sanity/sanity.go b/pkg/detectors/sanity/sanity.go index 66e2d503b0ea..f9a3bf23add1 100644 --- a/pkg/detectors/sanity/sanity.go +++ b/pkg/detectors/sanity/sanity.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -47,7 +47,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for match := range uniqueMatches { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Sanity, + DetectorType: detector_typepb.DetectorType_Sanity, Raw: []byte(match), } @@ -67,8 +67,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Sanity +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Sanity } /* diff --git a/pkg/detectors/sanity/sanity_integration_test.go b/pkg/detectors/sanity/sanity_integration_test.go index 3e76f40db2ba..c5620a8fddf2 100644 --- a/pkg/detectors/sanity/sanity_integration_test.go +++ b/pkg/detectors/sanity/sanity_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestSanity_FromChunk(t *testing.T) { @@ -50,7 +50,7 @@ func TestSanity_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Sanity, + DetectorType: detector_typepb.DetectorType_Sanity, Verified: true, }, }, @@ -67,7 +67,7 @@ func TestSanity_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Sanity, + DetectorType: detector_typepb.DetectorType_Sanity, Verified: false, }, }, diff --git a/pkg/detectors/satismeterprojectkey/satismeterprojectkey.go b/pkg/detectors/satismeterprojectkey/satismeterprojectkey.go index 8b16a4987e15..7cf9e91fc9cb 100644 --- a/pkg/detectors/satismeterprojectkey/satismeterprojectkey.go +++ b/pkg/detectors/satismeterprojectkey/satismeterprojectkey.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -51,7 +51,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for projectID := range uniqueProjectMatches { for token := range uniqueTokenMatches { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_SatismeterProjectkey, + DetectorType: detector_typepb.DetectorType_SatismeterProjectkey, Raw: []byte(projectID), RawV2: []byte(projectID + token), } @@ -70,8 +70,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_SatismeterProjectkey +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_SatismeterProjectkey } func (s Scanner) Description() string { diff --git a/pkg/detectors/satismeterprojectkey/satismeterprojectkey_integration_test.go b/pkg/detectors/satismeterprojectkey/satismeterprojectkey_integration_test.go index 6234e3f78d0b..d87b5e6c93cd 100644 --- a/pkg/detectors/satismeterprojectkey/satismeterprojectkey_integration_test.go +++ b/pkg/detectors/satismeterprojectkey/satismeterprojectkey_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestSatismeterProjectkey_FromChunk(t *testing.T) { @@ -51,7 +51,7 @@ func TestSatismeterProjectkey_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_SatismeterProjectkey, + DetectorType: detector_typepb.DetectorType_SatismeterProjectkey, Verified: true, RawV2: []byte(projectID + token), }, @@ -68,7 +68,7 @@ func TestSatismeterProjectkey_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_SatismeterProjectkey, + DetectorType: detector_typepb.DetectorType_SatismeterProjectkey, Verified: false, RawV2: []byte(inactiveProjectID + inactiveToken), }, diff --git a/pkg/detectors/satismeterwritekey/satismeterwritekey.go b/pkg/detectors/satismeterwritekey/satismeterwritekey.go index 55142b47d18d..0f1354754a2a 100644 --- a/pkg/detectors/satismeterwritekey/satismeterwritekey.go +++ b/pkg/detectors/satismeterwritekey/satismeterwritekey.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -63,7 +63,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_SatismeterWritekey, + DetectorType: detector_typepb.DetectorType_SatismeterWritekey, Raw: []byte(projectID), RawV2: []byte(projectID + writeKey), } @@ -82,8 +82,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_SatismeterWritekey +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_SatismeterWritekey } func (s Scanner) Description() string { diff --git a/pkg/detectors/satismeterwritekey/satismeterwritekey_integration_test.go b/pkg/detectors/satismeterwritekey/satismeterwritekey_integration_test.go index 92d4e84dc80a..16e19e231234 100644 --- a/pkg/detectors/satismeterwritekey/satismeterwritekey_integration_test.go +++ b/pkg/detectors/satismeterwritekey/satismeterwritekey_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestSatismeterWritekey_FromChunk(t *testing.T) { @@ -52,12 +52,12 @@ func TestSatismeterWritekey_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_SatismeterWritekey, + DetectorType: detector_typepb.DetectorType_SatismeterWritekey, Verified: false, RawV2: []byte(projectID + token), }, { - DetectorType: detectorspb.DetectorType_SatismeterWritekey, + DetectorType: detector_typepb.DetectorType_SatismeterWritekey, Verified: true, RawV2: []byte(projectID + writeKey), }, @@ -74,12 +74,12 @@ func TestSatismeterWritekey_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_SatismeterWritekey, + DetectorType: detector_typepb.DetectorType_SatismeterWritekey, Verified: false, RawV2: []byte(inactiveProjectID + inactiveToken), }, { - DetectorType: detectorspb.DetectorType_SatismeterWritekey, + DetectorType: detector_typepb.DetectorType_SatismeterWritekey, Verified: false, RawV2: []byte(inactiveProjectID + inactiveWriteKey), }, diff --git a/pkg/detectors/saucelabs/saucelabs.go b/pkg/detectors/saucelabs/saucelabs.go index 4835c39da08e..911f4a5d9ea0 100644 --- a/pkg/detectors/saucelabs/saucelabs.go +++ b/pkg/detectors/saucelabs/saucelabs.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -65,7 +65,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for key := range uniqueKeyMatches { for baseURL := range uniqueBaseURLMatches { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_SauceLabs, + DetectorType: detector_typepb.DetectorType_SauceLabs, Raw: []byte(userName), RawV2: []byte(userName + key), ExtraData: map[string]string{ @@ -88,8 +88,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_SauceLabs +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_SauceLabs } func (s Scanner) Description() string { diff --git a/pkg/detectors/saucelabs/saucelabs_integration_test.go b/pkg/detectors/saucelabs/saucelabs_integration_test.go index 7145d0f5d364..78f15812c11a 100644 --- a/pkg/detectors/saucelabs/saucelabs_integration_test.go +++ b/pkg/detectors/saucelabs/saucelabs_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestSauceLabs_FromChunk(t *testing.T) { @@ -49,12 +49,12 @@ func TestSauceLabs_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_SauceLabs, + DetectorType: detector_typepb.DetectorType_SauceLabs, Verified: true, RawV2: []byte(id + secret), }, { - DetectorType: detectorspb.DetectorType_SauceLabs, + DetectorType: detector_typepb.DetectorType_SauceLabs, Verified: false, RawV2: []byte(secret + secret), }, @@ -71,12 +71,12 @@ func TestSauceLabs_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_SauceLabs, + DetectorType: detector_typepb.DetectorType_SauceLabs, Verified: false, RawV2: []byte(id + inactiveSecret), }, { - DetectorType: detectorspb.DetectorType_SauceLabs, + DetectorType: detector_typepb.DetectorType_SauceLabs, Verified: false, RawV2: []byte(inactiveSecret + inactiveSecret), }, diff --git a/pkg/detectors/scalewaykey/scalewaykey.go b/pkg/detectors/scalewaykey/scalewaykey.go index ccb5e9035080..0abb2a9a4820 100644 --- a/pkg/detectors/scalewaykey/scalewaykey.go +++ b/pkg/detectors/scalewaykey/scalewaykey.go @@ -2,13 +2,14 @@ package scalewaykey import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -38,7 +39,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_ScalewayKey, + DetectorType: detector_typepb.DetectorType_ScalewayKey, Raw: []byte(resMatch), } @@ -63,8 +64,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_ScalewayKey +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_ScalewayKey } func (s Scanner) Description() string { diff --git a/pkg/detectors/scalewaykey/scalewaykey_integration_test.go b/pkg/detectors/scalewaykey/scalewaykey_integration_test.go index 409b92dcd342..2d5ac5a71dc4 100644 --- a/pkg/detectors/scalewaykey/scalewaykey_integration_test.go +++ b/pkg/detectors/scalewaykey/scalewaykey_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestScalewayKey_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestScalewayKey_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ScalewayKey, + DetectorType: detector_typepb.DetectorType_ScalewayKey, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestScalewayKey_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ScalewayKey, + DetectorType: detector_typepb.DetectorType_ScalewayKey, Verified: false, }, }, diff --git a/pkg/detectors/scalr/scalr.go b/pkg/detectors/scalr/scalr.go index 08c6eedcb922..da17d9d93537 100644 --- a/pkg/detectors/scalr/scalr.go +++ b/pkg/detectors/scalr/scalr.go @@ -3,13 +3,14 @@ package scalr import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -45,7 +46,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for _, idmatch := range idmatches { resIdMatch := strings.TrimSpace(idmatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Scalr, + DetectorType: detector_typepb.DetectorType_Scalr, Raw: []byte(resMatch), } @@ -75,8 +76,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Scalr +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Scalr } func (s Scanner) Description() string { diff --git a/pkg/detectors/scalr/scalr_integration_test.go b/pkg/detectors/scalr/scalr_integration_test.go index 404cbeca5a7c..681c7b915344 100644 --- a/pkg/detectors/scalr/scalr_integration_test.go +++ b/pkg/detectors/scalr/scalr_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestScalr_FromChunk(t *testing.T) { @@ -49,11 +49,11 @@ func TestScalr_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Scalr, + DetectorType: detector_typepb.DetectorType_Scalr, Verified: false, }, { - DetectorType: detectorspb.DetectorType_Scalr, + DetectorType: detector_typepb.DetectorType_Scalr, Verified: true, }, }, @@ -69,11 +69,11 @@ func TestScalr_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Scalr, + DetectorType: detector_typepb.DetectorType_Scalr, Verified: false, }, { - DetectorType: detectorspb.DetectorType_Scalr, + DetectorType: detector_typepb.DetectorType_Scalr, Verified: false, }, }, diff --git a/pkg/detectors/scrapeowl/scrapeowl.go b/pkg/detectors/scrapeowl/scrapeowl.go index 58ad4f0018d7..70e67c6d5f44 100644 --- a/pkg/detectors/scrapeowl/scrapeowl.go +++ b/pkg/detectors/scrapeowl/scrapeowl.go @@ -9,7 +9,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Scrapeowl, + DetectorType: detector_typepb.DetectorType_Scrapeowl, Raw: []byte(resMatch), } @@ -64,8 +64,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Scrapeowl +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Scrapeowl } func (s Scanner) Description() string { diff --git a/pkg/detectors/scrapeowl/scrapeowl_integration_test.go b/pkg/detectors/scrapeowl/scrapeowl_integration_test.go index 3b38277fc066..47c627001b85 100644 --- a/pkg/detectors/scrapeowl/scrapeowl_integration_test.go +++ b/pkg/detectors/scrapeowl/scrapeowl_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestScrapeowl_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestScrapeowl_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Scrapeowl, + DetectorType: detector_typepb.DetectorType_Scrapeowl, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestScrapeowl_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Scrapeowl, + DetectorType: detector_typepb.DetectorType_Scrapeowl, Verified: false, }, }, diff --git a/pkg/detectors/scraperapi/scraperapi.go b/pkg/detectors/scraperapi/scraperapi.go index 68c2475e0714..575db2b63cc9 100644 --- a/pkg/detectors/scraperapi/scraperapi.go +++ b/pkg/detectors/scraperapi/scraperapi.go @@ -3,14 +3,15 @@ package scraperapi import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" "time" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -38,7 +39,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_ScraperAPI, + DetectorType: detector_typepb.DetectorType_ScraperAPI, Raw: []byte(resMatch), } @@ -64,8 +65,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_ScraperAPI +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_ScraperAPI } func (s Scanner) Description() string { diff --git a/pkg/detectors/scraperapi/scraperapi_integration_test.go b/pkg/detectors/scraperapi/scraperapi_integration_test.go index 8b8cec04d498..bc332ad7db64 100644 --- a/pkg/detectors/scraperapi/scraperapi_integration_test.go +++ b/pkg/detectors/scraperapi/scraperapi_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestScraperAPI_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestScraperAPI_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ScraperAPI, + DetectorType: detector_typepb.DetectorType_ScraperAPI, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestScraperAPI_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ScraperAPI, + DetectorType: detector_typepb.DetectorType_ScraperAPI, Verified: false, }, }, diff --git a/pkg/detectors/scraperbox/scraperbox.go b/pkg/detectors/scraperbox/scraperbox.go index 4b71f35f9811..3f6fe49dd309 100644 --- a/pkg/detectors/scraperbox/scraperbox.go +++ b/pkg/detectors/scraperbox/scraperbox.go @@ -3,14 +3,15 @@ package scraperbox import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" "time" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -41,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_ScraperBox, + DetectorType: detector_typepb.DetectorType_ScraperBox, Raw: []byte(resMatch), } @@ -67,8 +68,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_ScraperBox +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_ScraperBox } func (s Scanner) Description() string { diff --git a/pkg/detectors/scraperbox/scraperbox_integration_test.go b/pkg/detectors/scraperbox/scraperbox_integration_test.go index 22234582cb06..c3b31e31cdc9 100644 --- a/pkg/detectors/scraperbox/scraperbox_integration_test.go +++ b/pkg/detectors/scraperbox/scraperbox_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestScraperBox_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestScraperBox_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ScraperBox, + DetectorType: detector_typepb.DetectorType_ScraperBox, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestScraperBox_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ScraperBox, + DetectorType: detector_typepb.DetectorType_ScraperBox, Verified: false, }, }, diff --git a/pkg/detectors/scrapestack/scrapestack.go b/pkg/detectors/scrapestack/scrapestack.go index 49345dcd7be1..0346e070ca89 100644 --- a/pkg/detectors/scrapestack/scrapestack.go +++ b/pkg/detectors/scrapestack/scrapestack.go @@ -3,14 +3,15 @@ package scrapestack import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "io" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -41,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_ScrapeStack, + DetectorType: detector_typepb.DetectorType_ScrapeStack, Raw: []byte(resMatch), } @@ -74,8 +75,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_ScrapeStack +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_ScrapeStack } func (s Scanner) Description() string { diff --git a/pkg/detectors/scrapestack/scrapestack_integration_test.go b/pkg/detectors/scrapestack/scrapestack_integration_test.go index 5560c56f84c7..bf208adca694 100644 --- a/pkg/detectors/scrapestack/scrapestack_integration_test.go +++ b/pkg/detectors/scrapestack/scrapestack_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestScrapeStack_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestScrapeStack_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ScrapeStack, + DetectorType: detector_typepb.DetectorType_ScrapeStack, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestScrapeStack_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ScrapeStack, + DetectorType: detector_typepb.DetectorType_ScrapeStack, Verified: false, }, }, diff --git a/pkg/detectors/scrapfly/scrapfly.go b/pkg/detectors/scrapfly/scrapfly.go index 4f6c55386e7c..2651f295b077 100644 --- a/pkg/detectors/scrapfly/scrapfly.go +++ b/pkg/detectors/scrapfly/scrapfly.go @@ -3,14 +3,15 @@ package scrapfly import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" "time" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -45,7 +46,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Scrapfly, + DetectorType: detector_typepb.DetectorType_Scrapfly, Raw: []byte(resMatch), } @@ -71,8 +72,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Scrapfly +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Scrapfly } func (s Scanner) Description() string { diff --git a/pkg/detectors/scrapfly/scrapfly_integration_test.go b/pkg/detectors/scrapfly/scrapfly_integration_test.go index 1634b658386b..7098c1f11784 100644 --- a/pkg/detectors/scrapfly/scrapfly_integration_test.go +++ b/pkg/detectors/scrapfly/scrapfly_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestScrapfly_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestScrapfly_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Scrapfly, + DetectorType: detector_typepb.DetectorType_Scrapfly, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestScrapfly_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Scrapfly, + DetectorType: detector_typepb.DetectorType_Scrapfly, Verified: false, }, }, diff --git a/pkg/detectors/scrapingant/scrapingant.go b/pkg/detectors/scrapingant/scrapingant.go index 0faa0985a8ee..8bde19f53aa8 100644 --- a/pkg/detectors/scrapingant/scrapingant.go +++ b/pkg/detectors/scrapingant/scrapingant.go @@ -12,7 +12,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -43,7 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_ScrapingAnt, + DetectorType: detector_typepb.DetectorType_ScrapingAnt, Raw: []byte(resMatch), } @@ -59,8 +59,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_ScrapingAnt +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_ScrapingAnt } func (s Scanner) Description() string { diff --git a/pkg/detectors/scrapingant/scrapingant_integration_test.go b/pkg/detectors/scrapingant/scrapingant_integration_test.go index eb69636ca8fd..6bcc9bfb8156 100644 --- a/pkg/detectors/scrapingant/scrapingant_integration_test.go +++ b/pkg/detectors/scrapingant/scrapingant_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestScrapingAnt_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestScrapingAnt_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ScrapingAnt, + DetectorType: detector_typepb.DetectorType_ScrapingAnt, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestScrapingAnt_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ScrapingAnt, + DetectorType: detector_typepb.DetectorType_ScrapingAnt, Verified: false, }, }, diff --git a/pkg/detectors/scrapingbee/scrapingbee.go b/pkg/detectors/scrapingbee/scrapingbee.go index 7ce96f6b5c52..a8c371236eb4 100644 --- a/pkg/detectors/scrapingbee/scrapingbee.go +++ b/pkg/detectors/scrapingbee/scrapingbee.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -20,8 +20,8 @@ type Scanner struct { // Ensure the Scanner satisfies the interface at compile time. var _ detectors.Detector = (*Scanner)(nil) -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_ScrapingBee +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_ScrapingBee } func (s Scanner) Description() string { @@ -53,7 +53,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for key := range uniqueMatches { r := detectors.Result{ - DetectorType: detectorspb.DetectorType_ScrapingBee, + DetectorType: detector_typepb.DetectorType_ScrapingBee, Raw: []byte(key), } diff --git a/pkg/detectors/scrapingbee/scrapingbee_integration_test.go b/pkg/detectors/scrapingbee/scrapingbee_integration_test.go index 2fb482ed2c80..7b7f5d27b1ae 100644 --- a/pkg/detectors/scrapingbee/scrapingbee_integration_test.go +++ b/pkg/detectors/scrapingbee/scrapingbee_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestScrapingBee_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestScrapingBee_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ScrapingBee, + DetectorType: detector_typepb.DetectorType_ScrapingBee, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestScrapingBee_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ScrapingBee, + DetectorType: detector_typepb.DetectorType_ScrapingBee, Verified: false, }, }, diff --git a/pkg/detectors/screenshotapi/screenshotapi.go b/pkg/detectors/screenshotapi/screenshotapi.go index 552d407d3984..93a33e9f5a2c 100644 --- a/pkg/detectors/screenshotapi/screenshotapi.go +++ b/pkg/detectors/screenshotapi/screenshotapi.go @@ -3,14 +3,15 @@ package screenshotapi import ( "context" "encoding/json" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" "time" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -45,7 +46,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_ScreenshotAPI, + DetectorType: detector_typepb.DetectorType_ScreenshotAPI, Raw: []byte(resMatch), } @@ -76,8 +77,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_ScreenshotAPI +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_ScreenshotAPI } func (s Scanner) Description() string { diff --git a/pkg/detectors/screenshotapi/screenshotapi_integration_test.go b/pkg/detectors/screenshotapi/screenshotapi_integration_test.go index 61cfe00e91b9..a761abcbca92 100644 --- a/pkg/detectors/screenshotapi/screenshotapi_integration_test.go +++ b/pkg/detectors/screenshotapi/screenshotapi_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestScreenshotAPI_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestScreenshotAPI_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ScreenshotAPI, + DetectorType: detector_typepb.DetectorType_ScreenshotAPI, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestScreenshotAPI_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ScreenshotAPI, + DetectorType: detector_typepb.DetectorType_ScreenshotAPI, Verified: false, }, }, diff --git a/pkg/detectors/screenshotlayer/screenshotlayer.go b/pkg/detectors/screenshotlayer/screenshotlayer.go index 59b4623244eb..e4a6c501d594 100644 --- a/pkg/detectors/screenshotlayer/screenshotlayer.go +++ b/pkg/detectors/screenshotlayer/screenshotlayer.go @@ -3,15 +3,16 @@ package screenshotlayer import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "io" "net/http" "strings" "time" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -42,7 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_ScreenshotLayer, + DetectorType: detector_typepb.DetectorType_ScreenshotLayer, Raw: []byte(resMatch), } @@ -75,8 +76,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_ScreenshotLayer +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_ScreenshotLayer } func (s Scanner) Description() string { diff --git a/pkg/detectors/screenshotlayer/screenshotlayer_integration_test.go b/pkg/detectors/screenshotlayer/screenshotlayer_integration_test.go index 53a431204e78..775d0e312b92 100644 --- a/pkg/detectors/screenshotlayer/screenshotlayer_integration_test.go +++ b/pkg/detectors/screenshotlayer/screenshotlayer_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestScreenshotLayer_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestScreenshotLayer_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ScreenshotLayer, + DetectorType: detector_typepb.DetectorType_ScreenshotLayer, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestScreenshotLayer_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ScreenshotLayer, + DetectorType: detector_typepb.DetectorType_ScreenshotLayer, Verified: false, }, }, diff --git a/pkg/detectors/scrutinizerci/scrutinizerci.go b/pkg/detectors/scrutinizerci/scrutinizerci.go index 201db7b32da2..d19fd0a9c2f9 100644 --- a/pkg/detectors/scrutinizerci/scrutinizerci.go +++ b/pkg/detectors/scrutinizerci/scrutinizerci.go @@ -2,13 +2,14 @@ package scrutinizerci import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -39,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_ScrutinizerCi, + DetectorType: detector_typepb.DetectorType_ScrutinizerCi, Raw: []byte(resMatch), } @@ -64,8 +65,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_ScrutinizerCi +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_ScrutinizerCi } func (s Scanner) Description() string { diff --git a/pkg/detectors/scrutinizerci/scrutinizerci_integration_test.go b/pkg/detectors/scrutinizerci/scrutinizerci_integration_test.go index eaf8439f9f54..78d1e0512abd 100644 --- a/pkg/detectors/scrutinizerci/scrutinizerci_integration_test.go +++ b/pkg/detectors/scrutinizerci/scrutinizerci_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestScrutinizerCi_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestScrutinizerCi_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ScrutinizerCi, + DetectorType: detector_typepb.DetectorType_ScrutinizerCi, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestScrutinizerCi_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ScrutinizerCi, + DetectorType: detector_typepb.DetectorType_ScrutinizerCi, Verified: false, }, }, diff --git a/pkg/detectors/securitytrails/securitytrails.go b/pkg/detectors/securitytrails/securitytrails.go index 10de813520ec..de27a1aeb728 100644 --- a/pkg/detectors/securitytrails/securitytrails.go +++ b/pkg/detectors/securitytrails/securitytrails.go @@ -2,13 +2,14 @@ package securitytrails import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -39,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_SecurityTrails, + DetectorType: detector_typepb.DetectorType_SecurityTrails, Raw: []byte(resMatch), } @@ -64,8 +65,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_SecurityTrails +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_SecurityTrails } func (s Scanner) Description() string { diff --git a/pkg/detectors/securitytrails/securitytrails_integration_test.go b/pkg/detectors/securitytrails/securitytrails_integration_test.go index 73f9bccc5b51..0d8d92c115a0 100644 --- a/pkg/detectors/securitytrails/securitytrails_integration_test.go +++ b/pkg/detectors/securitytrails/securitytrails_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestSecurityTrails_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestSecurityTrails_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_SecurityTrails, + DetectorType: detector_typepb.DetectorType_SecurityTrails, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestSecurityTrails_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_SecurityTrails, + DetectorType: detector_typepb.DetectorType_SecurityTrails, Verified: true, }, }, @@ -80,7 +80,7 @@ func TestSecurityTrails_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_SecurityTrails, + DetectorType: detector_typepb.DetectorType_SecurityTrails, Verified: false, }, }, diff --git a/pkg/detectors/segmentapikey/segmentapikey.go b/pkg/detectors/segmentapikey/segmentapikey.go index 8513b85af973..511d47eb6f7c 100644 --- a/pkg/detectors/segmentapikey/segmentapikey.go +++ b/pkg/detectors/segmentapikey/segmentapikey.go @@ -3,13 +3,14 @@ package segmentapikey import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_SegmentApiKey, + DetectorType: detector_typepb.DetectorType_SegmentApiKey, Raw: []byte(resMatch), } @@ -65,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_SegmentApiKey +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_SegmentApiKey } func (s Scanner) Description() string { diff --git a/pkg/detectors/segmentapikey/segmentapikey_integration_test.go b/pkg/detectors/segmentapikey/segmentapikey_integration_test.go index 9f34cb1bbcfa..5dbd639c8338 100644 --- a/pkg/detectors/segmentapikey/segmentapikey_integration_test.go +++ b/pkg/detectors/segmentapikey/segmentapikey_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestSegmentApiKey_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestSegmentApiKey_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_SegmentApiKey, + DetectorType: detector_typepb.DetectorType_SegmentApiKey, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestSegmentApiKey_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_SegmentApiKey, + DetectorType: detector_typepb.DetectorType_SegmentApiKey, Verified: false, }, }, diff --git a/pkg/detectors/selectpdf/selectpdf.go b/pkg/detectors/selectpdf/selectpdf.go index 9167b8a27b55..5e3736181568 100644 --- a/pkg/detectors/selectpdf/selectpdf.go +++ b/pkg/detectors/selectpdf/selectpdf.go @@ -3,14 +3,15 @@ package selectpdf import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" "time" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -41,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_SelectPDF, + DetectorType: detector_typepb.DetectorType_SelectPDF, Raw: []byte(resMatch), } @@ -67,8 +68,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_SelectPDF +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_SelectPDF } func (s Scanner) Description() string { diff --git a/pkg/detectors/selectpdf/selectpdf_integration_test.go b/pkg/detectors/selectpdf/selectpdf_integration_test.go index 30906236d5a4..3820459283b4 100644 --- a/pkg/detectors/selectpdf/selectpdf_integration_test.go +++ b/pkg/detectors/selectpdf/selectpdf_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestSelectPDF_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestSelectPDF_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_SelectPDF, + DetectorType: detector_typepb.DetectorType_SelectPDF, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestSelectPDF_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_SelectPDF, + DetectorType: detector_typepb.DetectorType_SelectPDF, Verified: false, }, }, diff --git a/pkg/detectors/semaphore/semaphore.go b/pkg/detectors/semaphore/semaphore.go index 4c3557b7bf77..f98b027d22d8 100644 --- a/pkg/detectors/semaphore/semaphore.go +++ b/pkg/detectors/semaphore/semaphore.go @@ -3,14 +3,15 @@ package semaphore import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "io" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -45,7 +46,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Semaphore, + DetectorType: detector_typepb.DetectorType_Semaphore, Raw: []byte(resMatch), } @@ -75,8 +76,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Semaphore +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Semaphore } func (s Scanner) Description() string { diff --git a/pkg/detectors/semaphore/semaphore_integration_test.go b/pkg/detectors/semaphore/semaphore_integration_test.go index c107c1ae948c..ee60b5eba643 100644 --- a/pkg/detectors/semaphore/semaphore_integration_test.go +++ b/pkg/detectors/semaphore/semaphore_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestSemaphore_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestSemaphore_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Semaphore, + DetectorType: detector_typepb.DetectorType_Semaphore, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestSemaphore_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Semaphore, + DetectorType: detector_typepb.DetectorType_Semaphore, Verified: false, }, }, diff --git a/pkg/detectors/sendbird/sendbird.go b/pkg/detectors/sendbird/sendbird.go index 1903923531db..4d20010472c9 100644 --- a/pkg/detectors/sendbird/sendbird.go +++ b/pkg/detectors/sendbird/sendbird.go @@ -4,13 +4,14 @@ import ( "context" "encoding/json" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -53,7 +54,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Sendbird, + DetectorType: detector_typepb.DetectorType_Sendbird, Raw: []byte(resMatch), } s1.ExtraData = map[string]string{ @@ -106,8 +107,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Sendbird +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Sendbird } func (s Scanner) Description() string { diff --git a/pkg/detectors/sendbird/sendbird_integration_test.go b/pkg/detectors/sendbird/sendbird_integration_test.go index aae61bfb84a6..7bb744b5bd17 100644 --- a/pkg/detectors/sendbird/sendbird_integration_test.go +++ b/pkg/detectors/sendbird/sendbird_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestSendbird_FromChunk(t *testing.T) { @@ -51,7 +51,7 @@ func TestSendbird_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Sendbird, + DetectorType: detector_typepb.DetectorType_Sendbird, Verified: true, }, }, @@ -68,7 +68,7 @@ func TestSendbird_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Sendbird, + DetectorType: detector_typepb.DetectorType_Sendbird, Verified: false, }, }, @@ -97,7 +97,7 @@ func TestSendbird_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Sendbird, + DetectorType: detector_typepb.DetectorType_Sendbird, Verified: false, }, }, @@ -114,7 +114,7 @@ func TestSendbird_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Sendbird, + DetectorType: detector_typepb.DetectorType_Sendbird, Verified: false, }, }, @@ -131,7 +131,7 @@ func TestSendbird_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Sendbird, + DetectorType: detector_typepb.DetectorType_Sendbird, Verified: false, }, }, @@ -148,7 +148,7 @@ func TestSendbird_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Sendbird, + DetectorType: detector_typepb.DetectorType_Sendbird, Verified: false, }, }, diff --git a/pkg/detectors/sendbirdorganizationapi/sendbirdorganizationapi.go b/pkg/detectors/sendbirdorganizationapi/sendbirdorganizationapi.go index dff73d59ceba..a0431b7e04a2 100644 --- a/pkg/detectors/sendbirdorganizationapi/sendbirdorganizationapi.go +++ b/pkg/detectors/sendbirdorganizationapi/sendbirdorganizationapi.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -43,7 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_SendbirdOrganizationAPI, + DetectorType: detector_typepb.DetectorType_SendbirdOrganizationAPI, Raw: []byte(resMatch), } @@ -78,8 +78,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_SendbirdOrganizationAPI +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_SendbirdOrganizationAPI } func (s Scanner) Description() string { diff --git a/pkg/detectors/sendbirdorganizationapi/sendbirdorganizationapi_integration_test.go b/pkg/detectors/sendbirdorganizationapi/sendbirdorganizationapi_integration_test.go index 7d1b856ad12a..a995861495a3 100644 --- a/pkg/detectors/sendbirdorganizationapi/sendbirdorganizationapi_integration_test.go +++ b/pkg/detectors/sendbirdorganizationapi/sendbirdorganizationapi_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestSendbirdOrganizationAPI_FromChunk(t *testing.T) { @@ -50,7 +50,7 @@ func TestSendbirdOrganizationAPI_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_SendbirdOrganizationAPI, + DetectorType: detector_typepb.DetectorType_SendbirdOrganizationAPI, Verified: true, }, }, @@ -67,7 +67,7 @@ func TestSendbirdOrganizationAPI_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_SendbirdOrganizationAPI, + DetectorType: detector_typepb.DetectorType_SendbirdOrganizationAPI, Verified: false, }, }, @@ -84,7 +84,7 @@ func TestSendbirdOrganizationAPI_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_SendbirdOrganizationAPI, + DetectorType: detector_typepb.DetectorType_SendbirdOrganizationAPI, Verified: false, }, }, @@ -101,7 +101,7 @@ func TestSendbirdOrganizationAPI_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_SendbirdOrganizationAPI, + DetectorType: detector_typepb.DetectorType_SendbirdOrganizationAPI, Verified: false, }, }, diff --git a/pkg/detectors/sendgrid/sendgrid.go b/pkg/detectors/sendgrid/sendgrid.go index 9b31c364bf54..09f6e14e97eb 100644 --- a/pkg/detectors/sendgrid/sendgrid.go +++ b/pkg/detectors/sendgrid/sendgrid.go @@ -11,7 +11,7 @@ import ( regexp "github.com/wasilibs/go-re2" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" "github.com/trufflesecurity/trufflehog/v3/pkg/common" ) @@ -46,7 +46,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for token := range uniqueMatches { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_SendGrid, + DetectorType: detector_typepb.DetectorType_SendGrid, Raw: []byte(token), } @@ -119,8 +119,8 @@ type scopesResponse struct { Scopes []string `json:"scopes"` } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_SendGrid +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_SendGrid } func (s Scanner) Description() string { diff --git a/pkg/detectors/sendgrid/sendgrid_integration_test.go b/pkg/detectors/sendgrid/sendgrid_integration_test.go index 230cf182521e..7c35999c7fa7 100644 --- a/pkg/detectors/sendgrid/sendgrid_integration_test.go +++ b/pkg/detectors/sendgrid/sendgrid_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestSendgrid_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestSendgrid_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_SendGrid, + DetectorType: detector_typepb.DetectorType_SendGrid, Verified: true, }, }, @@ -66,7 +66,7 @@ func TestSendgrid_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_SendGrid, + DetectorType: detector_typepb.DetectorType_SendGrid, Verified: false, }, }, @@ -95,7 +95,7 @@ func TestSendgrid_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_SendGrid, + DetectorType: detector_typepb.DetectorType_SendGrid, Verified: false, }, }, @@ -112,7 +112,7 @@ func TestSendgrid_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_SendGrid, + DetectorType: detector_typepb.DetectorType_SendGrid, Verified: false, }, }, diff --git a/pkg/detectors/sendinbluev2/sendinbluev2.go b/pkg/detectors/sendinbluev2/sendinbluev2.go index 96f68ca2e1de..c3cd324bbd60 100644 --- a/pkg/detectors/sendinbluev2/sendinbluev2.go +++ b/pkg/detectors/sendinbluev2/sendinbluev2.go @@ -2,13 +2,14 @@ package sendinbluev2 import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -38,7 +39,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_SendinBlueV2, + DetectorType: detector_typepb.DetectorType_SendinBlueV2, Raw: []byte(resMatch), } @@ -63,8 +64,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_SendinBlueV2 +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_SendinBlueV2 } func (s Scanner) Description() string { diff --git a/pkg/detectors/sendinbluev2/sendinbluev2_integration_test.go b/pkg/detectors/sendinbluev2/sendinbluev2_integration_test.go index 0e3546a77b21..3763ff923258 100644 --- a/pkg/detectors/sendinbluev2/sendinbluev2_integration_test.go +++ b/pkg/detectors/sendinbluev2/sendinbluev2_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestSendinBlueV2_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestSendinBlueV2_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_SendinBlueV2, + DetectorType: detector_typepb.DetectorType_SendinBlueV2, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestSendinBlueV2_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_SendinBlueV2, + DetectorType: detector_typepb.DetectorType_SendinBlueV2, Verified: false, }, }, diff --git a/pkg/detectors/sentryorgtoken/sentryorgtoken.go b/pkg/detectors/sentryorgtoken/sentryorgtoken.go index 950f5ee61014..971a4bb00392 100644 --- a/pkg/detectors/sentryorgtoken/sentryorgtoken.go +++ b/pkg/detectors/sentryorgtoken/sentryorgtoken.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -31,8 +31,8 @@ func (s Scanner) Keywords() []string { return []string{"sntrys_eyJ"} } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_SentryOrgToken +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_SentryOrgToken } func (s Scanner) Description() string { @@ -52,7 +52,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for orgToken := range uniqueOrgTokens { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_SentryOrgToken, + DetectorType: detector_typepb.DetectorType_SentryOrgToken, Raw: []byte(orgToken), } diff --git a/pkg/detectors/sentryorgtoken/sentryorgtoken_integration_test.go b/pkg/detectors/sentryorgtoken/sentryorgtoken_integration_test.go index c0fe11291db4..2d828cf66298 100644 --- a/pkg/detectors/sentryorgtoken/sentryorgtoken_integration_test.go +++ b/pkg/detectors/sentryorgtoken/sentryorgtoken_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestSentryOrgToken_FromChunk(t *testing.T) { @@ -50,7 +50,7 @@ func TestSentryOrgToken_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_SentryOrgToken, + DetectorType: detector_typepb.DetectorType_SentryOrgToken, Verified: true, }, }, @@ -66,7 +66,7 @@ func TestSentryOrgToken_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_SentryOrgToken, + DetectorType: detector_typepb.DetectorType_SentryOrgToken, Verified: false, }, }, diff --git a/pkg/detectors/sentrytoken/v1/sentrytoken.go b/pkg/detectors/sentrytoken/v1/sentrytoken.go index c16cf67abd8e..c62fc056c15b 100644 --- a/pkg/detectors/sentrytoken/v1/sentrytoken.go +++ b/pkg/detectors/sentrytoken/v1/sentrytoken.go @@ -12,7 +12,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -58,7 +58,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for authToken := range uniqueAuthTokens { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_SentryToken, + DetectorType: detector_typepb.DetectorType_SentryToken, Raw: []byte(authToken), } @@ -118,8 +118,8 @@ func VerifyToken(ctx context.Context, client *http.Client, token string) (map[st } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_SentryToken +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_SentryToken } func (s Scanner) Description() string { diff --git a/pkg/detectors/sentrytoken/v1/sentrytoken_integration_test.go b/pkg/detectors/sentrytoken/v1/sentrytoken_integration_test.go index 158830ee58d6..64caecf73d8a 100644 --- a/pkg/detectors/sentrytoken/v1/sentrytoken_integration_test.go +++ b/pkg/detectors/sentrytoken/v1/sentrytoken_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestSentryToken_FromChunk(t *testing.T) { @@ -50,7 +50,7 @@ func TestSentryToken_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_SentryToken, + DetectorType: detector_typepb.DetectorType_SentryToken, Verified: true, }, }, @@ -66,7 +66,7 @@ func TestSentryToken_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_SentryToken, + DetectorType: detector_typepb.DetectorType_SentryToken, Verified: false, }, }, @@ -82,7 +82,7 @@ func TestSentryToken_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_SentryToken, + DetectorType: detector_typepb.DetectorType_SentryToken, Verified: false, }, }, @@ -99,7 +99,7 @@ func TestSentryToken_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_SentryToken, + DetectorType: detector_typepb.DetectorType_SentryToken, Verified: false, }, }, diff --git a/pkg/detectors/sentrytoken/v2/sentrytoken.go b/pkg/detectors/sentrytoken/v2/sentrytoken.go index 36c37bf8c824..ee65ef57d7c7 100644 --- a/pkg/detectors/sentrytoken/v2/sentrytoken.go +++ b/pkg/detectors/sentrytoken/v2/sentrytoken.go @@ -9,7 +9,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" v1 "github.com/trufflesecurity/trufflehog/v3/pkg/detectors/sentrytoken/v1" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -48,7 +48,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for authToken := range uniqueAuthTokens { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_SentryToken, + DetectorType: detector_typepb.DetectorType_SentryToken, Raw: []byte(authToken), } @@ -68,8 +68,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_SentryToken +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_SentryToken } func (s Scanner) Description() string { diff --git a/pkg/detectors/sentrytoken/v2/sentrytoken_integration_test.go b/pkg/detectors/sentrytoken/v2/sentrytoken_integration_test.go index 2ea77da0269d..d1be6f9cfc51 100644 --- a/pkg/detectors/sentrytoken/v2/sentrytoken_integration_test.go +++ b/pkg/detectors/sentrytoken/v2/sentrytoken_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestSentryToken_FromChunk(t *testing.T) { @@ -50,7 +50,7 @@ func TestSentryToken_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_SentryToken, + DetectorType: detector_typepb.DetectorType_SentryToken, Verified: true, }, }, @@ -66,7 +66,7 @@ func TestSentryToken_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_SentryToken, + DetectorType: detector_typepb.DetectorType_SentryToken, Verified: false, }, }, @@ -82,7 +82,7 @@ func TestSentryToken_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_SentryToken, + DetectorType: detector_typepb.DetectorType_SentryToken, Verified: false, }, }, @@ -99,7 +99,7 @@ func TestSentryToken_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_SentryToken, + DetectorType: detector_typepb.DetectorType_SentryToken, Verified: false, }, }, diff --git a/pkg/detectors/serphouse/serphouse.go b/pkg/detectors/serphouse/serphouse.go index 051f77be6118..4fa63d81f22a 100644 --- a/pkg/detectors/serphouse/serphouse.go +++ b/pkg/detectors/serphouse/serphouse.go @@ -3,13 +3,14 @@ package serphouse import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Serphouse, + DetectorType: detector_typepb.DetectorType_Serphouse, Raw: []byte(resMatch), } @@ -66,8 +67,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Serphouse +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Serphouse } func (s Scanner) Description() string { diff --git a/pkg/detectors/serphouse/serphouse_integration_test.go b/pkg/detectors/serphouse/serphouse_integration_test.go index ed6fa8c681c4..e01b825e5d47 100644 --- a/pkg/detectors/serphouse/serphouse_integration_test.go +++ b/pkg/detectors/serphouse/serphouse_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestSerphouse_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestSerphouse_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Serphouse, + DetectorType: detector_typepb.DetectorType_Serphouse, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestSerphouse_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Serphouse, + DetectorType: detector_typepb.DetectorType_Serphouse, Verified: false, }, }, diff --git a/pkg/detectors/serpstack/serpstack.go b/pkg/detectors/serpstack/serpstack.go index 8512ebba73f4..7cf5e44af3fa 100644 --- a/pkg/detectors/serpstack/serpstack.go +++ b/pkg/detectors/serpstack/serpstack.go @@ -12,7 +12,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -43,7 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_SerpStack, + DetectorType: detector_typepb.DetectorType_SerpStack, Raw: []byte(resMatch), } @@ -78,8 +78,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_SerpStack +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_SerpStack } func (s Scanner) Description() string { diff --git a/pkg/detectors/serpstack/serpstack_integration_test.go b/pkg/detectors/serpstack/serpstack_integration_test.go index 84cca277c288..027b912cd6a1 100644 --- a/pkg/detectors/serpstack/serpstack_integration_test.go +++ b/pkg/detectors/serpstack/serpstack_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestSerpStack_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestSerpStack_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_SerpStack, + DetectorType: detector_typepb.DetectorType_SerpStack, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestSerpStack_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_SerpStack, + DetectorType: detector_typepb.DetectorType_SerpStack, Verified: false, }, }, diff --git a/pkg/detectors/sheety/sheety.go b/pkg/detectors/sheety/sheety.go index eab7f70bb38e..83ce03878e6a 100644 --- a/pkg/detectors/sheety/sheety.go +++ b/pkg/detectors/sheety/sheety.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -47,7 +47,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resIdMatch := strings.TrimSpace(idmatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Sheety, + DetectorType: detector_typepb.DetectorType_Sheety, Raw: []byte(resMatch), } @@ -74,8 +74,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Sheety +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Sheety } func (s Scanner) Description() string { diff --git a/pkg/detectors/sheety/sheety_integration_test.go b/pkg/detectors/sheety/sheety_integration_test.go index 3c68d97ed0dc..9c01c21ee524 100644 --- a/pkg/detectors/sheety/sheety_integration_test.go +++ b/pkg/detectors/sheety/sheety_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestSheety_FromChunk(t *testing.T) { @@ -50,7 +50,7 @@ func TestSheety_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Sheety, + DetectorType: detector_typepb.DetectorType_Sheety, Verified: true, }, }, @@ -66,7 +66,7 @@ func TestSheety_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Sheety, + DetectorType: detector_typepb.DetectorType_Sheety, Verified: false, }, }, diff --git a/pkg/detectors/sherpadesk/sherpadesk.go b/pkg/detectors/sherpadesk/sherpadesk.go index 8acd88505b67..fa64120840b0 100644 --- a/pkg/detectors/sherpadesk/sherpadesk.go +++ b/pkg/detectors/sherpadesk/sherpadesk.go @@ -4,13 +4,14 @@ import ( "context" b64 "encoding/base64" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -41,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Sherpadesk, + DetectorType: detector_typepb.DetectorType_Sherpadesk, Raw: []byte(resMatch), } @@ -69,8 +70,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Sherpadesk +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Sherpadesk } func (s Scanner) Description() string { diff --git a/pkg/detectors/sherpadesk/sherpadesk_integration_test.go b/pkg/detectors/sherpadesk/sherpadesk_integration_test.go index 14145cc986ce..1429a928beac 100644 --- a/pkg/detectors/sherpadesk/sherpadesk_integration_test.go +++ b/pkg/detectors/sherpadesk/sherpadesk_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestSherpadesk_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestSherpadesk_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Sherpadesk, + DetectorType: detector_typepb.DetectorType_Sherpadesk, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestSherpadesk_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Sherpadesk, + DetectorType: detector_typepb.DetectorType_Sherpadesk, Verified: false, }, }, diff --git a/pkg/detectors/shipday/shipday.go b/pkg/detectors/shipday/shipday.go index e725bda5c694..bdfd01fcfdd2 100644 --- a/pkg/detectors/shipday/shipday.go +++ b/pkg/detectors/shipday/shipday.go @@ -3,13 +3,14 @@ package shipday import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Shipday, + DetectorType: detector_typepb.DetectorType_Shipday, Raw: []byte(resMatch), } @@ -65,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Shipday +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Shipday } func (s Scanner) Description() string { diff --git a/pkg/detectors/shipday/shipday_integration_test.go b/pkg/detectors/shipday/shipday_integration_test.go index 0efc9c528ebe..a349dd436082 100644 --- a/pkg/detectors/shipday/shipday_integration_test.go +++ b/pkg/detectors/shipday/shipday_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestShipday_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestShipday_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Shipday, + DetectorType: detector_typepb.DetectorType_Shipday, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestShipday_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Shipday, + DetectorType: detector_typepb.DetectorType_Shipday, Verified: false, }, }, diff --git a/pkg/detectors/shodankey/shodankey.go b/pkg/detectors/shodankey/shodankey.go index f2edb21ebacc..bba11257564d 100644 --- a/pkg/detectors/shodankey/shodankey.go +++ b/pkg/detectors/shodankey/shodankey.go @@ -3,14 +3,15 @@ package shodankey import ( "context" "encoding/json" - regexp "github.com/wasilibs/go-re2" "io" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -41,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_ShodanKey, + DetectorType: detector_typepb.DetectorType_ShodanKey, Raw: []byte(resMatch), } @@ -95,8 +96,8 @@ func verifyToken(ctx context.Context, client *http.Client, token string) bool { return json.Unmarshal(bytes, &info) == nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_ShodanKey +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_ShodanKey } func (s Scanner) Description() string { diff --git a/pkg/detectors/shodankey/shodankey_integration_test.go b/pkg/detectors/shodankey/shodankey_integration_test.go index d9c730cee74d..ec2ef9949ecb 100644 --- a/pkg/detectors/shodankey/shodankey_integration_test.go +++ b/pkg/detectors/shodankey/shodankey_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestShodanKey_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestShodanKey_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ShodanKey, + DetectorType: detector_typepb.DetectorType_ShodanKey, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestShodanKey_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ShodanKey, + DetectorType: detector_typepb.DetectorType_ShodanKey, Verified: false, }, }, diff --git a/pkg/detectors/shopify/shopify.go b/pkg/detectors/shopify/shopify.go index bf47dc6b82b6..65ead3a05786 100644 --- a/pkg/detectors/shopify/shopify.go +++ b/pkg/detectors/shopify/shopify.go @@ -9,7 +9,7 @@ import ( regexp "github.com/wasilibs/go-re2" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -48,7 +48,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result domainRes := strings.TrimSpace(domainMatch) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Shopify, + DetectorType: detector_typepb.DetectorType_Shopify, Redacted: domainRes, Raw: []byte(key + domainRes), } @@ -107,8 +107,8 @@ type shopifyTokenAccessScopes struct { } `json:"access_scopes"` } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Shopify +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Shopify } func (s Scanner) Description() string { diff --git a/pkg/detectors/shopify/shopify_integration_test.go b/pkg/detectors/shopify/shopify_integration_test.go index 4282cd67d1b9..346688121455 100644 --- a/pkg/detectors/shopify/shopify_integration_test.go +++ b/pkg/detectors/shopify/shopify_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestShopify_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestShopify_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Shopify, + DetectorType: detector_typepb.DetectorType_Shopify, Redacted: domain, Verified: true, ExtraData: map[string]string{ @@ -69,7 +69,7 @@ func TestShopify_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Shopify, + DetectorType: detector_typepb.DetectorType_Shopify, Redacted: domain, Verified: false, ExtraData: nil, diff --git a/pkg/detectors/shortcut/shortcut.go b/pkg/detectors/shortcut/shortcut.go index a5f23bcabba7..f283b7b4247f 100644 --- a/pkg/detectors/shortcut/shortcut.go +++ b/pkg/detectors/shortcut/shortcut.go @@ -2,13 +2,14 @@ package shortcut import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -38,7 +39,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Shortcut, + DetectorType: detector_typepb.DetectorType_Shortcut, Raw: []byte(resMatch), } @@ -78,8 +79,8 @@ func verifyResult(ctx context.Context, client *http.Client, apiKey string) (bool return false, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Shortcut +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Shortcut } func (s Scanner) Description() string { diff --git a/pkg/detectors/shortcut/shortcut_integration_test.go b/pkg/detectors/shortcut/shortcut_integration_test.go index c477270db82e..460eab937f0c 100644 --- a/pkg/detectors/shortcut/shortcut_integration_test.go +++ b/pkg/detectors/shortcut/shortcut_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestShortcut_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestShortcut_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Shortcut, + DetectorType: detector_typepb.DetectorType_Shortcut, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestShortcut_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Shortcut, + DetectorType: detector_typepb.DetectorType_Shortcut, Verified: false, }, }, diff --git a/pkg/detectors/shotstack/shotstack.go b/pkg/detectors/shotstack/shotstack.go index fe0c0e6d5ee8..4910e32aee43 100644 --- a/pkg/detectors/shotstack/shotstack.go +++ b/pkg/detectors/shotstack/shotstack.go @@ -2,13 +2,14 @@ package shotstack import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -39,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Shotstack, + DetectorType: detector_typepb.DetectorType_Shotstack, Raw: []byte(resMatch), } @@ -96,8 +97,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Shotstack +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Shotstack } func (s Scanner) Description() string { diff --git a/pkg/detectors/shotstack/shotstack_integration_test.go b/pkg/detectors/shotstack/shotstack_integration_test.go index 5d4afd1a2e97..4ce6cbf032cc 100644 --- a/pkg/detectors/shotstack/shotstack_integration_test.go +++ b/pkg/detectors/shotstack/shotstack_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestShotstack_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestShotstack_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Shotstack, + DetectorType: detector_typepb.DetectorType_Shotstack, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestShotstack_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Shotstack, + DetectorType: detector_typepb.DetectorType_Shotstack, Verified: false, }, }, diff --git a/pkg/detectors/shutterstock/shutterstock.go b/pkg/detectors/shutterstock/shutterstock.go index 0b25220388a9..c98b61067183 100644 --- a/pkg/detectors/shutterstock/shutterstock.go +++ b/pkg/detectors/shutterstock/shutterstock.go @@ -2,13 +2,14 @@ package shutterstock import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -46,7 +47,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resSecretMatch := strings.TrimSpace(secretMatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Shutterstock, + DetectorType: detector_typepb.DetectorType_Shutterstock, Raw: []byte(resSecretMatch), } @@ -73,8 +74,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Shutterstock +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Shutterstock } func (s Scanner) Description() string { diff --git a/pkg/detectors/shutterstock/shutterstock_integration_test.go b/pkg/detectors/shutterstock/shutterstock_integration_test.go index f8df34474a90..502e1f055b22 100644 --- a/pkg/detectors/shutterstock/shutterstock_integration_test.go +++ b/pkg/detectors/shutterstock/shutterstock_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestShutterstock_FromChunk(t *testing.T) { @@ -50,7 +50,7 @@ func TestShutterstock_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Shutterstock, + DetectorType: detector_typepb.DetectorType_Shutterstock, Verified: true, }, }, @@ -66,7 +66,7 @@ func TestShutterstock_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Shutterstock, + DetectorType: detector_typepb.DetectorType_Shutterstock, Verified: false, }, }, diff --git a/pkg/detectors/shutterstockoauth/shutterstockoauth.go b/pkg/detectors/shutterstockoauth/shutterstockoauth.go index c1eb8a2ea066..2fb3930a97f0 100644 --- a/pkg/detectors/shutterstockoauth/shutterstockoauth.go +++ b/pkg/detectors/shutterstockoauth/shutterstockoauth.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -41,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_ShutterstockOAuth, + DetectorType: detector_typepb.DetectorType_ShutterstockOAuth, Raw: []byte(resMatch), } @@ -67,8 +67,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_ShutterstockOAuth +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_ShutterstockOAuth } func (s Scanner) Description() string { diff --git a/pkg/detectors/shutterstockoauth/shutterstockoauth_integration_test.go b/pkg/detectors/shutterstockoauth/shutterstockoauth_integration_test.go index cab496900842..95aea3b48c5a 100644 --- a/pkg/detectors/shutterstockoauth/shutterstockoauth_integration_test.go +++ b/pkg/detectors/shutterstockoauth/shutterstockoauth_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestShutterstockOAuth_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestShutterstockOAuth_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ShutterstockOAuth, + DetectorType: detector_typepb.DetectorType_ShutterstockOAuth, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestShutterstockOAuth_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ShutterstockOAuth, + DetectorType: detector_typepb.DetectorType_ShutterstockOAuth, Verified: false, }, }, diff --git a/pkg/detectors/signable/signable.go b/pkg/detectors/signable/signable.go index 3eedbcba2d87..8b71b4201322 100644 --- a/pkg/detectors/signable/signable.go +++ b/pkg/detectors/signable/signable.go @@ -4,13 +4,14 @@ import ( "context" b64 "encoding/base64" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -48,7 +49,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Signable, + DetectorType: detector_typepb.DetectorType_Signable, Raw: []byte(resMatch), } @@ -105,8 +106,8 @@ func verifyResult(ctx context.Context, client *http.Client, token string) (bool, return false, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Signable +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Signable } func (s Scanner) Description() string { diff --git a/pkg/detectors/signable/signable_integration_test.go b/pkg/detectors/signable/signable_integration_test.go index b9d5af5f018f..feef49df1ece 100644 --- a/pkg/detectors/signable/signable_integration_test.go +++ b/pkg/detectors/signable/signable_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestSignable_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestSignable_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Signable, + DetectorType: detector_typepb.DetectorType_Signable, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestSignable_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Signable, + DetectorType: detector_typepb.DetectorType_Signable, Verified: false, }, }, diff --git a/pkg/detectors/signalwire/signalwire.go b/pkg/detectors/signalwire/signalwire.go index 85ee2b9ccf37..d079ab42161d 100644 --- a/pkg/detectors/signalwire/signalwire.go +++ b/pkg/detectors/signalwire/signalwire.go @@ -10,7 +10,7 @@ import ( regexp "github.com/wasilibs/go-re2" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -53,7 +53,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resURL := strings.TrimSpace(urlMatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Signalwire, + DetectorType: detector_typepb.DetectorType_Signalwire, Raw: []byte(resMatch), } @@ -83,8 +83,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Signalwire +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Signalwire } func (s Scanner) Description() string { diff --git a/pkg/detectors/signalwire/signalwire_integration_test.go b/pkg/detectors/signalwire/signalwire_integration_test.go index 02f776f04ec2..346b1be6cef1 100644 --- a/pkg/detectors/signalwire/signalwire_integration_test.go +++ b/pkg/detectors/signalwire/signalwire_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestSignalwire_FromChunk(t *testing.T) { @@ -50,7 +50,7 @@ func TestSignalwire_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Signalwire, + DetectorType: detector_typepb.DetectorType_Signalwire, Verified: true, }, }, @@ -66,7 +66,7 @@ func TestSignalwire_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Signalwire, + DetectorType: detector_typepb.DetectorType_Signalwire, Verified: false, }, }, diff --git a/pkg/detectors/signaturit/signaturit.go b/pkg/detectors/signaturit/signaturit.go index d71657a3b4ce..ced2b4abc7e0 100644 --- a/pkg/detectors/signaturit/signaturit.go +++ b/pkg/detectors/signaturit/signaturit.go @@ -3,13 +3,14 @@ package signaturit import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Signaturit, + DetectorType: detector_typepb.DetectorType_Signaturit, Raw: []byte(resMatch), } @@ -65,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Signaturit +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Signaturit } func (s Scanner) Description() string { diff --git a/pkg/detectors/signaturit/signaturit_integration_test.go b/pkg/detectors/signaturit/signaturit_integration_test.go index b6670237d705..513546bf467b 100644 --- a/pkg/detectors/signaturit/signaturit_integration_test.go +++ b/pkg/detectors/signaturit/signaturit_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestSignaturit_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestSignaturit_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Signaturit, + DetectorType: detector_typepb.DetectorType_Signaturit, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestSignaturit_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Signaturit, + DetectorType: detector_typepb.DetectorType_Signaturit, Verified: false, }, }, diff --git a/pkg/detectors/signupgenius/signupgenius.go b/pkg/detectors/signupgenius/signupgenius.go index 548d46e9fc18..ad0ad607cc14 100644 --- a/pkg/detectors/signupgenius/signupgenius.go +++ b/pkg/detectors/signupgenius/signupgenius.go @@ -2,13 +2,14 @@ package signupgenius import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -39,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Signupgenius, + DetectorType: detector_typepb.DetectorType_Signupgenius, Raw: []byte(resMatch), } @@ -63,8 +64,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Signupgenius +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Signupgenius } func (s Scanner) Description() string { diff --git a/pkg/detectors/signupgenius/signupgenius_integration_test.go b/pkg/detectors/signupgenius/signupgenius_integration_test.go index e74b007c37c8..bc078e6ef981 100644 --- a/pkg/detectors/signupgenius/signupgenius_integration_test.go +++ b/pkg/detectors/signupgenius/signupgenius_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestSignupgenius_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestSignupgenius_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Signupgenius, + DetectorType: detector_typepb.DetectorType_Signupgenius, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestSignupgenius_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Signupgenius, + DetectorType: detector_typepb.DetectorType_Signupgenius, Verified: false, }, }, diff --git a/pkg/detectors/sigopt/sigopt.go b/pkg/detectors/sigopt/sigopt.go index e24ea867882d..bd397e95a4da 100644 --- a/pkg/detectors/sigopt/sigopt.go +++ b/pkg/detectors/sigopt/sigopt.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -42,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Sigopt, + DetectorType: detector_typepb.DetectorType_Sigopt, Raw: []byte(resMatch), } @@ -70,8 +70,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Sigopt +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Sigopt } func (s Scanner) Description() string { diff --git a/pkg/detectors/sigopt/sigopt_integration_test.go b/pkg/detectors/sigopt/sigopt_integration_test.go index c25a2cc62a9f..c97ef0dfcf3e 100644 --- a/pkg/detectors/sigopt/sigopt_integration_test.go +++ b/pkg/detectors/sigopt/sigopt_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestSigopt_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestSigopt_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Sigopt, + DetectorType: detector_typepb.DetectorType_Sigopt, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestSigopt_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Sigopt, + DetectorType: detector_typepb.DetectorType_Sigopt, Verified: false, }, }, diff --git a/pkg/detectors/simfin/simfin.go b/pkg/detectors/simfin/simfin.go index e356197a80b6..576b092b305a 100644 --- a/pkg/detectors/simfin/simfin.go +++ b/pkg/detectors/simfin/simfin.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -42,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_SimFin, + DetectorType: detector_typepb.DetectorType_SimFin, Raw: []byte(resMatch), } @@ -73,8 +73,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_SimFin +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_SimFin } func (s Scanner) Description() string { diff --git a/pkg/detectors/simfin/simfin_integration_test.go b/pkg/detectors/simfin/simfin_integration_test.go index 999febb9d948..08daef25eb81 100644 --- a/pkg/detectors/simfin/simfin_integration_test.go +++ b/pkg/detectors/simfin/simfin_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestSimFin_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestSimFin_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_SimFin, + DetectorType: detector_typepb.DetectorType_SimFin, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestSimFin_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_SimFin, + DetectorType: detector_typepb.DetectorType_SimFin, Verified: false, }, }, diff --git a/pkg/detectors/simplesat/simplesat.go b/pkg/detectors/simplesat/simplesat.go index 83418e2c79fb..745d615bfc92 100644 --- a/pkg/detectors/simplesat/simplesat.go +++ b/pkg/detectors/simplesat/simplesat.go @@ -2,13 +2,14 @@ package simplesat import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -39,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Simplesat, + DetectorType: detector_typepb.DetectorType_Simplesat, Raw: []byte(resMatch), } @@ -64,8 +65,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Simplesat +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Simplesat } func (s Scanner) Description() string { diff --git a/pkg/detectors/simplesat/simplesat_integration_test.go b/pkg/detectors/simplesat/simplesat_integration_test.go index e00c0f31b133..a71919860df3 100644 --- a/pkg/detectors/simplesat/simplesat_integration_test.go +++ b/pkg/detectors/simplesat/simplesat_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestSimplesat_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestSimplesat_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Simplesat, + DetectorType: detector_typepb.DetectorType_Simplesat, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestSimplesat_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Simplesat, + DetectorType: detector_typepb.DetectorType_Simplesat, Verified: false, }, }, diff --git a/pkg/detectors/simplynoted/simplynoted.go b/pkg/detectors/simplynoted/simplynoted.go index ecbb98e1edba..37e54cd73258 100644 --- a/pkg/detectors/simplynoted/simplynoted.go +++ b/pkg/detectors/simplynoted/simplynoted.go @@ -3,13 +3,14 @@ package simplynoted import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_SimplyNoted, + DetectorType: detector_typepb.DetectorType_SimplyNoted, Raw: []byte(resMatch), } @@ -65,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_SimplyNoted +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_SimplyNoted } func (s Scanner) Description() string { diff --git a/pkg/detectors/simplynoted/simplynoted_integration_test.go b/pkg/detectors/simplynoted/simplynoted_integration_test.go index dff91caa7eca..201b77667004 100644 --- a/pkg/detectors/simplynoted/simplynoted_integration_test.go +++ b/pkg/detectors/simplynoted/simplynoted_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestSimplyNoted_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestSimplyNoted_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_SimplyNoted, + DetectorType: detector_typepb.DetectorType_SimplyNoted, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestSimplyNoted_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_SimplyNoted, + DetectorType: detector_typepb.DetectorType_SimplyNoted, Verified: false, }, }, diff --git a/pkg/detectors/simvoly/simvoly.go b/pkg/detectors/simvoly/simvoly.go index 12936e5895d5..6edbfa5b0604 100644 --- a/pkg/detectors/simvoly/simvoly.go +++ b/pkg/detectors/simvoly/simvoly.go @@ -3,13 +3,14 @@ package simvoly import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Simvoly, + DetectorType: detector_typepb.DetectorType_Simvoly, Raw: []byte(resMatch), } @@ -65,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Simvoly +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Simvoly } func (s Scanner) Description() string { diff --git a/pkg/detectors/simvoly/simvoly_integration_test.go b/pkg/detectors/simvoly/simvoly_integration_test.go index af28be91ae18..119307a33726 100644 --- a/pkg/detectors/simvoly/simvoly_integration_test.go +++ b/pkg/detectors/simvoly/simvoly_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestSimvoly_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestSimvoly_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Simvoly, + DetectorType: detector_typepb.DetectorType_Simvoly, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestSimvoly_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Simvoly, + DetectorType: detector_typepb.DetectorType_Simvoly, Verified: false, }, }, diff --git a/pkg/detectors/sinchmessage/sinchmessage.go b/pkg/detectors/sinchmessage/sinchmessage.go index 5d21481cc285..0203daffe6bc 100644 --- a/pkg/detectors/sinchmessage/sinchmessage.go +++ b/pkg/detectors/sinchmessage/sinchmessage.go @@ -3,13 +3,14 @@ package sinchmessage import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -46,7 +47,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resIdMatch := strings.TrimSpace(idmatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_SinchMessage, + DetectorType: detector_typepb.DetectorType_SinchMessage, Raw: []byte(resMatch), } @@ -80,8 +81,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_SinchMessage +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_SinchMessage } func (s Scanner) Description() string { diff --git a/pkg/detectors/sinchmessage/sinchmessage_integration_test.go b/pkg/detectors/sinchmessage/sinchmessage_integration_test.go index a4017882038e..200ae0fb53e7 100644 --- a/pkg/detectors/sinchmessage/sinchmessage_integration_test.go +++ b/pkg/detectors/sinchmessage/sinchmessage_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestSinchMessage_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestSinchMessage_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_SinchMessage, + DetectorType: detector_typepb.DetectorType_SinchMessage, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestSinchMessage_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_SinchMessage, + DetectorType: detector_typepb.DetectorType_SinchMessage, Verified: false, }, }, diff --git a/pkg/detectors/sirv/sirv.go b/pkg/detectors/sirv/sirv.go index 0f80dd963dc6..a11867c84d59 100644 --- a/pkg/detectors/sirv/sirv.go +++ b/pkg/detectors/sirv/sirv.go @@ -3,17 +3,18 @@ package sirv import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" "time" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) -type Scanner struct{ +type Scanner struct { detectors.DefaultMultiPartCredentialProvider } @@ -48,7 +49,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resIdMatch := strings.TrimSpace(idMatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Sirv, + DetectorType: detector_typepb.DetectorType_Sirv, Raw: []byte(resMatch), } @@ -77,8 +78,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Sirv +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Sirv } func (s Scanner) Description() string { diff --git a/pkg/detectors/sirv/sirv_integration_test.go b/pkg/detectors/sirv/sirv_integration_test.go index 1905f6a4fddd..3be4c6b40130 100644 --- a/pkg/detectors/sirv/sirv_integration_test.go +++ b/pkg/detectors/sirv/sirv_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestSirv_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestSirv_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Sirv, + DetectorType: detector_typepb.DetectorType_Sirv, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestSirv_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Sirv, + DetectorType: detector_typepb.DetectorType_Sirv, Verified: false, }, }, diff --git a/pkg/detectors/siteleaf/siteleaf.go b/pkg/detectors/siteleaf/siteleaf.go index 707118bdd3f3..9b072598b07d 100644 --- a/pkg/detectors/siteleaf/siteleaf.go +++ b/pkg/detectors/siteleaf/siteleaf.go @@ -4,13 +4,14 @@ import ( "context" b64 "encoding/base64" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -48,7 +49,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resIdMatch := strings.TrimSpace(idmatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Siteleaf, + DetectorType: detector_typepb.DetectorType_Siteleaf, Raw: []byte(resMatch), } @@ -79,8 +80,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Siteleaf +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Siteleaf } func (s Scanner) Description() string { diff --git a/pkg/detectors/siteleaf/siteleaf_integration_test.go b/pkg/detectors/siteleaf/siteleaf_integration_test.go index e55d124a5aa6..bddf97226515 100644 --- a/pkg/detectors/siteleaf/siteleaf_integration_test.go +++ b/pkg/detectors/siteleaf/siteleaf_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestSiteleaf_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestSiteleaf_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Siteleaf, + DetectorType: detector_typepb.DetectorType_Siteleaf, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestSiteleaf_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Siteleaf, + DetectorType: detector_typepb.DetectorType_Siteleaf, Verified: false, }, }, diff --git a/pkg/detectors/skrappio/skrappio.go b/pkg/detectors/skrappio/skrappio.go index 4e26a89098ef..7952171399c3 100644 --- a/pkg/detectors/skrappio/skrappio.go +++ b/pkg/detectors/skrappio/skrappio.go @@ -2,13 +2,14 @@ package skrappio import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -39,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Skrappio, + DetectorType: detector_typepb.DetectorType_Skrappio, Raw: []byte(resMatch), } @@ -65,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Skrappio +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Skrappio } func (s Scanner) Description() string { diff --git a/pkg/detectors/skrappio/skrappio_integration_test.go b/pkg/detectors/skrappio/skrappio_integration_test.go index 709f782f78f7..2029b5809178 100644 --- a/pkg/detectors/skrappio/skrappio_integration_test.go +++ b/pkg/detectors/skrappio/skrappio_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestSkrapio_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestSkrapio_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Skrappio, + DetectorType: detector_typepb.DetectorType_Skrappio, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestSkrapio_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Skrappio, + DetectorType: detector_typepb.DetectorType_Skrappio, Verified: false, }, }, diff --git a/pkg/detectors/skybiometry/skybiometry.go b/pkg/detectors/skybiometry/skybiometry.go index 6eeddbc03217..7f0e114d0fc3 100644 --- a/pkg/detectors/skybiometry/skybiometry.go +++ b/pkg/detectors/skybiometry/skybiometry.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -55,7 +55,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_SkyBiometry, + DetectorType: detector_typepb.DetectorType_SkyBiometry, Raw: []byte(secret), } @@ -72,8 +72,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_SkyBiometry +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_SkyBiometry } func (s Scanner) Description() string { diff --git a/pkg/detectors/skybiometry/skybiometry_integration_test.go b/pkg/detectors/skybiometry/skybiometry_integration_test.go index f7d96e29b11f..e997ae6ec5cc 100644 --- a/pkg/detectors/skybiometry/skybiometry_integration_test.go +++ b/pkg/detectors/skybiometry/skybiometry_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestSkyBiometry_FromChunk(t *testing.T) { @@ -50,11 +50,11 @@ func TestSkyBiometry_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_SkyBiometry, + DetectorType: detector_typepb.DetectorType_SkyBiometry, Verified: true, }, { - DetectorType: detectorspb.DetectorType_SkyBiometry, + DetectorType: detector_typepb.DetectorType_SkyBiometry, Verified: false, }, }, @@ -70,11 +70,11 @@ func TestSkyBiometry_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_SkyBiometry, + DetectorType: detector_typepb.DetectorType_SkyBiometry, Verified: false, }, { - DetectorType: detectorspb.DetectorType_SkyBiometry, + DetectorType: detector_typepb.DetectorType_SkyBiometry, Verified: false, }, }, diff --git a/pkg/detectors/slack/slack.go b/pkg/detectors/slack/slack.go index 71f4de3954f0..de112d257004 100644 --- a/pkg/detectors/slack/slack.go +++ b/pkg/detectors/slack/slack.go @@ -9,7 +9,7 @@ import ( regexp "github.com/wasilibs/go-re2" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" "github.com/trufflesecurity/trufflehog/v3/pkg/common" ) @@ -59,7 +59,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for _, token := range tokens { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Slack, + DetectorType: detector_typepb.DetectorType_Slack, Raw: []byte(token), } s1.ExtraData = map[string]string{ @@ -125,8 +125,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Slack +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Slack } func (s Scanner) Description() string { diff --git a/pkg/detectors/slack/slack_integration_test.go b/pkg/detectors/slack/slack_integration_test.go index 2f3f8539d9c2..06788031f6db 100644 --- a/pkg/detectors/slack/slack_integration_test.go +++ b/pkg/detectors/slack/slack_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestSlack_FromChunk(t *testing.T) { @@ -50,7 +50,7 @@ func TestSlack_FromChunk(t *testing.T) { }, wantResults: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Slack, + DetectorType: detector_typepb.DetectorType_Slack, Verified: true, ExtraData: map[string]string{ "name": "marge.haskell.bridge", @@ -71,7 +71,7 @@ func TestSlack_FromChunk(t *testing.T) { }, wantResults: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Slack, + DetectorType: detector_typepb.DetectorType_Slack, Verified: false, ExtraData: map[string]string{ "rotation_guide": "https://howtorotate.com/docs/tutorials/slack/", @@ -91,7 +91,7 @@ func TestSlack_FromChunk(t *testing.T) { }, wantResults: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Slack, + DetectorType: detector_typepb.DetectorType_Slack, Verified: false, ExtraData: map[string]string{ "rotation_guide": "https://howtorotate.com/docs/tutorials/slack/", @@ -112,7 +112,7 @@ func TestSlack_FromChunk(t *testing.T) { }, wantResults: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Slack, + DetectorType: detector_typepb.DetectorType_Slack, Verified: false, ExtraData: map[string]string{ "rotation_guide": "https://howtorotate.com/docs/tutorials/slack/", @@ -133,7 +133,7 @@ func TestSlack_FromChunk(t *testing.T) { }, wantResults: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Slack, + DetectorType: detector_typepb.DetectorType_Slack, Verified: false, ExtraData: map[string]string{ "rotation_guide": "https://howtorotate.com/docs/tutorials/slack/", @@ -154,7 +154,7 @@ func TestSlack_FromChunk(t *testing.T) { }, wantResults: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Slack, + DetectorType: detector_typepb.DetectorType_Slack, Verified: false, ExtraData: map[string]string{ "rotation_guide": "https://howtorotate.com/docs/tutorials/slack/", diff --git a/pkg/detectors/slackwebhook/slackwebhook.go b/pkg/detectors/slackwebhook/slackwebhook.go index e151f4a9ca40..63e313dfb23a 100644 --- a/pkg/detectors/slackwebhook/slackwebhook.go +++ b/pkg/detectors/slackwebhook/slackwebhook.go @@ -9,7 +9,7 @@ import ( "strings" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" regexp "github.com/wasilibs/go-re2" ) @@ -48,7 +48,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_SlackWebhook, + DetectorType: detector_typepb.DetectorType_SlackWebhook, Raw: []byte(resMatch), } s1.ExtraData = map[string]string{ @@ -106,8 +106,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_SlackWebhook +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_SlackWebhook } func (s Scanner) Description() string { diff --git a/pkg/detectors/slackwebhook/slackwebhook_integration_test.go b/pkg/detectors/slackwebhook/slackwebhook_integration_test.go index 706b5b62e25b..e20f3ca07fc2 100644 --- a/pkg/detectors/slackwebhook/slackwebhook_integration_test.go +++ b/pkg/detectors/slackwebhook/slackwebhook_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestSlackWebhook_FromChunk(t *testing.T) { @@ -52,7 +52,7 @@ func TestSlackWebhook_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_SlackWebhook, + DetectorType: detector_typepb.DetectorType_SlackWebhook, ExtraData: map[string]string{"rotation_guide": "https://howtorotate.com/docs/tutorials/slack-webhook/"}, Verified: true, }, @@ -70,7 +70,7 @@ func TestSlackWebhook_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_SlackWebhook, + DetectorType: detector_typepb.DetectorType_SlackWebhook, ExtraData: map[string]string{"rotation_guide": "https://howtorotate.com/docs/tutorials/slack-webhook/"}, Verified: true, }, @@ -88,7 +88,7 @@ func TestSlackWebhook_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_SlackWebhook, + DetectorType: detector_typepb.DetectorType_SlackWebhook, ExtraData: map[string]string{"rotation_guide": "https://howtorotate.com/docs/tutorials/slack-webhook/"}, Verified: false, }, @@ -106,7 +106,7 @@ func TestSlackWebhook_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_SlackWebhook, + DetectorType: detector_typepb.DetectorType_SlackWebhook, ExtraData: map[string]string{"rotation_guide": "https://howtorotate.com/docs/tutorials/slack-webhook/"}, Verified: false, }, @@ -124,7 +124,7 @@ func TestSlackWebhook_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_SlackWebhook, + DetectorType: detector_typepb.DetectorType_SlackWebhook, ExtraData: map[string]string{"rotation_guide": "https://howtorotate.com/docs/tutorials/slack-webhook/"}, Verified: false, }, @@ -142,7 +142,7 @@ func TestSlackWebhook_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_SlackWebhook, + DetectorType: detector_typepb.DetectorType_SlackWebhook, ExtraData: map[string]string{"rotation_guide": "https://howtorotate.com/docs/tutorials/slack-webhook/"}, Verified: false, }, diff --git a/pkg/detectors/smartsheets/smartsheets.go b/pkg/detectors/smartsheets/smartsheets.go index 85216cdf857b..e4e313a6786f 100644 --- a/pkg/detectors/smartsheets/smartsheets.go +++ b/pkg/detectors/smartsheets/smartsheets.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -43,7 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for key := range uniqueKeys { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Smartsheets, + DetectorType: detector_typepb.DetectorType_Smartsheets, Raw: []byte(key), } @@ -59,8 +59,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Smartsheets +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Smartsheets } func (s Scanner) Description() string { diff --git a/pkg/detectors/smartsheets/smartsheets_integration_test.go b/pkg/detectors/smartsheets/smartsheets_integration_test.go index 386ec16e9650..dbdb72eeb8c8 100644 --- a/pkg/detectors/smartsheets/smartsheets_integration_test.go +++ b/pkg/detectors/smartsheets/smartsheets_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestSmartsheets_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestSmartsheets_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Smartsheets, + DetectorType: detector_typepb.DetectorType_Smartsheets, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestSmartsheets_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Smartsheets, + DetectorType: detector_typepb.DetectorType_Smartsheets, Verified: false, }, }, diff --git a/pkg/detectors/smartystreets/smartystreets.go b/pkg/detectors/smartystreets/smartystreets.go index df4f0ff90239..1fe8a5c0ccf3 100644 --- a/pkg/detectors/smartystreets/smartystreets.go +++ b/pkg/detectors/smartystreets/smartystreets.go @@ -3,16 +3,17 @@ package smartystreets import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) -type Scanner struct{ +type Scanner struct { detectors.DefaultMultiPartCredentialProvider } @@ -47,7 +48,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resIdMatch := strings.TrimSpace(idMatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_SmartyStreets, + DetectorType: detector_typepb.DetectorType_SmartyStreets, Raw: []byte(resMatch), } @@ -72,8 +73,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_SmartyStreets +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_SmartyStreets } func (s Scanner) Description() string { diff --git a/pkg/detectors/smartystreets/smartystreets_integration_test.go b/pkg/detectors/smartystreets/smartystreets_integration_test.go index a4a34abbe0ac..014ab07fee8e 100644 --- a/pkg/detectors/smartystreets/smartystreets_integration_test.go +++ b/pkg/detectors/smartystreets/smartystreets_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestSmartyStreets_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestSmartyStreets_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_SmartyStreets, + DetectorType: detector_typepb.DetectorType_SmartyStreets, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestSmartyStreets_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_SmartyStreets, + DetectorType: detector_typepb.DetectorType_SmartyStreets, Verified: false, }, }, diff --git a/pkg/detectors/smooch/smooch.go b/pkg/detectors/smooch/smooch.go index e825f5b02dbc..5a606b39c8f8 100644 --- a/pkg/detectors/smooch/smooch.go +++ b/pkg/detectors/smooch/smooch.go @@ -4,16 +4,17 @@ import ( "context" b64 "encoding/base64" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) -type Scanner struct{ +type Scanner struct { detectors.DefaultMultiPartCredentialProvider } @@ -48,7 +49,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resSecret := strings.TrimSpace(secretMatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Smooch, + DetectorType: detector_typepb.DetectorType_Smooch, Raw: []byte(resMatch), RawV2: []byte(resMatch + resSecret), } @@ -77,8 +78,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Smooch +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Smooch } func (s Scanner) Description() string { diff --git a/pkg/detectors/smooch/smooch_integration_test.go b/pkg/detectors/smooch/smooch_integration_test.go index b982b52136c0..88ba4b7bde4a 100644 --- a/pkg/detectors/smooch/smooch_integration_test.go +++ b/pkg/detectors/smooch/smooch_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestSmooch_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestSmooch_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Smooch, + DetectorType: detector_typepb.DetectorType_Smooch, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestSmooch_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Smooch, + DetectorType: detector_typepb.DetectorType_Smooch, Verified: false, }, }, diff --git a/pkg/detectors/snipcart/snipcart.go b/pkg/detectors/snipcart/snipcart.go index 2dd9f0bdc4ec..5a4c4d10ff7c 100644 --- a/pkg/detectors/snipcart/snipcart.go +++ b/pkg/detectors/snipcart/snipcart.go @@ -4,13 +4,14 @@ import ( "context" b64 "encoding/base64" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -41,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Snipcart, + DetectorType: detector_typepb.DetectorType_Snipcart, Raw: []byte(resMatch), } @@ -69,8 +70,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Snipcart +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Snipcart } func (s Scanner) Description() string { diff --git a/pkg/detectors/snipcart/snipcart_integration_test.go b/pkg/detectors/snipcart/snipcart_integration_test.go index 35be88a33737..37c6aef42a72 100644 --- a/pkg/detectors/snipcart/snipcart_integration_test.go +++ b/pkg/detectors/snipcart/snipcart_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestSnipcart_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestSnipcart_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Snipcart, + DetectorType: detector_typepb.DetectorType_Snipcart, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestSnipcart_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Snipcart, + DetectorType: detector_typepb.DetectorType_Snipcart, Verified: false, }, }, diff --git a/pkg/detectors/snowflake/snowflake.go b/pkg/detectors/snowflake/snowflake.go index 138731b40c72..7ade1dac1141 100644 --- a/pkg/detectors/snowflake/snowflake.go +++ b/pkg/detectors/snowflake/snowflake.go @@ -15,7 +15,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -121,7 +121,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Snowflake, + DetectorType: detector_typepb.DetectorType_Snowflake, Raw: []byte(resPasswordMatch), ExtraData: map[string]string{ "account": resAccountMatch, @@ -191,8 +191,8 @@ func verifyMatch(ctx context.Context, account, username, password string) (bool, return loginResp.Success, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Snowflake +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Snowflake } func (s Scanner) Description() string { diff --git a/pkg/detectors/snowflake/snowflake_integration_test.go b/pkg/detectors/snowflake/snowflake_integration_test.go index b51a6d2eeedc..43fc1624e505 100644 --- a/pkg/detectors/snowflake/snowflake_integration_test.go +++ b/pkg/detectors/snowflake/snowflake_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestSnowflake_FromChunk(t *testing.T) { @@ -58,7 +58,7 @@ func TestSnowflake_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Snowflake, + DetectorType: detector_typepb.DetectorType_Snowflake, Verified: true, ExtraData: map[string]string{ "account": accountIdentifier, @@ -79,7 +79,7 @@ func TestSnowflake_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Snowflake, + DetectorType: detector_typepb.DetectorType_Snowflake, Verified: false, ExtraData: map[string]string{ "account": accountIdentifier, @@ -112,7 +112,7 @@ func TestSnowflake_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Snowflake, + DetectorType: detector_typepb.DetectorType_Snowflake, ExtraData: map[string]string{ "account": accountIdentifier, "username": username, diff --git a/pkg/detectors/snykkey/snykkey.go b/pkg/detectors/snykkey/snykkey.go index 2a017c5d70cb..0d7c83baac76 100644 --- a/pkg/detectors/snykkey/snykkey.go +++ b/pkg/detectors/snykkey/snykkey.go @@ -12,7 +12,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -122,8 +122,8 @@ type organization struct { Name string `json:"name"` } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_SnykKey +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_SnykKey } func (s Scanner) Description() string { diff --git a/pkg/detectors/snykkey/snykkey_integration_test.go b/pkg/detectors/snykkey/snykkey_integration_test.go index 651b298b03fd..dff59887c3d9 100644 --- a/pkg/detectors/snykkey/snykkey_integration_test.go +++ b/pkg/detectors/snykkey/snykkey_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestSnykKey_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestSnykKey_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_SnykKey, + DetectorType: detector_typepb.DetectorType_SnykKey, Verified: true, ExtraData: map[string]string{ "Email": "rendyplayground@gmail.com", @@ -69,7 +69,7 @@ func TestSnykKey_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_SnykKey, + DetectorType: detector_typepb.DetectorType_SnykKey, Verified: false, }, }, diff --git a/pkg/detectors/sonarcloud/sonarcloud.go b/pkg/detectors/sonarcloud/sonarcloud.go index d74226daa81e..62dc978a4f4b 100644 --- a/pkg/detectors/sonarcloud/sonarcloud.go +++ b/pkg/detectors/sonarcloud/sonarcloud.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -53,7 +53,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for match := range uniqueTokenMatches { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_SonarCloud, + DetectorType: detector_typepb.DetectorType_SonarCloud, Raw: []byte(match), } @@ -111,8 +111,8 @@ func (s Scanner) verifyMatch(ctx context.Context, client *http.Client, token str return resp.Valid, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_SonarCloud +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_SonarCloud } func (s Scanner) Description() string { diff --git a/pkg/detectors/sonarcloud/sonarcloud_integration_test.go b/pkg/detectors/sonarcloud/sonarcloud_integration_test.go index fb9554885720..ced576bcf216 100644 --- a/pkg/detectors/sonarcloud/sonarcloud_integration_test.go +++ b/pkg/detectors/sonarcloud/sonarcloud_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestSonarCloud_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestSonarCloud_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_SonarCloud, + DetectorType: detector_typepb.DetectorType_SonarCloud, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestSonarCloud_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_SonarCloud, + DetectorType: detector_typepb.DetectorType_SonarCloud, Verified: false, }, }, diff --git a/pkg/detectors/sourcegraph/sourcegraph.go b/pkg/detectors/sourcegraph/sourcegraph.go index 93566d4537be..51d1253ae65a 100644 --- a/pkg/detectors/sourcegraph/sourcegraph.go +++ b/pkg/detectors/sourcegraph/sourcegraph.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -42,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Sourcegraph, + DetectorType: detector_typepb.DetectorType_Sourcegraph, Raw: []byte(resMatch), } s1.ExtraData = map[string]string{ @@ -87,8 +87,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Sourcegraph +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Sourcegraph } func (s Scanner) Description() string { diff --git a/pkg/detectors/sourcegraph/sourcegraph_integration_test.go b/pkg/detectors/sourcegraph/sourcegraph_integration_test.go index fb695ca4eceb..5054c55c5652 100644 --- a/pkg/detectors/sourcegraph/sourcegraph_integration_test.go +++ b/pkg/detectors/sourcegraph/sourcegraph_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestSourcegraph_FromChunk(t *testing.T) { @@ -56,7 +56,7 @@ func TestSourcegraph_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Sourcegraph, + DetectorType: detector_typepb.DetectorType_Sourcegraph, Verified: true, }, }, @@ -73,7 +73,7 @@ func TestSourcegraph_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Sourcegraph, + DetectorType: detector_typepb.DetectorType_Sourcegraph, Verified: true, }, }, @@ -90,7 +90,7 @@ func TestSourcegraph_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Sourcegraph, + DetectorType: detector_typepb.DetectorType_Sourcegraph, Verified: true, }, }, @@ -107,7 +107,7 @@ func TestSourcegraph_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Sourcegraph, + DetectorType: detector_typepb.DetectorType_Sourcegraph, Verified: true, }, }, @@ -124,7 +124,7 @@ func TestSourcegraph_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Sourcegraph, + DetectorType: detector_typepb.DetectorType_Sourcegraph, Verified: false, }, }, @@ -141,7 +141,7 @@ func TestSourcegraph_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Sourcegraph, + DetectorType: detector_typepb.DetectorType_Sourcegraph, Verified: false, }, }, @@ -158,7 +158,7 @@ func TestSourcegraph_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Sourcegraph, + DetectorType: detector_typepb.DetectorType_Sourcegraph, Verified: false, }, }, @@ -187,7 +187,7 @@ func TestSourcegraph_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Sourcegraph, + DetectorType: detector_typepb.DetectorType_Sourcegraph, Verified: false, }, }, @@ -204,7 +204,7 @@ func TestSourcegraph_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Sourcegraph, + DetectorType: detector_typepb.DetectorType_Sourcegraph, Verified: false, }, }, diff --git a/pkg/detectors/sourcegraphcody/sourcegraphcody.go b/pkg/detectors/sourcegraphcody/sourcegraphcody.go index 37aa58b14732..6a99900397a1 100644 --- a/pkg/detectors/sourcegraphcody/sourcegraphcody.go +++ b/pkg/detectors/sourcegraphcody/sourcegraphcody.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -42,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_SourcegraphCody, + DetectorType: detector_typepb.DetectorType_SourcegraphCody, Raw: []byte(resMatch), } @@ -80,8 +80,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_SourcegraphCody +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_SourcegraphCody } func (s Scanner) Description() string { diff --git a/pkg/detectors/sourcegraphcody/sourcegraphcody_integration_test.go b/pkg/detectors/sourcegraphcody/sourcegraphcody_integration_test.go index 824beac3c4dd..7de4dab7dfca 100644 --- a/pkg/detectors/sourcegraphcody/sourcegraphcody_integration_test.go +++ b/pkg/detectors/sourcegraphcody/sourcegraphcody_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestSourcegraphcody_FromChunk(t *testing.T) { @@ -50,7 +50,7 @@ func TestSourcegraphcody_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_SourcegraphCody, + DetectorType: detector_typepb.DetectorType_SourcegraphCody, Verified: true, }, }, @@ -67,7 +67,7 @@ func TestSourcegraphcody_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_SourcegraphCody, + DetectorType: detector_typepb.DetectorType_SourcegraphCody, Verified: false, }, }, @@ -96,7 +96,7 @@ func TestSourcegraphcody_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_SourcegraphCody, + DetectorType: detector_typepb.DetectorType_SourcegraphCody, Verified: false, }, }, @@ -113,7 +113,7 @@ func TestSourcegraphcody_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_SourcegraphCody, + DetectorType: detector_typepb.DetectorType_SourcegraphCody, Verified: false, }, }, diff --git a/pkg/detectors/sparkpost/sparkpost.go b/pkg/detectors/sparkpost/sparkpost.go index e73b0e0fc4b5..06bef13962ed 100644 --- a/pkg/detectors/sparkpost/sparkpost.go +++ b/pkg/detectors/sparkpost/sparkpost.go @@ -2,13 +2,14 @@ package sparkpost import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -39,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Sparkpost, + DetectorType: detector_typepb.DetectorType_Sparkpost, Raw: []byte(resMatch), } @@ -64,8 +65,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Sparkpost +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Sparkpost } func (s Scanner) Description() string { diff --git a/pkg/detectors/sparkpost/sparkpost_integration_test.go b/pkg/detectors/sparkpost/sparkpost_integration_test.go index 6711fe6396a0..89a953999fee 100644 --- a/pkg/detectors/sparkpost/sparkpost_integration_test.go +++ b/pkg/detectors/sparkpost/sparkpost_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestSparkpost_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestSparkpost_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Sparkpost, + DetectorType: detector_typepb.DetectorType_Sparkpost, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestSparkpost_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Sparkpost, + DetectorType: detector_typepb.DetectorType_Sparkpost, Verified: false, }, }, diff --git a/pkg/detectors/speechtextai/speechtextai.go b/pkg/detectors/speechtextai/speechtextai.go index bdb0c8dfaef6..d7e733747852 100644 --- a/pkg/detectors/speechtextai/speechtextai.go +++ b/pkg/detectors/speechtextai/speechtextai.go @@ -3,13 +3,14 @@ package speechtextai import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_SpeechTextAI, + DetectorType: detector_typepb.DetectorType_SpeechTextAI, Raw: []byte(resMatch), } @@ -68,8 +69,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_SpeechTextAI +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_SpeechTextAI } func (s Scanner) Description() string { diff --git a/pkg/detectors/speechtextai/speechtextai_integration_test.go b/pkg/detectors/speechtextai/speechtextai_integration_test.go index f3184a5fd53d..4a065f34337d 100644 --- a/pkg/detectors/speechtextai/speechtextai_integration_test.go +++ b/pkg/detectors/speechtextai/speechtextai_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestSpeechTextAI_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestSpeechTextAI_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_SpeechTextAI, + DetectorType: detector_typepb.DetectorType_SpeechTextAI, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestSpeechTextAI_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_SpeechTextAI, + DetectorType: detector_typepb.DetectorType_SpeechTextAI, Verified: false, }, }, diff --git a/pkg/detectors/splunkobservabilitytoken/splunkobservabilitytoken.go b/pkg/detectors/splunkobservabilitytoken/splunkobservabilitytoken.go index 0c9059792063..881929c9f980 100644 --- a/pkg/detectors/splunkobservabilitytoken/splunkobservabilitytoken.go +++ b/pkg/detectors/splunkobservabilitytoken/splunkobservabilitytoken.go @@ -9,7 +9,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_SplunkOberservabilityToken, + DetectorType: detector_typepb.DetectorType_SplunkOberservabilityToken, Raw: []byte(resMatch), } @@ -66,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_SplunkOberservabilityToken +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_SplunkOberservabilityToken } func (s Scanner) Description() string { diff --git a/pkg/detectors/splunkobservabilitytoken/splunkobservabilitytoken_integration_test.go b/pkg/detectors/splunkobservabilitytoken/splunkobservabilitytoken_integration_test.go index 49de9e00aec2..991174067caf 100644 --- a/pkg/detectors/splunkobservabilitytoken/splunkobservabilitytoken_integration_test.go +++ b/pkg/detectors/splunkobservabilitytoken/splunkobservabilitytoken_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestSplunkObservabilityToken_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestSplunkObservabilityToken_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_SplunkOberservabilityToken, + DetectorType: detector_typepb.DetectorType_SplunkOberservabilityToken, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestSplunkObservabilityToken_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_SplunkOberservabilityToken, + DetectorType: detector_typepb.DetectorType_SplunkOberservabilityToken, Verified: false, }, }, diff --git a/pkg/detectors/spoonacular/spoonacular.go b/pkg/detectors/spoonacular/spoonacular.go index edb8a5b13b29..1d652b93cf28 100644 --- a/pkg/detectors/spoonacular/spoonacular.go +++ b/pkg/detectors/spoonacular/spoonacular.go @@ -3,13 +3,14 @@ package spoonacular import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Spoonacular, + DetectorType: detector_typepb.DetectorType_Spoonacular, Raw: []byte(resMatch), } @@ -65,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Spoonacular +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Spoonacular } func (s Scanner) Description() string { diff --git a/pkg/detectors/spoonacular/spoonacular_integration_test.go b/pkg/detectors/spoonacular/spoonacular_integration_test.go index 91ba6069b8f6..497ad0c8070d 100644 --- a/pkg/detectors/spoonacular/spoonacular_integration_test.go +++ b/pkg/detectors/spoonacular/spoonacular_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestSpoonacular_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestSpoonacular_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Spoonacular, + DetectorType: detector_typepb.DetectorType_Spoonacular, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestSpoonacular_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Spoonacular, + DetectorType: detector_typepb.DetectorType_Spoonacular, Verified: false, }, }, diff --git a/pkg/detectors/sportsmonk/sportsmonk.go b/pkg/detectors/sportsmonk/sportsmonk.go index ebc1180c8639..3c22528f9ab5 100644 --- a/pkg/detectors/sportsmonk/sportsmonk.go +++ b/pkg/detectors/sportsmonk/sportsmonk.go @@ -2,13 +2,14 @@ package sportsmonk import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -39,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Sportsmonk, + DetectorType: detector_typepb.DetectorType_Sportsmonk, Raw: []byte(resMatch), } @@ -63,8 +64,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Sportsmonk +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Sportsmonk } func (s Scanner) Description() string { diff --git a/pkg/detectors/sportsmonk/sportsmonk_integration_test.go b/pkg/detectors/sportsmonk/sportsmonk_integration_test.go index 399df68b6d7b..61b0956f0ff1 100644 --- a/pkg/detectors/sportsmonk/sportsmonk_integration_test.go +++ b/pkg/detectors/sportsmonk/sportsmonk_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestSportsmonk_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestSportsmonk_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Sportsmonk, + DetectorType: detector_typepb.DetectorType_Sportsmonk, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestSportsmonk_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Sportsmonk, + DetectorType: detector_typepb.DetectorType_Sportsmonk, Verified: false, }, }, diff --git a/pkg/detectors/spotifykey/spotifykey.go b/pkg/detectors/spotifykey/spotifykey.go index 3b8bf03dc25b..0a804365296a 100644 --- a/pkg/detectors/spotifykey/spotifykey.go +++ b/pkg/detectors/spotifykey/spotifykey.go @@ -2,17 +2,19 @@ package spotifykey import ( "context" + "golang.org/x/oauth2" - regexp "github.com/wasilibs/go-re2" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "golang.org/x/oauth2/clientcredentials" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -48,7 +50,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for _, idMatch := range idMatches { idresMatch := strings.TrimSpace(idMatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_SpotifyKey, + DetectorType: detector_typepb.DetectorType_SpotifyKey, Raw: []byte(resMatch), } @@ -74,8 +76,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_SpotifyKey +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_SpotifyKey } func (s Scanner) Description() string { diff --git a/pkg/detectors/spotifykey/spotifykey_integration_test.go b/pkg/detectors/spotifykey/spotifykey_integration_test.go index a38741bfa528..dad63d74c179 100644 --- a/pkg/detectors/spotifykey/spotifykey_integration_test.go +++ b/pkg/detectors/spotifykey/spotifykey_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestSpotifyKey_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestSpotifyKey_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_SpotifyKey, + DetectorType: detector_typepb.DetectorType_SpotifyKey, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestSpotifyKey_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_SpotifyKey, + DetectorType: detector_typepb.DetectorType_SpotifyKey, Verified: false, }, }, diff --git a/pkg/detectors/sqlserver/sqlserver.go b/pkg/detectors/sqlserver/sqlserver.go index 78d6bcd6a5fc..101b3a3cd337 100644 --- a/pkg/detectors/sqlserver/sqlserver.go +++ b/pkg/detectors/sqlserver/sqlserver.go @@ -13,7 +13,7 @@ import ( mssql "github.com/microsoft/go-mssqldb" "github.com/microsoft/go-mssqldb/msdsn" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" ) @@ -79,7 +79,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_SQLServer, + DetectorType: detector_typepb.DetectorType_SQLServer, Raw: []byte(paramsUnsafe.Password), RawV2: []byte(paramsUnsafe.URL().String()), Redacted: detectors.RedactURL(*paramsUnsafe.URL()), @@ -167,8 +167,8 @@ var ping = func(ctx context.Context, config msdsn.Config) (bool, error) { return true, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_SQLServer +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_SQLServer } func (s Scanner) Description() string { diff --git a/pkg/detectors/sqlserver/sqlserver_integration_test.go b/pkg/detectors/sqlserver/sqlserver_integration_test.go index dacc62b2cf50..4b0f61f201ff 100644 --- a/pkg/detectors/sqlserver/sqlserver_integration_test.go +++ b/pkg/detectors/sqlserver/sqlserver_integration_test.go @@ -18,7 +18,7 @@ import ( "github.com/testcontainers/testcontainers-go/modules/mssql" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestSQLServerIntegration_FromChunk(t *testing.T) { @@ -67,7 +67,7 @@ func TestSQLServerIntegration_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_SQLServer, + DetectorType: detector_typepb.DetectorType_SQLServer, Raw: []byte(password), RawV2: []byte(urlEncode(fmt.Sprintf("sqlserver://sa:%s@localhost:%s?database=master&dial+timeout=15&disableretry=false", password, @@ -89,7 +89,7 @@ func TestSQLServerIntegration_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_SQLServer, + DetectorType: detector_typepb.DetectorType_SQLServer, Raw: []byte("123"), RawV2: []byte(fmt.Sprintf("sqlserver://sa:123@localhost:%s?dial+timeout=15&disableretry=false", port.Port())), @@ -123,7 +123,7 @@ func TestSQLServerIntegration_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_SQLServer, + DetectorType: detector_typepb.DetectorType_SQLServer, Redacted: fmt.Sprintf("sqlserver://sa:********@localhost:%s?database=master&dial+timeout=15&disableretry=false", port.Port()), Raw: []byte(password), @@ -145,7 +145,7 @@ func TestSQLServerIntegration_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_SQLServer, + DetectorType: detector_typepb.DetectorType_SQLServer, Raw: []byte("P@ssw0rd!"), RawV2: []byte("sqlserver://sa:P%40ssw0rd%21@unreachablehost?database=master&dial+timeout=15&disableretry=false"), Redacted: "sqlserver://sa:********@unreachablehost?database=master&dial+timeout=15&disableretry=false", @@ -219,7 +219,7 @@ func TestSQLServer_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_SQLServer, + DetectorType: detector_typepb.DetectorType_SQLServer, Redacted: "sqlserver://sa:********@localhost?database=Demo&dial+timeout=15&disableretry=false", Verified: true, }, @@ -241,7 +241,7 @@ func TestSQLServer_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_SQLServer, + DetectorType: detector_typepb.DetectorType_SQLServer, Redacted: "sqlserver://sa:********@localhost?dial+timeout=15&disableretry=false", Verified: false, }, @@ -279,7 +279,7 @@ func TestSQLServer_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_SQLServer, + DetectorType: detector_typepb.DetectorType_SQLServer, Redacted: "sqlserver://username:********@server_name?database=testdb&dial+timeout=15&disableretry=false&encrypt=true", Verified: true, }, diff --git a/pkg/detectors/square/square.go b/pkg/detectors/square/square.go index 94052a7f2dbf..bc79a312c359 100644 --- a/pkg/detectors/square/square.go +++ b/pkg/detectors/square/square.go @@ -9,7 +9,7 @@ import ( regexp "github.com/wasilibs/go-re2" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" "github.com/trufflesecurity/trufflehog/v3/pkg/common" ) @@ -44,7 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(secMatch[1]) result := detectors.Result{ - DetectorType: detectorspb.DetectorType_Square, + DetectorType: detector_typepb.DetectorType_Square, Raw: []byte(resMatch), } result.ExtraData = map[string]string{ @@ -86,8 +86,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Square +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Square } func (s Scanner) Description() string { diff --git a/pkg/detectors/square/square_integration_test.go b/pkg/detectors/square/square_integration_test.go index d6b7793d40c7..471a1ef51817 100644 --- a/pkg/detectors/square/square_integration_test.go +++ b/pkg/detectors/square/square_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestSquare_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestSquare_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Square, + DetectorType: detector_typepb.DetectorType_Square, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestSquare_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Square, + DetectorType: detector_typepb.DetectorType_Square, Verified: false, }, }, diff --git a/pkg/detectors/squareapp/squareapp.go b/pkg/detectors/squareapp/squareapp.go index 5f214d1efde7..c15985da7ccc 100644 --- a/pkg/detectors/squareapp/squareapp.go +++ b/pkg/detectors/squareapp/squareapp.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -43,8 +43,8 @@ func (s Scanner) Keywords() []string { return []string{"sq0i"} } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_SquareApp +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_SquareApp } func (s Scanner) Description() string { @@ -73,7 +73,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } result := detectors.Result{ - DetectorType: detectorspb.DetectorType_SquareApp, + DetectorType: detector_typepb.DetectorType_SquareApp, Raw: []byte(id), Redacted: id, ExtraData: map[string]string{}, diff --git a/pkg/detectors/squareapp/squareapp_integration_test.go b/pkg/detectors/squareapp/squareapp_integration_test.go index fdec17a3f569..f64ced0ca88a 100644 --- a/pkg/detectors/squareapp/squareapp_integration_test.go +++ b/pkg/detectors/squareapp/squareapp_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestSquareApp_FromChunk(t *testing.T) { @@ -50,7 +50,7 @@ func TestSquareApp_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_SquareApp, + DetectorType: detector_typepb.DetectorType_SquareApp, Verified: true, Redacted: id, ExtraData: map[string]string{"Env": "Sandbox"}, diff --git a/pkg/detectors/squarespace/squarespace.go b/pkg/detectors/squarespace/squarespace.go index 1398fb30e9fa..718bd5ee6ab5 100644 --- a/pkg/detectors/squarespace/squarespace.go +++ b/pkg/detectors/squarespace/squarespace.go @@ -3,13 +3,14 @@ package squarespace import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Squarespace, + DetectorType: detector_typepb.DetectorType_Squarespace, Raw: []byte(resMatch), } @@ -66,8 +67,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Squarespace +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Squarespace } func (s Scanner) Description() string { diff --git a/pkg/detectors/squarespace/squarespace_integration_test.go b/pkg/detectors/squarespace/squarespace_integration_test.go index 80308cb71cf3..2510d753d54f 100644 --- a/pkg/detectors/squarespace/squarespace_integration_test.go +++ b/pkg/detectors/squarespace/squarespace_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestSquarespace_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestSquarespace_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Squarespace, + DetectorType: detector_typepb.DetectorType_Squarespace, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestSquarespace_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Squarespace, + DetectorType: detector_typepb.DetectorType_Squarespace, Verified: false, }, }, diff --git a/pkg/detectors/squareup/squareup.go b/pkg/detectors/squareup/squareup.go index bfa2a5ac4e20..6beb88dcc059 100644 --- a/pkg/detectors/squareup/squareup.go +++ b/pkg/detectors/squareup/squareup.go @@ -3,13 +3,14 @@ package squareup import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Squareup, + DetectorType: detector_typepb.DetectorType_Squareup, Raw: []byte(resMatch), } @@ -66,8 +67,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Squareup +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Squareup } func (s Scanner) Description() string { diff --git a/pkg/detectors/squareup/squareup_integration_test.go b/pkg/detectors/squareup/squareup_integration_test.go index fce1cce50664..7ed588accdde 100644 --- a/pkg/detectors/squareup/squareup_integration_test.go +++ b/pkg/detectors/squareup/squareup_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestSquareup_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestSquareup_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Squareup, + DetectorType: detector_typepb.DetectorType_Squareup, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestSquareup_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Squareup, + DetectorType: detector_typepb.DetectorType_Squareup, Verified: false, }, }, diff --git a/pkg/detectors/sslmate/sslmate.go b/pkg/detectors/sslmate/sslmate.go index 29d3023623c1..994cf74ffc5a 100644 --- a/pkg/detectors/sslmate/sslmate.go +++ b/pkg/detectors/sslmate/sslmate.go @@ -3,13 +3,14 @@ package sslmate import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_SslMate, + DetectorType: detector_typepb.DetectorType_SslMate, Raw: []byte(resMatch), } @@ -65,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_SslMate +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_SslMate } func (s Scanner) Description() string { diff --git a/pkg/detectors/sslmate/sslmate_integration_test.go b/pkg/detectors/sslmate/sslmate_integration_test.go index 7c5f396604fb..d03dbad6151f 100644 --- a/pkg/detectors/sslmate/sslmate_integration_test.go +++ b/pkg/detectors/sslmate/sslmate_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestSslMate_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestSslMate_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_SslMate, + DetectorType: detector_typepb.DetectorType_SslMate, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestSslMate_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_SslMate, + DetectorType: detector_typepb.DetectorType_SslMate, Verified: false, }, }, diff --git a/pkg/detectors/statuscake/statuscake.go b/pkg/detectors/statuscake/statuscake.go index e06b3a42ada6..c16070e40050 100644 --- a/pkg/detectors/statuscake/statuscake.go +++ b/pkg/detectors/statuscake/statuscake.go @@ -3,13 +3,14 @@ package statuscake import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Statuscake, + DetectorType: detector_typepb.DetectorType_Statuscake, Raw: []byte(resMatch), } @@ -65,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Statuscake +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Statuscake } func (s Scanner) Description() string { diff --git a/pkg/detectors/statuscake/statuscake_integration_test.go b/pkg/detectors/statuscake/statuscake_integration_test.go index 8cd8609cf9e0..bec78bffe993 100644 --- a/pkg/detectors/statuscake/statuscake_integration_test.go +++ b/pkg/detectors/statuscake/statuscake_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestStatuscake_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestStatuscake_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Statuscake, + DetectorType: detector_typepb.DetectorType_Statuscake, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestStatuscake_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Statuscake, + DetectorType: detector_typepb.DetectorType_Statuscake, Verified: false, }, }, diff --git a/pkg/detectors/statuspage/statuspage.go b/pkg/detectors/statuspage/statuspage.go index c980c6973aed..56e12b197a0f 100644 --- a/pkg/detectors/statuspage/statuspage.go +++ b/pkg/detectors/statuspage/statuspage.go @@ -2,13 +2,14 @@ package statuspage import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -39,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Statuspage, + DetectorType: detector_typepb.DetectorType_Statuspage, Raw: []byte(resMatch), } @@ -65,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Statuspage +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Statuspage } func (s Scanner) Description() string { diff --git a/pkg/detectors/statuspage/statuspage_integration_test.go b/pkg/detectors/statuspage/statuspage_integration_test.go index c2c8335dc6c9..793ac2774752 100644 --- a/pkg/detectors/statuspage/statuspage_integration_test.go +++ b/pkg/detectors/statuspage/statuspage_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestStatuspage_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestStatuspage_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Statuspage, + DetectorType: detector_typepb.DetectorType_Statuspage, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestStatuspage_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Statuspage, + DetectorType: detector_typepb.DetectorType_Statuspage, Verified: false, }, }, diff --git a/pkg/detectors/statuspal/statuspal.go b/pkg/detectors/statuspal/statuspal.go index bdc7574b99b3..804f97f02c76 100644 --- a/pkg/detectors/statuspal/statuspal.go +++ b/pkg/detectors/statuspal/statuspal.go @@ -2,13 +2,14 @@ package statuspal import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -39,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Statuspal, + DetectorType: detector_typepb.DetectorType_Statuspal, Raw: []byte(resMatch), } @@ -65,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Statuspal +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Statuspal } func (s Scanner) Description() string { diff --git a/pkg/detectors/statuspal/statuspal_integration_test.go b/pkg/detectors/statuspal/statuspal_integration_test.go index 2f1a9547b072..39a6028d7f2f 100644 --- a/pkg/detectors/statuspal/statuspal_integration_test.go +++ b/pkg/detectors/statuspal/statuspal_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestStatuspal_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestStatuspal_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Statuspal, + DetectorType: detector_typepb.DetectorType_Statuspal, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestStatuspal_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Statuspal, + DetectorType: detector_typepb.DetectorType_Statuspal, Verified: false, }, }, diff --git a/pkg/detectors/stitchdata/stitchdata.go b/pkg/detectors/stitchdata/stitchdata.go index 44f33f2a23d7..4c539bd615e7 100644 --- a/pkg/detectors/stitchdata/stitchdata.go +++ b/pkg/detectors/stitchdata/stitchdata.go @@ -3,13 +3,14 @@ package stitchdata import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Stitchdata, + DetectorType: detector_typepb.DetectorType_Stitchdata, Raw: []byte(resMatch), } @@ -66,8 +67,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Stitchdata +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Stitchdata } func (s Scanner) Description() string { diff --git a/pkg/detectors/stitchdata/stitchdata_integration_test.go b/pkg/detectors/stitchdata/stitchdata_integration_test.go index e3f0c9a3f51a..a30e917fd048 100644 --- a/pkg/detectors/stitchdata/stitchdata_integration_test.go +++ b/pkg/detectors/stitchdata/stitchdata_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestStitchdata_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestStitchdata_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Stitchdata, + DetectorType: detector_typepb.DetectorType_Stitchdata, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestStitchdata_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Stitchdata, + DetectorType: detector_typepb.DetectorType_Stitchdata, Verified: false, }, }, diff --git a/pkg/detectors/stockdata/stockdata.go b/pkg/detectors/stockdata/stockdata.go index 03c2f073251e..7b2c7e45ccd3 100644 --- a/pkg/detectors/stockdata/stockdata.go +++ b/pkg/detectors/stockdata/stockdata.go @@ -2,13 +2,14 @@ package stockdata import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -39,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Stockdata, + DetectorType: detector_typepb.DetectorType_Stockdata, Raw: []byte(resMatch), } @@ -63,8 +64,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Stockdata +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Stockdata } func (s Scanner) Description() string { diff --git a/pkg/detectors/stockdata/stockdata_integration_test.go b/pkg/detectors/stockdata/stockdata_integration_test.go index d7794858e433..06549e209cd6 100644 --- a/pkg/detectors/stockdata/stockdata_integration_test.go +++ b/pkg/detectors/stockdata/stockdata_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestStockdata_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestStockdata_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Stockdata, + DetectorType: detector_typepb.DetectorType_Stockdata, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestStockdata_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Stockdata, + DetectorType: detector_typepb.DetectorType_Stockdata, Verified: false, }, }, diff --git a/pkg/detectors/storecove/storecove.go b/pkg/detectors/storecove/storecove.go index de90b55e1bfa..475585467109 100644 --- a/pkg/detectors/storecove/storecove.go +++ b/pkg/detectors/storecove/storecove.go @@ -3,13 +3,14 @@ package storecove import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Storecove, + DetectorType: detector_typepb.DetectorType_Storecove, Raw: []byte(resMatch), } @@ -65,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Storecove +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Storecove } func (s Scanner) Description() string { diff --git a/pkg/detectors/storecove/storecove_integration_test.go b/pkg/detectors/storecove/storecove_integration_test.go index 5adfc8b7efda..585e824d4c4f 100644 --- a/pkg/detectors/storecove/storecove_integration_test.go +++ b/pkg/detectors/storecove/storecove_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestStorecove_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestStorecove_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Storecove, + DetectorType: detector_typepb.DetectorType_Storecove, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestStorecove_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Storecove, + DetectorType: detector_typepb.DetectorType_Storecove, Verified: false, }, }, diff --git a/pkg/detectors/stormboard/stormboard.go b/pkg/detectors/stormboard/stormboard.go index b3cf0c582f0b..01e9293489ca 100644 --- a/pkg/detectors/stormboard/stormboard.go +++ b/pkg/detectors/stormboard/stormboard.go @@ -2,13 +2,14 @@ package stormboard import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -39,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Stormboard, + DetectorType: detector_typepb.DetectorType_Stormboard, Raw: []byte(resMatch), } @@ -64,8 +65,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Stormboard +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Stormboard } func (s Scanner) Description() string { diff --git a/pkg/detectors/stormboard/stormboard_integration_test.go b/pkg/detectors/stormboard/stormboard_integration_test.go index cf537ef2350c..cac896c8e58f 100644 --- a/pkg/detectors/stormboard/stormboard_integration_test.go +++ b/pkg/detectors/stormboard/stormboard_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestStormboard_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestStormboard_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Stormboard, + DetectorType: detector_typepb.DetectorType_Stormboard, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestStormboard_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Stormboard, + DetectorType: detector_typepb.DetectorType_Stormboard, Verified: false, }, }, diff --git a/pkg/detectors/stormglass/stormglass.go b/pkg/detectors/stormglass/stormglass.go index 420d4be98b6c..bdc7174d8b0e 100644 --- a/pkg/detectors/stormglass/stormglass.go +++ b/pkg/detectors/stormglass/stormglass.go @@ -2,13 +2,14 @@ package stormglass import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -39,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Stormglass, + DetectorType: detector_typepb.DetectorType_Stormglass, Raw: []byte(resMatch), } @@ -64,8 +65,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Stormglass +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Stormglass } func (s Scanner) Description() string { diff --git a/pkg/detectors/stormglass/stormglass_integration_test.go b/pkg/detectors/stormglass/stormglass_integration_test.go index 8bdb9dfb819f..e60e1f9296a5 100644 --- a/pkg/detectors/stormglass/stormglass_integration_test.go +++ b/pkg/detectors/stormglass/stormglass_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestStormglass_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestStormglass_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Stormglass, + DetectorType: detector_typepb.DetectorType_Stormglass, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestStormglass_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Stormglass, + DetectorType: detector_typepb.DetectorType_Stormglass, Verified: false, }, }, diff --git a/pkg/detectors/storyblok/storyblok.go b/pkg/detectors/storyblok/storyblok.go index d589ca279b0a..fc3a07c1d539 100644 --- a/pkg/detectors/storyblok/storyblok.go +++ b/pkg/detectors/storyblok/storyblok.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -31,8 +31,8 @@ func (s Scanner) Keywords() []string { return []string{"storyblok"} } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_StoryblokAccessToken +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_StoryblokAccessToken } func (s Scanner) Description() string { @@ -52,7 +52,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for accessToken := range uniqueAccessTokens { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_StoryblokAccessToken, + DetectorType: detector_typepb.DetectorType_StoryblokAccessToken, Raw: []byte(accessToken), } diff --git a/pkg/detectors/storyblok/storyblok_integration_test.go b/pkg/detectors/storyblok/storyblok_integration_test.go index b639cc04455d..e9f4ccc7537e 100644 --- a/pkg/detectors/storyblok/storyblok_integration_test.go +++ b/pkg/detectors/storyblok/storyblok_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestStoryblok_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestStoryblok_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_StoryblokAccessToken, + DetectorType: detector_typepb.DetectorType_StoryblokAccessToken, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestStoryblok_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_StoryblokAccessToken, + DetectorType: detector_typepb.DetectorType_StoryblokAccessToken, Verified: false, }, }, diff --git a/pkg/detectors/storyblokpersonalaccesstoken/storyblok.go b/pkg/detectors/storyblokpersonalaccesstoken/storyblok.go index 529ee0bd5276..72c9343de0cc 100644 --- a/pkg/detectors/storyblokpersonalaccesstoken/storyblok.go +++ b/pkg/detectors/storyblokpersonalaccesstoken/storyblok.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -31,8 +31,8 @@ func (s Scanner) Keywords() []string { return []string{"storyblok"} } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_StoryblokPersonalAccessToken +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_StoryblokPersonalAccessToken } func (s Scanner) Description() string { @@ -53,7 +53,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for pat := range uniquePATs { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_StoryblokPersonalAccessToken, + DetectorType: detector_typepb.DetectorType_StoryblokPersonalAccessToken, Raw: []byte(pat), } diff --git a/pkg/detectors/storyblokpersonalaccesstoken/storyblok_integration_test.go b/pkg/detectors/storyblokpersonalaccesstoken/storyblok_integration_test.go index f3c5a46a8c2d..4a6546323dfd 100644 --- a/pkg/detectors/storyblokpersonalaccesstoken/storyblok_integration_test.go +++ b/pkg/detectors/storyblokpersonalaccesstoken/storyblok_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestStoryblokPersonalAccessToken_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestStoryblokPersonalAccessToken_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_StoryblokPersonalAccessToken, + DetectorType: detector_typepb.DetectorType_StoryblokPersonalAccessToken, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestStoryblokPersonalAccessToken_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_StoryblokPersonalAccessToken, + DetectorType: detector_typepb.DetectorType_StoryblokPersonalAccessToken, Verified: false, }, }, diff --git a/pkg/detectors/storychief/storychief.go b/pkg/detectors/storychief/storychief.go index 36356fe4ec63..e370dd337d99 100644 --- a/pkg/detectors/storychief/storychief.go +++ b/pkg/detectors/storychief/storychief.go @@ -3,13 +3,14 @@ package storychief import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Storychief, + DetectorType: detector_typepb.DetectorType_Storychief, Raw: []byte(resMatch), } @@ -66,8 +67,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Storychief +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Storychief } func (s Scanner) Description() string { diff --git a/pkg/detectors/storychief/storychief_integration_test.go b/pkg/detectors/storychief/storychief_integration_test.go index dade17d2a6be..2f7e89205019 100644 --- a/pkg/detectors/storychief/storychief_integration_test.go +++ b/pkg/detectors/storychief/storychief_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestStorychief_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestStorychief_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Storychief, + DetectorType: detector_typepb.DetectorType_Storychief, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestStorychief_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Storychief, + DetectorType: detector_typepb.DetectorType_Storychief, Verified: false, }, }, diff --git a/pkg/detectors/strava/strava.go b/pkg/detectors/strava/strava.go index 523291d09be9..c5b54983d9e1 100644 --- a/pkg/detectors/strava/strava.go +++ b/pkg/detectors/strava/strava.go @@ -2,16 +2,17 @@ package strava import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) -type Scanner struct{ +type Scanner struct { detectors.DefaultMultiPartCredentialProvider } @@ -51,7 +52,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resKey := strings.TrimSpace(keyMatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Strava, + DetectorType: detector_typepb.DetectorType_Strava, Raw: []byte(resId), RawV2: []byte(resId + resSecret), } @@ -81,8 +82,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Strava +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Strava } func (s Scanner) Description() string { diff --git a/pkg/detectors/strava/strava_integration_test.go b/pkg/detectors/strava/strava_integration_test.go index 908965540911..096df8912b02 100644 --- a/pkg/detectors/strava/strava_integration_test.go +++ b/pkg/detectors/strava/strava_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestStrava_FromChunk(t *testing.T) { @@ -50,7 +50,7 @@ func TestStrava_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Strava, + DetectorType: detector_typepb.DetectorType_Strava, Verified: true, }, }, @@ -66,7 +66,7 @@ func TestStrava_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Strava, + DetectorType: detector_typepb.DetectorType_Strava, Verified: false, }, }, diff --git a/pkg/detectors/streak/streak.go b/pkg/detectors/streak/streak.go index 67cb5416ac05..5f7f04237c78 100644 --- a/pkg/detectors/streak/streak.go +++ b/pkg/detectors/streak/streak.go @@ -4,13 +4,14 @@ import ( "context" b64 "encoding/base64" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -41,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Streak, + DetectorType: detector_typepb.DetectorType_Streak, Raw: []byte(resMatch), } @@ -68,8 +69,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Streak +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Streak } func (s Scanner) Description() string { diff --git a/pkg/detectors/streak/streak_integration_test.go b/pkg/detectors/streak/streak_integration_test.go index 38c4e7d45ed0..9e8b1f493034 100644 --- a/pkg/detectors/streak/streak_integration_test.go +++ b/pkg/detectors/streak/streak_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestStreak_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestStreak_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Streak, + DetectorType: detector_typepb.DetectorType_Streak, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestStreak_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Streak, + DetectorType: detector_typepb.DetectorType_Streak, Verified: false, }, }, diff --git a/pkg/detectors/stripe/stripe.go b/pkg/detectors/stripe/stripe.go index 79a5e8ac593d..605ca40458b5 100644 --- a/pkg/detectors/stripe/stripe.go +++ b/pkg/detectors/stripe/stripe.go @@ -9,7 +9,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -38,7 +38,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for _, match := range matches { result := detectors.Result{ - DetectorType: detectorspb.DetectorType_Stripe, + DetectorType: detector_typepb.DetectorType_Stripe, Raw: []byte(match), } result.ExtraData = map[string]string{ @@ -75,8 +75,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Stripe +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Stripe } func (s Scanner) Description() string { diff --git a/pkg/detectors/stripe/stripe_integration_test.go b/pkg/detectors/stripe/stripe_integration_test.go index 19bb0836a460..471f8312156c 100644 --- a/pkg/detectors/stripe/stripe_integration_test.go +++ b/pkg/detectors/stripe/stripe_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestStripe_FromChunk(t *testing.T) { @@ -47,7 +47,7 @@ func TestStripe_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Stripe, + DetectorType: detector_typepb.DetectorType_Stripe, Verified: true, ExtraData: map[string]string{ "rotation_guide": "https://howtorotate.com/docs/tutorials/stripe/", @@ -66,7 +66,7 @@ func TestStripe_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Stripe, + DetectorType: detector_typepb.DetectorType_Stripe, Verified: false, ExtraData: map[string]string{ "rotation_guide": "https://howtorotate.com/docs/tutorials/stripe/", diff --git a/pkg/detectors/stripepaymentintent/stripepaymentintent.go b/pkg/detectors/stripepaymentintent/stripepaymentintent.go index fd4da43e0dd7..cbe30ba79f68 100644 --- a/pkg/detectors/stripepaymentintent/stripepaymentintent.go +++ b/pkg/detectors/stripepaymentintent/stripepaymentintent.go @@ -12,7 +12,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -63,7 +63,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) ([]dete for clientSecret := range clientSecrets { for key := range secretKeys { result := detectors.Result{ - DetectorType: detectorspb.DetectorType_StripePaymentIntent, + DetectorType: detector_typepb.DetectorType_StripePaymentIntent, Raw: []byte(clientSecret), RawV2: []byte(clientSecret + key), ExtraData: map[string]string{ @@ -82,7 +82,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) ([]dete for key := range publishableKeys { result := detectors.Result{ - DetectorType: detectorspb.DetectorType_StripePaymentIntent, + DetectorType: detector_typepb.DetectorType_StripePaymentIntent, Raw: []byte(clientSecret), RawV2: []byte(clientSecret + key), ExtraData: map[string]string{ @@ -117,8 +117,8 @@ func extractMatches(pattern *regexp.Regexp, data string) map[string]struct{} { return result } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_StripePaymentIntent +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_StripePaymentIntent } func (s Scanner) Description() string { diff --git a/pkg/detectors/stripepaymentintent/stripepaymentintent_integration_test.go b/pkg/detectors/stripepaymentintent/stripepaymentintent_integration_test.go index ade83e949365..2791aefcb78e 100644 --- a/pkg/detectors/stripepaymentintent/stripepaymentintent_integration_test.go +++ b/pkg/detectors/stripepaymentintent/stripepaymentintent_integration_test.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestStripepaymentintent_FromChunk(t *testing.T) { @@ -96,7 +96,7 @@ func TestStripepaymentintent_FromChunk(t *testing.T) { hasVerified := false for i := range got { // Check that all results have the correct detector type - if got[i].DetectorType != detectorspb.DetectorType_StripePaymentIntent { + if got[i].DetectorType != detector_typepb.DetectorType_StripePaymentIntent { t.Errorf("Stripepaymentintent.FromData() result %d has wrong DetectorType", i) } diff --git a/pkg/detectors/stripo/stripo.go b/pkg/detectors/stripo/stripo.go index 562a45b77e0e..2118ee3caa1b 100644 --- a/pkg/detectors/stripo/stripo.go +++ b/pkg/detectors/stripo/stripo.go @@ -3,13 +3,14 @@ package stripo import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -38,7 +39,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Stripo, + DetectorType: detector_typepb.DetectorType_Stripo, Raw: []byte(resMatch), } @@ -76,8 +77,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Stripo +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Stripo } func (s Scanner) Description() string { diff --git a/pkg/detectors/stripo/stripo_integration_test.go b/pkg/detectors/stripo/stripo_integration_test.go index ae2bb3c72d60..475ec6271ce9 100644 --- a/pkg/detectors/stripo/stripo_integration_test.go +++ b/pkg/detectors/stripo/stripo_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestStripo_FromChunk(t *testing.T) { @@ -50,7 +50,7 @@ func TestStripo_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Stripo, + DetectorType: detector_typepb.DetectorType_Stripo, Verified: true, }, }, @@ -67,7 +67,7 @@ func TestStripo_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Stripo, + DetectorType: detector_typepb.DetectorType_Stripo, Verified: false, }, }, diff --git a/pkg/detectors/stytch/stytch.go b/pkg/detectors/stytch/stytch.go index 3f237091dc4a..478905da5e58 100644 --- a/pkg/detectors/stytch/stytch.go +++ b/pkg/detectors/stytch/stytch.go @@ -2,16 +2,17 @@ package stytch import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) -type Scanner struct{ +type Scanner struct { detectors.DefaultMultiPartCredentialProvider } @@ -45,7 +46,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result userPatMatch := strings.TrimSpace(idMatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Stytch, + DetectorType: detector_typepb.DetectorType_Stytch, Raw: []byte(tokenPatMatch), } @@ -71,8 +72,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Stytch +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Stytch } func (s Scanner) Description() string { diff --git a/pkg/detectors/stytch/stytch_integration_test.go b/pkg/detectors/stytch/stytch_integration_test.go index 6de25ac8a30a..014ed3cb5ed3 100644 --- a/pkg/detectors/stytch/stytch_integration_test.go +++ b/pkg/detectors/stytch/stytch_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestStytch_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestStytch_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Stytch, + DetectorType: detector_typepb.DetectorType_Stytch, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestStytch_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Stytch, + DetectorType: detector_typepb.DetectorType_Stytch, Verified: false, }, }, diff --git a/pkg/detectors/sugester/sugester.go b/pkg/detectors/sugester/sugester.go index eec6e53ba933..a7317d20286c 100644 --- a/pkg/detectors/sugester/sugester.go +++ b/pkg/detectors/sugester/sugester.go @@ -8,7 +8,7 @@ import ( regexp "github.com/wasilibs/go-re2" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -45,7 +45,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for _, domainmatch := range domainMatches { resDomainMatch := strings.TrimSpace(domainmatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Sugester, + DetectorType: detector_typepb.DetectorType_Sugester, Raw: []byte(resMatch), } @@ -71,8 +71,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Sugester +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Sugester } func (s Scanner) Description() string { diff --git a/pkg/detectors/sugester/sugester_integration_test.go b/pkg/detectors/sugester/sugester_integration_test.go index 4b27ef9a3213..3431755fc065 100644 --- a/pkg/detectors/sugester/sugester_integration_test.go +++ b/pkg/detectors/sugester/sugester_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestSugester_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestSugester_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Sugester, + DetectorType: detector_typepb.DetectorType_Sugester, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestSugester_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Sugester, + DetectorType: detector_typepb.DetectorType_Sugester, Verified: false, }, }, diff --git a/pkg/detectors/sumologickey/sumologickey.go b/pkg/detectors/sumologickey/sumologickey.go index dff1768aa34d..b264be97ec5d 100644 --- a/pkg/detectors/sumologickey/sumologickey.go +++ b/pkg/detectors/sumologickey/sumologickey.go @@ -9,7 +9,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" regexp "github.com/wasilibs/go-re2" ) @@ -140,7 +140,7 @@ func verifyMatch(ctx context.Context, client *http.Client, endpoint string, id s func createResult(accessId string, accessKey string, endpoint string, verified bool, err error) *detectors.Result { r := &detectors.Result{ - DetectorType: detectorspb.DetectorType_SumoLogicKey, + DetectorType: detector_typepb.DetectorType_SumoLogicKey, Raw: []byte(accessKey), Verified: verified, ExtraData: map[string]string{ @@ -165,8 +165,8 @@ func createResult(accessId string, accessKey string, endpoint string, verified b return r } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_SumoLogicKey +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_SumoLogicKey } func (s Scanner) Description() string { diff --git a/pkg/detectors/sumologickey/sumologickey_integration_test.go b/pkg/detectors/sumologickey/sumologickey_integration_test.go index 4776f5b49c4d..b4a3c9aca92f 100644 --- a/pkg/detectors/sumologickey/sumologickey_integration_test.go +++ b/pkg/detectors/sumologickey/sumologickey_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestSumoLogicKey_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestSumoLogicKey_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_SumoLogicKey, + DetectorType: detector_typepb.DetectorType_SumoLogicKey, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestSumoLogicKey_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_SumoLogicKey, + DetectorType: detector_typepb.DetectorType_SumoLogicKey, Verified: false, }, }, diff --git a/pkg/detectors/supabasetoken/supabasetoken.go b/pkg/detectors/supabasetoken/supabasetoken.go index d904f4e005c2..0a0710b3204e 100644 --- a/pkg/detectors/supabasetoken/supabasetoken.go +++ b/pkg/detectors/supabasetoken/supabasetoken.go @@ -3,13 +3,14 @@ package supabasetoken import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_SupabaseToken, + DetectorType: detector_typepb.DetectorType_SupabaseToken, Raw: []byte(resMatch), } @@ -65,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_SupabaseToken +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_SupabaseToken } func (s Scanner) Description() string { diff --git a/pkg/detectors/supabasetoken/supabasetoken_integration_test.go b/pkg/detectors/supabasetoken/supabasetoken_integration_test.go index 5c97a18adf71..42696a4bd885 100644 --- a/pkg/detectors/supabasetoken/supabasetoken_integration_test.go +++ b/pkg/detectors/supabasetoken/supabasetoken_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestSupabasetoken_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestSupabasetoken_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_SupabaseToken, + DetectorType: detector_typepb.DetectorType_SupabaseToken, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestSupabasetoken_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_SupabaseToken, + DetectorType: detector_typepb.DetectorType_SupabaseToken, Verified: false, }, }, diff --git a/pkg/detectors/supernotesapi/supernotesapi.go b/pkg/detectors/supernotesapi/supernotesapi.go index f10020095301..3cd89a977e9b 100644 --- a/pkg/detectors/supernotesapi/supernotesapi.go +++ b/pkg/detectors/supernotesapi/supernotesapi.go @@ -9,7 +9,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_SuperNotesAPI, + DetectorType: detector_typepb.DetectorType_SuperNotesAPI, Raw: []byte(resMatch), } @@ -66,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_SuperNotesAPI +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_SuperNotesAPI } func (s Scanner) Description() string { diff --git a/pkg/detectors/supernotesapi/supernotesapi_integration_test.go b/pkg/detectors/supernotesapi/supernotesapi_integration_test.go index cf6a075a195a..044752f7cd90 100644 --- a/pkg/detectors/supernotesapi/supernotesapi_integration_test.go +++ b/pkg/detectors/supernotesapi/supernotesapi_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestSuperNotesAPI_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestSuperNotesAPI_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_SuperNotesAPI, + DetectorType: detector_typepb.DetectorType_SuperNotesAPI, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestSuperNotesAPI_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_SuperNotesAPI, + DetectorType: detector_typepb.DetectorType_SuperNotesAPI, Verified: false, }, }, diff --git a/pkg/detectors/surveyanyplace/surveyanyplace.go b/pkg/detectors/surveyanyplace/surveyanyplace.go index 6f315b5a16b0..1774f8564215 100644 --- a/pkg/detectors/surveyanyplace/surveyanyplace.go +++ b/pkg/detectors/surveyanyplace/surveyanyplace.go @@ -3,16 +3,17 @@ package surveyanyplace import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) -type Scanner struct{ +type Scanner struct { detectors.DefaultMultiPartCredentialProvider } @@ -47,7 +48,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resIdMatch := strings.TrimSpace(idmatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_SurveyAnyplace, + DetectorType: detector_typepb.DetectorType_SurveyAnyplace, Raw: []byte(resMatch), } @@ -81,8 +82,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_SurveyAnyplace +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_SurveyAnyplace } func (s Scanner) Description() string { diff --git a/pkg/detectors/surveyanyplace/surveyanyplace_integration_test.go b/pkg/detectors/surveyanyplace/surveyanyplace_integration_test.go index 6a849f3e8f80..c0ec7658c96d 100644 --- a/pkg/detectors/surveyanyplace/surveyanyplace_integration_test.go +++ b/pkg/detectors/surveyanyplace/surveyanyplace_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestSurveyAnyplace_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestSurveyAnyplace_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_SurveyAnyplace, + DetectorType: detector_typepb.DetectorType_SurveyAnyplace, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestSurveyAnyplace_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_SurveyAnyplace, + DetectorType: detector_typepb.DetectorType_SurveyAnyplace, Verified: false, }, }, diff --git a/pkg/detectors/surveybot/surveybot.go b/pkg/detectors/surveybot/surveybot.go index 27eddefd05d6..ba16c39c514b 100644 --- a/pkg/detectors/surveybot/surveybot.go +++ b/pkg/detectors/surveybot/surveybot.go @@ -3,13 +3,14 @@ package surveybot import ( "context" "encoding/json" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -44,7 +45,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_SurveyBot, + DetectorType: detector_typepb.DetectorType_SurveyBot, Raw: []byte(resMatch), } @@ -77,8 +78,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_SurveyBot +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_SurveyBot } func (s Scanner) Description() string { diff --git a/pkg/detectors/surveybot/surveybot_integration_test.go b/pkg/detectors/surveybot/surveybot_integration_test.go index dd567c2c19b3..a3cd47ffe85d 100644 --- a/pkg/detectors/surveybot/surveybot_integration_test.go +++ b/pkg/detectors/surveybot/surveybot_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestSurveyBot_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestSurveyBot_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_SurveyBot, + DetectorType: detector_typepb.DetectorType_SurveyBot, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestSurveyBot_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_SurveyBot, + DetectorType: detector_typepb.DetectorType_SurveyBot, Verified: false, }, }, diff --git a/pkg/detectors/surveysparrow/surveysparrow.go b/pkg/detectors/surveysparrow/surveysparrow.go index 436e1cefac1a..0e0ee90a29d8 100644 --- a/pkg/detectors/surveysparrow/surveysparrow.go +++ b/pkg/detectors/surveysparrow/surveysparrow.go @@ -3,13 +3,14 @@ package surveysparrow import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_SurveySparrow, + DetectorType: detector_typepb.DetectorType_SurveySparrow, Raw: []byte(resMatch), } @@ -65,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_SurveySparrow +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_SurveySparrow } func (s Scanner) Description() string { diff --git a/pkg/detectors/surveysparrow/surveysparrow_integration_test.go b/pkg/detectors/surveysparrow/surveysparrow_integration_test.go index 607b5a53ff35..4ab3dca75ccb 100644 --- a/pkg/detectors/surveysparrow/surveysparrow_integration_test.go +++ b/pkg/detectors/surveysparrow/surveysparrow_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestSurveySparrow_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestSurveySparrow_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_SurveySparrow, + DetectorType: detector_typepb.DetectorType_SurveySparrow, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestSurveySparrow_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_SurveySparrow, + DetectorType: detector_typepb.DetectorType_SurveySparrow, Verified: false, }, }, diff --git a/pkg/detectors/survicate/survicate.go b/pkg/detectors/survicate/survicate.go index 0dae1e6fc1b3..1335adfc2574 100644 --- a/pkg/detectors/survicate/survicate.go +++ b/pkg/detectors/survicate/survicate.go @@ -3,13 +3,14 @@ package survicate import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Survicate, + DetectorType: detector_typepb.DetectorType_Survicate, Raw: []byte(resMatch), } @@ -65,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Survicate +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Survicate } func (s Scanner) Description() string { diff --git a/pkg/detectors/survicate/survicate_integration_test.go b/pkg/detectors/survicate/survicate_integration_test.go index 61db64034c47..f13930bc7ca4 100644 --- a/pkg/detectors/survicate/survicate_integration_test.go +++ b/pkg/detectors/survicate/survicate_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestSurvicate_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestSurvicate_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Survicate, + DetectorType: detector_typepb.DetectorType_Survicate, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestSurvicate_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Survicate, + DetectorType: detector_typepb.DetectorType_Survicate, Verified: false, }, }, diff --git a/pkg/detectors/swell/swell.go b/pkg/detectors/swell/swell.go index de4147218c03..528fce7dcde0 100644 --- a/pkg/detectors/swell/swell.go +++ b/pkg/detectors/swell/swell.go @@ -2,13 +2,14 @@ package swell import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -47,7 +48,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result userPatMatch := strings.TrimSpace(idMatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Swell, + DetectorType: detector_typepb.DetectorType_Swell, Raw: []byte(tokenPatMatch), } if verify { @@ -71,8 +72,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Swell +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Swell } func (s Scanner) Description() string { diff --git a/pkg/detectors/swell/swell_integration_test.go b/pkg/detectors/swell/swell_integration_test.go index 90edf070291a..342bf923dbc2 100644 --- a/pkg/detectors/swell/swell_integration_test.go +++ b/pkg/detectors/swell/swell_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestSwell_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestSwell_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Swell, + DetectorType: detector_typepb.DetectorType_Swell, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestSwell_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Swell, + DetectorType: detector_typepb.DetectorType_Swell, Verified: false, }, }, diff --git a/pkg/detectors/swiftype/swiftype.go b/pkg/detectors/swiftype/swiftype.go index f3cc5a678aac..9c9a74af2370 100644 --- a/pkg/detectors/swiftype/swiftype.go +++ b/pkg/detectors/swiftype/swiftype.go @@ -2,13 +2,14 @@ package swiftype import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -39,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Swiftype, + DetectorType: detector_typepb.DetectorType_Swiftype, Raw: []byte(resMatch), } @@ -65,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Swiftype +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Swiftype } func (s Scanner) Description() string { diff --git a/pkg/detectors/swiftype/swiftype_integration_test.go b/pkg/detectors/swiftype/swiftype_integration_test.go index bafbcb78a094..29a4f473dcd5 100644 --- a/pkg/detectors/swiftype/swiftype_integration_test.go +++ b/pkg/detectors/swiftype/swiftype_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestSwiftype_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestSwiftype_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Swiftype, + DetectorType: detector_typepb.DetectorType_Swiftype, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestSwiftype_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Swiftype, + DetectorType: detector_typepb.DetectorType_Swiftype, Verified: false, }, }, diff --git a/pkg/detectors/tableau/tableau.go b/pkg/detectors/tableau/tableau.go index 9daf232db567..4bd7feec6c95 100644 --- a/pkg/detectors/tableau/tableau.go +++ b/pkg/detectors/tableau/tableau.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -85,7 +85,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for _, tokenSecret := range tokenSecrets { for endpoint := range uniqueEndpoints { result := detectors.Result{ - DetectorType: detectorspb.DetectorType_TableauPersonalAccessToken, + DetectorType: detector_typepb.DetectorType_TableauPersonalAccessToken, Raw: []byte(tokenName), RawV2: []byte(fmt.Sprintf("%s:%s:%s", tokenName, tokenSecret, endpoint)), ExtraData: make(map[string]string), @@ -257,8 +257,8 @@ func verifyTableauPAT(ctx context.Context, client *http.Client, tokenName, token } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_TableauPersonalAccessToken +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_TableauPersonalAccessToken } func (s Scanner) Description() string { diff --git a/pkg/detectors/tableau/tableau_integration_test.go b/pkg/detectors/tableau/tableau_integration_test.go index 48dd41a0aebf..7f45d4a2b090 100644 --- a/pkg/detectors/tableau/tableau_integration_test.go +++ b/pkg/detectors/tableau/tableau_integration_test.go @@ -15,7 +15,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestTableau_FromChunk(t *testing.T) { @@ -56,7 +56,7 @@ func TestTableau_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_TableauPersonalAccessToken, + DetectorType: detector_typepb.DetectorType_TableauPersonalAccessToken, Verified: true, ExtraData: map[string]string{ "token_name": tokenName, @@ -88,7 +88,7 @@ func TestTableau_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_TableauPersonalAccessToken, + DetectorType: detector_typepb.DetectorType_TableauPersonalAccessToken, Verified: false, ExtraData: map[string]string{ "token_name": tokenName, @@ -115,7 +115,7 @@ func TestTableau_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_TableauPersonalAccessToken, + DetectorType: detector_typepb.DetectorType_TableauPersonalAccessToken, Verified: false, ExtraData: map[string]string{ "token_name": tokenName, @@ -141,7 +141,7 @@ func TestTableau_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_TableauPersonalAccessToken, + DetectorType: detector_typepb.DetectorType_TableauPersonalAccessToken, Verified: false, ExtraData: map[string]string{ "token_name": inactiveTokenName, @@ -249,35 +249,35 @@ func TestTableau_FromChunk_MultipleMixedVerificationResults(t *testing.T) { want := []detectors.Result{ { - DetectorType: detectorspb.DetectorType_TableauPersonalAccessToken, + DetectorType: detector_typepb.DetectorType_TableauPersonalAccessToken, Verified: true, // tokenName + tokenSecret + valid URL }, { - DetectorType: detectorspb.DetectorType_TableauPersonalAccessToken, + DetectorType: detector_typepb.DetectorType_TableauPersonalAccessToken, Verified: false, // tokenName + tokenSecret + invalid URL }, { - DetectorType: detectorspb.DetectorType_TableauPersonalAccessToken, + DetectorType: detector_typepb.DetectorType_TableauPersonalAccessToken, Verified: false, // tokenName + inactiveTokenSecret + valid URL }, { - DetectorType: detectorspb.DetectorType_TableauPersonalAccessToken, + DetectorType: detector_typepb.DetectorType_TableauPersonalAccessToken, Verified: false, // tokenName + inactiveTokenSecret + invalid URL }, { - DetectorType: detectorspb.DetectorType_TableauPersonalAccessToken, + DetectorType: detector_typepb.DetectorType_TableauPersonalAccessToken, Verified: false, // inactiveTokenName + tokenSecret + valid URL }, { - DetectorType: detectorspb.DetectorType_TableauPersonalAccessToken, + DetectorType: detector_typepb.DetectorType_TableauPersonalAccessToken, Verified: false, // inactiveTokenName + tokenSecret + invalid URL }, { - DetectorType: detectorspb.DetectorType_TableauPersonalAccessToken, + DetectorType: detector_typepb.DetectorType_TableauPersonalAccessToken, Verified: false, // inactiveTokenName + inactiveTokenSecret + valid URL }, { - DetectorType: detectorspb.DetectorType_TableauPersonalAccessToken, + DetectorType: detector_typepb.DetectorType_TableauPersonalAccessToken, Verified: false, // inactiveTokenName + inactiveTokenSecret + invalid URL }, } diff --git a/pkg/detectors/tailscale/tailscale.go b/pkg/detectors/tailscale/tailscale.go index 4d40e8c63c84..4434fb80e473 100644 --- a/pkg/detectors/tailscale/tailscale.go +++ b/pkg/detectors/tailscale/tailscale.go @@ -3,14 +3,15 @@ package tailscale import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "net/url" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -41,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[0]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Tailscale, + DetectorType: detector_typepb.DetectorType_Tailscale, Raw: []byte(resMatch), } @@ -76,8 +77,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Tailscale +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Tailscale } func (s Scanner) Description() string { diff --git a/pkg/detectors/tailscale/tailscale_integration_test.go b/pkg/detectors/tailscale/tailscale_integration_test.go index 28ee3ba5d8ad..c47995d2a8a5 100644 --- a/pkg/detectors/tailscale/tailscale_integration_test.go +++ b/pkg/detectors/tailscale/tailscale_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestTailscaleapi_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestTailscaleapi_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Tailscale, + DetectorType: detector_typepb.DetectorType_Tailscale, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestTailscaleapi_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Tailscale, + DetectorType: detector_typepb.DetectorType_Tailscale, Verified: false, }, }, diff --git a/pkg/detectors/tallyfy/tallyfy.go b/pkg/detectors/tallyfy/tallyfy.go index d2e4c687dfdc..288960b4a444 100644 --- a/pkg/detectors/tallyfy/tallyfy.go +++ b/pkg/detectors/tallyfy/tallyfy.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -43,7 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Tallyfy, + DetectorType: detector_typepb.DetectorType_Tallyfy, Raw: []byte(resMatch), } @@ -69,8 +69,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Tallyfy +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Tallyfy } func (s Scanner) Description() string { diff --git a/pkg/detectors/tallyfy/tallyfy_integration_test.go b/pkg/detectors/tallyfy/tallyfy_integration_test.go index 82cdc35d020d..efeee0499d2d 100644 --- a/pkg/detectors/tallyfy/tallyfy_integration_test.go +++ b/pkg/detectors/tallyfy/tallyfy_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestTallyfy_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestTallyfy_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Tallyfy, + DetectorType: detector_typepb.DetectorType_Tallyfy, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestTallyfy_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Tallyfy, + DetectorType: detector_typepb.DetectorType_Tallyfy, Verified: false, }, }, diff --git a/pkg/detectors/tatumio/tatumio.go b/pkg/detectors/tatumio/tatumio.go index 31930b3e6d2f..b1743f75b5fe 100644 --- a/pkg/detectors/tatumio/tatumio.go +++ b/pkg/detectors/tatumio/tatumio.go @@ -2,13 +2,14 @@ package tatumio import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -39,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_TatumIO, + DetectorType: detector_typepb.DetectorType_TatumIO, Raw: []byte(resMatch), } @@ -65,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_TatumIO +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_TatumIO } func (s Scanner) Description() string { diff --git a/pkg/detectors/tatumio/tatumio_integration_test.go b/pkg/detectors/tatumio/tatumio_integration_test.go index 885ed5268f9b..8ba6422fb31a 100644 --- a/pkg/detectors/tatumio/tatumio_integration_test.go +++ b/pkg/detectors/tatumio/tatumio_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestTatumIO_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestTatumIO_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_TatumIO, + DetectorType: detector_typepb.DetectorType_TatumIO, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestTatumIO_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_TatumIO, + DetectorType: detector_typepb.DetectorType_TatumIO, Verified: false, }, }, diff --git a/pkg/detectors/taxjar/taxjar.go b/pkg/detectors/taxjar/taxjar.go index 5dc44105a358..cc6fd2c19030 100644 --- a/pkg/detectors/taxjar/taxjar.go +++ b/pkg/detectors/taxjar/taxjar.go @@ -3,13 +3,14 @@ package taxjar import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Taxjar, + DetectorType: detector_typepb.DetectorType_Taxjar, Raw: []byte(resMatch), } @@ -65,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Taxjar +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Taxjar } func (s Scanner) Description() string { diff --git a/pkg/detectors/taxjar/taxjar_integration_test.go b/pkg/detectors/taxjar/taxjar_integration_test.go index 1eb5ea716137..47f8308eb858 100644 --- a/pkg/detectors/taxjar/taxjar_integration_test.go +++ b/pkg/detectors/taxjar/taxjar_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestTaxjar_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestTaxjar_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Taxjar, + DetectorType: detector_typepb.DetectorType_Taxjar, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestTaxjar_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Taxjar, + DetectorType: detector_typepb.DetectorType_Taxjar, Verified: false, }, }, diff --git a/pkg/detectors/teamgate/teamgate.go b/pkg/detectors/teamgate/teamgate.go index b8793411ef2e..5572b7797ad0 100644 --- a/pkg/detectors/teamgate/teamgate.go +++ b/pkg/detectors/teamgate/teamgate.go @@ -2,13 +2,14 @@ package teamgate import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -46,7 +47,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resKeyMatch := strings.TrimSpace(keyMatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Teamgate, + DetectorType: detector_typepb.DetectorType_Teamgate, Raw: []byte(resMatch), } if verify { @@ -73,8 +74,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Teamgate +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Teamgate } func (s Scanner) Description() string { diff --git a/pkg/detectors/teamgate/teamgate_integration_test.go b/pkg/detectors/teamgate/teamgate_integration_test.go index 8ff2b5e7d61e..054bb65c006d 100644 --- a/pkg/detectors/teamgate/teamgate_integration_test.go +++ b/pkg/detectors/teamgate/teamgate_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestTeamgate_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestTeamgate_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Teamgate, + DetectorType: detector_typepb.DetectorType_Teamgate, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestTeamgate_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Teamgate, + DetectorType: detector_typepb.DetectorType_Teamgate, Verified: false, }, }, diff --git a/pkg/detectors/teamworkcrm/teamworkcrm.go b/pkg/detectors/teamworkcrm/teamworkcrm.go index 9df53b0bf876..e15ec3612630 100644 --- a/pkg/detectors/teamworkcrm/teamworkcrm.go +++ b/pkg/detectors/teamworkcrm/teamworkcrm.go @@ -3,13 +3,14 @@ package teamworkcrm import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_TeamworkCRM, + DetectorType: detector_typepb.DetectorType_TeamworkCRM, Raw: []byte(resMatch), } @@ -65,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_TeamworkCRM +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_TeamworkCRM } func (s Scanner) Description() string { diff --git a/pkg/detectors/teamworkcrm/teamworkcrm_integration_test.go b/pkg/detectors/teamworkcrm/teamworkcrm_integration_test.go index 1c55c09d9324..3c97d20e7ebf 100644 --- a/pkg/detectors/teamworkcrm/teamworkcrm_integration_test.go +++ b/pkg/detectors/teamworkcrm/teamworkcrm_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestTeamworkCRM_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestTeamworkCRM_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_TeamworkCRM, + DetectorType: detector_typepb.DetectorType_TeamworkCRM, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestTeamworkCRM_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_TeamworkCRM, + DetectorType: detector_typepb.DetectorType_TeamworkCRM, Verified: false, }, }, diff --git a/pkg/detectors/teamworkdesk/teamworkdesk.go b/pkg/detectors/teamworkdesk/teamworkdesk.go index cae2900bb7aa..2b539c4530ea 100644 --- a/pkg/detectors/teamworkdesk/teamworkdesk.go +++ b/pkg/detectors/teamworkdesk/teamworkdesk.go @@ -3,13 +3,14 @@ package teamworkdesk import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_TeamworkDesk, + DetectorType: detector_typepb.DetectorType_TeamworkDesk, Raw: []byte(resMatch), } @@ -65,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_TeamworkDesk +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_TeamworkDesk } func (s Scanner) Description() string { diff --git a/pkg/detectors/teamworkdesk/teamworkdesk_integration_test.go b/pkg/detectors/teamworkdesk/teamworkdesk_integration_test.go index bf03fed6fa42..1bde1de9533f 100644 --- a/pkg/detectors/teamworkdesk/teamworkdesk_integration_test.go +++ b/pkg/detectors/teamworkdesk/teamworkdesk_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestTeamworkDesk_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestTeamworkDesk_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_TeamworkDesk, + DetectorType: detector_typepb.DetectorType_TeamworkDesk, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestTeamworkDesk_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_TeamworkDesk, + DetectorType: detector_typepb.DetectorType_TeamworkDesk, Verified: false, }, }, diff --git a/pkg/detectors/teamworkspaces/teamworkspaces.go b/pkg/detectors/teamworkspaces/teamworkspaces.go index d6010582c01f..65204cb2338c 100644 --- a/pkg/detectors/teamworkspaces/teamworkspaces.go +++ b/pkg/detectors/teamworkspaces/teamworkspaces.go @@ -3,13 +3,14 @@ package teamworkspaces import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_TeamworkSpaces, + DetectorType: detector_typepb.DetectorType_TeamworkSpaces, Raw: []byte(resMatch), } @@ -65,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_TeamworkSpaces +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_TeamworkSpaces } func (s Scanner) Description() string { diff --git a/pkg/detectors/teamworkspaces/teamworkspaces_integration_test.go b/pkg/detectors/teamworkspaces/teamworkspaces_integration_test.go index ea693bad9f45..f4468de29d84 100644 --- a/pkg/detectors/teamworkspaces/teamworkspaces_integration_test.go +++ b/pkg/detectors/teamworkspaces/teamworkspaces_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestTeamworkSpaces_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestTeamworkSpaces_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_TeamworkSpaces, + DetectorType: detector_typepb.DetectorType_TeamworkSpaces, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestTeamworkSpaces_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_TeamworkSpaces, + DetectorType: detector_typepb.DetectorType_TeamworkSpaces, Verified: false, }, }, diff --git a/pkg/detectors/technicalanalysisapi/technicalanalysisapi.go b/pkg/detectors/technicalanalysisapi/technicalanalysisapi.go index 5059f9bb64f3..4106b562cb37 100644 --- a/pkg/detectors/technicalanalysisapi/technicalanalysisapi.go +++ b/pkg/detectors/technicalanalysisapi/technicalanalysisapi.go @@ -3,14 +3,15 @@ package technicalanalysisapi import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" "time" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -41,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_TechnicalAnalysisApi, + DetectorType: detector_typepb.DetectorType_TechnicalAnalysisApi, Raw: []byte(resMatch), } @@ -67,8 +68,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_TechnicalAnalysisApi +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_TechnicalAnalysisApi } func (s Scanner) Description() string { diff --git a/pkg/detectors/technicalanalysisapi/technicalanalysisapi_integration_test.go b/pkg/detectors/technicalanalysisapi/technicalanalysisapi_integration_test.go index b3ca4b3cb613..15894aeb211c 100644 --- a/pkg/detectors/technicalanalysisapi/technicalanalysisapi_integration_test.go +++ b/pkg/detectors/technicalanalysisapi/technicalanalysisapi_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestTechnicalAnalysisApi_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestTechnicalAnalysisApi_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_TechnicalAnalysisApi, + DetectorType: detector_typepb.DetectorType_TechnicalAnalysisApi, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestTechnicalAnalysisApi_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_TechnicalAnalysisApi, + DetectorType: detector_typepb.DetectorType_TechnicalAnalysisApi, Verified: false, }, }, diff --git a/pkg/detectors/tefter/tefter.go b/pkg/detectors/tefter/tefter.go index bfbea4e539b2..3f8b11098690 100644 --- a/pkg/detectors/tefter/tefter.go +++ b/pkg/detectors/tefter/tefter.go @@ -3,14 +3,15 @@ package tefter import ( "context" "encoding/json" - regexp "github.com/wasilibs/go-re2" "io" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -41,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Tefter, + DetectorType: detector_typepb.DetectorType_Tefter, Raw: []byte(resMatch), } @@ -73,8 +74,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Tefter +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Tefter } func (s Scanner) Description() string { diff --git a/pkg/detectors/tefter/tefter_integration_test.go b/pkg/detectors/tefter/tefter_integration_test.go index 607e8e421364..a57e9c278d44 100644 --- a/pkg/detectors/tefter/tefter_integration_test.go +++ b/pkg/detectors/tefter/tefter_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestTefter_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestTefter_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Tefter, + DetectorType: detector_typepb.DetectorType_Tefter, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestTefter_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Tefter, + DetectorType: detector_typepb.DetectorType_Tefter, Verified: false, }, }, diff --git a/pkg/detectors/telegrambottoken/telegrambottoken.go b/pkg/detectors/telegrambottoken/telegrambottoken.go index 3f9e2007b294..162ed7c57f86 100644 --- a/pkg/detectors/telegrambottoken/telegrambottoken.go +++ b/pkg/detectors/telegrambottoken/telegrambottoken.go @@ -12,7 +12,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -46,7 +46,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result key := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_TelegramBotToken, + DetectorType: detector_typepb.DetectorType_TelegramBotToken, Raw: []byte(key), } @@ -92,8 +92,8 @@ type userResponse struct { Username string `json:"username"` } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_TelegramBotToken +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_TelegramBotToken } func (s Scanner) Description() string { diff --git a/pkg/detectors/telegrambottoken/telegrambottoken_integration_test.go b/pkg/detectors/telegrambottoken/telegrambottoken_integration_test.go index bd7aab393043..4755ae0f424a 100644 --- a/pkg/detectors/telegrambottoken/telegrambottoken_integration_test.go +++ b/pkg/detectors/telegrambottoken/telegrambottoken_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestTelegramBotToken_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestTelegramBotToken_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_TelegramBotToken, + DetectorType: detector_typepb.DetectorType_TelegramBotToken, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestTelegramBotToken_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_TelegramBotToken, + DetectorType: detector_typepb.DetectorType_TelegramBotToken, Verified: false, }, }, diff --git a/pkg/detectors/teletype/teletype.go b/pkg/detectors/teletype/teletype.go index a939fe8a6dff..9e87e46b13e3 100644 --- a/pkg/detectors/teletype/teletype.go +++ b/pkg/detectors/teletype/teletype.go @@ -2,14 +2,15 @@ package teletype import ( "context" - regexp "github.com/wasilibs/go-re2" "io" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Teletype, + DetectorType: detector_typepb.DetectorType_Teletype, Raw: []byte(resMatch), } @@ -78,8 +79,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Teletype +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Teletype } func (s Scanner) Description() string { diff --git a/pkg/detectors/teletype/teletype_integration_test.go b/pkg/detectors/teletype/teletype_integration_test.go index c36edd0e604e..cfe46cb7e887 100644 --- a/pkg/detectors/teletype/teletype_integration_test.go +++ b/pkg/detectors/teletype/teletype_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestTeletype_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestTeletype_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Teletype, + DetectorType: detector_typepb.DetectorType_Teletype, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestTeletype_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Teletype, + DetectorType: detector_typepb.DetectorType_Teletype, Verified: false, }, }, diff --git a/pkg/detectors/telnyx/telnyx.go b/pkg/detectors/telnyx/telnyx.go index 6d56ee1ee0a6..a7b4ee922b95 100644 --- a/pkg/detectors/telnyx/telnyx.go +++ b/pkg/detectors/telnyx/telnyx.go @@ -3,13 +3,14 @@ package telnyx import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Telnyx, + DetectorType: detector_typepb.DetectorType_Telnyx, Raw: []byte(resMatch), } @@ -66,8 +67,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Telnyx +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Telnyx } func (s Scanner) Description() string { diff --git a/pkg/detectors/telnyx/telnyx_integration_test.go b/pkg/detectors/telnyx/telnyx_integration_test.go index 7eb3a8848482..fbb8bac04276 100644 --- a/pkg/detectors/telnyx/telnyx_integration_test.go +++ b/pkg/detectors/telnyx/telnyx_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestTelnyx_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestTelnyx_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Telnyx, + DetectorType: detector_typepb.DetectorType_Telnyx, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestTelnyx_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Telnyx, + DetectorType: detector_typepb.DetectorType_Telnyx, Verified: false, }, }, diff --git a/pkg/detectors/terraformcloudpersonaltoken/terraformcloudpersonaltoken.go b/pkg/detectors/terraformcloudpersonaltoken/terraformcloudpersonaltoken.go index fe71f1999eda..48ec8d7e525b 100644 --- a/pkg/detectors/terraformcloudpersonaltoken/terraformcloudpersonaltoken.go +++ b/pkg/detectors/terraformcloudpersonaltoken/terraformcloudpersonaltoken.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_TerraformCloudPersonalToken, + DetectorType: detector_typepb.DetectorType_TerraformCloudPersonalToken, Raw: []byte(resMatch), } @@ -65,8 +65,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_TerraformCloudPersonalToken +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_TerraformCloudPersonalToken } func (s Scanner) Description() string { diff --git a/pkg/detectors/terraformcloudpersonaltoken/terraformcloudpersonaltoken_integration_test.go b/pkg/detectors/terraformcloudpersonaltoken/terraformcloudpersonaltoken_integration_test.go index 2d0f54d3bb6d..02a59f8f3828 100644 --- a/pkg/detectors/terraformcloudpersonaltoken/terraformcloudpersonaltoken_integration_test.go +++ b/pkg/detectors/terraformcloudpersonaltoken/terraformcloudpersonaltoken_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestTerraformCloudPersonalToken_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestTerraformCloudPersonalToken_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_TerraformCloudPersonalToken, + DetectorType: detector_typepb.DetectorType_TerraformCloudPersonalToken, Verified: true, }, }, @@ -71,7 +71,7 @@ func TestTerraformCloudPersonalToken_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_TerraformCloudPersonalToken, + DetectorType: detector_typepb.DetectorType_TerraformCloudPersonalToken, Verified: false, }, }, @@ -87,7 +87,7 @@ func TestTerraformCloudPersonalToken_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_TerraformCloudPersonalToken, + DetectorType: detector_typepb.DetectorType_TerraformCloudPersonalToken, Verified: false, }, }, diff --git a/pkg/detectors/testingbot/testingbot.go b/pkg/detectors/testingbot/testingbot.go index e145345d36e8..5539f4bcc031 100644 --- a/pkg/detectors/testingbot/testingbot.go +++ b/pkg/detectors/testingbot/testingbot.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -55,7 +55,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_TestingBot, + DetectorType: detector_typepb.DetectorType_TestingBot, Raw: []byte(key), } @@ -72,8 +72,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_TestingBot +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_TestingBot } func (s Scanner) Description() string { diff --git a/pkg/detectors/testingbot/testingbot_integration_test.go b/pkg/detectors/testingbot/testingbot_integration_test.go index 959a8e411e98..badbe71072bd 100644 --- a/pkg/detectors/testingbot/testingbot_integration_test.go +++ b/pkg/detectors/testingbot/testingbot_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestTestingBot_FromChunk(t *testing.T) { @@ -49,11 +49,11 @@ func TestTestingBot_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_TestingBot, + DetectorType: detector_typepb.DetectorType_TestingBot, Verified: false, }, { - DetectorType: detectorspb.DetectorType_TestingBot, + DetectorType: detector_typepb.DetectorType_TestingBot, Verified: true, }, }, @@ -69,11 +69,11 @@ func TestTestingBot_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_TestingBot, + DetectorType: detector_typepb.DetectorType_TestingBot, Verified: false, }, { - DetectorType: detectorspb.DetectorType_TestingBot, + DetectorType: detector_typepb.DetectorType_TestingBot, Verified: false, }, }, diff --git a/pkg/detectors/textmagic/textmagic.go b/pkg/detectors/textmagic/textmagic.go index d1a4ef054380..1ade5b19974b 100644 --- a/pkg/detectors/textmagic/textmagic.go +++ b/pkg/detectors/textmagic/textmagic.go @@ -4,13 +4,14 @@ import ( "context" b64 "encoding/base64" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -48,7 +49,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resUser := strings.TrimSpace(userMatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Textmagic, + DetectorType: detector_typepb.DetectorType_Textmagic, Raw: []byte(resMatch), RawV2: []byte(resMatch + resUser), } @@ -78,8 +79,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Textmagic +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Textmagic } func (s Scanner) Description() string { diff --git a/pkg/detectors/textmagic/textmagic_integration_test.go b/pkg/detectors/textmagic/textmagic_integration_test.go index 251e20b12f57..1322e9a1c672 100644 --- a/pkg/detectors/textmagic/textmagic_integration_test.go +++ b/pkg/detectors/textmagic/textmagic_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestTextmagic_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestTextmagic_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Textmagic, + DetectorType: detector_typepb.DetectorType_Textmagic, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestTextmagic_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Textmagic, + DetectorType: detector_typepb.DetectorType_Textmagic, Verified: false, }, }, diff --git a/pkg/detectors/theoddsapi/theoddsapi.go b/pkg/detectors/theoddsapi/theoddsapi.go index 4be4baf30fbe..fd872059e03a 100644 --- a/pkg/detectors/theoddsapi/theoddsapi.go +++ b/pkg/detectors/theoddsapi/theoddsapi.go @@ -2,13 +2,14 @@ package theoddsapi import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -39,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_TheOddsApi, + DetectorType: detector_typepb.DetectorType_TheOddsApi, Raw: []byte(resMatch), } @@ -63,8 +64,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_TheOddsApi +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_TheOddsApi } func (s Scanner) Description() string { diff --git a/pkg/detectors/theoddsapi/theoddsapi_integration_test.go b/pkg/detectors/theoddsapi/theoddsapi_integration_test.go index d4a5aead7daf..22f619208d17 100644 --- a/pkg/detectors/theoddsapi/theoddsapi_integration_test.go +++ b/pkg/detectors/theoddsapi/theoddsapi_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestTheOddsApi_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestTheOddsApi_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_TheOddsApi, + DetectorType: detector_typepb.DetectorType_TheOddsApi, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestTheOddsApi_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_TheOddsApi, + DetectorType: detector_typepb.DetectorType_TheOddsApi, Verified: false, }, }, diff --git a/pkg/detectors/thinkific/thinkific.go b/pkg/detectors/thinkific/thinkific.go index 91ddaea61118..d07457d30d5e 100644 --- a/pkg/detectors/thinkific/thinkific.go +++ b/pkg/detectors/thinkific/thinkific.go @@ -10,7 +10,7 @@ import ( regexp "github.com/wasilibs/go-re2" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -46,7 +46,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for _, domainMatch := range domainMatches { resDomainMatch := strings.TrimSpace(domainMatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Thinkific, + DetectorType: detector_typepb.DetectorType_Thinkific, Raw: []byte(resMatch), } @@ -81,8 +81,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Thinkific +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Thinkific } func (s Scanner) Description() string { diff --git a/pkg/detectors/thinkific/thinkific_integration_test.go b/pkg/detectors/thinkific/thinkific_integration_test.go index d9445616c73f..f8fa2672102e 100644 --- a/pkg/detectors/thinkific/thinkific_integration_test.go +++ b/pkg/detectors/thinkific/thinkific_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestThinkific_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestThinkific_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Thinkific, + DetectorType: detector_typepb.DetectorType_Thinkific, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestThinkific_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Thinkific, + DetectorType: detector_typepb.DetectorType_Thinkific, Verified: false, }, }, diff --git a/pkg/detectors/thousandeyes/thousandeyes.go b/pkg/detectors/thousandeyes/thousandeyes.go index 735905b45e95..917053c88551 100644 --- a/pkg/detectors/thousandeyes/thousandeyes.go +++ b/pkg/detectors/thousandeyes/thousandeyes.go @@ -2,16 +2,17 @@ package thousandeyes import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) -type Scanner struct{ +type Scanner struct { detectors.DefaultMultiPartCredentialProvider } @@ -47,7 +48,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result userPatMatch := strings.TrimSpace(emailMatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_ThousandEyes, + DetectorType: detector_typepb.DetectorType_ThousandEyes, Raw: []byte(tokenPatMatch), } @@ -73,8 +74,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_ThousandEyes +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_ThousandEyes } func (s Scanner) Description() string { diff --git a/pkg/detectors/thousandeyes/thousandeyes_integration_test.go b/pkg/detectors/thousandeyes/thousandeyes_integration_test.go index 8a5ea0bead86..9b56426c41e7 100644 --- a/pkg/detectors/thousandeyes/thousandeyes_integration_test.go +++ b/pkg/detectors/thousandeyes/thousandeyes_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestThousandEyes_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestThousandEyes_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ThousandEyes, + DetectorType: detector_typepb.DetectorType_ThousandEyes, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestThousandEyes_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ThousandEyes, + DetectorType: detector_typepb.DetectorType_ThousandEyes, Verified: false, }, }, diff --git a/pkg/detectors/ticketmaster/ticketmaster.go b/pkg/detectors/ticketmaster/ticketmaster.go index 1384ca5c1799..3124c3bbb765 100644 --- a/pkg/detectors/ticketmaster/ticketmaster.go +++ b/pkg/detectors/ticketmaster/ticketmaster.go @@ -3,13 +3,14 @@ package ticketmaster import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_TicketMaster, + DetectorType: detector_typepb.DetectorType_TicketMaster, Raw: []byte(resMatch), } @@ -64,8 +65,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_TicketMaster +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_TicketMaster } func (s Scanner) Description() string { diff --git a/pkg/detectors/ticketmaster/ticketmaster_integration_test.go b/pkg/detectors/ticketmaster/ticketmaster_integration_test.go index 6cdbefb91d97..0db851036905 100644 --- a/pkg/detectors/ticketmaster/ticketmaster_integration_test.go +++ b/pkg/detectors/ticketmaster/ticketmaster_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestTicketMaster_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestTicketMaster_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_TicketMaster, + DetectorType: detector_typepb.DetectorType_TicketMaster, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestTicketMaster_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_TicketMaster, + DetectorType: detector_typepb.DetectorType_TicketMaster, Verified: false, }, }, diff --git a/pkg/detectors/tickettailor/tickettailor.go b/pkg/detectors/tickettailor/tickettailor.go index 587cfe32e8c6..7bad33fa1bba 100644 --- a/pkg/detectors/tickettailor/tickettailor.go +++ b/pkg/detectors/tickettailor/tickettailor.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -43,7 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for key := range uniqueKeyMatches { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Tickettailor, + DetectorType: detector_typepb.DetectorType_Tickettailor, Raw: []byte(key), } @@ -59,8 +59,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Tickettailor +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Tickettailor } func (s Scanner) Description() string { diff --git a/pkg/detectors/tickettailor/tickettailor_integration_test.go b/pkg/detectors/tickettailor/tickettailor_integration_test.go index c391c47d6d0e..d7c2fdbad10f 100644 --- a/pkg/detectors/tickettailor/tickettailor_integration_test.go +++ b/pkg/detectors/tickettailor/tickettailor_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestTickettailor_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestTickettailor_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Tickettailor, + DetectorType: detector_typepb.DetectorType_Tickettailor, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestTickettailor_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Tickettailor, + DetectorType: detector_typepb.DetectorType_Tickettailor, Verified: false, }, }, diff --git a/pkg/detectors/tiingo/tiingo.go b/pkg/detectors/tiingo/tiingo.go index 3b1c00049730..60309eb06c70 100644 --- a/pkg/detectors/tiingo/tiingo.go +++ b/pkg/detectors/tiingo/tiingo.go @@ -3,13 +3,14 @@ package tiingo import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Tiingo, + DetectorType: detector_typepb.DetectorType_Tiingo, Raw: []byte(resMatch), } @@ -66,8 +67,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Tiingo +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Tiingo } func (s Scanner) Description() string { diff --git a/pkg/detectors/tiingo/tiingo_integration_test.go b/pkg/detectors/tiingo/tiingo_integration_test.go index 64e75d3dca19..f8e80a04a775 100644 --- a/pkg/detectors/tiingo/tiingo_integration_test.go +++ b/pkg/detectors/tiingo/tiingo_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestTiingo_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestTiingo_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Tiingo, + DetectorType: detector_typepb.DetectorType_Tiingo, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestTiingo_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Tiingo, + DetectorType: detector_typepb.DetectorType_Tiingo, Verified: false, }, }, diff --git a/pkg/detectors/timecamp/timecamp.go b/pkg/detectors/timecamp/timecamp.go index e5942668f9cc..d74cdf174f07 100644 --- a/pkg/detectors/timecamp/timecamp.go +++ b/pkg/detectors/timecamp/timecamp.go @@ -2,13 +2,14 @@ package timecamp import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -39,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_TimeCamp, + DetectorType: detector_typepb.DetectorType_TimeCamp, Raw: []byte(resMatch), } @@ -65,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_TimeCamp +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_TimeCamp } func (s Scanner) Description() string { diff --git a/pkg/detectors/timecamp/timecamp_integration_test.go b/pkg/detectors/timecamp/timecamp_integration_test.go index d091ae3ec4c8..b20313855c61 100644 --- a/pkg/detectors/timecamp/timecamp_integration_test.go +++ b/pkg/detectors/timecamp/timecamp_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestTimeCamp_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestTimeCamp_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_TimeCamp, + DetectorType: detector_typepb.DetectorType_TimeCamp, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestTimeCamp_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_TimeCamp, + DetectorType: detector_typepb.DetectorType_TimeCamp, Verified: false, }, }, diff --git a/pkg/detectors/timezoneapi/timezoneapi.go b/pkg/detectors/timezoneapi/timezoneapi.go index 617136016720..9b7b89b4f6ca 100644 --- a/pkg/detectors/timezoneapi/timezoneapi.go +++ b/pkg/detectors/timezoneapi/timezoneapi.go @@ -2,13 +2,14 @@ package timezoneapi import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -39,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Timezoneapi, + DetectorType: detector_typepb.DetectorType_Timezoneapi, Raw: []byte(resMatch), } @@ -68,8 +69,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Timezoneapi +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Timezoneapi } func (s Scanner) Description() string { diff --git a/pkg/detectors/timezoneapi/timezoneapi_integration_test.go b/pkg/detectors/timezoneapi/timezoneapi_integration_test.go index 8a3accdd80b0..56b2956d2fc8 100644 --- a/pkg/detectors/timezoneapi/timezoneapi_integration_test.go +++ b/pkg/detectors/timezoneapi/timezoneapi_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestTimezoneapi_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestTimezoneapi_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Timezoneapi, + DetectorType: detector_typepb.DetectorType_Timezoneapi, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestTimezoneapi_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Timezoneapi, + DetectorType: detector_typepb.DetectorType_Timezoneapi, Verified: false, }, }, diff --git a/pkg/detectors/tineswebhook/tineswebhook.go b/pkg/detectors/tineswebhook/tineswebhook.go index 34fc3a989960..839647215618 100644 --- a/pkg/detectors/tineswebhook/tineswebhook.go +++ b/pkg/detectors/tineswebhook/tineswebhook.go @@ -8,7 +8,7 @@ import ( regexp "github.com/wasilibs/go-re2" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -39,7 +39,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_TinesWebhook, + DetectorType: detector_typepb.DetectorType_TinesWebhook, Raw: []byte(resMatch), } @@ -64,8 +64,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_TinesWebhook +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_TinesWebhook } func (s Scanner) Description() string { diff --git a/pkg/detectors/tineswebhook/tineswebhook_integration_test.go b/pkg/detectors/tineswebhook/tineswebhook_integration_test.go index f80b9e7fb626..19f585c77ef6 100644 --- a/pkg/detectors/tineswebhook/tineswebhook_integration_test.go +++ b/pkg/detectors/tineswebhook/tineswebhook_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestTinesWebhook_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestTinesWebhook_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_TinesWebhook, + DetectorType: detector_typepb.DetectorType_TinesWebhook, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestTinesWebhook_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_TinesWebhook, + DetectorType: detector_typepb.DetectorType_TinesWebhook, Verified: false, }, }, diff --git a/pkg/detectors/tly/tly.go b/pkg/detectors/tly/tly.go index 0a31e210c84b..5243dd1a5c11 100644 --- a/pkg/detectors/tly/tly.go +++ b/pkg/detectors/tly/tly.go @@ -2,13 +2,14 @@ package tly import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -39,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_TLy, + DetectorType: detector_typepb.DetectorType_TLy, Raw: []byte(resMatch), } @@ -63,8 +64,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_TLy +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_TLy } func (s Scanner) Description() string { diff --git a/pkg/detectors/tly/tly_integration_test.go b/pkg/detectors/tly/tly_integration_test.go index c151f420dcac..502170071344 100644 --- a/pkg/detectors/tly/tly_integration_test.go +++ b/pkg/detectors/tly/tly_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestTLy_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestTLy_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_TLy, + DetectorType: detector_typepb.DetectorType_TLy, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestTLy_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_TLy, + DetectorType: detector_typepb.DetectorType_TLy, Verified: false, }, }, diff --git a/pkg/detectors/tmetric/tmetric.go b/pkg/detectors/tmetric/tmetric.go index 636d91921389..9330cb7a9f64 100644 --- a/pkg/detectors/tmetric/tmetric.go +++ b/pkg/detectors/tmetric/tmetric.go @@ -3,13 +3,14 @@ package tmetric import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Tmetric, + DetectorType: detector_typepb.DetectorType_Tmetric, Raw: []byte(resMatch), } @@ -65,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Tmetric +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Tmetric } func (s Scanner) Description() string { diff --git a/pkg/detectors/tmetric/tmetric_integration_test.go b/pkg/detectors/tmetric/tmetric_integration_test.go index dfe3154dd306..082b3d6ca23e 100644 --- a/pkg/detectors/tmetric/tmetric_integration_test.go +++ b/pkg/detectors/tmetric/tmetric_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestTmetric_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestTmetric_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Tmetric, + DetectorType: detector_typepb.DetectorType_Tmetric, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestTmetric_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Tmetric, + DetectorType: detector_typepb.DetectorType_Tmetric, Verified: false, }, }, diff --git a/pkg/detectors/todoist/todoist.go b/pkg/detectors/todoist/todoist.go index 06d11228cbe6..aa2ad24a8b4e 100644 --- a/pkg/detectors/todoist/todoist.go +++ b/pkg/detectors/todoist/todoist.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -41,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Todoist, + DetectorType: detector_typepb.DetectorType_Todoist, Raw: []byte(resMatch), } @@ -66,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Todoist +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Todoist } func (s Scanner) Description() string { diff --git a/pkg/detectors/todoist/todoist_integration_test.go b/pkg/detectors/todoist/todoist_integration_test.go index de8f825b06bc..816b0981e743 100644 --- a/pkg/detectors/todoist/todoist_integration_test.go +++ b/pkg/detectors/todoist/todoist_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestTodoist_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestTodoist_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Todoist, + DetectorType: detector_typepb.DetectorType_Todoist, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestTodoist_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Todoist, + DetectorType: detector_typepb.DetectorType_Todoist, Verified: false, }, }, diff --git a/pkg/detectors/toggltrack/toggltrack.go b/pkg/detectors/toggltrack/toggltrack.go index 69960abf6f56..0e6fb8f3a5dc 100644 --- a/pkg/detectors/toggltrack/toggltrack.go +++ b/pkg/detectors/toggltrack/toggltrack.go @@ -4,13 +4,14 @@ import ( "context" b64 "encoding/base64" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -41,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_TogglTrack, + DetectorType: detector_typepb.DetectorType_TogglTrack, Raw: []byte(resMatch), } @@ -69,8 +70,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_TogglTrack +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_TogglTrack } func (s Scanner) Description() string { diff --git a/pkg/detectors/toggltrack/toggltrack_integration_test.go b/pkg/detectors/toggltrack/toggltrack_integration_test.go index 2e21c7ef7e17..ef8bfd5ce663 100644 --- a/pkg/detectors/toggltrack/toggltrack_integration_test.go +++ b/pkg/detectors/toggltrack/toggltrack_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestTogglTrack_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestTogglTrack_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_TogglTrack, + DetectorType: detector_typepb.DetectorType_TogglTrack, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestTogglTrack_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_TogglTrack, + DetectorType: detector_typepb.DetectorType_TogglTrack, Verified: false, }, }, diff --git a/pkg/detectors/tokeet/tokeet.go b/pkg/detectors/tokeet/tokeet.go index e580299dc63e..6134415519e4 100644 --- a/pkg/detectors/tokeet/tokeet.go +++ b/pkg/detectors/tokeet/tokeet.go @@ -3,16 +3,17 @@ package tokeet import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) -type Scanner struct{ +type Scanner struct { detectors.DefaultMultiPartCredentialProvider } @@ -47,7 +48,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resIdMatch := strings.TrimSpace(idmatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Tokeet, + DetectorType: detector_typepb.DetectorType_Tokeet, Raw: []byte(resMatch), } if verify { @@ -74,8 +75,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Tokeet +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Tokeet } func (s Scanner) Description() string { diff --git a/pkg/detectors/tokeet/tokeet_integration_test.go b/pkg/detectors/tokeet/tokeet_integration_test.go index a0f5254c0739..f735d7cb897f 100644 --- a/pkg/detectors/tokeet/tokeet_integration_test.go +++ b/pkg/detectors/tokeet/tokeet_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestTokeet_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestTokeet_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Tokeet, + DetectorType: detector_typepb.DetectorType_Tokeet, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestTokeet_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Tokeet, + DetectorType: detector_typepb.DetectorType_Tokeet, Verified: false, }, }, diff --git a/pkg/detectors/tomorrowio/tomorrowio.go b/pkg/detectors/tomorrowio/tomorrowio.go index 5bc673fe1d61..6cc43daadccd 100644 --- a/pkg/detectors/tomorrowio/tomorrowio.go +++ b/pkg/detectors/tomorrowio/tomorrowio.go @@ -3,13 +3,14 @@ package tomorrowio import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_TomorrowIO, + DetectorType: detector_typepb.DetectorType_TomorrowIO, Raw: []byte(resMatch), } @@ -54,7 +55,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result defer res.Body.Close() if res.StatusCode >= 200 && res.StatusCode < 300 { s1.Verified = true - } + } } } @@ -64,8 +65,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_TomorrowIO +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_TomorrowIO } func (s Scanner) Description() string { diff --git a/pkg/detectors/tomorrowio/tomorrowio_integration_test.go b/pkg/detectors/tomorrowio/tomorrowio_integration_test.go index 4e76e8475daf..ec0535e22eef 100644 --- a/pkg/detectors/tomorrowio/tomorrowio_integration_test.go +++ b/pkg/detectors/tomorrowio/tomorrowio_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestTomorrowIO_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestTomorrowIO_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_TomorrowIO, + DetectorType: detector_typepb.DetectorType_TomorrowIO, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestTomorrowIO_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_TomorrowIO, + DetectorType: detector_typepb.DetectorType_TomorrowIO, Verified: false, }, }, diff --git a/pkg/detectors/tomtom/tomtom.go b/pkg/detectors/tomtom/tomtom.go index f606aa0f8eee..053948fba23d 100644 --- a/pkg/detectors/tomtom/tomtom.go +++ b/pkg/detectors/tomtom/tomtom.go @@ -2,13 +2,14 @@ package tomtom import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -39,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Tomtom, + DetectorType: detector_typepb.DetectorType_Tomtom, Raw: []byte(resMatch), } @@ -63,8 +64,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Tomtom +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Tomtom } func (s Scanner) Description() string { diff --git a/pkg/detectors/tomtom/tomtom_integration_test.go b/pkg/detectors/tomtom/tomtom_integration_test.go index 2a5c854124a2..d4ce4f945319 100644 --- a/pkg/detectors/tomtom/tomtom_integration_test.go +++ b/pkg/detectors/tomtom/tomtom_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestTomtom_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestTomtom_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Tomtom, + DetectorType: detector_typepb.DetectorType_Tomtom, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestTomtom_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Tomtom, + DetectorType: detector_typepb.DetectorType_Tomtom, Verified: false, }, }, diff --git a/pkg/detectors/tradier/tradier.go b/pkg/detectors/tradier/tradier.go index e32f44ba0345..717809a362ce 100644 --- a/pkg/detectors/tradier/tradier.go +++ b/pkg/detectors/tradier/tradier.go @@ -3,13 +3,14 @@ package tradier import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Tradier, + DetectorType: detector_typepb.DetectorType_Tradier, Raw: []byte(resMatch), } @@ -65,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Tradier +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Tradier } func (s Scanner) Description() string { diff --git a/pkg/detectors/tradier/tradier_integration_test.go b/pkg/detectors/tradier/tradier_integration_test.go index 5c5842f7aa57..3e7aa3ad6888 100644 --- a/pkg/detectors/tradier/tradier_integration_test.go +++ b/pkg/detectors/tradier/tradier_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestTradier_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestTradier_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Tradier, + DetectorType: detector_typepb.DetectorType_Tradier, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestTradier_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Tradier, + DetectorType: detector_typepb.DetectorType_Tradier, Verified: false, }, }, diff --git a/pkg/detectors/transferwise/transferwise.go b/pkg/detectors/transferwise/transferwise.go index af36aa3d0dd9..c3c8c91d2b5a 100644 --- a/pkg/detectors/transferwise/transferwise.go +++ b/pkg/detectors/transferwise/transferwise.go @@ -3,13 +3,14 @@ package transferwise import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Transferwise, + DetectorType: detector_typepb.DetectorType_Transferwise, Raw: []byte(resMatch), } @@ -66,8 +67,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Transferwise +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Transferwise } func (s Scanner) Description() string { diff --git a/pkg/detectors/transferwise/transferwise_integration_test.go b/pkg/detectors/transferwise/transferwise_integration_test.go index fd833fae22fa..6036918e9156 100644 --- a/pkg/detectors/transferwise/transferwise_integration_test.go +++ b/pkg/detectors/transferwise/transferwise_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestTransferwise_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestTransferwise_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Transferwise, + DetectorType: detector_typepb.DetectorType_Transferwise, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestTransferwise_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Transferwise, + DetectorType: detector_typepb.DetectorType_Transferwise, Verified: false, }, }, diff --git a/pkg/detectors/travelpayouts/travelpayouts.go b/pkg/detectors/travelpayouts/travelpayouts.go index d335011517af..65a9b281a2e0 100644 --- a/pkg/detectors/travelpayouts/travelpayouts.go +++ b/pkg/detectors/travelpayouts/travelpayouts.go @@ -3,13 +3,14 @@ package travelpayouts import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_TravelPayouts, + DetectorType: detector_typepb.DetectorType_TravelPayouts, Raw: []byte(resMatch), } @@ -64,8 +65,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_TravelPayouts +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_TravelPayouts } func (s Scanner) Description() string { diff --git a/pkg/detectors/travelpayouts/travelpayouts_integration_test.go b/pkg/detectors/travelpayouts/travelpayouts_integration_test.go index 3d057f1986b0..e360215fed7c 100644 --- a/pkg/detectors/travelpayouts/travelpayouts_integration_test.go +++ b/pkg/detectors/travelpayouts/travelpayouts_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestTravelPayouts_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestTravelPayouts_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_TravelPayouts, + DetectorType: detector_typepb.DetectorType_TravelPayouts, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestTravelPayouts_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_TravelPayouts, + DetectorType: detector_typepb.DetectorType_TravelPayouts, Verified: false, }, }, diff --git a/pkg/detectors/travisci/travisci.go b/pkg/detectors/travisci/travisci.go index 56972ea96411..28c95510617e 100644 --- a/pkg/detectors/travisci/travisci.go +++ b/pkg/detectors/travisci/travisci.go @@ -3,13 +3,14 @@ package travisci import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -39,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_TravisCI, + DetectorType: detector_typepb.DetectorType_TravisCI, Raw: []byte(resMatch), } @@ -66,8 +67,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_TravisCI +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_TravisCI } func (s Scanner) Description() string { diff --git a/pkg/detectors/travisci/travisci_integration_test.go b/pkg/detectors/travisci/travisci_integration_test.go index 77e9fc0bd320..61d8a530233b 100644 --- a/pkg/detectors/travisci/travisci_integration_test.go +++ b/pkg/detectors/travisci/travisci_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestTravisCI_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestTravisCI_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_TravisCI, + DetectorType: detector_typepb.DetectorType_TravisCI, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestTravisCI_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_TravisCI, + DetectorType: detector_typepb.DetectorType_TravisCI, Verified: false, }, }, diff --git a/pkg/detectors/trelloapikey/trelloapikey.go b/pkg/detectors/trelloapikey/trelloapikey.go index 0e67c4ada01c..5335e8b65476 100644 --- a/pkg/detectors/trelloapikey/trelloapikey.go +++ b/pkg/detectors/trelloapikey/trelloapikey.go @@ -2,16 +2,17 @@ package trelloapikey import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) -type Scanner struct{ +type Scanner struct { detectors.DefaultMultiPartCredentialProvider } @@ -45,7 +46,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result token := strings.TrimSpace(tokenMatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_TrelloApiKey, + DetectorType: detector_typepb.DetectorType_TrelloApiKey, Redacted: resMatch, Raw: []byte(resMatch), } @@ -73,8 +74,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_TrelloApiKey +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_TrelloApiKey } func (s Scanner) Description() string { diff --git a/pkg/detectors/trelloapikey/trelloapikey_integration_test.go b/pkg/detectors/trelloapikey/trelloapikey_integration_test.go index b2aff40aafd0..09c917da115f 100644 --- a/pkg/detectors/trelloapikey/trelloapikey_integration_test.go +++ b/pkg/detectors/trelloapikey/trelloapikey_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestTrelloApiKey_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestTrelloApiKey_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_TrelloApiKey, + DetectorType: detector_typepb.DetectorType_TrelloApiKey, Redacted: apiKey, Verified: true, }, @@ -66,7 +66,7 @@ func TestTrelloApiKey_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_TrelloApiKey, + DetectorType: detector_typepb.DetectorType_TrelloApiKey, Redacted: "6abe2cb200b2edy1666avq5325476dfp", Verified: false, }, diff --git a/pkg/detectors/tru/tru.go b/pkg/detectors/tru/tru.go index 43ccfcb9edca..5d7436545a0a 100644 --- a/pkg/detectors/tru/tru.go +++ b/pkg/detectors/tru/tru.go @@ -4,16 +4,17 @@ import ( "context" b64 "encoding/base64" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) -type Scanner struct{ +type Scanner struct { detectors.DefaultMultiPartCredentialProvider } @@ -47,7 +48,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resSecret := strings.TrimSpace(secretMatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Tru, + DetectorType: detector_typepb.DetectorType_Tru, Raw: []byte(resMatch), RawV2: []byte(resMatch + resSecret), } @@ -77,8 +78,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Tru +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Tru } func (s Scanner) Description() string { diff --git a/pkg/detectors/tru/tru_integration_test.go b/pkg/detectors/tru/tru_integration_test.go index 17d56acf6bee..05d3a092109d 100644 --- a/pkg/detectors/tru/tru_integration_test.go +++ b/pkg/detectors/tru/tru_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestTru_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestTru_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Tru, + DetectorType: detector_typepb.DetectorType_Tru, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestTru_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Tru, + DetectorType: detector_typepb.DetectorType_Tru, Verified: false, }, }, diff --git a/pkg/detectors/trufflehogenterprise/trufflehogenterprise.go b/pkg/detectors/trufflehogenterprise/trufflehogenterprise.go index ae44d15a262f..25e51dd1f7d2 100644 --- a/pkg/detectors/trufflehogenterprise/trufflehogenterprise.go +++ b/pkg/detectors/trufflehogenterprise/trufflehogenterprise.go @@ -3,13 +3,14 @@ package trufflehogenterprise import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -52,7 +53,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resHostnameMatch := strings.TrimSpace(hostnameMatch[0]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_TrufflehogEnterprise, + DetectorType: detector_typepb.DetectorType_TrufflehogEnterprise, Raw: []byte(resKeyMatch), } @@ -90,8 +91,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_TrufflehogEnterprise +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_TrufflehogEnterprise } func (s Scanner) Description() string { diff --git a/pkg/detectors/trufflehogenterprise/trufflehogenterprise_integration_test.go b/pkg/detectors/trufflehogenterprise/trufflehogenterprise_integration_test.go index 56e10f2b9416..e8deb90ffc82 100644 --- a/pkg/detectors/trufflehogenterprise/trufflehogenterprise_integration_test.go +++ b/pkg/detectors/trufflehogenterprise/trufflehogenterprise_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestTrufflehogenterprise_FromChunk(t *testing.T) { @@ -50,7 +50,7 @@ func TestTrufflehogenterprise_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_TrufflehogEnterprise, + DetectorType: detector_typepb.DetectorType_TrufflehogEnterprise, Verified: true, }, }, @@ -66,7 +66,7 @@ func TestTrufflehogenterprise_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_TrufflehogEnterprise, + DetectorType: detector_typepb.DetectorType_TrufflehogEnterprise, Verified: false, }, }, diff --git a/pkg/detectors/twelvedata/twelvedata.go b/pkg/detectors/twelvedata/twelvedata.go index afc2d50b9a86..5e0227927306 100644 --- a/pkg/detectors/twelvedata/twelvedata.go +++ b/pkg/detectors/twelvedata/twelvedata.go @@ -2,14 +2,15 @@ package twelvedata import ( "context" - regexp "github.com/wasilibs/go-re2" "io" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_TwelveData, + DetectorType: detector_typepb.DetectorType_TwelveData, Raw: []byte(resMatch), } @@ -76,8 +77,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_TwelveData +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_TwelveData } func (s Scanner) Description() string { diff --git a/pkg/detectors/twelvedata/twelvedata_integration_test.go b/pkg/detectors/twelvedata/twelvedata_integration_test.go index f46b777a429d..d810337f89cc 100644 --- a/pkg/detectors/twelvedata/twelvedata_integration_test.go +++ b/pkg/detectors/twelvedata/twelvedata_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestTwelveData_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestTwelveData_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_TwelveData, + DetectorType: detector_typepb.DetectorType_TwelveData, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestTwelveData_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_TwelveData, + DetectorType: detector_typepb.DetectorType_TwelveData, Verified: false, }, }, diff --git a/pkg/detectors/twilio/twilio.go b/pkg/detectors/twilio/twilio.go index ca01b94d2755..fe71ee263b4d 100644 --- a/pkg/detectors/twilio/twilio.go +++ b/pkg/detectors/twilio/twilio.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -62,7 +62,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for _, sid := range sidMatches { for _, key := range keyMatches { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Twilio, + DetectorType: detector_typepb.DetectorType_Twilio, Raw: []byte(sid), RawV2: []byte(sid + key), Redacted: sid, @@ -93,8 +93,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Twilio +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Twilio } func (s Scanner) Description() string { diff --git a/pkg/detectors/twilio/twilio_integration_test.go b/pkg/detectors/twilio/twilio_integration_test.go index 246fd7fcd9fa..5b67087eb914 100644 --- a/pkg/detectors/twilio/twilio_integration_test.go +++ b/pkg/detectors/twilio/twilio_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestTwilio_FromChunk(t *testing.T) { @@ -51,7 +51,7 @@ func TestTwilio_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Twilio, + DetectorType: detector_typepb.DetectorType_Twilio, Verified: true, Redacted: id, RawV2: []byte(id + secret), @@ -74,7 +74,7 @@ func TestTwilio_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Twilio, + DetectorType: detector_typepb.DetectorType_Twilio, Verified: false, Redacted: id, RawV2: []byte(id + secretInactive), @@ -106,7 +106,7 @@ func TestTwilio_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Twilio, + DetectorType: detector_typepb.DetectorType_Twilio, Verified: false, Redacted: id, RawV2: []byte(id + secret), @@ -128,7 +128,7 @@ func TestTwilio_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Twilio, + DetectorType: detector_typepb.DetectorType_Twilio, Verified: false, Redacted: id, RawV2: []byte(id + secret), diff --git a/pkg/detectors/twilioapikey/twilioapikey.go b/pkg/detectors/twilioapikey/twilioapikey.go index 677e4ceb3c8e..6fed5c1b332b 100644 --- a/pkg/detectors/twilioapikey/twilioapikey.go +++ b/pkg/detectors/twilioapikey/twilioapikey.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -60,7 +60,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for _, apiKey := range apiKeyMatches { for _, secret := range secretMatches { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Twilio, + DetectorType: detector_typepb.DetectorType_Twilio, Raw: []byte(apiKey), RawV2: []byte(apiKey + secret), Redacted: secret[:5] + "...", @@ -88,8 +88,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_TwilioApiKey +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_TwilioApiKey } func (s Scanner) Description() string { diff --git a/pkg/detectors/twilioapikey/twilioapikey_integration_test.go b/pkg/detectors/twilioapikey/twilioapikey_integration_test.go index 0f506bd7d958..ec15b84ad606 100644 --- a/pkg/detectors/twilioapikey/twilioapikey_integration_test.go +++ b/pkg/detectors/twilioapikey/twilioapikey_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestTwilioAPIKey_FromChunk(t *testing.T) { @@ -52,7 +52,7 @@ func TestTwilioAPIKey_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Twilio, + DetectorType: detector_typepb.DetectorType_Twilio, Verified: true, Redacted: secret, RawV2: []byte(apiKey + secret), @@ -74,7 +74,7 @@ func TestTwilioAPIKey_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Twilio, + DetectorType: detector_typepb.DetectorType_Twilio, Verified: false, Redacted: secretInactive, RawV2: []byte(apiKey + secretInactive), diff --git a/pkg/detectors/twist/twist.go b/pkg/detectors/twist/twist.go index 819c3eff5c7e..77c105948b1a 100644 --- a/pkg/detectors/twist/twist.go +++ b/pkg/detectors/twist/twist.go @@ -3,13 +3,14 @@ package twist import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -45,7 +46,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Twist, + DetectorType: detector_typepb.DetectorType_Twist, Raw: []byte(resMatch), } @@ -60,7 +61,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result defer res.Body.Close() if res.StatusCode >= 200 && res.StatusCode < 300 { s1.Verified = true - } + } } } results = append(results, s1) @@ -68,8 +69,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Twist +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Twist } func (s Scanner) Description() string { diff --git a/pkg/detectors/twist/twist_integration_test.go b/pkg/detectors/twist/twist_integration_test.go index ff3fc753858d..b9bb649c5926 100644 --- a/pkg/detectors/twist/twist_integration_test.go +++ b/pkg/detectors/twist/twist_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestTwist_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestTwist_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Twist, + DetectorType: detector_typepb.DetectorType_Twist, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestTwist_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Twist, + DetectorType: detector_typepb.DetectorType_Twist, Verified: false, }, }, diff --git a/pkg/detectors/twitch/twitch.go b/pkg/detectors/twitch/twitch.go index e8171befff07..42d61776cf83 100644 --- a/pkg/detectors/twitch/twitch.go +++ b/pkg/detectors/twitch/twitch.go @@ -12,7 +12,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -61,7 +61,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Twitch, + DetectorType: detector_typepb.DetectorType_Twitch, Raw: []byte(id), RawV2: []byte(id + ":" + secret), } @@ -116,8 +116,8 @@ func verifyTwitch(ctx context.Context, client *http.Client, resMatch string, res } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Twitch +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Twitch } func (s Scanner) Description() string { diff --git a/pkg/detectors/twitch/twitch_integration_test.go b/pkg/detectors/twitch/twitch_integration_test.go index ea8b39b712d4..c123a07d32b8 100644 --- a/pkg/detectors/twitch/twitch_integration_test.go +++ b/pkg/detectors/twitch/twitch_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestTwitch_FromChunk(t *testing.T) { @@ -54,11 +54,11 @@ func TestTwitch_FromChunk(t *testing.T) { // but only 1 of them will be verified want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Twitch, + DetectorType: detector_typepb.DetectorType_Twitch, Verified: false, }, { - DetectorType: detectorspb.DetectorType_Twitch, + DetectorType: detector_typepb.DetectorType_Twitch, Verified: true, }, }, @@ -74,11 +74,11 @@ func TestTwitch_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Twitch, + DetectorType: detector_typepb.DetectorType_Twitch, Verified: false, }, { - DetectorType: detectorspb.DetectorType_Twitch, + DetectorType: detector_typepb.DetectorType_Twitch, Verified: false, }, }, @@ -95,11 +95,11 @@ func TestTwitch_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Twitch, + DetectorType: detector_typepb.DetectorType_Twitch, Verified: false, }, { - DetectorType: detectorspb.DetectorType_Twitch, + DetectorType: detector_typepb.DetectorType_Twitch, Verified: false, }, }, @@ -116,11 +116,11 @@ func TestTwitch_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Twitch, + DetectorType: detector_typepb.DetectorType_Twitch, Verified: false, }, { - DetectorType: detectorspb.DetectorType_Twitch, + DetectorType: detector_typepb.DetectorType_Twitch, Verified: false, }, }, diff --git a/pkg/detectors/twitchaccesstoken/twitchaccesstoken.go b/pkg/detectors/twitchaccesstoken/twitchaccesstoken.go index c1e99ee31941..c6b9376451e7 100644 --- a/pkg/detectors/twitchaccesstoken/twitchaccesstoken.go +++ b/pkg/detectors/twitchaccesstoken/twitchaccesstoken.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -43,7 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for match := range uniqueMatches { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_TwitchAccessToken, + DetectorType: detector_typepb.DetectorType_TwitchAccessToken, Raw: []byte(match), } @@ -93,8 +93,8 @@ func verifyMatch(ctx context.Context, client *http.Client, token string) (bool, } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_TwitchAccessToken +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_TwitchAccessToken } func (s Scanner) Description() string { diff --git a/pkg/detectors/twitchaccesstoken/twitchaccesstoken_integration_test.go b/pkg/detectors/twitchaccesstoken/twitchaccesstoken_integration_test.go index 819d6d985b47..84eaaba8bbb3 100644 --- a/pkg/detectors/twitchaccesstoken/twitchaccesstoken_integration_test.go +++ b/pkg/detectors/twitchaccesstoken/twitchaccesstoken_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestTwitchaccesstoken_FromChunk(t *testing.T) { @@ -50,7 +50,7 @@ func TestTwitchaccesstoken_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_TwitchAccessToken, + DetectorType: detector_typepb.DetectorType_TwitchAccessToken, Verified: true, }, }, @@ -67,7 +67,7 @@ func TestTwitchaccesstoken_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_TwitchAccessToken, + DetectorType: detector_typepb.DetectorType_TwitchAccessToken, Verified: false, }, }, @@ -96,7 +96,7 @@ func TestTwitchaccesstoken_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_TwitchAccessToken, + DetectorType: detector_typepb.DetectorType_TwitchAccessToken, Verified: false, }, }, @@ -113,7 +113,7 @@ func TestTwitchaccesstoken_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_TwitchAccessToken, + DetectorType: detector_typepb.DetectorType_TwitchAccessToken, Verified: false, }, }, diff --git a/pkg/detectors/twitter/v1/twitter_v1.go b/pkg/detectors/twitter/v1/twitter_v1.go index ec2d0b595fde..eebca0be04ad 100644 --- a/pkg/detectors/twitter/v1/twitter_v1.go +++ b/pkg/detectors/twitter/v1/twitter_v1.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -51,7 +51,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch = strings.TrimSpace(resMatch) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Twitter, + DetectorType: detector_typepb.DetectorType_Twitter, Raw: []byte(resMatch), ExtraData: map[string]string{ "version": fmt.Sprintf("%d", s.Version()), @@ -74,8 +74,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Twitter +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Twitter } func (s Scanner) Description() string { diff --git a/pkg/detectors/twitter/v1/twitter_v1_integration_test.go b/pkg/detectors/twitter/v1/twitter_v1_integration_test.go index b65178082991..867b703c616d 100644 --- a/pkg/detectors/twitter/v1/twitter_v1_integration_test.go +++ b/pkg/detectors/twitter/v1/twitter_v1_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestTwitter_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestTwitter_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Twitter, + DetectorType: detector_typepb.DetectorType_Twitter, Verified: true, ExtraData: map[string]string{ "version": "1", @@ -67,7 +67,7 @@ func TestTwitter_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Twitter, + DetectorType: detector_typepb.DetectorType_Twitter, Verified: false, ExtraData: map[string]string{ "version": "1", diff --git a/pkg/detectors/twitter/v2/twitter_v2.go b/pkg/detectors/twitter/v2/twitter_v2.go index 63db3e1a825f..61b6f63a2db4 100644 --- a/pkg/detectors/twitter/v2/twitter_v2.go +++ b/pkg/detectors/twitter/v2/twitter_v2.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" v1 "github.com/trufflesecurity/trufflehog/v3/pkg/detectors/twitter/v1" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -52,7 +52,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result match = strings.TrimSpace(match) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Twitter, + DetectorType: detector_typepb.DetectorType_Twitter, Raw: []byte(match), ExtraData: map[string]string{ "version": fmt.Sprintf("%d", s.Version()), @@ -75,8 +75,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Twitter +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Twitter } // Description returns a description for the result being detected diff --git a/pkg/detectors/twitter/v2/twitter_v2_integration_test.go b/pkg/detectors/twitter/v2/twitter_v2_integration_test.go index aac6f391c84f..88520df5e68b 100644 --- a/pkg/detectors/twitter/v2/twitter_v2_integration_test.go +++ b/pkg/detectors/twitter/v2/twitter_v2_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestTwitter_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestTwitter_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Twitter, + DetectorType: detector_typepb.DetectorType_Twitter, Verified: true, ExtraData: map[string]string{ "version": "2", @@ -67,7 +67,7 @@ func TestTwitter_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Twitter, + DetectorType: detector_typepb.DetectorType_Twitter, Verified: false, ExtraData: map[string]string{ "version": "2", diff --git a/pkg/detectors/twitterconsumerkey/twitterconsumerkey.go b/pkg/detectors/twitterconsumerkey/twitterconsumerkey.go index 7f0a43fc75a5..9c673a18d139 100644 --- a/pkg/detectors/twitterconsumerkey/twitterconsumerkey.go +++ b/pkg/detectors/twitterconsumerkey/twitterconsumerkey.go @@ -12,7 +12,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -57,7 +57,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result secret := strings.TrimSpace(secret) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_TwitterConsumerkey, + DetectorType: detector_typepb.DetectorType_TwitterConsumerkey, Raw: []byte(key), RawV2: []byte(key + secret), } @@ -83,8 +83,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_TwitterConsumerkey +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_TwitterConsumerkey } func (s Scanner) Description() string { diff --git a/pkg/detectors/twitterconsumerkey/twitterconsumerkey_integration_test.go b/pkg/detectors/twitterconsumerkey/twitterconsumerkey_integration_test.go index 8ba404b35062..3c9fda3915af 100644 --- a/pkg/detectors/twitterconsumerkey/twitterconsumerkey_integration_test.go +++ b/pkg/detectors/twitterconsumerkey/twitterconsumerkey_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestTwitterConsumerKey_FromChunk(t *testing.T) { @@ -53,7 +53,7 @@ func TestTwitterConsumerKey_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_TwitterConsumerkey, + DetectorType: detector_typepb.DetectorType_TwitterConsumerkey, Verified: true, Raw: []byte(key), RawV2: []byte(key + secret), @@ -72,7 +72,7 @@ func TestTwitterConsumerKey_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_TwitterConsumerkey, + DetectorType: detector_typepb.DetectorType_TwitterConsumerkey, Verified: false, Raw: []byte(inactiveKey), RawV2: []byte(inactiveKey + inactiveSecret), diff --git a/pkg/detectors/tyntec/tyntec.go b/pkg/detectors/tyntec/tyntec.go index e5fff0538675..f5b5019e727a 100644 --- a/pkg/detectors/tyntec/tyntec.go +++ b/pkg/detectors/tyntec/tyntec.go @@ -2,13 +2,14 @@ package tyntec import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -39,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Tyntec, + DetectorType: detector_typepb.DetectorType_Tyntec, Raw: []byte(resMatch), } @@ -64,8 +65,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Tyntec +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Tyntec } func (s Scanner) Description() string { diff --git a/pkg/detectors/tyntec/tyntec_integration_test.go b/pkg/detectors/tyntec/tyntec_integration_test.go index ddb10f9f8cc1..d71cadde4a8a 100644 --- a/pkg/detectors/tyntec/tyntec_integration_test.go +++ b/pkg/detectors/tyntec/tyntec_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestTyntec_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestTyntec_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Tyntec, + DetectorType: detector_typepb.DetectorType_Tyntec, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestTyntec_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Tyntec, + DetectorType: detector_typepb.DetectorType_Tyntec, Verified: false, }, }, diff --git a/pkg/detectors/typeform/v1/typeform.go b/pkg/detectors/typeform/v1/typeform.go index f8a2574b10d3..1ebd5973c235 100644 --- a/pkg/detectors/typeform/v1/typeform.go +++ b/pkg/detectors/typeform/v1/typeform.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -44,7 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Typeform, + DetectorType: detector_typepb.DetectorType_Typeform, Raw: []byte(resMatch), } @@ -60,8 +60,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Typeform +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Typeform } func (s Scanner) Description() string { diff --git a/pkg/detectors/typeform/v1/typeform_integration_test.go b/pkg/detectors/typeform/v1/typeform_integration_test.go index ac5971a37458..c8eb90c4d71a 100644 --- a/pkg/detectors/typeform/v1/typeform_integration_test.go +++ b/pkg/detectors/typeform/v1/typeform_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestTypeform_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestTypeform_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Typeform, + DetectorType: detector_typepb.DetectorType_Typeform, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestTypeform_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Typeform, + DetectorType: detector_typepb.DetectorType_Typeform, Verified: false, }, }, diff --git a/pkg/detectors/typeform/v2/typeform.go b/pkg/detectors/typeform/v2/typeform.go index a540b9eae7e2..e83f73594f48 100644 --- a/pkg/detectors/typeform/v2/typeform.go +++ b/pkg/detectors/typeform/v2/typeform.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -58,7 +58,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for _, match := range matches { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Typeform, + DetectorType: detector_typepb.DetectorType_Typeform, Raw: []byte(match), } @@ -113,8 +113,8 @@ func verifyMatch(ctx context.Context, client *http.Client, secret string) (bool, } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Typeform +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Typeform } func (s Scanner) Description() string { diff --git a/pkg/detectors/typeform/v2/typeform_integration_test.go b/pkg/detectors/typeform/v2/typeform_integration_test.go index b3ca87fad837..227e8da0c475 100644 --- a/pkg/detectors/typeform/v2/typeform_integration_test.go +++ b/pkg/detectors/typeform/v2/typeform_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestTypeform_FromChunk(t *testing.T) { @@ -50,7 +50,7 @@ func TestTypeform_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Typeform, + DetectorType: detector_typepb.DetectorType_Typeform, Verified: true, ExtraData: map[string]string{ "Alias": "TruffleSecurity Detectors", @@ -73,7 +73,7 @@ func TestTypeform_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Typeform, + DetectorType: detector_typepb.DetectorType_Typeform, Verified: false, }, }, diff --git a/pkg/detectors/typetalk/typetalk.go b/pkg/detectors/typetalk/typetalk.go index 850a0f91acd0..1234c9720819 100644 --- a/pkg/detectors/typetalk/typetalk.go +++ b/pkg/detectors/typetalk/typetalk.go @@ -3,16 +3,17 @@ package typetalk import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) -type Scanner struct{ +type Scanner struct { detectors.DefaultMultiPartCredentialProvider } @@ -47,7 +48,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resIdMatch := strings.TrimSpace(idMatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Typetalk, + DetectorType: detector_typepb.DetectorType_Typetalk, Raw: []byte(resMatch), } @@ -72,8 +73,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Typetalk +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Typetalk } func (s Scanner) Description() string { diff --git a/pkg/detectors/typetalk/typetalk_integration_test.go b/pkg/detectors/typetalk/typetalk_integration_test.go index f99d6484c56f..0852cdc3cc48 100644 --- a/pkg/detectors/typetalk/typetalk_integration_test.go +++ b/pkg/detectors/typetalk/typetalk_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestTypetalk_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestTypetalk_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Typetalk, + DetectorType: detector_typepb.DetectorType_Typetalk, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestTypetalk_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Typetalk, + DetectorType: detector_typepb.DetectorType_Typetalk, Verified: false, }, }, diff --git a/pkg/detectors/ubidots/ubidots.go b/pkg/detectors/ubidots/ubidots.go index 94e6a944df38..8c29f148b9fb 100644 --- a/pkg/detectors/ubidots/ubidots.go +++ b/pkg/detectors/ubidots/ubidots.go @@ -2,13 +2,14 @@ package ubidots import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -39,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Ubidots, + DetectorType: detector_typepb.DetectorType_Ubidots, Raw: []byte(resMatch), } @@ -65,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Ubidots +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Ubidots } func (s Scanner) Description() string { diff --git a/pkg/detectors/ubidots/ubidots_integration_test.go b/pkg/detectors/ubidots/ubidots_integration_test.go index 4dd26f2fc9d2..310fcd99d730 100644 --- a/pkg/detectors/ubidots/ubidots_integration_test.go +++ b/pkg/detectors/ubidots/ubidots_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestUbidots_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestUbidots_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Ubidots, + DetectorType: detector_typepb.DetectorType_Ubidots, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestUbidots_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Ubidots, + DetectorType: detector_typepb.DetectorType_Ubidots, Verified: false, }, }, diff --git a/pkg/detectors/uclassify/uclassify.go b/pkg/detectors/uclassify/uclassify.go index d70bdd167428..f30b21d6212e 100644 --- a/pkg/detectors/uclassify/uclassify.go +++ b/pkg/detectors/uclassify/uclassify.go @@ -3,13 +3,14 @@ package uclassify import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Uclassify, + DetectorType: detector_typepb.DetectorType_Uclassify, Raw: []byte(resMatch), } @@ -67,8 +68,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Uclassify +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Uclassify } func (s Scanner) Description() string { diff --git a/pkg/detectors/uclassify/uclassify_integration_test.go b/pkg/detectors/uclassify/uclassify_integration_test.go index f3b4e2a4041d..3883708fe9df 100644 --- a/pkg/detectors/uclassify/uclassify_integration_test.go +++ b/pkg/detectors/uclassify/uclassify_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestUclassify_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestUclassify_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Uclassify, + DetectorType: detector_typepb.DetectorType_Uclassify, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestUclassify_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Uclassify, + DetectorType: detector_typepb.DetectorType_Uclassify, Verified: false, }, }, diff --git a/pkg/detectors/unifyid/unifyid.go b/pkg/detectors/unifyid/unifyid.go index 4a71c3088545..052bdb11feb2 100644 --- a/pkg/detectors/unifyid/unifyid.go +++ b/pkg/detectors/unifyid/unifyid.go @@ -2,14 +2,15 @@ package unifyid import ( "context" - regexp "github.com/wasilibs/go-re2" "io" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_UnifyID, + DetectorType: detector_typepb.DetectorType_UnifyID, Raw: []byte(resMatch), } @@ -72,8 +73,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_UnifyID +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_UnifyID } func (s Scanner) Description() string { diff --git a/pkg/detectors/unifyid/unifyid_integration_test.go b/pkg/detectors/unifyid/unifyid_integration_test.go index 4e59fce1e1b8..57ecafb388d4 100644 --- a/pkg/detectors/unifyid/unifyid_integration_test.go +++ b/pkg/detectors/unifyid/unifyid_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestUnifyid_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestUnifyid_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_UnifyID, + DetectorType: detector_typepb.DetectorType_UnifyID, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestUnifyid_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_UnifyID, + DetectorType: detector_typepb.DetectorType_UnifyID, Verified: false, }, }, diff --git a/pkg/detectors/unplugg/unplugg.go b/pkg/detectors/unplugg/unplugg.go index 39c809efa269..50c2467f5400 100644 --- a/pkg/detectors/unplugg/unplugg.go +++ b/pkg/detectors/unplugg/unplugg.go @@ -2,13 +2,14 @@ package unplugg import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -39,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Unplugg, + DetectorType: detector_typepb.DetectorType_Unplugg, Raw: []byte(resMatch), } @@ -66,8 +67,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Unplugg +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Unplugg } func (s Scanner) Description() string { diff --git a/pkg/detectors/unplugg/unplugg_integration_test.go b/pkg/detectors/unplugg/unplugg_integration_test.go index f021bfa7c9de..2e380b4e332a 100644 --- a/pkg/detectors/unplugg/unplugg_integration_test.go +++ b/pkg/detectors/unplugg/unplugg_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestUnplugg_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestUnplugg_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Unplugg, + DetectorType: detector_typepb.DetectorType_Unplugg, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestUnplugg_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Unplugg, + DetectorType: detector_typepb.DetectorType_Unplugg, Verified: false, }, }, diff --git a/pkg/detectors/unsplash/unsplash.go b/pkg/detectors/unsplash/unsplash.go index c0e9d1826af9..f74348060ff2 100644 --- a/pkg/detectors/unsplash/unsplash.go +++ b/pkg/detectors/unsplash/unsplash.go @@ -2,13 +2,14 @@ package unsplash import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -39,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Unsplash, + DetectorType: detector_typepb.DetectorType_Unsplash, Raw: []byte(resMatch), } @@ -63,8 +64,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Unsplash +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Unsplash } func (s Scanner) Description() string { diff --git a/pkg/detectors/unsplash/unsplash_integration_test.go b/pkg/detectors/unsplash/unsplash_integration_test.go index 20941b87e0a0..5c59c2b702b1 100644 --- a/pkg/detectors/unsplash/unsplash_integration_test.go +++ b/pkg/detectors/unsplash/unsplash_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestUnsplash_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestUnsplash_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Unsplash, + DetectorType: detector_typepb.DetectorType_Unsplash, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestUnsplash_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Unsplash, + DetectorType: detector_typepb.DetectorType_Unsplash, Verified: false, }, }, diff --git a/pkg/detectors/upcdatabase/upcdatabase.go b/pkg/detectors/upcdatabase/upcdatabase.go index 7774ca93befe..e19da04a9fc2 100644 --- a/pkg/detectors/upcdatabase/upcdatabase.go +++ b/pkg/detectors/upcdatabase/upcdatabase.go @@ -3,14 +3,15 @@ package upcdatabase import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "io" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -41,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_UPCDatabase, + DetectorType: detector_typepb.DetectorType_UPCDatabase, Raw: []byte(resMatch), } @@ -74,8 +75,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_UPCDatabase +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_UPCDatabase } func (s Scanner) Description() string { diff --git a/pkg/detectors/upcdatabase/upcdatabase_integration_test.go b/pkg/detectors/upcdatabase/upcdatabase_integration_test.go index 1bf3e3a28f16..a26d2b158b08 100644 --- a/pkg/detectors/upcdatabase/upcdatabase_integration_test.go +++ b/pkg/detectors/upcdatabase/upcdatabase_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestUPCDatabase_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestUPCDatabase_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_UPCDatabase, + DetectorType: detector_typepb.DetectorType_UPCDatabase, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestUPCDatabase_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_UPCDatabase, + DetectorType: detector_typepb.DetectorType_UPCDatabase, Verified: false, }, }, diff --git a/pkg/detectors/uplead/uplead.go b/pkg/detectors/uplead/uplead.go index 1a141fc8ec1a..a6f7dd4527a4 100644 --- a/pkg/detectors/uplead/uplead.go +++ b/pkg/detectors/uplead/uplead.go @@ -2,13 +2,14 @@ package uplead import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -39,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Uplead, + DetectorType: detector_typepb.DetectorType_Uplead, Raw: []byte(resMatch), } @@ -64,8 +65,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Uplead +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Uplead } func (s Scanner) Description() string { diff --git a/pkg/detectors/uplead/uplead_integration_test.go b/pkg/detectors/uplead/uplead_integration_test.go index 6268796550b7..f675e98cb26e 100644 --- a/pkg/detectors/uplead/uplead_integration_test.go +++ b/pkg/detectors/uplead/uplead_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestUplead_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestUplead_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Uplead, + DetectorType: detector_typepb.DetectorType_Uplead, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestUplead_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Uplead, + DetectorType: detector_typepb.DetectorType_Uplead, Verified: false, }, }, diff --git a/pkg/detectors/uploadcare/uploadcare.go b/pkg/detectors/uploadcare/uploadcare.go index df0c30f37758..4ca63c400e43 100644 --- a/pkg/detectors/uploadcare/uploadcare.go +++ b/pkg/detectors/uploadcare/uploadcare.go @@ -3,16 +3,17 @@ package uploadcare import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) -type Scanner struct{ +type Scanner struct { detectors.DefaultMultiPartCredentialProvider } @@ -46,7 +47,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for _, publicMatch := range publicMatches { publicKeyMatch := strings.TrimSpace(publicMatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_UploadCare, + DetectorType: detector_typepb.DetectorType_UploadCare, Raw: []byte(resMatch), } @@ -73,8 +74,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_UploadCare +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_UploadCare } func (s Scanner) Description() string { diff --git a/pkg/detectors/uploadcare/uploadcare_integration_test.go b/pkg/detectors/uploadcare/uploadcare_integration_test.go index 25e46a061216..35dfe6456eec 100644 --- a/pkg/detectors/uploadcare/uploadcare_integration_test.go +++ b/pkg/detectors/uploadcare/uploadcare_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestUploadCare_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestUploadCare_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_UploadCare, + DetectorType: detector_typepb.DetectorType_UploadCare, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestUploadCare_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_UploadCare, + DetectorType: detector_typepb.DetectorType_UploadCare, Verified: false, }, }, diff --git a/pkg/detectors/uptimerobot/uptimerobot.go b/pkg/detectors/uptimerobot/uptimerobot.go index d6aeb11136af..a959ac9bb43a 100644 --- a/pkg/detectors/uptimerobot/uptimerobot.go +++ b/pkg/detectors/uptimerobot/uptimerobot.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -41,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_UptimeRobot, + DetectorType: detector_typepb.DetectorType_UptimeRobot, Raw: []byte(resMatch), } @@ -75,8 +75,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_UptimeRobot +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_UptimeRobot } func (s Scanner) Description() string { diff --git a/pkg/detectors/uptimerobot/uptimerobot_integration_test.go b/pkg/detectors/uptimerobot/uptimerobot_integration_test.go index 7e6637138151..c2fbe809f637 100644 --- a/pkg/detectors/uptimerobot/uptimerobot_integration_test.go +++ b/pkg/detectors/uptimerobot/uptimerobot_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestUptimeRobot_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestUptimeRobot_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_UptimeRobot, + DetectorType: detector_typepb.DetectorType_UptimeRobot, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestUptimeRobot_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_UptimeRobot, + DetectorType: detector_typepb.DetectorType_UptimeRobot, Verified: false, }, }, diff --git a/pkg/detectors/upwave/upwave.go b/pkg/detectors/upwave/upwave.go index c6f0b66d6476..362c199cd8c4 100644 --- a/pkg/detectors/upwave/upwave.go +++ b/pkg/detectors/upwave/upwave.go @@ -3,13 +3,14 @@ package upwave import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Upwave, + DetectorType: detector_typepb.DetectorType_Upwave, Raw: []byte(resMatch), } @@ -56,7 +57,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result defer res.Body.Close() if res.StatusCode >= 200 && res.StatusCode < 300 { s1.Verified = true - } + } } } @@ -66,8 +67,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Upwave +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Upwave } func (s Scanner) Description() string { diff --git a/pkg/detectors/upwave/upwave_integration_test.go b/pkg/detectors/upwave/upwave_integration_test.go index 15371ebe1789..7707722dd499 100644 --- a/pkg/detectors/upwave/upwave_integration_test.go +++ b/pkg/detectors/upwave/upwave_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestUpwave_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestUpwave_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Upwave, + DetectorType: detector_typepb.DetectorType_Upwave, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestUpwave_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Upwave, + DetectorType: detector_typepb.DetectorType_Upwave, Verified: false, }, }, diff --git a/pkg/detectors/uri/uri.go b/pkg/detectors/uri/uri.go index a140c58a09e4..8a357cbd3597 100644 --- a/pkg/detectors/uri/uri.go +++ b/pkg/detectors/uri/uri.go @@ -15,7 +15,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/cache/simple" logContext "github.com/trufflesecurity/trufflehog/v3/pkg/context" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -44,8 +44,8 @@ func (s Scanner) Keywords() []string { return []string{"http://", "https://"} } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_URI +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_URI } func (s Scanner) Description() string { @@ -98,7 +98,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result rawUrlWithoutPath := rawUrl.String() r := detectors.Result{ - DetectorType: detectorspb.DetectorType_URI, + DetectorType: detector_typepb.DetectorType_URI, Raw: []byte(rawUrlWithoutPath), RawV2: []byte(rawUrlWithPath), Redacted: detectors.RedactURL(*parsedURL), diff --git a/pkg/detectors/uri/uri_integration_test.go b/pkg/detectors/uri/uri_integration_test.go index 567c97979b5d..dc00a5c1946b 100644 --- a/pkg/detectors/uri/uri_integration_test.go +++ b/pkg/detectors/uri/uri_integration_test.go @@ -12,7 +12,7 @@ import ( "github.com/kylelemons/godebug/pretty" "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestURI_FromChunk(t *testing.T) { @@ -39,7 +39,7 @@ func TestURI_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_URI, + DetectorType: detector_typepb.DetectorType_URI, Verified: false, Redacted: "https://user:********@httpwatch.com", }, @@ -56,7 +56,7 @@ func TestURI_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_URI, + DetectorType: detector_typepb.DetectorType_URI, Verified: true, Redacted: "https://httpwatch:********@www.httpwatch.com", }, @@ -73,7 +73,7 @@ func TestURI_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_URI, + DetectorType: detector_typepb.DetectorType_URI, Verified: true, Redacted: "https://httpwatch:********@www.httpwatch.com", }, @@ -90,7 +90,7 @@ func TestURI_FromChunk(t *testing.T) { }, want: func() []detectors.Result { r := detectors.Result{ - DetectorType: detectorspb.DetectorType_URI, + DetectorType: detector_typepb.DetectorType_URI, Verified: false, Redacted: "https://httpwatch:********@www.httpwatch.com", } diff --git a/pkg/detectors/urlscan/urlscan.go b/pkg/detectors/urlscan/urlscan.go index 0f66546ffd12..b6700f9b591f 100644 --- a/pkg/detectors/urlscan/urlscan.go +++ b/pkg/detectors/urlscan/urlscan.go @@ -2,13 +2,14 @@ package urlscan import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -39,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Urlscan, + DetectorType: detector_typepb.DetectorType_Urlscan, Raw: []byte(resMatch), } @@ -64,8 +65,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Urlscan +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Urlscan } func (s Scanner) Description() string { diff --git a/pkg/detectors/urlscan/urlscan_integration_test.go b/pkg/detectors/urlscan/urlscan_integration_test.go index 7008388c7fd1..d47ec822def2 100644 --- a/pkg/detectors/urlscan/urlscan_integration_test.go +++ b/pkg/detectors/urlscan/urlscan_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestUrlscan_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestUrlscan_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Urlscan, + DetectorType: detector_typepb.DetectorType_Urlscan, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestUrlscan_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Urlscan, + DetectorType: detector_typepb.DetectorType_Urlscan, Verified: false, }, }, diff --git a/pkg/detectors/user/user.go b/pkg/detectors/user/user.go index aea72d3e0c7b..0e6a17099d19 100644 --- a/pkg/detectors/user/user.go +++ b/pkg/detectors/user/user.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -41,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_User, + DetectorType: detector_typepb.DetectorType_User, Raw: []byte(resMatch), } @@ -66,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_User +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_User } func (s Scanner) Description() string { diff --git a/pkg/detectors/user/user_integration_test.go b/pkg/detectors/user/user_integration_test.go index 970e0877e235..b48a6ba4a880 100644 --- a/pkg/detectors/user/user_integration_test.go +++ b/pkg/detectors/user/user_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestUser_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestUser_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_User, + DetectorType: detector_typepb.DetectorType_User, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestUser_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_User, + DetectorType: detector_typepb.DetectorType_User, Verified: false, }, }, diff --git a/pkg/detectors/userflow/userflow.go b/pkg/detectors/userflow/userflow.go index 7cf64e3de8c4..3d258a95d3b8 100644 --- a/pkg/detectors/userflow/userflow.go +++ b/pkg/detectors/userflow/userflow.go @@ -3,13 +3,14 @@ package userflow import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Userflow, + DetectorType: detector_typepb.DetectorType_Userflow, Raw: []byte(resMatch), } @@ -66,8 +67,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Userflow +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Userflow } func (s Scanner) Description() string { diff --git a/pkg/detectors/userflow/userflow_integration_test.go b/pkg/detectors/userflow/userflow_integration_test.go index 6321e454bf58..7f6f355a4f38 100644 --- a/pkg/detectors/userflow/userflow_integration_test.go +++ b/pkg/detectors/userflow/userflow_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestUserflow_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestUserflow_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Userflow, + DetectorType: detector_typepb.DetectorType_Userflow, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestUserflow_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Userflow, + DetectorType: detector_typepb.DetectorType_Userflow, Verified: false, }, }, diff --git a/pkg/detectors/userstack/userstack.go b/pkg/detectors/userstack/userstack.go index 864445c01a71..52aa48e8409e 100644 --- a/pkg/detectors/userstack/userstack.go +++ b/pkg/detectors/userstack/userstack.go @@ -3,14 +3,15 @@ package userstack import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "io" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -41,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_UserStack, + DetectorType: detector_typepb.DetectorType_UserStack, Raw: []byte(resMatch), } @@ -72,8 +73,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_UserStack +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_UserStack } func (s Scanner) Description() string { diff --git a/pkg/detectors/userstack/userstack_integration_test.go b/pkg/detectors/userstack/userstack_integration_test.go index d436c0ddf949..094e0d842f91 100644 --- a/pkg/detectors/userstack/userstack_integration_test.go +++ b/pkg/detectors/userstack/userstack_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestUserStack_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestUserStack_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_UserStack, + DetectorType: detector_typepb.DetectorType_UserStack, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestUserStack_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_UserStack, + DetectorType: detector_typepb.DetectorType_UserStack, Verified: false, }, }, diff --git a/pkg/detectors/vagrantcloudpersonaltoken/vagrantcloudpersonaltoken.go b/pkg/detectors/vagrantcloudpersonaltoken/vagrantcloudpersonaltoken.go index 37bd5107b4e9..2fcff4dd9db2 100644 --- a/pkg/detectors/vagrantcloudpersonaltoken/vagrantcloudpersonaltoken.go +++ b/pkg/detectors/vagrantcloudpersonaltoken/vagrantcloudpersonaltoken.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -42,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_VagrantCloudPersonalToken, + DetectorType: detector_typepb.DetectorType_VagrantCloudPersonalToken, Raw: []byte(resMatch), } @@ -79,8 +79,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_VagrantCloudPersonalToken +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_VagrantCloudPersonalToken } func (s Scanner) Description() string { diff --git a/pkg/detectors/vagrantcloudpersonaltoken/vagrantcloudpersonaltoken_integration_test.go b/pkg/detectors/vagrantcloudpersonaltoken/vagrantcloudpersonaltoken_integration_test.go index 6ecbafaebea4..f3da3eeafd02 100644 --- a/pkg/detectors/vagrantcloudpersonaltoken/vagrantcloudpersonaltoken_integration_test.go +++ b/pkg/detectors/vagrantcloudpersonaltoken/vagrantcloudpersonaltoken_integration_test.go @@ -15,7 +15,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestVagrantcloudpersonaltoken_FromChunk(t *testing.T) { @@ -51,7 +51,7 @@ func TestVagrantcloudpersonaltoken_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_VagrantCloudPersonalToken, + DetectorType: detector_typepb.DetectorType_VagrantCloudPersonalToken, Verified: true, }, }, @@ -68,7 +68,7 @@ func TestVagrantcloudpersonaltoken_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_VagrantCloudPersonalToken, + DetectorType: detector_typepb.DetectorType_VagrantCloudPersonalToken, Verified: false, }, }, diff --git a/pkg/detectors/vatlayer/vatlayer.go b/pkg/detectors/vatlayer/vatlayer.go index deca19f33e8a..0dca2d21dcb0 100644 --- a/pkg/detectors/vatlayer/vatlayer.go +++ b/pkg/detectors/vatlayer/vatlayer.go @@ -3,14 +3,15 @@ package vatlayer import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "io" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -41,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_VatLayer, + DetectorType: detector_typepb.DetectorType_VatLayer, Raw: []byte(resMatch), } @@ -74,8 +75,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_VatLayer +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_VatLayer } func (s Scanner) Description() string { diff --git a/pkg/detectors/vatlayer/vatlayer_integration_test.go b/pkg/detectors/vatlayer/vatlayer_integration_test.go index 57ac61124fe3..01eb1cdbe069 100644 --- a/pkg/detectors/vatlayer/vatlayer_integration_test.go +++ b/pkg/detectors/vatlayer/vatlayer_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestVatLayer_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestVatLayer_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_VatLayer, + DetectorType: detector_typepb.DetectorType_VatLayer, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestVatLayer_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_VatLayer, + DetectorType: detector_typepb.DetectorType_VatLayer, Verified: false, }, }, diff --git a/pkg/detectors/vbout/vbout.go b/pkg/detectors/vbout/vbout.go index d5dfbb15604e..7f70ee286938 100644 --- a/pkg/detectors/vbout/vbout.go +++ b/pkg/detectors/vbout/vbout.go @@ -3,13 +3,14 @@ package vbout import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Vbout, + DetectorType: detector_typepb.DetectorType_Vbout, Raw: []byte(resMatch), } @@ -54,7 +55,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result defer res.Body.Close() if res.StatusCode >= 200 && res.StatusCode < 300 { s1.Verified = true - } + } } } @@ -64,8 +65,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Vbout +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Vbout } func (s Scanner) Description() string { diff --git a/pkg/detectors/vbout/vbout_integration_test.go b/pkg/detectors/vbout/vbout_integration_test.go index c8eaa6575b46..3800ec8033e7 100644 --- a/pkg/detectors/vbout/vbout_integration_test.go +++ b/pkg/detectors/vbout/vbout_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestVbout_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestVbout_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Vbout, + DetectorType: detector_typepb.DetectorType_Vbout, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestVbout_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Vbout, + DetectorType: detector_typepb.DetectorType_Vbout, Verified: false, }, }, diff --git a/pkg/detectors/vercel/vercel.go b/pkg/detectors/vercel/vercel.go index f2eb960fa0d7..52a797b06356 100644 --- a/pkg/detectors/vercel/vercel.go +++ b/pkg/detectors/vercel/vercel.go @@ -3,13 +3,14 @@ package vercel import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Vercel, + DetectorType: detector_typepb.DetectorType_Vercel, Raw: []byte(resMatch), } @@ -65,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Vercel +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Vercel } func (s Scanner) Description() string { diff --git a/pkg/detectors/vercel/vercel_integration_test.go b/pkg/detectors/vercel/vercel_integration_test.go index d9726d83fecf..148fddae0062 100644 --- a/pkg/detectors/vercel/vercel_integration_test.go +++ b/pkg/detectors/vercel/vercel_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestVercel_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestVercel_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Vercel, + DetectorType: detector_typepb.DetectorType_Vercel, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestVercel_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Vercel, + DetectorType: detector_typepb.DetectorType_Vercel, Verified: false, }, }, diff --git a/pkg/detectors/verifier/verifier.go b/pkg/detectors/verifier/verifier.go index ac8dbccad329..606460518515 100644 --- a/pkg/detectors/verifier/verifier.go +++ b/pkg/detectors/verifier/verifier.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -50,7 +50,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for emailMatch := range uniqueEmailMatches { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Verifier, + DetectorType: detector_typepb.DetectorType_Verifier, Raw: []byte(resMatch), } if verify { @@ -73,8 +73,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Verifier +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Verifier } func (s Scanner) Description() string { diff --git a/pkg/detectors/verifier/verifier_integration_test.go b/pkg/detectors/verifier/verifier_integration_test.go index d6e55a1861e3..c70c97eaee92 100644 --- a/pkg/detectors/verifier/verifier_integration_test.go +++ b/pkg/detectors/verifier/verifier_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestVerifier_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestVerifier_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Verifier, + DetectorType: detector_typepb.DetectorType_Verifier, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestVerifier_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Verifier, + DetectorType: detector_typepb.DetectorType_Verifier, Verified: false, }, }, diff --git a/pkg/detectors/verimail/verimail.go b/pkg/detectors/verimail/verimail.go index 45268496e2e4..4c41707883b9 100644 --- a/pkg/detectors/verimail/verimail.go +++ b/pkg/detectors/verimail/verimail.go @@ -9,7 +9,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Verimail, + DetectorType: detector_typepb.DetectorType_Verimail, Raw: []byte(resMatch), } @@ -64,8 +64,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Verimail +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Verimail } func (s Scanner) Description() string { diff --git a/pkg/detectors/verimail/verimail_integration_test.go b/pkg/detectors/verimail/verimail_integration_test.go index 87165a4c00f4..159cde00be8f 100644 --- a/pkg/detectors/verimail/verimail_integration_test.go +++ b/pkg/detectors/verimail/verimail_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestVerimail_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestVerimail_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Verimail, + DetectorType: detector_typepb.DetectorType_Verimail, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestVerimail_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Verimail, + DetectorType: detector_typepb.DetectorType_Verimail, Verified: false, }, }, diff --git a/pkg/detectors/veriphone/veriphone.go b/pkg/detectors/veriphone/veriphone.go index 03070558212e..511b2df2b809 100644 --- a/pkg/detectors/veriphone/veriphone.go +++ b/pkg/detectors/veriphone/veriphone.go @@ -9,7 +9,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Veriphone, + DetectorType: detector_typepb.DetectorType_Veriphone, Raw: []byte(resMatch), } @@ -64,8 +64,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Veriphone +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Veriphone } func (s Scanner) Description() string { diff --git a/pkg/detectors/veriphone/veriphone_integration_test.go b/pkg/detectors/veriphone/veriphone_integration_test.go index af712d5db67d..e477ec48826c 100644 --- a/pkg/detectors/veriphone/veriphone_integration_test.go +++ b/pkg/detectors/veriphone/veriphone_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestVeriphone_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestVeriphone_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Veriphone, + DetectorType: detector_typepb.DetectorType_Veriphone, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestVeriphone_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Veriphone, + DetectorType: detector_typepb.DetectorType_Veriphone, Verified: false, }, }, diff --git a/pkg/detectors/versioneye/versioneye.go b/pkg/detectors/versioneye/versioneye.go index 642a689c4d2f..d302b24444d1 100644 --- a/pkg/detectors/versioneye/versioneye.go +++ b/pkg/detectors/versioneye/versioneye.go @@ -2,13 +2,14 @@ package versioneye import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -39,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_VersionEye, + DetectorType: detector_typepb.DetectorType_VersionEye, Raw: []byte(resMatch), } @@ -64,8 +65,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_VersionEye +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_VersionEye } func (s Scanner) Description() string { diff --git a/pkg/detectors/versioneye/versioneye_integration_test.go b/pkg/detectors/versioneye/versioneye_integration_test.go index 336405d4206e..2086f7ba7580 100644 --- a/pkg/detectors/versioneye/versioneye_integration_test.go +++ b/pkg/detectors/versioneye/versioneye_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestVersionEye_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestVersionEye_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_VersionEye, + DetectorType: detector_typepb.DetectorType_VersionEye, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestVersionEye_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_VersionEye, + DetectorType: detector_typepb.DetectorType_VersionEye, Verified: false, }, }, diff --git a/pkg/detectors/viewneo/viewneo.go b/pkg/detectors/viewneo/viewneo.go index 710a4d9b53f2..a2417fdd5b5c 100644 --- a/pkg/detectors/viewneo/viewneo.go +++ b/pkg/detectors/viewneo/viewneo.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -45,7 +45,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Viewneo, + DetectorType: detector_typepb.DetectorType_Viewneo, Raw: []byte(resMatch), } @@ -71,8 +71,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Viewneo +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Viewneo } func (s Scanner) Description() string { diff --git a/pkg/detectors/viewneo/viewneo_integration_test.go b/pkg/detectors/viewneo/viewneo_integration_test.go index ff6c82645570..d930292e9689 100644 --- a/pkg/detectors/viewneo/viewneo_integration_test.go +++ b/pkg/detectors/viewneo/viewneo_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestViewneo_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestViewneo_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Viewneo, + DetectorType: detector_typepb.DetectorType_Viewneo, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestViewneo_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Viewneo, + DetectorType: detector_typepb.DetectorType_Viewneo, Verified: false, }, }, diff --git a/pkg/detectors/virustotal/virustotal.go b/pkg/detectors/virustotal/virustotal.go index 063dd2578799..4970ee66ed84 100644 --- a/pkg/detectors/virustotal/virustotal.go +++ b/pkg/detectors/virustotal/virustotal.go @@ -2,13 +2,14 @@ package virustotal import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -39,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_VirusTotal, + DetectorType: detector_typepb.DetectorType_VirusTotal, Raw: []byte(resMatch), } @@ -71,8 +72,8 @@ func verifyToken(ctx context.Context, client *http.Client, token string) bool { return true } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_VirusTotal +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_VirusTotal } func (s Scanner) Description() string { diff --git a/pkg/detectors/virustotal/virustotal_integration_test.go b/pkg/detectors/virustotal/virustotal_integration_test.go index b416c118effd..1ec36f1bf1a2 100644 --- a/pkg/detectors/virustotal/virustotal_integration_test.go +++ b/pkg/detectors/virustotal/virustotal_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestVirusTotal_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestVirusTotal_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_VirusTotal, + DetectorType: detector_typepb.DetectorType_VirusTotal, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestVirusTotal_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_VirusTotal, + DetectorType: detector_typepb.DetectorType_VirusTotal, Verified: false, }, }, diff --git a/pkg/detectors/visualcrossing/visualcrossing.go b/pkg/detectors/visualcrossing/visualcrossing.go index 48bfa46e6f57..48692b78965c 100644 --- a/pkg/detectors/visualcrossing/visualcrossing.go +++ b/pkg/detectors/visualcrossing/visualcrossing.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -41,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_VisualCrossing, + DetectorType: detector_typepb.DetectorType_VisualCrossing, Raw: []byte(resMatch), } @@ -66,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_VisualCrossing +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_VisualCrossing } func (s Scanner) Description() string { diff --git a/pkg/detectors/visualcrossing/visualcrossing_integration_test.go b/pkg/detectors/visualcrossing/visualcrossing_integration_test.go index 9c570ee36938..8f7a0e86e27b 100644 --- a/pkg/detectors/visualcrossing/visualcrossing_integration_test.go +++ b/pkg/detectors/visualcrossing/visualcrossing_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestVisualcrossing_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestVisualcrossing_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_VisualCrossing, + DetectorType: detector_typepb.DetectorType_VisualCrossing, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestVisualcrossing_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_VisualCrossing, + DetectorType: detector_typepb.DetectorType_VisualCrossing, Verified: false, }, }, diff --git a/pkg/detectors/voiceflow/voiceflow.go b/pkg/detectors/voiceflow/voiceflow.go index 10d5c2af374b..8132e38dcb68 100644 --- a/pkg/detectors/voiceflow/voiceflow.go +++ b/pkg/detectors/voiceflow/voiceflow.go @@ -4,14 +4,15 @@ import ( "bytes" "context" "fmt" - regexp "github.com/wasilibs/go-re2" "io" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -45,7 +46,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Voiceflow, + DetectorType: detector_typepb.DetectorType_Voiceflow, Raw: []byte(resMatch), } @@ -92,8 +93,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Voiceflow +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Voiceflow } func (s Scanner) Description() string { diff --git a/pkg/detectors/voiceflow/voiceflow_integration_test.go b/pkg/detectors/voiceflow/voiceflow_integration_test.go index 8163f6ef9474..b050db49c10a 100644 --- a/pkg/detectors/voiceflow/voiceflow_integration_test.go +++ b/pkg/detectors/voiceflow/voiceflow_integration_test.go @@ -15,7 +15,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestVoiceflow_FromChunk(t *testing.T) { @@ -51,7 +51,7 @@ func TestVoiceflow_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Voiceflow, + DetectorType: detector_typepb.DetectorType_Voiceflow, Verified: true, }, }, @@ -68,7 +68,7 @@ func TestVoiceflow_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Voiceflow, + DetectorType: detector_typepb.DetectorType_Voiceflow, Verified: false, }, }, @@ -97,7 +97,7 @@ func TestVoiceflow_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Voiceflow, + DetectorType: detector_typepb.DetectorType_Voiceflow, Verified: false, }, }, @@ -114,7 +114,7 @@ func TestVoiceflow_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Voiceflow, + DetectorType: detector_typepb.DetectorType_Voiceflow, Verified: false, }, }, diff --git a/pkg/detectors/voicegain/voicegain.go b/pkg/detectors/voicegain/voicegain.go index 6c3eff23353a..43b2ad1e9cc3 100644 --- a/pkg/detectors/voicegain/voicegain.go +++ b/pkg/detectors/voicegain/voicegain.go @@ -3,13 +3,14 @@ package voicegain import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Voicegain, + DetectorType: detector_typepb.DetectorType_Voicegain, Raw: []byte(resMatch), } @@ -66,8 +67,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Voicegain +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Voicegain } func (s Scanner) Description() string { diff --git a/pkg/detectors/voicegain/voicegain_integration_test.go b/pkg/detectors/voicegain/voicegain_integration_test.go index 4a3ce826faa5..3e26f8ef7559 100644 --- a/pkg/detectors/voicegain/voicegain_integration_test.go +++ b/pkg/detectors/voicegain/voicegain_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestVoicegain_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestVoicegain_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Voicegain, + DetectorType: detector_typepb.DetectorType_Voicegain, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestVoicegain_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Voicegain, + DetectorType: detector_typepb.DetectorType_Voicegain, Verified: false, }, }, diff --git a/pkg/detectors/voodoosms/voodoosms.go b/pkg/detectors/voodoosms/voodoosms.go index 7e2b8e427bfe..9b488478dadf 100644 --- a/pkg/detectors/voodoosms/voodoosms.go +++ b/pkg/detectors/voodoosms/voodoosms.go @@ -3,13 +3,14 @@ package voodoosms import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_VoodooSMS, + DetectorType: detector_typepb.DetectorType_VoodooSMS, Raw: []byte(resMatch), } @@ -66,8 +67,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_VoodooSMS +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_VoodooSMS } func (s Scanner) Description() string { diff --git a/pkg/detectors/voodoosms/voodoosms_integration_test.go b/pkg/detectors/voodoosms/voodoosms_integration_test.go index 3728dde96026..7061ef398015 100644 --- a/pkg/detectors/voodoosms/voodoosms_integration_test.go +++ b/pkg/detectors/voodoosms/voodoosms_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestVoodooSMS_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestVoodooSMS_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_VoodooSMS, + DetectorType: detector_typepb.DetectorType_VoodooSMS, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestVoodooSMS_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_VoodooSMS, + DetectorType: detector_typepb.DetectorType_VoodooSMS, Verified: false, }, }, diff --git a/pkg/detectors/vouchery/vouchery.go b/pkg/detectors/vouchery/vouchery.go index 5e4668b1f1ba..2f9b11468a83 100644 --- a/pkg/detectors/vouchery/vouchery.go +++ b/pkg/detectors/vouchery/vouchery.go @@ -3,16 +3,17 @@ package vouchery import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) -type Scanner struct{ +type Scanner struct { detectors.DefaultMultiPartCredentialProvider } @@ -48,7 +49,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result subMatch := strings.TrimSpace(subMatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Vouchery, + DetectorType: detector_typepb.DetectorType_Vouchery, Raw: []byte(resMatch), RawV2: []byte(resMatch + subMatch), } @@ -75,8 +76,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Vouchery +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Vouchery } func (s Scanner) Description() string { diff --git a/pkg/detectors/vouchery/vouchery_integration_test.go b/pkg/detectors/vouchery/vouchery_integration_test.go index 851f4f45b845..26102945835b 100644 --- a/pkg/detectors/vouchery/vouchery_integration_test.go +++ b/pkg/detectors/vouchery/vouchery_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestVouchery_FromChunk(t *testing.T) { @@ -49,12 +49,12 @@ func TestVouchery_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Vouchery, + DetectorType: detector_typepb.DetectorType_Vouchery, Verified: false, RawV2: []byte(secret + "secret"), }, { - DetectorType: detectorspb.DetectorType_Vouchery, + DetectorType: detector_typepb.DetectorType_Vouchery, Verified: true, RawV2: []byte(secret + subdomain), }, @@ -71,12 +71,12 @@ func TestVouchery_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Vouchery, + DetectorType: detector_typepb.DetectorType_Vouchery, Verified: false, RawV2: []byte(inactiveSecret + "secret"), }, { - DetectorType: detectorspb.DetectorType_Vouchery, + DetectorType: detector_typepb.DetectorType_Vouchery, Verified: false, RawV2: []byte(inactiveSecret + subdomain), }, diff --git a/pkg/detectors/vpnapi/vpnapi.go b/pkg/detectors/vpnapi/vpnapi.go index 1a3fc2846ace..d96e8d445526 100644 --- a/pkg/detectors/vpnapi/vpnapi.go +++ b/pkg/detectors/vpnapi/vpnapi.go @@ -2,13 +2,14 @@ package vpnapi import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -39,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Vpnapi, + DetectorType: detector_typepb.DetectorType_Vpnapi, Raw: []byte(resMatch), } @@ -63,8 +64,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Vpnapi +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Vpnapi } func (s Scanner) Description() string { diff --git a/pkg/detectors/vpnapi/vpnapi_integration_test.go b/pkg/detectors/vpnapi/vpnapi_integration_test.go index 34583d05b839..56f44ec450b9 100644 --- a/pkg/detectors/vpnapi/vpnapi_integration_test.go +++ b/pkg/detectors/vpnapi/vpnapi_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestVpnapi_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestVpnapi_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Vpnapi, + DetectorType: detector_typepb.DetectorType_Vpnapi, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestVpnapi_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Vpnapi, + DetectorType: detector_typepb.DetectorType_Vpnapi, Verified: false, }, }, diff --git a/pkg/detectors/vultrapikey/vultrapikey.go b/pkg/detectors/vultrapikey/vultrapikey.go index bf3cdf303cc2..53caacf400af 100644 --- a/pkg/detectors/vultrapikey/vultrapikey.go +++ b/pkg/detectors/vultrapikey/vultrapikey.go @@ -3,13 +3,14 @@ package vultrapikey import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_VultrApiKey, + DetectorType: detector_typepb.DetectorType_VultrApiKey, Raw: []byte(resMatch), } @@ -65,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_VultrApiKey +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_VultrApiKey } func (s Scanner) Description() string { diff --git a/pkg/detectors/vultrapikey/vultrapikey_integration_test.go b/pkg/detectors/vultrapikey/vultrapikey_integration_test.go index 575713d4f005..3d044948fa11 100644 --- a/pkg/detectors/vultrapikey/vultrapikey_integration_test.go +++ b/pkg/detectors/vultrapikey/vultrapikey_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestVultrApiKey_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestVultrApiKey_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_VultrApiKey, + DetectorType: detector_typepb.DetectorType_VultrApiKey, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestVultrApiKey_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_VultrApiKey, + DetectorType: detector_typepb.DetectorType_VultrApiKey, Verified: false, }, }, diff --git a/pkg/detectors/vyte/vyte.go b/pkg/detectors/vyte/vyte.go index e6e423d83eef..b853a029ce92 100644 --- a/pkg/detectors/vyte/vyte.go +++ b/pkg/detectors/vyte/vyte.go @@ -2,13 +2,14 @@ package vyte import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -39,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Vyte, + DetectorType: detector_typepb.DetectorType_Vyte, Raw: []byte(resMatch), } @@ -65,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Vyte +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Vyte } func (s Scanner) Description() string { diff --git a/pkg/detectors/vyte/vyte_integration_test.go b/pkg/detectors/vyte/vyte_integration_test.go index 7cce3162fdca..c1345a53364f 100644 --- a/pkg/detectors/vyte/vyte_integration_test.go +++ b/pkg/detectors/vyte/vyte_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/common" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestVyte_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestVyte_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Vyte, + DetectorType: detector_typepb.DetectorType_Vyte, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestVyte_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Vyte, + DetectorType: detector_typepb.DetectorType_Vyte, Verified: false, }, }, diff --git a/pkg/detectors/walkscore/walkscore.go b/pkg/detectors/walkscore/walkscore.go index 50c99785401c..41e04c167bd9 100644 --- a/pkg/detectors/walkscore/walkscore.go +++ b/pkg/detectors/walkscore/walkscore.go @@ -3,14 +3,15 @@ package walkscore import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "io" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -41,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_WalkScore, + DetectorType: detector_typepb.DetectorType_WalkScore, Raw: []byte(resMatch), } @@ -71,8 +72,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_WalkScore +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_WalkScore } func (s Scanner) Description() string { diff --git a/pkg/detectors/walkscore/walkscore_integration_test.go b/pkg/detectors/walkscore/walkscore_integration_test.go index 852b47fbf0a1..2e11ddd68981 100644 --- a/pkg/detectors/walkscore/walkscore_integration_test.go +++ b/pkg/detectors/walkscore/walkscore_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestWalkscore_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestWalkscore_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_WalkScore, + DetectorType: detector_typepb.DetectorType_WalkScore, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestWalkscore_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_WalkScore, + DetectorType: detector_typepb.DetectorType_WalkScore, Verified: false, }, }, diff --git a/pkg/detectors/weatherbit/weatherbit.go b/pkg/detectors/weatherbit/weatherbit.go index 886759bee6a8..d7c561ac7c6b 100644 --- a/pkg/detectors/weatherbit/weatherbit.go +++ b/pkg/detectors/weatherbit/weatherbit.go @@ -3,13 +3,14 @@ package weatherbit import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_WeatherBit, + DetectorType: detector_typepb.DetectorType_WeatherBit, Raw: []byte(resMatch), } @@ -65,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_WeatherBit +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_WeatherBit } func (s Scanner) Description() string { diff --git a/pkg/detectors/weatherbit/weatherbit_integration_test.go b/pkg/detectors/weatherbit/weatherbit_integration_test.go index 616ac3f00709..64043cbf9c16 100644 --- a/pkg/detectors/weatherbit/weatherbit_integration_test.go +++ b/pkg/detectors/weatherbit/weatherbit_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestWeatherbit_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestWeatherbit_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_WeatherBit, + DetectorType: detector_typepb.DetectorType_WeatherBit, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestWeatherbit_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_WeatherBit, + DetectorType: detector_typepb.DetectorType_WeatherBit, Verified: false, }, }, diff --git a/pkg/detectors/weatherstack/weatherstack.go b/pkg/detectors/weatherstack/weatherstack.go index 6e0b71be851d..75e23369e547 100644 --- a/pkg/detectors/weatherstack/weatherstack.go +++ b/pkg/detectors/weatherstack/weatherstack.go @@ -3,14 +3,15 @@ package weatherstack import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "io" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -41,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_WeatherStack, + DetectorType: detector_typepb.DetectorType_WeatherStack, Raw: []byte(resMatch), } @@ -72,8 +73,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_WeatherStack +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_WeatherStack } func (s Scanner) Description() string { diff --git a/pkg/detectors/weatherstack/weatherstack_integration_test.go b/pkg/detectors/weatherstack/weatherstack_integration_test.go index a671e784d58c..ea4f5af8c27b 100644 --- a/pkg/detectors/weatherstack/weatherstack_integration_test.go +++ b/pkg/detectors/weatherstack/weatherstack_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestWeatherstack_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestWeatherstack_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_WeatherStack, + DetectorType: detector_typepb.DetectorType_WeatherStack, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestWeatherstack_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_WeatherStack, + DetectorType: detector_typepb.DetectorType_WeatherStack, Verified: false, }, }, diff --git a/pkg/detectors/web3storage/web3storage.go b/pkg/detectors/web3storage/web3storage.go index e5d7f9611d8d..8e40afd62bb1 100644 --- a/pkg/detectors/web3storage/web3storage.go +++ b/pkg/detectors/web3storage/web3storage.go @@ -3,13 +3,14 @@ package web3storage import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -41,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Web3Storage, + DetectorType: detector_typepb.DetectorType_Web3Storage, Raw: []byte(resMatch), } @@ -77,8 +78,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Web3Storage +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Web3Storage } func (s Scanner) Description() string { diff --git a/pkg/detectors/web3storage/web3storage_integration_test.go b/pkg/detectors/web3storage/web3storage_integration_test.go index 42efd3f7c083..5d91a0f2b4d0 100644 --- a/pkg/detectors/web3storage/web3storage_integration_test.go +++ b/pkg/detectors/web3storage/web3storage_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestWeb3Storage_FromChunk(t *testing.T) { @@ -50,7 +50,7 @@ func TestWeb3Storage_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Web3Storage, + DetectorType: detector_typepb.DetectorType_Web3Storage, Verified: true, }, }, @@ -67,7 +67,7 @@ func TestWeb3Storage_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Web3Storage, + DetectorType: detector_typepb.DetectorType_Web3Storage, Verified: false, }, }, @@ -96,7 +96,7 @@ func TestWeb3Storage_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Web3Storage, + DetectorType: detector_typepb.DetectorType_Web3Storage, Verified: false, }, }, @@ -113,7 +113,7 @@ func TestWeb3Storage_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Web3Storage, + DetectorType: detector_typepb.DetectorType_Web3Storage, Verified: false, }, }, diff --git a/pkg/detectors/webex/webex.go b/pkg/detectors/webex/webex.go index d13ab835f4de..1f7da4f7545b 100644 --- a/pkg/detectors/webex/webex.go +++ b/pkg/detectors/webex/webex.go @@ -3,17 +3,18 @@ package webex import ( "context" "encoding/json" - regexp "github.com/wasilibs/go-re2" "io" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) -type Scanner struct{ +type Scanner struct { detectors.DefaultMultiPartCredentialProvider } @@ -44,7 +45,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result id := strings.TrimSpace(idMatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Webex, + DetectorType: detector_typepb.DetectorType_Webex, Raw: []byte(resMatch), } @@ -82,8 +83,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Webex +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Webex } func (s Scanner) Description() string { diff --git a/pkg/detectors/webex/webex_integration_test.go b/pkg/detectors/webex/webex_integration_test.go index b2a44e2a58e2..fcf48aa1a42b 100644 --- a/pkg/detectors/webex/webex_integration_test.go +++ b/pkg/detectors/webex/webex_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestWebex_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestWebex_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Webex, + DetectorType: detector_typepb.DetectorType_Webex, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestWebex_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Webex, + DetectorType: detector_typepb.DetectorType_Webex, Verified: false, }, }, diff --git a/pkg/detectors/webexbot/webexbot.go b/pkg/detectors/webexbot/webexbot.go index 1dfe4059c621..cdf61b8afcdf 100644 --- a/pkg/detectors/webexbot/webexbot.go +++ b/pkg/detectors/webexbot/webexbot.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -44,7 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for match := range uniqueMatches { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_WebexBot, + DetectorType: detector_typepb.DetectorType_WebexBot, Raw: []byte(match), Redacted: match[:5] + "...", ExtraData: map[string]string{}, @@ -114,8 +114,8 @@ func verifyMatch(ctx context.Context, client *http.Client, token string) (bool, } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_WebexBot +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_WebexBot } func (s Scanner) Description() string { diff --git a/pkg/detectors/webexbot/webexbot_integration_test.go b/pkg/detectors/webexbot/webexbot_integration_test.go index db0010f61420..e9d026087d5f 100644 --- a/pkg/detectors/webexbot/webexbot_integration_test.go +++ b/pkg/detectors/webexbot/webexbot_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestWebexbot_FromChunk(t *testing.T) { @@ -53,7 +53,7 @@ func TestWebexbot_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_WebexBot, + DetectorType: detector_typepb.DetectorType_WebexBot, Verified: true, Redacted: redacted, }, @@ -71,7 +71,7 @@ func TestWebexbot_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_WebexBot, + DetectorType: detector_typepb.DetectorType_WebexBot, Verified: false, Redacted: inactiveRedacted, }, @@ -101,7 +101,7 @@ func TestWebexbot_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_WebexBot, + DetectorType: detector_typepb.DetectorType_WebexBot, Verified: false, Redacted: redacted, }, @@ -119,7 +119,7 @@ func TestWebexbot_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_WebexBot, + DetectorType: detector_typepb.DetectorType_WebexBot, Verified: false, Redacted: redacted, }, diff --git a/pkg/detectors/webflow/webflow.go b/pkg/detectors/webflow/webflow.go index 1db49826e9ca..313f9f300938 100644 --- a/pkg/detectors/webflow/webflow.go +++ b/pkg/detectors/webflow/webflow.go @@ -3,13 +3,14 @@ package webflow import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Webflow, + DetectorType: detector_typepb.DetectorType_Webflow, Raw: []byte(resMatch), } @@ -66,8 +67,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Webflow +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Webflow } func (s Scanner) Description() string { diff --git a/pkg/detectors/webflow/webflow_integration_test.go b/pkg/detectors/webflow/webflow_integration_test.go index f4c3e7c0eea9..02bfeafe4c66 100644 --- a/pkg/detectors/webflow/webflow_integration_test.go +++ b/pkg/detectors/webflow/webflow_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestWebflow_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestWebflow_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Webflow, + DetectorType: detector_typepb.DetectorType_Webflow, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestWebflow_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Webflow, + DetectorType: detector_typepb.DetectorType_Webflow, Verified: false, }, }, diff --git a/pkg/detectors/webscraper/webscraper.go b/pkg/detectors/webscraper/webscraper.go index f992f86757f5..ea894ce898b4 100644 --- a/pkg/detectors/webscraper/webscraper.go +++ b/pkg/detectors/webscraper/webscraper.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -41,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_WebScraper, + DetectorType: detector_typepb.DetectorType_WebScraper, Raw: []byte(resMatch), } @@ -65,8 +65,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_WebScraper +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_WebScraper } func (s Scanner) Description() string { diff --git a/pkg/detectors/webscraper/webscraper_integration_test.go b/pkg/detectors/webscraper/webscraper_integration_test.go index 79efa05e9822..21a09cf2221c 100644 --- a/pkg/detectors/webscraper/webscraper_integration_test.go +++ b/pkg/detectors/webscraper/webscraper_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestWebScraper_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestWebScraper_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_WebScraper, + DetectorType: detector_typepb.DetectorType_WebScraper, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestWebScraper_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_WebScraper, + DetectorType: detector_typepb.DetectorType_WebScraper, Verified: false, }, }, diff --git a/pkg/detectors/webscraping/webscraping.go b/pkg/detectors/webscraping/webscraping.go index 4e0b1fe34e62..3693927b2b8e 100644 --- a/pkg/detectors/webscraping/webscraping.go +++ b/pkg/detectors/webscraping/webscraping.go @@ -2,14 +2,15 @@ package webscraping import ( "context" - regexp "github.com/wasilibs/go-re2" "io" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Webscraping, + DetectorType: detector_typepb.DetectorType_Webscraping, Raw: []byte(resMatch), } @@ -70,8 +71,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Webscraping +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Webscraping } func (s Scanner) Description() string { diff --git a/pkg/detectors/webscraping/webscraping_integration_test.go b/pkg/detectors/webscraping/webscraping_integration_test.go index 26007155afd8..ca8f54e64295 100644 --- a/pkg/detectors/webscraping/webscraping_integration_test.go +++ b/pkg/detectors/webscraping/webscraping_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestWebscraping_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestWebscraping_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Webscraping, + DetectorType: detector_typepb.DetectorType_Webscraping, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestWebscraping_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Webscraping, + DetectorType: detector_typepb.DetectorType_Webscraping, Verified: false, }, }, diff --git a/pkg/detectors/websitepulse/websitepulse.go b/pkg/detectors/websitepulse/websitepulse.go index 4b6250f5db06..b2fbc0f29571 100644 --- a/pkg/detectors/websitepulse/websitepulse.go +++ b/pkg/detectors/websitepulse/websitepulse.go @@ -3,17 +3,18 @@ package websitepulse import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "io" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) -type Scanner struct{ +type Scanner struct { detectors.DefaultMultiPartCredentialProvider } @@ -47,7 +48,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for _, idmatch := range idmatches { resIdMatch := strings.TrimSpace(idmatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Websitepulse, + DetectorType: detector_typepb.DetectorType_Websitepulse, Raw: []byte(resMatch), } if verify { @@ -78,8 +79,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Websitepulse +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Websitepulse } func (s Scanner) Description() string { diff --git a/pkg/detectors/websitepulse/websitepulse_integration_test.go b/pkg/detectors/websitepulse/websitepulse_integration_test.go index 7d589d5292c8..878046377c9d 100644 --- a/pkg/detectors/websitepulse/websitepulse_integration_test.go +++ b/pkg/detectors/websitepulse/websitepulse_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestWebsitepulse_FromChunk(t *testing.T) { @@ -49,11 +49,11 @@ func TestWebsitepulse_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Websitepulse, + DetectorType: detector_typepb.DetectorType_Websitepulse, Verified: false, }, { - DetectorType: detectorspb.DetectorType_Websitepulse, + DetectorType: detector_typepb.DetectorType_Websitepulse, Verified: true, }, }, @@ -69,11 +69,11 @@ func TestWebsitepulse_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Websitepulse, + DetectorType: detector_typepb.DetectorType_Websitepulse, Verified: false, }, { - DetectorType: detectorspb.DetectorType_Websitepulse, + DetectorType: detector_typepb.DetectorType_Websitepulse, Verified: false, }, }, diff --git a/pkg/detectors/weightsandbiases/weightsandbiases.go b/pkg/detectors/weightsandbiases/weightsandbiases.go index daede1930ad9..7dac7bb14a80 100644 --- a/pkg/detectors/weightsandbiases/weightsandbiases.go +++ b/pkg/detectors/weightsandbiases/weightsandbiases.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{ client *http.Client } @@ -43,7 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for match := range uniqueMatches { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_WeightsAndBiases, + DetectorType: detector_typepb.DetectorType_WeightsAndBiases, Raw: []byte(match), } @@ -127,6 +127,6 @@ func (s Scanner) Description() string { return "Weights & Biases is a Machine Learning Operations (MLOps) platform that helps track experiments, version datasets, evaluate model performance, and collaborate with team members" } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_WeightsAndBiases +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_WeightsAndBiases } diff --git a/pkg/detectors/weightsandbiases/weightsandbiases_integration_test.go b/pkg/detectors/weightsandbiases/weightsandbiases_integration_test.go index 73a96f45fd39..0b7a204dde5f 100644 --- a/pkg/detectors/weightsandbiases/weightsandbiases_integration_test.go +++ b/pkg/detectors/weightsandbiases/weightsandbiases_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestWeightsandbiases_FromChunk(t *testing.T) { @@ -50,7 +50,7 @@ func TestWeightsandbiases_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_WeightsAndBiases, + DetectorType: detector_typepb.DetectorType_WeightsAndBiases, Verified: true, ExtraData: map[string]string{ "admin": "false", @@ -72,7 +72,7 @@ func TestWeightsandbiases_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_WeightsAndBiases, + DetectorType: detector_typepb.DetectorType_WeightsAndBiases, Verified: false, }, }, @@ -101,7 +101,7 @@ func TestWeightsandbiases_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_WeightsAndBiases, + DetectorType: detector_typepb.DetectorType_WeightsAndBiases, Verified: false, }, }, @@ -118,7 +118,7 @@ func TestWeightsandbiases_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_WeightsAndBiases, + DetectorType: detector_typepb.DetectorType_WeightsAndBiases, Verified: false, }, }, diff --git a/pkg/detectors/wepay/wepay.go b/pkg/detectors/wepay/wepay.go index b2c21abd0c13..e76f7cddfd29 100644 --- a/pkg/detectors/wepay/wepay.go +++ b/pkg/detectors/wepay/wepay.go @@ -2,16 +2,17 @@ package wepay import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) -type Scanner struct{ +type Scanner struct { detectors.DefaultMultiPartCredentialProvider } @@ -48,7 +49,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for _, match := range matches { resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_WePay, + DetectorType: detector_typepb.DetectorType_WePay, Raw: []byte(resMatch), } @@ -78,8 +79,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_WePay +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_WePay } func (s Scanner) Description() string { diff --git a/pkg/detectors/wepay/wepay_integration_test.go b/pkg/detectors/wepay/wepay_integration_test.go index 6f427a27b455..6195066ba742 100644 --- a/pkg/detectors/wepay/wepay_integration_test.go +++ b/pkg/detectors/wepay/wepay_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestWePay_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestWePay_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_WePay, + DetectorType: detector_typepb.DetectorType_WePay, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestWePay_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_WePay, + DetectorType: detector_typepb.DetectorType_WePay, Verified: false, }, }, diff --git a/pkg/detectors/whoxy/whoxy.go b/pkg/detectors/whoxy/whoxy.go index e358a89096c5..516cb8ee61b7 100644 --- a/pkg/detectors/whoxy/whoxy.go +++ b/pkg/detectors/whoxy/whoxy.go @@ -3,14 +3,15 @@ package whoxy import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "io" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -41,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Whoxy, + DetectorType: detector_typepb.DetectorType_Whoxy, Raw: []byte(resMatch), } @@ -71,8 +72,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Whoxy +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Whoxy } func (s Scanner) Description() string { diff --git a/pkg/detectors/whoxy/whoxy_integration_test.go b/pkg/detectors/whoxy/whoxy_integration_test.go index 6043566cce9f..378b1f92189d 100644 --- a/pkg/detectors/whoxy/whoxy_integration_test.go +++ b/pkg/detectors/whoxy/whoxy_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestWhoxy_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestWhoxy_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Whoxy, + DetectorType: detector_typepb.DetectorType_Whoxy, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestWhoxy_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Whoxy, + DetectorType: detector_typepb.DetectorType_Whoxy, Verified: false, }, }, diff --git a/pkg/detectors/wistia/wistia.go b/pkg/detectors/wistia/wistia.go index 93806bb1bc45..39766307b80e 100644 --- a/pkg/detectors/wistia/wistia.go +++ b/pkg/detectors/wistia/wistia.go @@ -2,13 +2,14 @@ package wistia import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -39,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Wistia, + DetectorType: detector_typepb.DetectorType_Wistia, Raw: []byte(resMatch), } @@ -53,7 +54,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result defer res.Body.Close() if res.StatusCode >= 200 && res.StatusCode < 300 { s1.Verified = true - } + } } } @@ -63,8 +64,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Wistia +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Wistia } func (s Scanner) Description() string { diff --git a/pkg/detectors/wistia/wistia_integration_test.go b/pkg/detectors/wistia/wistia_integration_test.go index aa9713bb5b3f..d69e238214a6 100644 --- a/pkg/detectors/wistia/wistia_integration_test.go +++ b/pkg/detectors/wistia/wistia_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestWistia_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestWistia_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Wistia, + DetectorType: detector_typepb.DetectorType_Wistia, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestWistia_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Wistia, + DetectorType: detector_typepb.DetectorType_Wistia, Verified: false, }, }, diff --git a/pkg/detectors/wit/wit.go b/pkg/detectors/wit/wit.go index 0da015d27219..53d710e3b847 100644 --- a/pkg/detectors/wit/wit.go +++ b/pkg/detectors/wit/wit.go @@ -3,13 +3,14 @@ package wit import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Wit, + DetectorType: detector_typepb.DetectorType_Wit, Raw: []byte(resMatch), } @@ -55,7 +56,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result defer res.Body.Close() if res.StatusCode >= 200 && res.StatusCode < 300 { s1.Verified = true - } + } } } @@ -65,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Wit +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Wit } func (s Scanner) Description() string { diff --git a/pkg/detectors/wit/wit_integration_test.go b/pkg/detectors/wit/wit_integration_test.go index 1e2903f515f9..12a40027ca1d 100644 --- a/pkg/detectors/wit/wit_integration_test.go +++ b/pkg/detectors/wit/wit_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestWit_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestWit_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Wit, + DetectorType: detector_typepb.DetectorType_Wit, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestWit_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Wit, + DetectorType: detector_typepb.DetectorType_Wit, Verified: false, }, }, diff --git a/pkg/detectors/wiz/wiz.go b/pkg/detectors/wiz/wiz.go index 862aa9038a4c..92763c824e79 100644 --- a/pkg/detectors/wiz/wiz.go +++ b/pkg/detectors/wiz/wiz.go @@ -12,7 +12,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -53,7 +53,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for idMatch := range idMatches { for secretMatch := range secretMatches { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Wiz, + DetectorType: detector_typepb.DetectorType_Wiz, Raw: []byte(idMatch), RawV2: []byte(idMatch + secretMatch), } @@ -118,8 +118,8 @@ func verifyMatch(ctx context.Context, client *http.Client, clientID, clientSecre } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Wiz +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Wiz } func (s Scanner) Description() string { diff --git a/pkg/detectors/wiz/wiz_integration_test.go b/pkg/detectors/wiz/wiz_integration_test.go index 022aff779d16..09285edca8fd 100644 --- a/pkg/detectors/wiz/wiz_integration_test.go +++ b/pkg/detectors/wiz/wiz_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestWiz_FromChunk(t *testing.T) { @@ -50,7 +50,7 @@ func TestWiz_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Wiz, + DetectorType: detector_typepb.DetectorType_Wiz, Verified: true, }, }, @@ -67,7 +67,7 @@ func TestWiz_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Wiz, + DetectorType: detector_typepb.DetectorType_Wiz, Verified: false, }, }, @@ -96,7 +96,7 @@ func TestWiz_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Wiz, + DetectorType: detector_typepb.DetectorType_Wiz, Verified: false, }, }, @@ -113,7 +113,7 @@ func TestWiz_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Wiz, + DetectorType: detector_typepb.DetectorType_Wiz, Verified: false, }, }, diff --git a/pkg/detectors/worksnaps/worksnaps.go b/pkg/detectors/worksnaps/worksnaps.go index df509bdc4065..d6d5b2b37fe0 100644 --- a/pkg/detectors/worksnaps/worksnaps.go +++ b/pkg/detectors/worksnaps/worksnaps.go @@ -4,13 +4,14 @@ import ( "context" b64 "encoding/base64" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -41,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Worksnaps, + DetectorType: detector_typepb.DetectorType_Worksnaps, Raw: []byte(resMatch), } @@ -68,8 +69,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Worksnaps +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Worksnaps } func (s Scanner) Description() string { diff --git a/pkg/detectors/worksnaps/worksnaps_integration_test.go b/pkg/detectors/worksnaps/worksnaps_integration_test.go index 59f40b9b9449..91d4707417c7 100644 --- a/pkg/detectors/worksnaps/worksnaps_integration_test.go +++ b/pkg/detectors/worksnaps/worksnaps_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestWorksnaps_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestWorksnaps_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Worksnaps, + DetectorType: detector_typepb.DetectorType_Worksnaps, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestWorksnaps_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Worksnaps, + DetectorType: detector_typepb.DetectorType_Worksnaps, Verified: false, }, }, diff --git a/pkg/detectors/workstack/workstack.go b/pkg/detectors/workstack/workstack.go index 8dbaac53683a..9d1d6756e706 100644 --- a/pkg/detectors/workstack/workstack.go +++ b/pkg/detectors/workstack/workstack.go @@ -2,13 +2,14 @@ package workstack import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -39,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Workstack, + DetectorType: detector_typepb.DetectorType_Workstack, Raw: []byte(resMatch), } @@ -64,8 +65,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Workstack +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Workstack } func (s Scanner) Description() string { diff --git a/pkg/detectors/workstack/workstack_integration_test.go b/pkg/detectors/workstack/workstack_integration_test.go index 5256925ec7eb..56292ffdd347 100644 --- a/pkg/detectors/workstack/workstack_integration_test.go +++ b/pkg/detectors/workstack/workstack_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestWorkstack_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestWorkstack_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Workstack, + DetectorType: detector_typepb.DetectorType_Workstack, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestWorkstack_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Workstack, + DetectorType: detector_typepb.DetectorType_Workstack, Verified: false, }, }, diff --git a/pkg/detectors/worldcoinindex/worldcoinindex.go b/pkg/detectors/worldcoinindex/worldcoinindex.go index b20766ae28c1..a1c11ef97302 100644 --- a/pkg/detectors/worldcoinindex/worldcoinindex.go +++ b/pkg/detectors/worldcoinindex/worldcoinindex.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -42,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_WorldCoinIndex, + DetectorType: detector_typepb.DetectorType_WorldCoinIndex, Raw: []byte(resMatch), } @@ -76,8 +76,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_WorldCoinIndex +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_WorldCoinIndex } func (s Scanner) Description() string { diff --git a/pkg/detectors/worldcoinindex/worldcoinindex_integration_test.go b/pkg/detectors/worldcoinindex/worldcoinindex_integration_test.go index c60caf931ea9..3574c52731a9 100644 --- a/pkg/detectors/worldcoinindex/worldcoinindex_integration_test.go +++ b/pkg/detectors/worldcoinindex/worldcoinindex_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestWorldCoinIndex_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestWorldCoinIndex_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_WorldCoinIndex, + DetectorType: detector_typepb.DetectorType_WorldCoinIndex, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestWorldCoinIndex_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_WorldCoinIndex, + DetectorType: detector_typepb.DetectorType_WorldCoinIndex, Verified: false, }, }, diff --git a/pkg/detectors/worldweather/worldweather.go b/pkg/detectors/worldweather/worldweather.go index f7e732be188b..c163eae9f6e0 100644 --- a/pkg/detectors/worldweather/worldweather.go +++ b/pkg/detectors/worldweather/worldweather.go @@ -3,13 +3,14 @@ package worldweather import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_WorldWeather, + DetectorType: detector_typepb.DetectorType_WorldWeather, Raw: []byte(resMatch), } @@ -65,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_WorldWeather +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_WorldWeather } func (s Scanner) Description() string { diff --git a/pkg/detectors/worldweather/worldweather_integration_test.go b/pkg/detectors/worldweather/worldweather_integration_test.go index 8d4e84997e85..ba7cd3f92470 100644 --- a/pkg/detectors/worldweather/worldweather_integration_test.go +++ b/pkg/detectors/worldweather/worldweather_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestWorldweather_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestWorldweather_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_WorldWeather, + DetectorType: detector_typepb.DetectorType_WorldWeather, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestWorldweather_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_WorldWeather, + DetectorType: detector_typepb.DetectorType_WorldWeather, Verified: false, }, }, diff --git a/pkg/detectors/wrike/wrike.go b/pkg/detectors/wrike/wrike.go index d9fb23be4d95..13a57b43c6cf 100644 --- a/pkg/detectors/wrike/wrike.go +++ b/pkg/detectors/wrike/wrike.go @@ -3,13 +3,14 @@ package wrike import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Wrike, + DetectorType: detector_typepb.DetectorType_Wrike, Raw: []byte(resMatch), } @@ -65,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Wrike +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Wrike } func (s Scanner) Description() string { diff --git a/pkg/detectors/wrike/wrike_integration_test.go b/pkg/detectors/wrike/wrike_integration_test.go index bce287b565a2..6ff1627d778b 100644 --- a/pkg/detectors/wrike/wrike_integration_test.go +++ b/pkg/detectors/wrike/wrike_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestWrike_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestWrike_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Wrike, + DetectorType: detector_typepb.DetectorType_Wrike, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestWrike_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Wrike, + DetectorType: detector_typepb.DetectorType_Wrike, Verified: false, }, }, diff --git a/pkg/detectors/xai/xai.go b/pkg/detectors/xai/xai.go index c02203256c26..6b29d4e1f07d 100644 --- a/pkg/detectors/xai/xai.go +++ b/pkg/detectors/xai/xai.go @@ -12,7 +12,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -45,7 +45,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for match := range keyMatches { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_XAI, + DetectorType: detector_typepb.DetectorType_XAI, Raw: []byte(match), } @@ -115,8 +115,8 @@ func verifyMatch(ctx context.Context, client *http.Client, apiKey string) (bool, } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_XAI +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_XAI } func (s Scanner) Description() string { diff --git a/pkg/detectors/xai/xai_integration_test.go b/pkg/detectors/xai/xai_integration_test.go index 5bf5309f838b..8f560b56ea0d 100644 --- a/pkg/detectors/xai/xai_integration_test.go +++ b/pkg/detectors/xai/xai_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestXai_FromChunk(t *testing.T) { @@ -50,7 +50,7 @@ func TestXai_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_XAI, + DetectorType: detector_typepb.DetectorType_XAI, Verified: true, }, }, @@ -67,7 +67,7 @@ func TestXai_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_XAI, + DetectorType: detector_typepb.DetectorType_XAI, Verified: false, }, }, @@ -96,7 +96,7 @@ func TestXai_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_XAI, + DetectorType: detector_typepb.DetectorType_XAI, Verified: false, }, }, @@ -113,7 +113,7 @@ func TestXai_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_XAI, + DetectorType: detector_typepb.DetectorType_XAI, Verified: false, }, }, diff --git a/pkg/detectors/yandex/yandex.go b/pkg/detectors/yandex/yandex.go index ef2e3deb378c..7fce2f54cdac 100644 --- a/pkg/detectors/yandex/yandex.go +++ b/pkg/detectors/yandex/yandex.go @@ -2,13 +2,14 @@ package yandex import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -39,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Yandex, + DetectorType: detector_typepb.DetectorType_Yandex, Raw: []byte(resMatch), } @@ -63,8 +64,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Yandex +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Yandex } func (s Scanner) Description() string { diff --git a/pkg/detectors/yandex/yandex_integration_test.go b/pkg/detectors/yandex/yandex_integration_test.go index a8e8d0cae4e3..0897767e34ac 100644 --- a/pkg/detectors/yandex/yandex_integration_test.go +++ b/pkg/detectors/yandex/yandex_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestYandex_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestYandex_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Yandex, + DetectorType: detector_typepb.DetectorType_Yandex, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestYandex_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Yandex, + DetectorType: detector_typepb.DetectorType_Yandex, Verified: false, }, }, diff --git a/pkg/detectors/yelp/yelp.go b/pkg/detectors/yelp/yelp.go index cb0c37408e48..6e9534bee2e8 100644 --- a/pkg/detectors/yelp/yelp.go +++ b/pkg/detectors/yelp/yelp.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -43,7 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Yelp, + DetectorType: detector_typepb.DetectorType_Yelp, Raw: []byte(resMatch), } @@ -80,8 +80,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Yelp +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Yelp } func (s Scanner) Description() string { diff --git a/pkg/detectors/yelp/yelp_integration_test.go b/pkg/detectors/yelp/yelp_integration_test.go index a659c6f8859b..2231c232af5c 100644 --- a/pkg/detectors/yelp/yelp_integration_test.go +++ b/pkg/detectors/yelp/yelp_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestYelp_FromChunk(t *testing.T) { @@ -51,7 +51,7 @@ func TestYelp_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Yelp, + DetectorType: detector_typepb.DetectorType_Yelp, Verified: true, }, }, @@ -67,7 +67,7 @@ func TestYelp_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Yelp, + DetectorType: detector_typepb.DetectorType_Yelp, Verified: false, }, }, @@ -94,7 +94,7 @@ func TestYelp_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Yelp, + DetectorType: detector_typepb.DetectorType_Yelp, Verified: false, }, }, @@ -111,7 +111,7 @@ func TestYelp_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Yelp, + DetectorType: detector_typepb.DetectorType_Yelp, Verified: false, }, }, diff --git a/pkg/detectors/youneedabudget/youneedabudget.go b/pkg/detectors/youneedabudget/youneedabudget.go index 896b19ae03d3..5dd944edf007 100644 --- a/pkg/detectors/youneedabudget/youneedabudget.go +++ b/pkg/detectors/youneedabudget/youneedabudget.go @@ -3,13 +3,14 @@ package youneedabudget import ( "context" "fmt" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -40,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_YouNeedABudget, + DetectorType: detector_typepb.DetectorType_YouNeedABudget, Raw: []byte(resMatch), } @@ -65,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_YouNeedABudget +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_YouNeedABudget } func (s Scanner) Description() string { diff --git a/pkg/detectors/youneedabudget/youneedabudget_integration_test.go b/pkg/detectors/youneedabudget/youneedabudget_integration_test.go index d292e99f5fe0..3eb925755415 100644 --- a/pkg/detectors/youneedabudget/youneedabudget_integration_test.go +++ b/pkg/detectors/youneedabudget/youneedabudget_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestYouNeedABudget_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestYouNeedABudget_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_YouNeedABudget, + DetectorType: detector_typepb.DetectorType_YouNeedABudget, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestYouNeedABudget_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_YouNeedABudget, + DetectorType: detector_typepb.DetectorType_YouNeedABudget, Verified: false, }, }, diff --git a/pkg/detectors/yousign/yousign.go b/pkg/detectors/yousign/yousign.go index 8e0fecc1ab4c..5fbab4b9f4d1 100644 --- a/pkg/detectors/yousign/yousign.go +++ b/pkg/detectors/yousign/yousign.go @@ -10,7 +10,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -45,7 +45,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_YouSign, + DetectorType: detector_typepb.DetectorType_YouSign, Raw: []byte(resMatch), } @@ -85,8 +85,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_YouSign +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_YouSign } func (s Scanner) Description() string { diff --git a/pkg/detectors/yousign/yousign_integration_test.go b/pkg/detectors/yousign/yousign_integration_test.go index 5d65724fc849..2cf3cf85e738 100644 --- a/pkg/detectors/yousign/yousign_integration_test.go +++ b/pkg/detectors/yousign/yousign_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestYousign_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestYousign_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_YouSign, + DetectorType: detector_typepb.DetectorType_YouSign, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestYousign_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_YouSign, + DetectorType: detector_typepb.DetectorType_YouSign, Verified: false, }, }, diff --git a/pkg/detectors/youtubeapikey/youtubeapikey.go b/pkg/detectors/youtubeapikey/youtubeapikey.go index 94de2994b0b8..b509a2495c04 100644 --- a/pkg/detectors/youtubeapikey/youtubeapikey.go +++ b/pkg/detectors/youtubeapikey/youtubeapikey.go @@ -2,13 +2,14 @@ package youtubeapikey import ( "context" - regexp "github.com/wasilibs/go-re2" "net/http" "strings" + regexp "github.com/wasilibs/go-re2" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -46,7 +47,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resIdmatch := strings.TrimSpace(idmatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_YoutubeApiKey, + DetectorType: detector_typepb.DetectorType_YoutubeApiKey, Raw: []byte(resMatch), } @@ -72,8 +73,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_YoutubeApiKey +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_YoutubeApiKey } func (s Scanner) Description() string { diff --git a/pkg/detectors/youtubeapikey/youtubeapikey_integration_test.go b/pkg/detectors/youtubeapikey/youtubeapikey_integration_test.go index f1954f8318dd..c1eb9f37f273 100644 --- a/pkg/detectors/youtubeapikey/youtubeapikey_integration_test.go +++ b/pkg/detectors/youtubeapikey/youtubeapikey_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestYoutubeApiKey_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestYoutubeApiKey_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_YoutubeApiKey, + DetectorType: detector_typepb.DetectorType_YoutubeApiKey, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestYoutubeApiKey_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_YoutubeApiKey, + DetectorType: detector_typepb.DetectorType_YoutubeApiKey, Verified: false, }, }, diff --git a/pkg/detectors/zapierwebhook/zapierwebhook.go b/pkg/detectors/zapierwebhook/zapierwebhook.go index 204fc20d7bb7..99f33e4726b2 100644 --- a/pkg/detectors/zapierwebhook/zapierwebhook.go +++ b/pkg/detectors/zapierwebhook/zapierwebhook.go @@ -10,7 +10,7 @@ import ( regexp "github.com/wasilibs/go-re2" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -41,7 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_ZapierWebhook, + DetectorType: detector_typepb.DetectorType_ZapierWebhook, Raw: []byte(resMatch), } @@ -57,8 +57,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_ZapierWebhook +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_ZapierWebhook } func (s Scanner) Description() string { diff --git a/pkg/detectors/zapierwebhook/zapierwebhook_integration_test.go b/pkg/detectors/zapierwebhook/zapierwebhook_integration_test.go index fd6e9d0c08cb..82950e91d5c8 100644 --- a/pkg/detectors/zapierwebhook/zapierwebhook_integration_test.go +++ b/pkg/detectors/zapierwebhook/zapierwebhook_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestZapierWebhook_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestZapierWebhook_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ZapierWebhook, + DetectorType: detector_typepb.DetectorType_ZapierWebhook, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestZapierWebhook_FromChunk(t *testing.T) { // }, // want: []detectors.Result{ // { - // DetectorType: detectorspb.DetectorType_ZapierWebhook, + // DetectorType: detector_typepb.DetectorType_ZapierWebhook, // Verified: false, // }, // }, diff --git a/pkg/detectors/zendeskapi/zendeskapi.go b/pkg/detectors/zendeskapi/zendeskapi.go index e1efe925a855..cd77e4ec59ab 100644 --- a/pkg/detectors/zendeskapi/zendeskapi.go +++ b/pkg/detectors/zendeskapi/zendeskapi.go @@ -9,7 +9,7 @@ import ( regexp "github.com/wasilibs/go-re2" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -55,7 +55,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for email := range uniqueEmails { for domain := range uniqueDomains { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_ZendeskApi, + DetectorType: detector_typepb.DetectorType_ZendeskApi, Raw: []byte(token), } @@ -75,8 +75,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_ZendeskApi +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_ZendeskApi } func (s Scanner) Description() string { diff --git a/pkg/detectors/zendeskapi/zendeskapi_integration_test.go b/pkg/detectors/zendeskapi/zendeskapi_integration_test.go index e53b877d2bdd..22fe740f9320 100644 --- a/pkg/detectors/zendeskapi/zendeskapi_integration_test.go +++ b/pkg/detectors/zendeskapi/zendeskapi_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestZendeskApi_FromChunk(t *testing.T) { @@ -50,7 +50,7 @@ func TestZendeskApi_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ZendeskApi, + DetectorType: detector_typepb.DetectorType_ZendeskApi, Verified: true, }, }, @@ -66,7 +66,7 @@ func TestZendeskApi_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ZendeskApi, + DetectorType: detector_typepb.DetectorType_ZendeskApi, Verified: false, }, }, diff --git a/pkg/detectors/zenkitapi/zenkitapi.go b/pkg/detectors/zenkitapi/zenkitapi.go index 3b3450b7a466..9f8ee2fcb3f5 100644 --- a/pkg/detectors/zenkitapi/zenkitapi.go +++ b/pkg/detectors/zenkitapi/zenkitapi.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -42,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_ZenkitAPI, + DetectorType: detector_typepb.DetectorType_ZenkitAPI, Raw: []byte(resMatch), } @@ -58,8 +58,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_ZenkitAPI +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_ZenkitAPI } func (s Scanner) Description() string { diff --git a/pkg/detectors/zenkitapi/zenkitapi_integration_test.go b/pkg/detectors/zenkitapi/zenkitapi_integration_test.go index 3ebfaeb83076..3d01149b4fba 100644 --- a/pkg/detectors/zenkitapi/zenkitapi_integration_test.go +++ b/pkg/detectors/zenkitapi/zenkitapi_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestZenkitAPI_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestZenkitAPI_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ZenkitAPI, + DetectorType: detector_typepb.DetectorType_ZenkitAPI, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestZenkitAPI_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ZenkitAPI, + DetectorType: detector_typepb.DetectorType_ZenkitAPI, Verified: false, }, }, diff --git a/pkg/detectors/zenrows/zenrows.go b/pkg/detectors/zenrows/zenrows.go index 3ceb3c8f6af5..acec9995ca85 100644 --- a/pkg/detectors/zenrows/zenrows.go +++ b/pkg/detectors/zenrows/zenrows.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -42,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_ZenRows, + DetectorType: detector_typepb.DetectorType_ZenRows, Raw: []byte(resMatch), } @@ -58,8 +58,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_ZenRows +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_ZenRows } func (s Scanner) Description() string { diff --git a/pkg/detectors/zenrows/zenrows_integration_test.go b/pkg/detectors/zenrows/zenrows_integration_test.go index 94cf14219218..51248b170eb0 100644 --- a/pkg/detectors/zenrows/zenrows_integration_test.go +++ b/pkg/detectors/zenrows/zenrows_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestZenRows_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestZenRows_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ZenRows, + DetectorType: detector_typepb.DetectorType_ZenRows, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestZenRows_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ZenRows, + DetectorType: detector_typepb.DetectorType_ZenRows, Verified: false, }, }, diff --git a/pkg/detectors/zenscrape/zenscrape.go b/pkg/detectors/zenscrape/zenscrape.go index 36345587996d..0b77c00d3608 100644 --- a/pkg/detectors/zenscrape/zenscrape.go +++ b/pkg/detectors/zenscrape/zenscrape.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -42,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Zenscrape, + DetectorType: detector_typepb.DetectorType_Zenscrape, Raw: []byte(resMatch), } @@ -58,8 +58,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Zenscrape +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Zenscrape } func (s Scanner) Description() string { diff --git a/pkg/detectors/zenscrape/zenscrape_integration_test.go b/pkg/detectors/zenscrape/zenscrape_integration_test.go index d5ff34af2ab7..44f5e47c7fd0 100644 --- a/pkg/detectors/zenscrape/zenscrape_integration_test.go +++ b/pkg/detectors/zenscrape/zenscrape_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestZenscrape_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestZenscrape_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Zenscrape, + DetectorType: detector_typepb.DetectorType_Zenscrape, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestZenscrape_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Zenscrape, + DetectorType: detector_typepb.DetectorType_Zenscrape, Verified: false, }, }, diff --git a/pkg/detectors/zenserp/zenserp.go b/pkg/detectors/zenserp/zenserp.go index 19d66704cb86..2d38ade077a5 100644 --- a/pkg/detectors/zenserp/zenserp.go +++ b/pkg/detectors/zenserp/zenserp.go @@ -12,7 +12,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -42,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Zenserp, + DetectorType: detector_typepb.DetectorType_Zenserp, Raw: []byte(resMatch), } @@ -58,8 +58,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Zenserp +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Zenserp } func (s Scanner) Description() string { diff --git a/pkg/detectors/zenserp/zenserp_integration_test.go b/pkg/detectors/zenserp/zenserp_integration_test.go index 89394bee7791..a5d9489436d2 100644 --- a/pkg/detectors/zenserp/zenserp_integration_test.go +++ b/pkg/detectors/zenserp/zenserp_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestZenserp_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestZenserp_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Zenserp, + DetectorType: detector_typepb.DetectorType_Zenserp, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestZenserp_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Zenserp, + DetectorType: detector_typepb.DetectorType_Zenserp, Verified: false, }, }, diff --git a/pkg/detectors/zeplin/zeplin.go b/pkg/detectors/zeplin/zeplin.go index feb516c5925e..5b8436ada8ef 100644 --- a/pkg/detectors/zeplin/zeplin.go +++ b/pkg/detectors/zeplin/zeplin.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -42,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Zeplin, + DetectorType: detector_typepb.DetectorType_Zeplin, Raw: []byte(resMatch), } @@ -58,8 +58,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Zeplin +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Zeplin } func (s Scanner) Description() string { diff --git a/pkg/detectors/zeplin/zeplin_integration_test.go b/pkg/detectors/zeplin/zeplin_integration_test.go index 46d1359916ae..571b856a0567 100644 --- a/pkg/detectors/zeplin/zeplin_integration_test.go +++ b/pkg/detectors/zeplin/zeplin_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestZeplin_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestZeplin_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Zeplin, + DetectorType: detector_typepb.DetectorType_Zeplin, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestZeplin_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Zeplin, + DetectorType: detector_typepb.DetectorType_Zeplin, Verified: false, }, }, diff --git a/pkg/detectors/zerobounce/zerobounce.go b/pkg/detectors/zerobounce/zerobounce.go index 727297048e1a..4577d4621b2e 100644 --- a/pkg/detectors/zerobounce/zerobounce.go +++ b/pkg/detectors/zerobounce/zerobounce.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -42,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Zerobounce, + DetectorType: detector_typepb.DetectorType_Zerobounce, Raw: []byte(resMatch), } @@ -58,8 +58,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Zerobounce +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Zerobounce } func (s Scanner) Description() string { diff --git a/pkg/detectors/zerobounce/zerobounce_integration_test.go b/pkg/detectors/zerobounce/zerobounce_integration_test.go index 98aa5287fb72..4113f3deb525 100644 --- a/pkg/detectors/zerobounce/zerobounce_integration_test.go +++ b/pkg/detectors/zerobounce/zerobounce_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestZerobounce_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestZerobounce_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Zerobounce, + DetectorType: detector_typepb.DetectorType_Zerobounce, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestZerobounce_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Zerobounce, + DetectorType: detector_typepb.DetectorType_Zerobounce, Verified: false, }, }, diff --git a/pkg/detectors/zerotier/zerotier.go b/pkg/detectors/zerotier/zerotier.go index a227be6d55ea..4cd833d620a6 100644 --- a/pkg/detectors/zerotier/zerotier.go +++ b/pkg/detectors/zerotier/zerotier.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -43,7 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_ZeroTier, + DetectorType: detector_typepb.DetectorType_ZeroTier, Raw: []byte(resMatch), } @@ -64,8 +64,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_ZeroTier +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_ZeroTier } func (s Scanner) Description() string { diff --git a/pkg/detectors/zerotier/zerotier_integration_test.go b/pkg/detectors/zerotier/zerotier_integration_test.go index 24c37dcfe27e..0ab9541d3c41 100644 --- a/pkg/detectors/zerotier/zerotier_integration_test.go +++ b/pkg/detectors/zerotier/zerotier_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestZerotier_FromChunk(t *testing.T) { @@ -50,7 +50,7 @@ func TestZerotier_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ZeroTier, + DetectorType: detector_typepb.DetectorType_ZeroTier, Verified: true, }, }, @@ -67,7 +67,7 @@ func TestZerotier_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ZeroTier, + DetectorType: detector_typepb.DetectorType_ZeroTier, Verified: false, }, }, diff --git a/pkg/detectors/zipapi/zipapi.go b/pkg/detectors/zipapi/zipapi.go index c4e4c716fab2..e87b9cf12017 100644 --- a/pkg/detectors/zipapi/zipapi.go +++ b/pkg/detectors/zipapi/zipapi.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -57,7 +57,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for emailMatch := range uniqueEmailMatches { for passMatch := range uniquePassMatches { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_ZipAPI, + DetectorType: detector_typepb.DetectorType_ZipAPI, Raw: []byte(keyMatch), } @@ -75,8 +75,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_ZipAPI +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_ZipAPI } func (s Scanner) Description() string { diff --git a/pkg/detectors/zipapi/zipapi_integration_test.go b/pkg/detectors/zipapi/zipapi_integration_test.go index 2c58af37e11c..38aa3aa82bea 100644 --- a/pkg/detectors/zipapi/zipapi_integration_test.go +++ b/pkg/detectors/zipapi/zipapi_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestZipapi_FromChunk(t *testing.T) { @@ -50,7 +50,7 @@ func TestZipapi_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ZipAPI, + DetectorType: detector_typepb.DetectorType_ZipAPI, Verified: true, }, }, @@ -66,7 +66,7 @@ func TestZipapi_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ZipAPI, + DetectorType: detector_typepb.DetectorType_ZipAPI, Verified: false, }, }, diff --git a/pkg/detectors/zipbooks/zipbooks.go b/pkg/detectors/zipbooks/zipbooks.go index d67ef9bda5c0..5044837983e7 100644 --- a/pkg/detectors/zipbooks/zipbooks.go +++ b/pkg/detectors/zipbooks/zipbooks.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -51,7 +51,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resPword := strings.TrimSpace(pwordMatch[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_ZipBooks, + DetectorType: detector_typepb.DetectorType_ZipBooks, Raw: []byte(emailMatch), } @@ -67,8 +67,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_ZipBooks +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_ZipBooks } func (s Scanner) Description() string { diff --git a/pkg/detectors/zipbooks/zipbooks_integration_test.go b/pkg/detectors/zipbooks/zipbooks_integration_test.go index 1e5e4532738a..8e13be513b04 100644 --- a/pkg/detectors/zipbooks/zipbooks_integration_test.go +++ b/pkg/detectors/zipbooks/zipbooks_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestZipbooks_FromChunk(t *testing.T) { @@ -49,7 +49,7 @@ func TestZipbooks_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ZipBooks, + DetectorType: detector_typepb.DetectorType_ZipBooks, Verified: true, }, }, @@ -65,7 +65,7 @@ func TestZipbooks_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ZipBooks, + DetectorType: detector_typepb.DetectorType_ZipBooks, Verified: false, }, }, diff --git a/pkg/detectors/zipcodeapi/zipcodeapi.go b/pkg/detectors/zipcodeapi/zipcodeapi.go index b8b0083a6eab..dc60a73678eb 100644 --- a/pkg/detectors/zipcodeapi/zipcodeapi.go +++ b/pkg/detectors/zipcodeapi/zipcodeapi.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -42,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_ZipCodeAPI, + DetectorType: detector_typepb.DetectorType_ZipCodeAPI, Raw: []byte(resMatch), } @@ -58,8 +58,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_ZipCodeAPI +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_ZipCodeAPI } func (s Scanner) Description() string { diff --git a/pkg/detectors/zipcodeapi/zipcodeapi_integration_test.go b/pkg/detectors/zipcodeapi/zipcodeapi_integration_test.go index ad30fe1e626e..0c94047c2f19 100644 --- a/pkg/detectors/zipcodeapi/zipcodeapi_integration_test.go +++ b/pkg/detectors/zipcodeapi/zipcodeapi_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestZipCodeAPI_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestZipCodeAPI_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ZipCodeAPI, + DetectorType: detector_typepb.DetectorType_ZipCodeAPI, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestZipCodeAPI_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ZipCodeAPI, + DetectorType: detector_typepb.DetectorType_ZipCodeAPI, Verified: false, }, }, diff --git a/pkg/detectors/zipcodebase/zipcodebase.go b/pkg/detectors/zipcodebase/zipcodebase.go index ebcdf18bde54..f04830e78b8a 100644 --- a/pkg/detectors/zipcodebase/zipcodebase.go +++ b/pkg/detectors/zipcodebase/zipcodebase.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -42,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_Zipcodebase, + DetectorType: detector_typepb.DetectorType_Zipcodebase, Raw: []byte(resMatch), } @@ -58,8 +58,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_Zipcodebase +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_Zipcodebase } func (s Scanner) Description() string { diff --git a/pkg/detectors/zipcodebase/zipcodebase_integration_test.go b/pkg/detectors/zipcodebase/zipcodebase_integration_test.go index 6fc9570958bd..74d58fa365f1 100644 --- a/pkg/detectors/zipcodebase/zipcodebase_integration_test.go +++ b/pkg/detectors/zipcodebase/zipcodebase_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestZipcodebase_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestZipcodebase_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Zipcodebase, + DetectorType: detector_typepb.DetectorType_Zipcodebase, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestZipcodebase_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_Zipcodebase, + DetectorType: detector_typepb.DetectorType_Zipcodebase, Verified: false, }, }, diff --git a/pkg/detectors/zohocrm/zohocrm.go b/pkg/detectors/zohocrm/zohocrm.go index bab3e9423676..ca73d78a61c8 100644 --- a/pkg/detectors/zohocrm/zohocrm.go +++ b/pkg/detectors/zohocrm/zohocrm.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -48,7 +48,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for match := range uniqueMatches { result := detectors.Result{ - DetectorType: detectorspb.DetectorType_ZohoCRM, + DetectorType: detector_typepb.DetectorType_ZohoCRM, Raw: []byte(match), } @@ -115,8 +115,8 @@ func verifyMatch(ctx context.Context, client *http.Client, token string) (bool, } } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_ZohoCRM +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_ZohoCRM } func (s Scanner) Description() string { diff --git a/pkg/detectors/zohocrm/zohocrm_integration_test.go b/pkg/detectors/zohocrm/zohocrm_integration_test.go index e9e960a1afdc..19cee824cb98 100644 --- a/pkg/detectors/zohocrm/zohocrm_integration_test.go +++ b/pkg/detectors/zohocrm/zohocrm_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) // TestZohocrm_FromChunk verifies the validity of a ZohoCRM access token @@ -56,7 +56,7 @@ func TestZohocrm_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ZohoCRM, + DetectorType: detector_typepb.DetectorType_ZohoCRM, Verified: true, }, }, @@ -73,7 +73,7 @@ func TestZohocrm_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ZohoCRM, + DetectorType: detector_typepb.DetectorType_ZohoCRM, Verified: false, }, }, @@ -102,7 +102,7 @@ func TestZohocrm_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ZohoCRM, + DetectorType: detector_typepb.DetectorType_ZohoCRM, Verified: false, }, }, @@ -119,7 +119,7 @@ func TestZohocrm_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ZohoCRM, + DetectorType: detector_typepb.DetectorType_ZohoCRM, Verified: false, }, }, diff --git a/pkg/detectors/zonkafeedback/zonkafeedback.go b/pkg/detectors/zonkafeedback/zonkafeedback.go index bee7d6ce54f8..92d1d693c4e4 100644 --- a/pkg/detectors/zonkafeedback/zonkafeedback.go +++ b/pkg/detectors/zonkafeedback/zonkafeedback.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct{} @@ -42,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_ZonkaFeedback, + DetectorType: detector_typepb.DetectorType_ZonkaFeedback, Raw: []byte(resMatch), } @@ -58,8 +58,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result return results, nil } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_ZonkaFeedback +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_ZonkaFeedback } func (s Scanner) Description() string { diff --git a/pkg/detectors/zonkafeedback/zonkafeedback_integration_test.go b/pkg/detectors/zonkafeedback/zonkafeedback_integration_test.go index 973aae60598d..84d37880c68c 100644 --- a/pkg/detectors/zonkafeedback/zonkafeedback_integration_test.go +++ b/pkg/detectors/zonkafeedback/zonkafeedback_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestZonkaFeedback_FromChunk(t *testing.T) { @@ -48,7 +48,7 @@ func TestZonkaFeedback_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ZonkaFeedback, + DetectorType: detector_typepb.DetectorType_ZonkaFeedback, Verified: true, }, }, @@ -64,7 +64,7 @@ func TestZonkaFeedback_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ZonkaFeedback, + DetectorType: detector_typepb.DetectorType_ZonkaFeedback, Verified: false, }, }, diff --git a/pkg/detectors/zulipchat/zulipchat.go b/pkg/detectors/zulipchat/zulipchat.go index bdd5da1494c5..74c111b8c4a3 100644 --- a/pkg/detectors/zulipchat/zulipchat.go +++ b/pkg/detectors/zulipchat/zulipchat.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type Scanner struct { @@ -58,7 +58,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result for id := range idMatches { for domain := range domainMatches { s1 := detectors.Result{ - DetectorType: detectorspb.DetectorType_ZulipChat, + DetectorType: detector_typepb.DetectorType_ZulipChat, Raw: []byte(key), RawV2: []byte(fmt.Sprintf("%s:%s:%s", key, id, domain)), ExtraData: map[string]string{ @@ -128,8 +128,8 @@ type member struct { Email string `json:"email"` } -func (s Scanner) Type() detectorspb.DetectorType { - return detectorspb.DetectorType_ZulipChat +func (s Scanner) Type() detector_typepb.DetectorType { + return detector_typepb.DetectorType_ZulipChat } func (s Scanner) Description() string { diff --git a/pkg/detectors/zulipchat/zulipchat_integration_test.go b/pkg/detectors/zulipchat/zulipchat_integration_test.go index 6d60ea910fdc..133d87b4272e 100644 --- a/pkg/detectors/zulipchat/zulipchat_integration_test.go +++ b/pkg/detectors/zulipchat/zulipchat_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestZulipChat_FromChunk(t *testing.T) { @@ -52,7 +52,7 @@ func TestZulipChat_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ZulipChat, + DetectorType: detector_typepb.DetectorType_ZulipChat, Verified: true, ExtraData: map[string]string{"Domain": "secretscanner.zulipchat.com", "Id": "knightmoverchan@gmail.com"}, }, @@ -70,7 +70,7 @@ func TestZulipChat_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ZulipChat, + DetectorType: detector_typepb.DetectorType_ZulipChat, Verified: false, ExtraData: map[string]string{"Domain": "secretscanner.zulipchat.com", "Id": "knightmoverchan@gmail.com"}, }, @@ -100,7 +100,7 @@ func TestZulipChat_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ZulipChat, + DetectorType: detector_typepb.DetectorType_ZulipChat, Verified: false, ExtraData: map[string]string{"Domain": "secretscanner.zulipchat.com", "Id": "knightmoverchan@gmail.com"}, }, @@ -118,7 +118,7 @@ func TestZulipChat_FromChunk(t *testing.T) { }, want: []detectors.Result{ { - DetectorType: detectorspb.DetectorType_ZulipChat, + DetectorType: detector_typepb.DetectorType_ZulipChat, Verified: false, ExtraData: map[string]string{"Domain": "secretscanner.zulipchat.com", "Id": "knightmoverchan@gmail.com"}, }, diff --git a/pkg/engine/ahocorasick/ahocorasickcore.go b/pkg/engine/ahocorasick/ahocorasickcore.go index c6f97da1476c..11a63b74e5a9 100644 --- a/pkg/engine/ahocorasick/ahocorasickcore.go +++ b/pkg/engine/ahocorasick/ahocorasickcore.go @@ -8,7 +8,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/custom_detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) // DetectorKey is used to identify a detector in the keywordsToDetectors map. @@ -19,7 +19,7 @@ import ( // that the AhoCorasickCore can populate passed-in maps keyed on this type // without exposing any of its internals to consumers. type DetectorKey struct { - detectorType detectorspb.DetectorType + detectorType detector_typepb.DetectorType version int customDetectorName string } @@ -36,7 +36,7 @@ func (k DetectorKey) Loggable() map[string]any { } // Type returns the detector type of the key. -func (k DetectorKey) Type() detectorspb.DetectorType { return k.detectorType } +func (k DetectorKey) Type() detector_typepb.DetectorType { return k.detectorType } // spanCalculator is an interface that defines a method for calculating a match span // in the chunk data. This allows for different strategies to be used without changing the core logic. diff --git a/pkg/engine/ahocorasick/ahocorasickcore_test.go b/pkg/engine/ahocorasick/ahocorasickcore_test.go index c33954a7dd3c..5828a846bf67 100644 --- a/pkg/engine/ahocorasick/ahocorasickcore_test.go +++ b/pkg/engine/ahocorasick/ahocorasickcore_test.go @@ -9,7 +9,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/custom_detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/pb/custom_detectorspb" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) const TestDetectorType = -1 @@ -23,7 +23,7 @@ func (testDetectorV1) FromData(ctx context.Context, verify bool, data []byte) ([ func (testDetectorV1) Keywords() []string { return []string{"a", "b"} } -func (testDetectorV1) Type() detectorspb.DetectorType { +func (testDetectorV1) Type() detector_typepb.DetectorType { return TestDetectorType } @@ -42,7 +42,7 @@ func (testDetectorV2) Keywords() []string { return []string{"a"} } -func (testDetectorV2) Type() detectorspb.DetectorType { +func (testDetectorV2) Type() detector_typepb.DetectorType { return TestDetectorType } @@ -61,7 +61,7 @@ func (testDetectorV3) Keywords() []string { return []string{"truffle"} } -func (testDetectorV3) Type() detectorspb.DetectorType { +func (testDetectorV3) Type() detector_typepb.DetectorType { return TestDetectorType } @@ -81,7 +81,7 @@ func (testDetectorV4) FromData(context.Context, bool, []byte) ([]detectors.Resul func (testDetectorV4) Keywords() []string { return []string{"password"} } -func (testDetectorV4) Type() detectorspb.DetectorType { return TestDetectorType } +func (testDetectorV4) Type() detector_typepb.DetectorType { return TestDetectorType } func (testDetectorV4) Version() int { return 1 } @@ -103,7 +103,7 @@ func (testDetectorV5) FromData(context.Context, bool, []byte) ([]detectors.Resul func (testDetectorV5) Keywords() []string { return []string{"password"} } -func (testDetectorV5) Type() detectorspb.DetectorType { return TestDetectorType } +func (testDetectorV5) Type() detector_typepb.DetectorType { return TestDetectorType } func (testDetectorV5) Version() int { return 1 } @@ -125,7 +125,7 @@ func (testDetectorV6) FromData(context.Context, bool, []byte) ([]detectors.Resul func (testDetectorV6) Keywords() []string { return []string{"password"} } -func (testDetectorV6) Type() detectorspb.DetectorType { return TestDetectorType } +func (testDetectorV6) Type() detector_typepb.DetectorType { return TestDetectorType } func (testDetectorV6) Version() int { return 1 } diff --git a/pkg/engine/defaults/defaults.go b/pkg/engine/defaults/defaults.go index c3e76f3caed5..0b1ae9164b03 100644 --- a/pkg/engine/defaults/defaults.go +++ b/pkg/engine/defaults/defaults.go @@ -858,7 +858,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/detectors/zohocrm" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors/zonkafeedback" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors/zulipchat" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func buildDetectorList() []detectors.Detector { @@ -1773,8 +1773,8 @@ func DefaultDetectors() []detectors.Detector { return detectorList } -func DefaultDetectorTypesImplementing[T any]() map[detectorspb.DetectorType]struct{} { - out := make(map[detectorspb.DetectorType]struct{}) +func DefaultDetectorTypesImplementing[T any]() map[detector_typepb.DetectorType]struct{} { + out := make(map[detector_typepb.DetectorType]struct{}) for _, detector := range DefaultDetectors() { if _, ok := detector.(T); ok { out[detector.Type()] = struct{}{} diff --git a/pkg/engine/defaults/defaults_test.go b/pkg/engine/defaults/defaults_test.go index cfb4c1c908d2..de3489b3e059 100644 --- a/pkg/engine/defaults/defaults_test.go +++ b/pkg/engine/defaults/defaults_test.go @@ -4,11 +4,11 @@ import ( "testing" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) func TestDefaultDetectorsHaveUniqueVersions(t *testing.T) { - detectorTypeToVersions := make(map[detectorspb.DetectorType]map[int]struct{}) + detectorTypeToVersions := make(map[detector_typepb.DetectorType]map[int]struct{}) addVersion := func(versions map[int]struct{}, version int) map[int]struct{} { if versions == nil { versions = make(map[int]struct{}) @@ -27,7 +27,7 @@ func TestDefaultDetectorsHaveUniqueVersions(t *testing.T) { key := detector.Type() if set, ok := detectorTypeToVersions[key]; ok && set != nil { if _, ok := set[version]; ok { - t.Errorf("detector %q has duplicate version: %d", detectorspb.DetectorType_name[int32(key)], version) + t.Errorf("detector %q has duplicate version: %d", detector_typepb.DetectorType_name[int32(key)], version) } } detectorTypeToVersions[key] = addVersion(detectorTypeToVersions[key], version) @@ -44,7 +44,7 @@ func TestDefaultDetectorTypesImplementing(t *testing.T) { } t.Errorf( "detector %q doesn't match expected", - detectorspb.DetectorType_name[int32(detector.Type())], + detector_typepb.DetectorType_name[int32(detector.Type())], ) } } @@ -61,7 +61,7 @@ func TestDefaultVersionerDetectorsHaveNonZeroVersions(t *testing.T) { } t.Errorf( "detector %q implements Versioner that returns a zero version", - detectorspb.DetectorType_name[int32(detector.Type())], + detector_typepb.DetectorType_name[int32(detector.Type())], ) } } diff --git a/pkg/engine/engine.go b/pkg/engine/engine.go index 25f8270aa8b6..180e9e18900c 100644 --- a/pkg/engine/engine.go +++ b/pkg/engine/engine.go @@ -28,6 +28,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/engine/defaults" "github.com/trufflesecurity/trufflehog/v3/pkg/giturl" "github.com/trufflesecurity/trufflehog/v3/pkg/output" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" "github.com/trufflesecurity/trufflehog/v3/pkg/pb/source_metadatapb" "github.com/trufflesecurity/trufflehog/v3/pkg/pb/sourcespb" @@ -648,7 +649,7 @@ func (e *Engine) sanityChecks(ctx context.Context) { seenDetectors := make(map[config.DetectorID]struct{}, len(e.detectors)) for _, det := range e.detectors { id := config.GetDetectorID(det) - if _, ok := seenDetectors[id]; ok && id.ID != detectorspb.DetectorType_CustomRegex { + if _, ok := seenDetectors[id]; ok && id.ID != detector_typepb.DetectorType_CustomRegex { ctx.Logger().Info("possible duplicate detector configured", "detector", id) } seenDetectors[id] = struct{}{} diff --git a/pkg/engine/engine_test.go b/pkg/engine/engine_test.go index c6d4bdec57a5..b3aacd6cfcef 100644 --- a/pkg/engine/engine_test.go +++ b/pkg/engine/engine_test.go @@ -26,6 +26,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/engine/ahocorasick" "github.com/trufflesecurity/trufflehog/v3/pkg/engine/defaults" "github.com/trufflesecurity/trufflehog/v3/pkg/pb/custom_detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" "github.com/trufflesecurity/trufflehog/v3/pkg/pb/source_metadatapb" "github.com/trufflesecurity/trufflehog/v3/pkg/pb/sourcespb" @@ -46,32 +47,32 @@ var _ detectors.Versioner = (*fakeDetectorV2)(nil) func (f fakeDetectorV1) FromData(_ aCtx.Context, _ bool, _ []byte) ([]detectors.Result, error) { return []detectors.Result{ { - DetectorType: detectorspb.DetectorType(-1), + DetectorType: detector_typepb.DetectorType(-1), Verified: true, Raw: []byte("fake secret v1"), }, }, nil } -func (f fakeDetectorV1) Keywords() []string { return []string{fakeDetectorKeyword} } -func (f fakeDetectorV1) Type() detectorspb.DetectorType { return detectorspb.DetectorType(-1) } -func (f fakeDetectorV1) Version() int { return 1 } +func (f fakeDetectorV1) Keywords() []string { return []string{fakeDetectorKeyword} } +func (f fakeDetectorV1) Type() detector_typepb.DetectorType { return detector_typepb.DetectorType(-1) } +func (f fakeDetectorV1) Version() int { return 1 } func (f fakeDetectorV1) Description() string { return "fake detector v1" } func (f fakeDetectorV2) FromData(_ aCtx.Context, _ bool, _ []byte) ([]detectors.Result, error) { return []detectors.Result{ { - DetectorType: detectorspb.DetectorType(-1), + DetectorType: detector_typepb.DetectorType(-1), Verified: true, Raw: []byte("fake secret v2"), }, }, nil } -func (f fakeDetectorV2) Keywords() []string { return []string{fakeDetectorKeyword} } -func (f fakeDetectorV2) Type() detectorspb.DetectorType { return detectorspb.DetectorType(-1) } -func (f fakeDetectorV2) Version() int { return 2 } +func (f fakeDetectorV2) Keywords() []string { return []string{fakeDetectorKeyword} } +func (f fakeDetectorV2) Type() detector_typepb.DetectorType { return detector_typepb.DetectorType(-1) } +func (f fakeDetectorV2) Version() int { return 2 } func (f fakeDetectorV2) Description() string { return "fake detector v2" } @@ -659,7 +660,7 @@ func TestProcessResult_AllFieldsCopied(t *testing.T) { // Arrange: Create a Result result := detectors.Result{ - DetectorType: detectorspb.DetectorType(-1), + DetectorType: detector_typepb.DetectorType(-1), ExtraData: map[string]string{"key": "value"}, Raw: []byte("something"), RawV2: []byte("something:else"), @@ -681,7 +682,7 @@ func TestProcessResult_AllFieldsCopied(t *testing.T) { assert.Equal(t, []byte("something:else"), r.RawV2) assert.Equal(t, "someth***", r.Redacted) assert.True(t, r.Verified) - assert.Equal(t, detectorspb.DetectorType(-1), r.DetectorType) + assert.Equal(t, detector_typepb.DetectorType(-1), r.DetectorType) assert.Equal(t, sources.SourceID(1), r.SourceID) assert.Equal(t, sources.JobID(2), r.JobID) assert.Equal(t, int64(3), r.SecretID) @@ -817,7 +818,7 @@ func TestEngine_FalsePositivesRetainedCorrectly(t *testing.T) { { name: "no overlap, retain false positives", detectors: []detectors.Detector{ - passthroughDetector{detectorType: detectorspb.DetectorType(-1), keywords: []string{"sample"}}, + passthroughDetector{detectorType: detector_typepb.DetectorType(-1), keywords: []string{"sample"}}, }, retainFalsePositives: true, wantUnverifiedSecretCount: 1, @@ -825,7 +826,7 @@ func TestEngine_FalsePositivesRetainedCorrectly(t *testing.T) { { name: "no overlap, do not retain false positives", detectors: []detectors.Detector{ - passthroughDetector{detectorType: detectorspb.DetectorType(-1), keywords: []string{"sample"}}, + passthroughDetector{detectorType: detector_typepb.DetectorType(-1), keywords: []string{"sample"}}, }, retainFalsePositives: false, wantUnverifiedSecretCount: 0, @@ -833,8 +834,8 @@ func TestEngine_FalsePositivesRetainedCorrectly(t *testing.T) { { name: "overlap, retain false positives", detectors: []detectors.Detector{ - passthroughDetector{detectorType: detectorspb.DetectorType(-1), keywords: []string{"sample"}}, - passthroughDetector{detectorType: detectorspb.DetectorType(-2), keywords: []string{"ample"}}, + passthroughDetector{detectorType: detector_typepb.DetectorType(-1), keywords: []string{"sample"}}, + passthroughDetector{detectorType: detector_typepb.DetectorType(-2), keywords: []string{"ample"}}, }, retainFalsePositives: true, wantUnverifiedSecretCount: 2, @@ -842,8 +843,8 @@ func TestEngine_FalsePositivesRetainedCorrectly(t *testing.T) { { name: "overlap, do not retain false positives", detectors: []detectors.Detector{ - passthroughDetector{detectorType: detectorspb.DetectorType(-1), keywords: []string{"sample"}}, - passthroughDetector{detectorType: detectorspb.DetectorType(-2), keywords: []string{"ample"}}, + passthroughDetector{detectorType: detector_typepb.DetectorType(-1), keywords: []string{"sample"}}, + passthroughDetector{detectorType: detector_typepb.DetectorType(-2), keywords: []string{"ample"}}, }, retainFalsePositives: false, wantUnverifiedSecretCount: 0, @@ -1175,8 +1176,8 @@ func (c customCleaner) FromData(aCtx.Context, bool, []byte) ([]detectors.Result, return []detectors.Result{}, nil } -func (c customCleaner) Keywords() []string { return []string{} } -func (c customCleaner) Type() detectorspb.DetectorType { return detectorspb.DetectorType(-1) } +func (c customCleaner) Keywords() []string { return []string{} } +func (c customCleaner) Type() detector_typepb.DetectorType { return detector_typepb.DetectorType(-1) } func (customCleaner) Description() string { return "" } @@ -1312,25 +1313,25 @@ func TestEngine_ShouldVerifyChunk(t *testing.T) { { name: "detector override by exact version", detector: &gitlab.Scanner{}, - overrideKey: config.DetectorID{ID: detectorspb.DetectorType_Gitlab, Version: 2}, + overrideKey: config.DetectorID{ID: detector_typepb.DetectorType_Gitlab, Version: 2}, want: func(sourceVerify, detectorVerify bool) bool { return detectorVerify }, }, { name: "detector override by versionless config", detector: &gitlab.Scanner{}, - overrideKey: config.DetectorID{ID: detectorspb.DetectorType_Gitlab, Version: 0}, + overrideKey: config.DetectorID{ID: detector_typepb.DetectorType_Gitlab, Version: 0}, want: func(sourceVerify, detectorVerify bool) bool { return detectorVerify }, }, { name: "no detector override because of detector type mismatch", detector: &gitlab.Scanner{}, - overrideKey: config.DetectorID{ID: detectorspb.DetectorType_NpmToken, Version: 2}, + overrideKey: config.DetectorID{ID: detector_typepb.DetectorType_NpmToken, Version: 2}, want: func(sourceVerify, detectorVerify bool) bool { return sourceVerify }, }, { name: "no detector override because of detector version mismatch", detector: &gitlab.Scanner{}, - overrideKey: config.DetectorID{ID: detectorspb.DetectorType_Gitlab, Version: 1}, + overrideKey: config.DetectorID{ID: detector_typepb.DetectorType_Gitlab, Version: 1}, want: func(sourceVerify, detectorVerify bool) bool { return sourceVerify }, }, } @@ -1373,10 +1374,10 @@ func TestEngineInitializesCloudProviderDetectors(t *testing.T) { assert.NoError(t, err) var count int - noCloudEndpointDetectors := map[detectorspb.DetectorType]struct{}{ - detectorspb.DetectorType_ArtifactoryAccessToken: {}, - detectorspb.DetectorType_ArtifactoryReferenceToken: {}, - detectorspb.DetectorType_TableauPersonalAccessToken: {}, + noCloudEndpointDetectors := map[detector_typepb.DetectorType]struct{}{ + detector_typepb.DetectorType_ArtifactoryAccessToken: {}, + detector_typepb.DetectorType_ArtifactoryReferenceToken: {}, + detector_typepb.DetectorType_TableauPersonalAccessToken: {}, // these do not have any cloud endpoint } @@ -1478,7 +1479,7 @@ def test_something(): } type passthroughDetector struct { - detectorType detectorspb.DetectorType + detectorType detector_typepb.DetectorType keywords []string secret string } @@ -1496,9 +1497,9 @@ func (p passthroughDetector) FromData(_ aCtx.Context, verify bool, data []byte) }, nil } -func (p passthroughDetector) Keywords() []string { return p.keywords } -func (p passthroughDetector) Type() detectorspb.DetectorType { return p.detectorType } -func (p passthroughDetector) Description() string { return "fake detector for testing" } +func (p passthroughDetector) Keywords() []string { return p.keywords } +func (p passthroughDetector) Type() detector_typepb.DetectorType { return p.detectorType } +func (p passthroughDetector) Description() string { return "fake detector for testing" } type passthroughDecoder struct{} @@ -1509,7 +1510,9 @@ func (p passthroughDecoder) FromChunk(chunk *sources.Chunk) *decoders.DecodableC } } -func (p passthroughDecoder) Type() detectorspb.DecoderType { return detectorspb.DecoderType(-1) } +func (p passthroughDecoder) Type() detectorspb.DecoderType { + return detectorspb.DecoderType(-1) +} // TestEngine_DetectChunk_UsesVerifyFlag validates that detectChunk correctly forwards detectableChunk.verify to // detectors. @@ -1652,8 +1655,8 @@ func TestEngine_VerificationOverlapWorker_DetectableChunkHasCorrectVerifyFlag(t // Arrange: Create overlapping detector matches. We can't create them directly, so we have to use a minimal A-H // core. ahcore := ahocorasick.NewAhoCorasickCore([]detectors.Detector{ - passthroughDetector{detectorType: detectorspb.DetectorType(-1), keywords: []string{"keyw"}}, - passthroughDetector{detectorType: detectorspb.DetectorType(-2), keywords: []string{"keyword"}}, + passthroughDetector{detectorType: detector_typepb.DetectorType(-1), keywords: []string{"keyw"}}, + passthroughDetector{detectorType: detector_typepb.DetectorType(-2), keywords: []string{"keyword"}}, }) detectorMatches := ahcore.FindDetectorMatches(chunk.Data) require.Len(t, detectorMatches, 2) @@ -1713,8 +1716,8 @@ func TestEngine_VerificationOverlapWorker_DetectableChunkHasCorrectVerifyFlag(t // Arrange: Create non-overlapping detector matches. We can't create them directly, so we have to use a minimal // A-H core. ahcore := ahocorasick.NewAhoCorasickCore([]detectors.Detector{ - passthroughDetector{detectorType: detectorspb.DetectorType(-1), keywords: []string{"keyw"}, secret: "oahpow"}, - passthroughDetector{detectorType: detectorspb.DetectorType(-2), keywords: []string{"keyword"}, secret: "blaisd"}, + passthroughDetector{detectorType: detector_typepb.DetectorType(-1), keywords: []string{"keyw"}, secret: "oahpow"}, + passthroughDetector{detectorType: detector_typepb.DetectorType(-2), keywords: []string{"keyword"}, secret: "blaisd"}, }) detectorMatches := ahcore.FindDetectorMatches(chunk.Data) require.Len(t, detectorMatches, 2) @@ -1851,7 +1854,7 @@ func TestEngine_IterativeDecoding(t *testing.T) { detector := &passthroughDetector{ keywords: []string{detectorKeyword}, - detectorType: detectorspb.DetectorType(9999), + detectorType: detector_typepb.DetectorType(9999), } e := &Engine{ AhoCorasickCore: ahocorasick.NewAhoCorasickCore([]detectors.Detector{detector}), diff --git a/pkg/output/json.go b/pkg/output/json.go index 8a99d3206157..4d8f7eb711f0 100644 --- a/pkg/output/json.go +++ b/pkg/output/json.go @@ -7,6 +7,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/context" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" "github.com/trufflesecurity/trufflehog/v3/pkg/pb/source_metadatapb" "github.com/trufflesecurity/trufflehog/v3/pkg/pb/sourcespb" @@ -34,7 +35,7 @@ func (p *JSONPrinter) Print(_ context.Context, r *detectors.ResultWithMetadata) // SourceName is the name of the Source. SourceName string // DetectorType is the type of Detector. - DetectorType detectorspb.DetectorType + DetectorType detector_typepb.DetectorType // DetectorName is the string name of the DetectorType. DetectorName string // DetectorDescription is the description of the Detector. diff --git a/pkg/pb/detectorspb/detectors.pb.go b/pkg/pb/detectorspb/detectors.pb.go index 9dc30b110d3b..58c6e248c85a 100644 --- a/pkg/pb/detectorspb/detectors.pb.go +++ b/pkg/pb/detectorspb/detectors.pb.go @@ -75,3198 +75,6 @@ func (DecoderType) EnumDescriptor() ([]byte, []int) { return file_detectors_proto_rawDescGZIP(), []int{0} } -type DetectorType int32 - -const ( - DetectorType_Alibaba DetectorType = 0 - DetectorType_AMQP DetectorType = 1 // Not yet implemented - DetectorType_AWS DetectorType = 2 - DetectorType_Azure DetectorType = 3 - DetectorType_Circle DetectorType = 4 - DetectorType_Coinbase DetectorType = 5 - DetectorType_GCP DetectorType = 6 - DetectorType_Generic DetectorType = 7 - DetectorType_Github DetectorType = 8 - DetectorType_Gitlab DetectorType = 9 - DetectorType_JDBC DetectorType = 10 - DetectorType_RazorPay DetectorType = 11 - DetectorType_SendGrid DetectorType = 12 - DetectorType_Slack DetectorType = 13 - DetectorType_Square DetectorType = 14 - DetectorType_PrivateKey DetectorType = 15 - DetectorType_Stripe DetectorType = 16 - DetectorType_URI DetectorType = 17 - DetectorType_Dropbox DetectorType = 18 - DetectorType_Heroku DetectorType = 19 - DetectorType_Mailchimp DetectorType = 20 - DetectorType_Okta DetectorType = 21 - DetectorType_OneLogin DetectorType = 22 - DetectorType_PivotalTracker DetectorType = 23 - DetectorType_SquareApp DetectorType = 25 - DetectorType_Twilio DetectorType = 26 - DetectorType_Test DetectorType = 27 - DetectorType_TravisCI DetectorType = 29 - DetectorType_SlackWebhook DetectorType = 30 - DetectorType_PaypalOauth DetectorType = 31 - DetectorType_PagerDutyApiKey DetectorType = 32 - DetectorType_Firebase DetectorType = 33 // Not yet implemented - DetectorType_Mailgun DetectorType = 34 - DetectorType_HubSpot DetectorType = 35 - DetectorType_GitHubApp DetectorType = 36 - DetectorType_CircleCI DetectorType = 37 // Not yet implemented - DetectorType_WpEngine DetectorType = 38 // Not yet implemented - DetectorType_DatadogToken DetectorType = 39 - DetectorType_FacebookOAuth DetectorType = 40 - DetectorType_AsanaPersonalAccessToken DetectorType = 41 - DetectorType_AmplitudeApiKey DetectorType = 42 - DetectorType_BitLyAccessToken DetectorType = 43 - DetectorType_CalendlyApiKey DetectorType = 44 - DetectorType_ZapierWebhook DetectorType = 45 - DetectorType_YoutubeApiKey DetectorType = 46 - DetectorType_SalesforceOauth2 DetectorType = 47 // Not yet implemented - DetectorType_TwitterApiSecret DetectorType = 48 // Not yet implemented - DetectorType_NpmToken DetectorType = 49 - DetectorType_NewRelicPersonalApiKey DetectorType = 50 - // Deprecated: Marked as deprecated in detectors.proto. - DetectorType_AirtableApiKey DetectorType = 51 - DetectorType_AkamaiToken DetectorType = 52 // Not yet implemented - DetectorType_AmazonMWS DetectorType = 53 // Not yet implemented - DetectorType_KubeConfig DetectorType = 54 // Not yet implemented - DetectorType_Auth0oauth DetectorType = 55 - DetectorType_Bitfinex DetectorType = 56 - DetectorType_Clarifai DetectorType = 57 - DetectorType_CloudflareGlobalApiKey DetectorType = 58 - DetectorType_CloudflareCaKey DetectorType = 59 - DetectorType_Confluent DetectorType = 60 - DetectorType_ContentfulDelivery DetectorType = 61 // Not yet implemented - DetectorType_DatabricksToken DetectorType = 62 - DetectorType_DigitalOceanSpaces DetectorType = 63 // Not yet implemented - DetectorType_DigitalOceanToken DetectorType = 64 - DetectorType_DiscordBotToken DetectorType = 65 - DetectorType_DiscordWebhook DetectorType = 66 - // Deprecated: Marked as deprecated in detectors.proto. - DetectorType_EtsyApiKey DetectorType = 67 - DetectorType_FastlyPersonalToken DetectorType = 68 - DetectorType_GoogleOauth2 DetectorType = 69 // Not yet implemented - DetectorType_ReCAPTCHA DetectorType = 70 // Not yet implemented - DetectorType_GoogleApiKey DetectorType = 71 // Not yet implemented - DetectorType_Hunter DetectorType = 72 - DetectorType_IbmCloudUserKey DetectorType = 73 - DetectorType_Netlify DetectorType = 74 - DetectorType_Vonage DetectorType = 75 // Not yet implemented - DetectorType_EquinixOauth DetectorType = 76 // Not yet implemented - DetectorType_Paystack DetectorType = 77 - DetectorType_PlaidToken DetectorType = 78 // Not yet implemented - DetectorType_PlaidKey DetectorType = 79 - DetectorType_Plivo DetectorType = 80 - DetectorType_Postmark DetectorType = 81 - DetectorType_PubNubPublishKey DetectorType = 82 - DetectorType_PubNubSubscriptionKey DetectorType = 83 - DetectorType_PusherChannelKey DetectorType = 84 - DetectorType_ScalewayKey DetectorType = 85 - DetectorType_SendinBlueV2 DetectorType = 86 - DetectorType_SentryToken DetectorType = 87 - DetectorType_ShodanKey DetectorType = 88 - DetectorType_SnykKey DetectorType = 89 - DetectorType_SpotifyKey DetectorType = 90 - DetectorType_TelegramBotToken DetectorType = 91 - DetectorType_TencentCloudKey DetectorType = 92 // Not yet implemented - DetectorType_TerraformCloudPersonalToken DetectorType = 93 - DetectorType_TrelloApiKey DetectorType = 94 - DetectorType_ZendeskApi DetectorType = 95 - DetectorType_MaxMindLicense DetectorType = 96 - DetectorType_AirtableMetadataApiKey DetectorType = 97 // Not yet implemented - DetectorType_AsanaOauth DetectorType = 98 - DetectorType_RapidApi DetectorType = 99 - DetectorType_CloudflareApiToken DetectorType = 100 - DetectorType_Webex DetectorType = 101 - DetectorType_FirebaseCloudMessaging DetectorType = 102 // Not yet implemented - DetectorType_ContentfulPersonalAccessToken DetectorType = 103 - DetectorType_MapBox DetectorType = 104 - DetectorType_MailJetBasicAuth DetectorType = 105 - DetectorType_MailJetSMS DetectorType = 106 - DetectorType_HubSpotApiKey DetectorType = 107 - DetectorType_HubSpotOauth DetectorType = 108 // Not yet implemented - DetectorType_SslMate DetectorType = 109 - DetectorType_Auth0ManagementApiToken DetectorType = 110 - DetectorType_MessageBird DetectorType = 111 - DetectorType_ElasticEmail DetectorType = 112 - DetectorType_FigmaPersonalAccessToken DetectorType = 113 - DetectorType_MicrosoftTeamsWebhook DetectorType = 114 - DetectorType_GitHubOld DetectorType = 115 // Not yet implemented - DetectorType_VultrApiKey DetectorType = 116 - DetectorType_Pepipost DetectorType = 117 - DetectorType_Postman DetectorType = 118 - DetectorType_CloudsightKey DetectorType = 119 // Not yet implemented - DetectorType_JiraToken DetectorType = 120 - DetectorType_NexmoApiKey DetectorType = 121 - DetectorType_SegmentApiKey DetectorType = 122 - DetectorType_SumoLogicKey DetectorType = 123 - DetectorType_PushBulletApiKey DetectorType = 124 - DetectorType_AirbrakeProjectKey DetectorType = 125 - DetectorType_AirbrakeUserKey DetectorType = 126 - DetectorType_PendoIntegrationKey DetectorType = 127 // Not yet implemented - DetectorType_SplunkOberservabilityToken DetectorType = 128 - DetectorType_LokaliseToken DetectorType = 129 - DetectorType_Calendarific DetectorType = 130 - DetectorType_Jumpcloud DetectorType = 131 - DetectorType_IpStack DetectorType = 133 - DetectorType_Notion DetectorType = 134 - DetectorType_DroneCI DetectorType = 135 - DetectorType_AdobeIO DetectorType = 136 - DetectorType_TwelveData DetectorType = 137 - DetectorType_D7Network DetectorType = 138 - DetectorType_ScrapingBee DetectorType = 139 - DetectorType_KeenIO DetectorType = 140 - DetectorType_Wakatime DetectorType = 141 // Not yet implemented - DetectorType_Buildkite DetectorType = 142 - DetectorType_Verimail DetectorType = 143 - DetectorType_Zerobounce DetectorType = 144 - DetectorType_Mailboxlayer DetectorType = 145 - DetectorType_Fastspring DetectorType = 146 // Not yet implemented - DetectorType_Paddle DetectorType = 147 // Not yet implemented - DetectorType_Sellfy DetectorType = 148 // Not yet implemented - DetectorType_FixerIO DetectorType = 149 - DetectorType_ButterCMS DetectorType = 150 - DetectorType_Taxjar DetectorType = 151 - DetectorType_Avalara DetectorType = 152 // Not yet implemented - DetectorType_Helpscout DetectorType = 153 - DetectorType_ElasticPath DetectorType = 154 // Not yet implemented - DetectorType_Zeplin DetectorType = 155 - DetectorType_Intercom DetectorType = 156 - DetectorType_Mailmodo DetectorType = 157 - DetectorType_CannyIo DetectorType = 158 - DetectorType_Pipedrive DetectorType = 159 - DetectorType_Vercel DetectorType = 160 - DetectorType_PosthogApp DetectorType = 161 - DetectorType_SinchMessage DetectorType = 162 - DetectorType_Ayrshare DetectorType = 163 - DetectorType_HelpCrunch DetectorType = 164 - DetectorType_LiveAgent DetectorType = 165 - DetectorType_Beamer DetectorType = 166 - DetectorType_WeChatAppKey DetectorType = 167 // Not yet implemented - DetectorType_LineMessaging DetectorType = 168 - DetectorType_UberServerToken DetectorType = 169 // Not yet implemented - DetectorType_AlgoliaAdminKey DetectorType = 170 - DetectorType_FullContact DetectorType = 171 // Not yet implemented - DetectorType_Mandrill DetectorType = 172 - DetectorType_Flutterwave DetectorType = 173 - DetectorType_MattermostPersonalToken DetectorType = 174 - DetectorType_Cloudant DetectorType = 175 // Not yet implemented - DetectorType_LineNotify DetectorType = 176 - DetectorType_LinearAPI DetectorType = 177 - DetectorType_Ubidots DetectorType = 178 - DetectorType_Anypoint DetectorType = 179 - DetectorType_Dwolla DetectorType = 180 - DetectorType_ArtifactoryAccessToken DetectorType = 181 - DetectorType_Surge DetectorType = 182 // Not yet implemented - DetectorType_Sparkpost DetectorType = 183 - DetectorType_GoCardless DetectorType = 184 - DetectorType_Codacy DetectorType = 185 - DetectorType_Kraken DetectorType = 186 - DetectorType_Checkout DetectorType = 187 - DetectorType_Kairos DetectorType = 188 // Not yet implemented - DetectorType_ClockworkSMS DetectorType = 189 - DetectorType_Atlassian DetectorType = 190 // Not yet implemented - DetectorType_LaunchDarkly DetectorType = 191 - DetectorType_Coveralls DetectorType = 192 - DetectorType_Linode DetectorType = 193 // Not yet implemented - DetectorType_WePay DetectorType = 194 - DetectorType_PlanetScale DetectorType = 195 - DetectorType_Doppler DetectorType = 196 - DetectorType_Agora DetectorType = 197 - DetectorType_Samsara DetectorType = 198 // Not yet implemented - DetectorType_FrameIO DetectorType = 199 - DetectorType_RubyGems DetectorType = 200 - DetectorType_OpenAI DetectorType = 201 - DetectorType_SurveySparrow DetectorType = 202 - DetectorType_Simvoly DetectorType = 203 - DetectorType_Survicate DetectorType = 204 - DetectorType_Omnisend DetectorType = 205 - DetectorType_Groovehq DetectorType = 206 - DetectorType_Newsapi DetectorType = 207 - DetectorType_Chatbot DetectorType = 208 - DetectorType_ClickSendsms DetectorType = 209 - DetectorType_Getgist DetectorType = 210 - DetectorType_CustomerIO DetectorType = 211 - DetectorType_ApiDeck DetectorType = 212 - DetectorType_Nftport DetectorType = 213 - DetectorType_Copper DetectorType = 214 - DetectorType_Close DetectorType = 215 - DetectorType_Myfreshworks DetectorType = 216 - DetectorType_Salesflare DetectorType = 217 - DetectorType_Webflow DetectorType = 218 - DetectorType_Duda DetectorType = 219 // Not yet implemented - DetectorType_Yext DetectorType = 220 // Not yet implemented - DetectorType_ContentStack DetectorType = 221 // Not yet implemented - DetectorType_StoryblokAccessToken DetectorType = 222 - DetectorType_GraphCMS DetectorType = 223 - DetectorType_Checkmarket DetectorType = 224 // Not yet implemented - DetectorType_Convertkit DetectorType = 225 - DetectorType_CustomerGuru DetectorType = 226 - DetectorType_Kaleyra DetectorType = 227 // Not yet implemented - DetectorType_Mailerlite DetectorType = 228 - DetectorType_Qualaroo DetectorType = 229 - DetectorType_SatismeterProjectkey DetectorType = 230 - DetectorType_SatismeterWritekey DetectorType = 231 - DetectorType_Simplesat DetectorType = 232 - DetectorType_SurveyAnyplace DetectorType = 233 - DetectorType_SurveyBot DetectorType = 234 - DetectorType_Webengage DetectorType = 235 // Not yet implemented - DetectorType_ZonkaFeedback DetectorType = 236 - DetectorType_Delighted DetectorType = 237 - DetectorType_Feedier DetectorType = 238 - DetectorType_Abyssale DetectorType = 239 - DetectorType_Magnetic DetectorType = 240 - // Deprecated: Marked as deprecated in detectors.proto. - DetectorType_Nytimes DetectorType = 241 - DetectorType_Polygon DetectorType = 242 - DetectorType_Powrbot DetectorType = 243 - // Deprecated: Marked as deprecated in detectors.proto. - DetectorType_ProspectIO DetectorType = 244 - DetectorType_Skrappio DetectorType = 245 - DetectorType_Monday DetectorType = 246 - DetectorType_Smartsheets DetectorType = 247 - DetectorType_Wrike DetectorType = 248 - DetectorType_Float DetectorType = 249 - DetectorType_Imagekit DetectorType = 250 - // Deprecated: Marked as deprecated in detectors.proto. - DetectorType_Integromat DetectorType = 251 - DetectorType_Salesblink DetectorType = 252 - DetectorType_Bored DetectorType = 253 // Not yet implemented - DetectorType_Campayn DetectorType = 254 - DetectorType_Clinchpad DetectorType = 255 - DetectorType_CompanyHub DetectorType = 256 - DetectorType_Debounce DetectorType = 257 - DetectorType_Dyspatch DetectorType = 258 - DetectorType_Guardianapi DetectorType = 259 - DetectorType_Harvest DetectorType = 260 - DetectorType_Moosend DetectorType = 261 - DetectorType_OpenWeather DetectorType = 262 - DetectorType_Siteleaf DetectorType = 263 - DetectorType_Squarespace DetectorType = 264 - DetectorType_FlowFlu DetectorType = 265 - DetectorType_Nimble DetectorType = 266 - DetectorType_LessAnnoyingCRM DetectorType = 267 - DetectorType_Nethunt DetectorType = 268 - DetectorType_Apptivo DetectorType = 269 - DetectorType_CapsuleCRM DetectorType = 270 - DetectorType_Insightly DetectorType = 271 - DetectorType_Kylas DetectorType = 272 - DetectorType_OnepageCRM DetectorType = 273 - DetectorType_User DetectorType = 274 - DetectorType_ProspectCRM DetectorType = 275 - DetectorType_ReallySimpleSystems DetectorType = 276 - DetectorType_Airship DetectorType = 277 - DetectorType_Artsy DetectorType = 278 - DetectorType_Yandex DetectorType = 279 - DetectorType_Clockify DetectorType = 280 - DetectorType_Dnscheck DetectorType = 281 - DetectorType_EasyInsight DetectorType = 282 - DetectorType_Ethplorer DetectorType = 283 - DetectorType_Everhour DetectorType = 284 - DetectorType_Fulcrum DetectorType = 285 - DetectorType_GeoIpifi DetectorType = 286 - DetectorType_Jotform DetectorType = 287 - DetectorType_Refiner DetectorType = 288 - DetectorType_Timezoneapi DetectorType = 289 - DetectorType_TogglTrack DetectorType = 290 - DetectorType_Vpnapi DetectorType = 291 - DetectorType_Workstack DetectorType = 292 - DetectorType_Apollo DetectorType = 293 - DetectorType_Eversign DetectorType = 294 // Not yet implemented - DetectorType_Juro DetectorType = 295 - DetectorType_KarmaCRM DetectorType = 296 - DetectorType_Metrilo DetectorType = 297 - DetectorType_Pandadoc DetectorType = 298 - DetectorType_RevampCRM DetectorType = 299 - DetectorType_Salescookie DetectorType = 300 - DetectorType_Alconost DetectorType = 301 - DetectorType_Blogger DetectorType = 302 - DetectorType_Accuweather DetectorType = 303 - // Deprecated: Marked as deprecated in detectors.proto. - DetectorType_Opengraphr DetectorType = 304 - DetectorType_Rawg DetectorType = 305 - DetectorType_Riotgames DetectorType = 306 // Not yet implemented - DetectorType_Clientary DetectorType = 307 - DetectorType_Stormglass DetectorType = 308 - DetectorType_Tomtom DetectorType = 309 - DetectorType_Twitch DetectorType = 310 - DetectorType_Documo DetectorType = 311 - DetectorType_Cloudways DetectorType = 312 // Not yet implemented - DetectorType_Veevavault DetectorType = 313 // Not yet implemented - DetectorType_KiteConnect DetectorType = 314 // Not yet implemented - DetectorType_ShopeeOpenPlatform DetectorType = 315 // Not yet implemented - DetectorType_TeamViewer DetectorType = 316 // Not yet implemented - DetectorType_Bulbul DetectorType = 317 - DetectorType_CentralStationCRM DetectorType = 318 - DetectorType_Teamgate DetectorType = 319 - DetectorType_Axonaut DetectorType = 320 - DetectorType_Tyntec DetectorType = 321 - DetectorType_Appcues DetectorType = 322 - DetectorType_Autoklose DetectorType = 323 - DetectorType_Cloudplan DetectorType = 324 - DetectorType_Dotdigital DetectorType = 325 - DetectorType_GetEmail DetectorType = 326 - DetectorType_GetEmails DetectorType = 327 - DetectorType_Kontent DetectorType = 328 - DetectorType_Leadfeeder DetectorType = 329 - DetectorType_Raven DetectorType = 330 - DetectorType_RocketReach DetectorType = 331 - DetectorType_Uplead DetectorType = 332 - DetectorType_Brandfetch DetectorType = 333 - DetectorType_Clearbit DetectorType = 334 - DetectorType_Crowdin DetectorType = 335 - DetectorType_Mapquest DetectorType = 336 - DetectorType_Noticeable DetectorType = 337 - DetectorType_Onbuka DetectorType = 338 // Not yet implemented - DetectorType_Todoist DetectorType = 339 - DetectorType_Storychief DetectorType = 340 - DetectorType_LinkedIn DetectorType = 341 // Not yet implemented - DetectorType_YouSign DetectorType = 342 - DetectorType_Docker DetectorType = 343 - DetectorType_Telesign DetectorType = 344 // Not yet implemented - DetectorType_Spoonacular DetectorType = 345 - DetectorType_Aerisweather DetectorType = 346 // Not yet implemented - DetectorType_Alphavantage DetectorType = 347 // Not yet implemented - DetectorType_Imgur DetectorType = 348 // Not yet implemented - DetectorType_Imagga DetectorType = 349 - DetectorType_SMSApi DetectorType = 350 // Not yet implemented - DetectorType_Distribusion DetectorType = 351 // Not yet implemented - // Deprecated: Marked as deprecated in detectors.proto. - DetectorType_Blablabus DetectorType = 352 - DetectorType_WordsApi DetectorType = 353 // Not yet implemented - DetectorType_Currencylayer DetectorType = 354 - DetectorType_Html2Pdf DetectorType = 355 - DetectorType_IPGeolocation DetectorType = 356 - DetectorType_Owlbot DetectorType = 357 - DetectorType_Cloudmersive DetectorType = 358 - DetectorType_Dynalist DetectorType = 359 - DetectorType_ExchangeRateAPI DetectorType = 360 - DetectorType_HolidayAPI DetectorType = 361 - DetectorType_Ipapi DetectorType = 362 - DetectorType_Marketstack DetectorType = 363 - DetectorType_Nutritionix DetectorType = 364 - DetectorType_Swell DetectorType = 365 - DetectorType_ClickupPersonalToken DetectorType = 366 - // Deprecated: Marked as deprecated in detectors.proto. - DetectorType_Nitro DetectorType = 367 - DetectorType_Rev DetectorType = 368 - DetectorType_RunRunIt DetectorType = 369 - DetectorType_Typeform DetectorType = 370 - DetectorType_Mixpanel DetectorType = 371 - DetectorType_Tradier DetectorType = 372 - DetectorType_Verifier DetectorType = 373 - DetectorType_Vouchery DetectorType = 374 - DetectorType_Alegra DetectorType = 375 - DetectorType_Audd DetectorType = 376 - DetectorType_Baremetrics DetectorType = 377 - DetectorType_Coinlib DetectorType = 378 - DetectorType_ExchangeRatesAPI DetectorType = 379 - DetectorType_CurrencyScoop DetectorType = 380 - DetectorType_FXMarket DetectorType = 381 - DetectorType_CurrencyCloud DetectorType = 382 - DetectorType_GetGeoAPI DetectorType = 383 - DetectorType_Abstract DetectorType = 384 - DetectorType_Billomat DetectorType = 385 - DetectorType_Dovico DetectorType = 386 - DetectorType_Bitbar DetectorType = 387 - DetectorType_Bugsnag DetectorType = 388 - DetectorType_AssemblyAI DetectorType = 389 - DetectorType_AdafruitIO DetectorType = 390 - DetectorType_Apify DetectorType = 391 - DetectorType_CoinGecko DetectorType = 392 // Not yet implemented - DetectorType_CryptoCompare DetectorType = 393 - DetectorType_Fullstory DetectorType = 394 - DetectorType_HelloSign DetectorType = 395 - DetectorType_Loyverse DetectorType = 396 - DetectorType_NetCore DetectorType = 397 // Not yet implemented - DetectorType_SauceLabs DetectorType = 398 - DetectorType_AlienVault DetectorType = 399 - DetectorType_Apiflash DetectorType = 401 - DetectorType_Coinlayer DetectorType = 402 - DetectorType_CurrentsAPI DetectorType = 403 - DetectorType_DataGov DetectorType = 404 - DetectorType_Enigma DetectorType = 405 - DetectorType_FinancialModelingPrep DetectorType = 406 - DetectorType_Geocodio DetectorType = 407 - DetectorType_HereAPI DetectorType = 408 - // Deprecated: Marked as deprecated in detectors.proto. - DetectorType_Macaddress DetectorType = 409 - DetectorType_OOPSpam DetectorType = 410 - DetectorType_ProtocolsIO DetectorType = 411 - DetectorType_ScraperAPI DetectorType = 412 - DetectorType_SecurityTrails DetectorType = 413 - DetectorType_TomorrowIO DetectorType = 414 - DetectorType_WorldCoinIndex DetectorType = 415 - DetectorType_FacePlusPlus DetectorType = 416 - DetectorType_Voicegain DetectorType = 417 - DetectorType_Deepgram DetectorType = 418 - DetectorType_VisualCrossing DetectorType = 419 - DetectorType_Finnhub DetectorType = 420 - DetectorType_Tiingo DetectorType = 421 - DetectorType_RingCentral DetectorType = 422 - DetectorType_Finage DetectorType = 423 - DetectorType_Edamam DetectorType = 424 - DetectorType_HypeAuditor DetectorType = 425 // Not yet implemented - DetectorType_Gengo DetectorType = 426 - DetectorType_Front DetectorType = 427 - DetectorType_Fleetbase DetectorType = 428 - DetectorType_Bubble DetectorType = 429 // Not yet implemented - DetectorType_Bannerbear DetectorType = 430 - DetectorType_Adzuna DetectorType = 431 - DetectorType_BitcoinAverage DetectorType = 432 - DetectorType_CommerceJS DetectorType = 433 - DetectorType_DetectLanguage DetectorType = 434 - // Deprecated: Marked as deprecated in detectors.proto. - DetectorType_FakeJSON DetectorType = 435 - DetectorType_Graphhopper DetectorType = 436 - DetectorType_Lexigram DetectorType = 437 - DetectorType_LinkPreview DetectorType = 438 - DetectorType_Numverify DetectorType = 439 - DetectorType_ProxyCrawl DetectorType = 440 - DetectorType_ZipCodeAPI DetectorType = 441 - DetectorType_Cometchat DetectorType = 442 // Not yet implemented - DetectorType_Keygen DetectorType = 443 // Not yet implemented - DetectorType_Mixcloud DetectorType = 444 // Not yet implemented - DetectorType_TatumIO DetectorType = 445 - DetectorType_Tmetric DetectorType = 446 - // Deprecated: Marked as deprecated in detectors.proto. - DetectorType_Lastfm DetectorType = 447 - DetectorType_Browshot DetectorType = 448 - DetectorType_JSONbin DetectorType = 449 // Not yet implemented - DetectorType_LocationIQ DetectorType = 450 - DetectorType_ScreenshotAPI DetectorType = 451 - DetectorType_WeatherStack DetectorType = 452 - DetectorType_Amadeus DetectorType = 453 - DetectorType_FourSquare DetectorType = 454 - DetectorType_Flickr DetectorType = 455 - DetectorType_ClickHelp DetectorType = 456 - DetectorType_Ambee DetectorType = 457 - DetectorType_Api2Cart DetectorType = 458 - DetectorType_Hypertrack DetectorType = 459 - DetectorType_KakaoTalk DetectorType = 460 // Not yet implemented - DetectorType_RiteKit DetectorType = 461 - DetectorType_Shutterstock DetectorType = 462 - // Deprecated: Marked as deprecated in detectors.proto. - DetectorType_Text2Data DetectorType = 463 - DetectorType_YouNeedABudget DetectorType = 464 - DetectorType_Cricket DetectorType = 465 // Not yet implemented - DetectorType_Filestack DetectorType = 466 // Not yet implemented - DetectorType_Gyazo DetectorType = 467 - DetectorType_Mavenlink DetectorType = 468 - DetectorType_Sheety DetectorType = 469 - DetectorType_Sportsmonk DetectorType = 470 - DetectorType_Stockdata DetectorType = 471 - DetectorType_Unsplash DetectorType = 472 - DetectorType_Allsports DetectorType = 473 - DetectorType_CalorieNinja DetectorType = 474 - DetectorType_WalkScore DetectorType = 475 - DetectorType_Strava DetectorType = 476 - DetectorType_Cicero DetectorType = 477 - DetectorType_IPQuality DetectorType = 478 - DetectorType_ParallelDots DetectorType = 479 - DetectorType_Roaring DetectorType = 480 - DetectorType_Mailsac DetectorType = 481 - DetectorType_Whoxy DetectorType = 482 - DetectorType_WorldWeather DetectorType = 483 - DetectorType_ApiFonica DetectorType = 484 - DetectorType_Aylien DetectorType = 485 - DetectorType_Geocode DetectorType = 486 - DetectorType_IconFinder DetectorType = 487 - // Deprecated: Marked as deprecated in detectors.proto. - DetectorType_Ipify DetectorType = 488 - DetectorType_LanguageLayer DetectorType = 489 - DetectorType_Lob DetectorType = 490 - // Deprecated: Marked as deprecated in detectors.proto. - DetectorType_OnWaterIO DetectorType = 491 - DetectorType_Pastebin DetectorType = 492 - DetectorType_PdfLayer DetectorType = 493 - DetectorType_Pixabay DetectorType = 494 - DetectorType_ReadMe DetectorType = 495 - DetectorType_VatLayer DetectorType = 496 - DetectorType_VirusTotal DetectorType = 497 - DetectorType_AirVisual DetectorType = 498 - DetectorType_Currencyfreaks DetectorType = 499 - DetectorType_Duffel DetectorType = 500 // Not yet implemented - DetectorType_FlatIO DetectorType = 501 - DetectorType_M3o DetectorType = 502 - DetectorType_Mesibo DetectorType = 503 - DetectorType_Openuv DetectorType = 504 - DetectorType_Snipcart DetectorType = 505 - DetectorType_Besttime DetectorType = 506 - DetectorType_Happyscribe DetectorType = 507 - DetectorType_Humanity DetectorType = 508 - DetectorType_Impala DetectorType = 509 - DetectorType_Loginradius DetectorType = 510 - DetectorType_AutoPilot DetectorType = 511 - DetectorType_Bitmex DetectorType = 512 - DetectorType_ClustDoc DetectorType = 513 - DetectorType_Messari DetectorType = 514 // Not yet implemented - DetectorType_PdfShift DetectorType = 515 - DetectorType_Poloniex DetectorType = 516 - DetectorType_RestpackHtmlToPdfAPI DetectorType = 517 - DetectorType_RestpackScreenshotAPI DetectorType = 518 - DetectorType_ShutterstockOAuth DetectorType = 519 - DetectorType_SkyBiometry DetectorType = 520 - DetectorType_AbuseIPDB DetectorType = 521 - DetectorType_AletheiaApi DetectorType = 522 - DetectorType_BlitApp DetectorType = 523 - DetectorType_Censys DetectorType = 524 - DetectorType_Cloverly DetectorType = 525 - DetectorType_CountryLayer DetectorType = 526 - DetectorType_FileIO DetectorType = 527 - DetectorType_FlightApi DetectorType = 528 - DetectorType_Geoapify DetectorType = 529 - DetectorType_IPinfoDB DetectorType = 530 - DetectorType_MediaStack DetectorType = 531 - DetectorType_NasdaqDataLink DetectorType = 532 - DetectorType_OpenCageData DetectorType = 533 - DetectorType_Paymongo DetectorType = 534 - DetectorType_PositionStack DetectorType = 535 - DetectorType_Rebrandly DetectorType = 536 - DetectorType_ScreenshotLayer DetectorType = 537 - DetectorType_Stytch DetectorType = 538 - DetectorType_Unplugg DetectorType = 539 - DetectorType_UPCDatabase DetectorType = 540 - DetectorType_UserStack DetectorType = 541 - DetectorType_Geocodify DetectorType = 542 - DetectorType_Newscatcher DetectorType = 543 - DetectorType_Nicereply DetectorType = 544 - DetectorType_Partnerstack DetectorType = 545 - DetectorType_Route4me DetectorType = 546 - DetectorType_Scrapeowl DetectorType = 547 - DetectorType_ScrapingDog DetectorType = 548 // Not yet implemented - DetectorType_Streak DetectorType = 549 - DetectorType_Veriphone DetectorType = 550 - DetectorType_Webscraping DetectorType = 551 - DetectorType_Zenscrape DetectorType = 552 - DetectorType_Zenserp DetectorType = 553 - DetectorType_CoinApi DetectorType = 554 - DetectorType_Gitter DetectorType = 555 - DetectorType_Host DetectorType = 556 - DetectorType_Iexcloud DetectorType = 557 - // Deprecated: Marked as deprecated in detectors.proto. - DetectorType_Restpack DetectorType = 558 - DetectorType_ScraperBox DetectorType = 559 - DetectorType_ScrapingAnt DetectorType = 560 - DetectorType_SerpStack DetectorType = 561 - DetectorType_SmartyStreets DetectorType = 562 - DetectorType_TicketMaster DetectorType = 563 - DetectorType_AviationStack DetectorType = 564 - DetectorType_BombBomb DetectorType = 565 - DetectorType_Commodities DetectorType = 566 - DetectorType_Dfuse DetectorType = 567 - DetectorType_EdenAI DetectorType = 568 - DetectorType_Glassnode DetectorType = 569 - DetectorType_Guru DetectorType = 570 - DetectorType_Hive DetectorType = 571 - DetectorType_Hiveage DetectorType = 572 - DetectorType_Kickbox DetectorType = 573 - // Deprecated: Marked as deprecated in detectors.proto. - DetectorType_Passbase DetectorType = 574 - DetectorType_PostageApp DetectorType = 575 - DetectorType_PureStake DetectorType = 576 - DetectorType_Qubole DetectorType = 577 - DetectorType_CarbonInterface DetectorType = 578 - DetectorType_Intrinio DetectorType = 579 - // Deprecated: Marked as deprecated in detectors.proto. - DetectorType_QuickMetrics DetectorType = 580 - DetectorType_ScrapeStack DetectorType = 581 - DetectorType_TechnicalAnalysisApi DetectorType = 582 - DetectorType_Urlscan DetectorType = 583 - DetectorType_BaseApiIO DetectorType = 584 // Not yet implemented - DetectorType_DailyCO DetectorType = 585 - DetectorType_TLy DetectorType = 586 - DetectorType_Shortcut DetectorType = 587 - DetectorType_Appfollow DetectorType = 588 - DetectorType_Thinkific DetectorType = 589 - DetectorType_Feedly DetectorType = 590 // Not yet implemented - DetectorType_Stitchdata DetectorType = 591 - DetectorType_Fetchrss DetectorType = 592 - DetectorType_Signupgenius DetectorType = 593 - DetectorType_Signaturit DetectorType = 594 - DetectorType_Optimizely DetectorType = 595 - DetectorType_OcrSpace DetectorType = 596 // Not yet implemented - DetectorType_WeatherBit DetectorType = 597 - DetectorType_BuddyNS DetectorType = 598 - DetectorType_ZipAPI DetectorType = 599 - DetectorType_ZipBooks DetectorType = 600 - DetectorType_Onedesk DetectorType = 601 - DetectorType_Bugherd DetectorType = 602 - DetectorType_Blazemeter DetectorType = 603 - DetectorType_Autodesk DetectorType = 604 - DetectorType_Tru DetectorType = 605 - DetectorType_UnifyID DetectorType = 606 - DetectorType_Trimble DetectorType = 607 // Not yet implemented - DetectorType_Smooch DetectorType = 608 - DetectorType_Semaphore DetectorType = 609 - DetectorType_Telnyx DetectorType = 610 - DetectorType_Signalwire DetectorType = 611 - DetectorType_Textmagic DetectorType = 612 - DetectorType_Serphouse DetectorType = 613 - DetectorType_Planyo DetectorType = 614 - DetectorType_Simplybook DetectorType = 615 // Not yet implemented - DetectorType_Vyte DetectorType = 616 - DetectorType_Nylas DetectorType = 617 - DetectorType_Squareup DetectorType = 618 - DetectorType_Dandelion DetectorType = 619 - // Deprecated: Marked as deprecated in detectors.proto. - DetectorType_DataFire DetectorType = 620 - DetectorType_DeepAI DetectorType = 621 - DetectorType_MeaningCloud DetectorType = 622 - DetectorType_NeutrinoApi DetectorType = 623 - DetectorType_Storecove DetectorType = 624 - DetectorType_Shipday DetectorType = 625 - // Deprecated: Marked as deprecated in detectors.proto. - DetectorType_Sentiment DetectorType = 626 - DetectorType_StreamChatMessaging DetectorType = 627 // Not yet implemented - DetectorType_TeamworkCRM DetectorType = 628 - DetectorType_TeamworkDesk DetectorType = 629 - DetectorType_TeamworkSpaces DetectorType = 630 - DetectorType_TheOddsApi DetectorType = 631 - DetectorType_Apacta DetectorType = 632 - DetectorType_GetSandbox DetectorType = 633 - // Deprecated: Marked as deprecated in detectors.proto. - DetectorType_Happi DetectorType = 634 - DetectorType_Oanda DetectorType = 635 - DetectorType_FastForex DetectorType = 636 - DetectorType_APIMatic DetectorType = 637 - DetectorType_VersionEye DetectorType = 638 - DetectorType_EagleEyeNetworks DetectorType = 639 - DetectorType_ThousandEyes DetectorType = 640 - DetectorType_SelectPDF DetectorType = 641 - DetectorType_Flightstats DetectorType = 642 - DetectorType_ChecIO DetectorType = 643 - DetectorType_Manifest DetectorType = 644 - // Deprecated: Marked as deprecated in detectors.proto. - DetectorType_ApiScience DetectorType = 645 - DetectorType_AppSynergy DetectorType = 646 - DetectorType_Caflou DetectorType = 647 - DetectorType_Caspio DetectorType = 648 - DetectorType_ChecklyHQ DetectorType = 649 - DetectorType_CloudElements DetectorType = 650 - DetectorType_DronaHQ DetectorType = 651 - DetectorType_Enablex DetectorType = 652 - DetectorType_Fmfw DetectorType = 653 - DetectorType_GoodDay DetectorType = 654 - DetectorType_Luno DetectorType = 655 - DetectorType_Meistertask DetectorType = 656 - DetectorType_Mindmeister DetectorType = 657 - DetectorType_PeopleDataLabs DetectorType = 658 - // Deprecated: Marked as deprecated in detectors.proto. - DetectorType_ScraperSite DetectorType = 659 - DetectorType_Scrapfly DetectorType = 660 - DetectorType_SimplyNoted DetectorType = 661 - DetectorType_TravelPayouts DetectorType = 662 - DetectorType_WebScraper DetectorType = 663 - DetectorType_Convier DetectorType = 664 - DetectorType_Courier DetectorType = 665 - DetectorType_Ditto DetectorType = 666 - DetectorType_Findl DetectorType = 667 - DetectorType_Lendflow DetectorType = 668 - DetectorType_Moderation DetectorType = 669 - DetectorType_Opendatasoft DetectorType = 670 // Not yet implemented - DetectorType_Podio DetectorType = 671 - // Deprecated: Marked as deprecated in detectors.proto. - DetectorType_Rockset DetectorType = 672 - DetectorType_Rownd DetectorType = 673 - DetectorType_Shotstack DetectorType = 674 - DetectorType_Swiftype DetectorType = 675 - DetectorType_Twitter DetectorType = 676 - DetectorType_Honey DetectorType = 677 - DetectorType_Freshdesk DetectorType = 678 - DetectorType_Upwave DetectorType = 679 - DetectorType_Fountain DetectorType = 680 // Not yet implemented - DetectorType_Freshbooks DetectorType = 681 - DetectorType_Mite DetectorType = 682 - DetectorType_Deputy DetectorType = 683 - DetectorType_Beebole DetectorType = 684 - DetectorType_Cashboard DetectorType = 685 - DetectorType_Kanban DetectorType = 686 - DetectorType_Worksnaps DetectorType = 687 - DetectorType_MyIntervals DetectorType = 688 - DetectorType_InvoiceOcean DetectorType = 689 - DetectorType_Sherpadesk DetectorType = 690 - DetectorType_Mrticktock DetectorType = 691 - DetectorType_Chatfule DetectorType = 692 - DetectorType_Aeroworkflow DetectorType = 693 - DetectorType_Emailoctopus DetectorType = 694 // Not yet implemented - // Deprecated: Marked as deprecated in detectors.proto. - DetectorType_Fusebill DetectorType = 695 - DetectorType_Geckoboard DetectorType = 696 - DetectorType_Gosquared DetectorType = 697 // Not yet implemented - DetectorType_Moonclerk DetectorType = 698 - DetectorType_Paymoapp DetectorType = 699 - DetectorType_Mixmax DetectorType = 700 - DetectorType_Processst DetectorType = 701 // Not yet implemented - DetectorType_Repairshopr DetectorType = 702 - DetectorType_Goshippo DetectorType = 703 // Not yet implemented - DetectorType_Sigopt DetectorType = 704 - DetectorType_Sugester DetectorType = 705 - DetectorType_Viewneo DetectorType = 706 - DetectorType_BoostNote DetectorType = 707 - DetectorType_CaptainData DetectorType = 708 - DetectorType_Checkvist DetectorType = 709 - DetectorType_Cliengo DetectorType = 710 - DetectorType_Cloze DetectorType = 711 - DetectorType_FormIO DetectorType = 712 - DetectorType_FormBucket DetectorType = 713 - DetectorType_GoCanvas DetectorType = 714 - DetectorType_MadKudu DetectorType = 715 - DetectorType_NozbeTeams DetectorType = 716 - DetectorType_Papyrs DetectorType = 717 // Not yet implemented - DetectorType_SuperNotesAPI DetectorType = 718 - DetectorType_Tallyfy DetectorType = 719 - DetectorType_ZenkitAPI DetectorType = 720 - DetectorType_CloudImage DetectorType = 721 - DetectorType_UploadCare DetectorType = 722 - DetectorType_Borgbase DetectorType = 723 - DetectorType_Pipedream DetectorType = 724 - DetectorType_Sirv DetectorType = 725 - DetectorType_Diffbot DetectorType = 726 - DetectorType_EightxEight DetectorType = 727 - DetectorType_Sendoso DetectorType = 728 // Not yet implemented - DetectorType_Printfection DetectorType = 729 // Not yet implemented - DetectorType_Authorize DetectorType = 730 // Not yet implemented - DetectorType_PandaScore DetectorType = 731 - DetectorType_Paymo DetectorType = 732 - DetectorType_AvazaPersonalAccessToken DetectorType = 733 - DetectorType_PlanviewLeanKit DetectorType = 734 - DetectorType_Livestorm DetectorType = 735 - DetectorType_KuCoin DetectorType = 736 - DetectorType_MetaAPI DetectorType = 737 - DetectorType_NiceHash DetectorType = 738 // Not yet implemented - DetectorType_CexIO DetectorType = 739 - DetectorType_Klipfolio DetectorType = 740 - DetectorType_Dynatrace DetectorType = 741 // Not yet implemented - DetectorType_MollieAPIKey DetectorType = 742 // Not yet implemented - DetectorType_MollieAccessToken DetectorType = 743 // Not yet implemented - DetectorType_BasisTheory DetectorType = 744 // Not yet implemented - DetectorType_Nordigen DetectorType = 745 // Not yet implemented - DetectorType_FlagsmithEnvironmentKey DetectorType = 746 // Not yet implemented - DetectorType_FlagsmithToken DetectorType = 747 // Not yet implemented - DetectorType_Mux DetectorType = 748 - DetectorType_Column DetectorType = 749 - DetectorType_Sendbird DetectorType = 750 - DetectorType_SendbirdOrganizationAPI DetectorType = 751 - DetectorType_Midise DetectorType = 752 // Not yet implemented - DetectorType_Mockaroo DetectorType = 753 - DetectorType_Image4 DetectorType = 754 // Not yet implemented - DetectorType_Pinata DetectorType = 755 - DetectorType_BrowserStack DetectorType = 756 - // Deprecated: Marked as deprecated in detectors.proto. - DetectorType_CrossBrowserTesting DetectorType = 757 - DetectorType_Loadmill DetectorType = 758 - DetectorType_TestingBot DetectorType = 759 - DetectorType_KnapsackPro DetectorType = 760 - DetectorType_Qase DetectorType = 761 - DetectorType_Dareboost DetectorType = 762 - DetectorType_GTMetrix DetectorType = 763 - DetectorType_Holistic DetectorType = 764 - DetectorType_Parsers DetectorType = 765 - DetectorType_ScrutinizerCi DetectorType = 766 - DetectorType_SonarCloud DetectorType = 767 - DetectorType_APITemplate DetectorType = 768 - DetectorType_ConversionTools DetectorType = 769 - DetectorType_CraftMyPDF DetectorType = 770 - DetectorType_ExportSDK DetectorType = 771 - // Deprecated: Marked as deprecated in detectors.proto. - DetectorType_GlitterlyAPI DetectorType = 772 - DetectorType_Hybiscus DetectorType = 773 - DetectorType_Miro DetectorType = 774 - DetectorType_Statuspage DetectorType = 775 - DetectorType_Statuspal DetectorType = 776 - DetectorType_Teletype DetectorType = 777 - DetectorType_TimeCamp DetectorType = 778 - DetectorType_Userflow DetectorType = 779 - DetectorType_Wistia DetectorType = 780 - // Deprecated: Marked as deprecated in detectors.proto. - DetectorType_SportRadar DetectorType = 781 - DetectorType_UptimeRobot DetectorType = 782 - DetectorType_Codequiry DetectorType = 783 - DetectorType_ExtractorAPI DetectorType = 784 - DetectorType_Signable DetectorType = 785 - DetectorType_MagicBell DetectorType = 786 - DetectorType_Stormboard DetectorType = 787 - DetectorType_Apilayer DetectorType = 788 - DetectorType_Disqus DetectorType = 789 - DetectorType_Woopra DetectorType = 790 // Not yet implemented - DetectorType_Paperform DetectorType = 791 - DetectorType_Gumroad DetectorType = 792 - DetectorType_Paydirtapp DetectorType = 793 - DetectorType_Detectify DetectorType = 794 - DetectorType_Statuscake DetectorType = 795 - DetectorType_Jumpseller DetectorType = 796 // Not yet implemented - DetectorType_LunchMoney DetectorType = 797 - DetectorType_Rosette DetectorType = 798 // Not yet implemented - DetectorType_Yelp DetectorType = 799 - DetectorType_Atera DetectorType = 800 - DetectorType_EcoStruxureIT DetectorType = 801 - DetectorType_Aha DetectorType = 802 - DetectorType_Parsehub DetectorType = 803 - DetectorType_PackageCloud DetectorType = 804 - DetectorType_Cloudsmith DetectorType = 805 - // Deprecated: Marked as deprecated in detectors.proto. - DetectorType_Flowdash DetectorType = 806 - // Deprecated: Marked as deprecated in detectors.proto. - DetectorType_Flowdock DetectorType = 807 - DetectorType_Fibery DetectorType = 808 - DetectorType_Typetalk DetectorType = 809 - DetectorType_VoodooSMS DetectorType = 810 - DetectorType_ZulipChat DetectorType = 811 - DetectorType_Formcraft DetectorType = 812 - DetectorType_Iexapis DetectorType = 813 - DetectorType_Reachmail DetectorType = 814 - DetectorType_Chartmogul DetectorType = 815 - DetectorType_Appointedd DetectorType = 816 - DetectorType_Wit DetectorType = 817 - DetectorType_RechargePayments DetectorType = 818 - DetectorType_Diggernaut DetectorType = 819 - DetectorType_MonkeyLearn DetectorType = 820 - DetectorType_Duply DetectorType = 821 - DetectorType_Postbacks DetectorType = 822 - DetectorType_Collect2 DetectorType = 823 - DetectorType_ZenRows DetectorType = 824 - DetectorType_Zipcodebase DetectorType = 825 - DetectorType_Tefter DetectorType = 826 - DetectorType_Twist DetectorType = 827 - DetectorType_BraintreePayments DetectorType = 828 - DetectorType_CloudConvert DetectorType = 829 - DetectorType_Grafana DetectorType = 830 - DetectorType_ConvertApi DetectorType = 831 - DetectorType_Transferwise DetectorType = 832 - DetectorType_Bulksms DetectorType = 833 - DetectorType_Databox DetectorType = 834 - DetectorType_Onesignal DetectorType = 835 - DetectorType_Rentman DetectorType = 836 - DetectorType_Parseur DetectorType = 837 - DetectorType_Docparser DetectorType = 838 - DetectorType_Formsite DetectorType = 839 - DetectorType_Tickettailor DetectorType = 840 - DetectorType_Lemlist DetectorType = 841 - DetectorType_Prodpad DetectorType = 842 - DetectorType_Formstack DetectorType = 843 // Not yet implemented - DetectorType_Codeclimate DetectorType = 844 - DetectorType_Codemagic DetectorType = 845 - DetectorType_Vbout DetectorType = 846 - DetectorType_Nightfall DetectorType = 847 - DetectorType_FlightLabs DetectorType = 848 - DetectorType_SpeechTextAI DetectorType = 849 - DetectorType_PollsAPI DetectorType = 850 - DetectorType_SimFin DetectorType = 851 - DetectorType_Scalr DetectorType = 852 - DetectorType_Kanbantool DetectorType = 853 - DetectorType_Brightlocal DetectorType = 854 // Not yet implemented - DetectorType_Hotwire DetectorType = 855 // Not yet implemented - DetectorType_Instabot DetectorType = 856 - DetectorType_Timekit DetectorType = 857 // Not yet implemented - DetectorType_Interseller DetectorType = 858 - DetectorType_Mojohelpdesk DetectorType = 859 // Not yet implemented - DetectorType_Createsend DetectorType = 860 // Not yet implemented - DetectorType_Getresponse DetectorType = 861 - DetectorType_Dynadot DetectorType = 862 // Not yet implemented - DetectorType_Demio DetectorType = 863 - DetectorType_Tokeet DetectorType = 864 - DetectorType_Myexperiment DetectorType = 865 // Not yet implemented - DetectorType_Copyscape DetectorType = 866 // Not yet implemented - DetectorType_Besnappy DetectorType = 867 - DetectorType_Salesmate DetectorType = 868 - // Deprecated: Marked as deprecated in detectors.proto. - DetectorType_Heatmapapi DetectorType = 869 - DetectorType_Websitepulse DetectorType = 870 - DetectorType_Uclassify DetectorType = 871 - DetectorType_Convert DetectorType = 872 - DetectorType_PDFmyURL DetectorType = 873 // Not yet implemented - DetectorType_Api2Convert DetectorType = 874 // Not yet implemented - DetectorType_Opsgenie DetectorType = 875 - DetectorType_Gemini DetectorType = 876 - DetectorType_Honeycomb DetectorType = 877 - DetectorType_KalturaAppToken DetectorType = 878 // Not yet implemented - DetectorType_KalturaSession DetectorType = 879 // Not yet implemented - DetectorType_BitGo DetectorType = 880 // Not yet implemented - DetectorType_Optidash DetectorType = 881 // Not yet implemented - DetectorType_Imgix DetectorType = 882 // Not yet implemented - DetectorType_ImageToText DetectorType = 883 // Not yet implemented - DetectorType_Page2Images DetectorType = 884 // Not yet implemented - DetectorType_Quickbase DetectorType = 885 // Not yet implemented - DetectorType_Redbooth DetectorType = 886 // Not yet implemented - DetectorType_Nubela DetectorType = 887 // Not yet implemented - DetectorType_Infobip DetectorType = 888 // Not yet implemented - DetectorType_Uproc DetectorType = 889 // Not yet implemented - DetectorType_Supportbee DetectorType = 890 // Not yet implemented - DetectorType_Aftership DetectorType = 891 // Not yet implemented - DetectorType_Edusign DetectorType = 892 // Not yet implemented - DetectorType_Teamup DetectorType = 893 // Not yet implemented - DetectorType_Workday DetectorType = 894 // Not yet implemented - DetectorType_MongoDB DetectorType = 895 - DetectorType_NGC DetectorType = 896 - DetectorType_DigitalOceanV2 DetectorType = 897 - DetectorType_SQLServer DetectorType = 898 - DetectorType_FTP DetectorType = 899 - DetectorType_Redis DetectorType = 900 - DetectorType_LDAP DetectorType = 901 - DetectorType_Shopify DetectorType = 902 - DetectorType_RabbitMQ DetectorType = 903 - DetectorType_CustomRegex DetectorType = 904 - DetectorType_Etherscan DetectorType = 905 - DetectorType_Infura DetectorType = 906 - DetectorType_Alchemy DetectorType = 907 - DetectorType_BlockNative DetectorType = 908 - DetectorType_Moralis DetectorType = 909 - DetectorType_BscScan DetectorType = 910 - // Deprecated: Marked as deprecated in detectors.proto. - DetectorType_CoinMarketCap DetectorType = 911 - DetectorType_Percy DetectorType = 912 - DetectorType_TinesWebhook DetectorType = 913 - DetectorType_Pulumi DetectorType = 914 - DetectorType_SupabaseToken DetectorType = 915 - DetectorType_NuGetApiKey DetectorType = 916 - DetectorType_Aiven DetectorType = 917 - DetectorType_Prefect DetectorType = 918 - DetectorType_Docusign DetectorType = 919 - DetectorType_Couchbase DetectorType = 920 - DetectorType_Dockerhub DetectorType = 921 - DetectorType_TrufflehogEnterprise DetectorType = 922 - DetectorType_EnvoyApiKey DetectorType = 923 - DetectorType_GitHubOauth2 DetectorType = 924 - DetectorType_Salesforce DetectorType = 925 - DetectorType_HuggingFace DetectorType = 926 - DetectorType_Snowflake DetectorType = 927 - DetectorType_Sourcegraph DetectorType = 928 - DetectorType_Tailscale DetectorType = 929 - DetectorType_Web3Storage DetectorType = 930 - DetectorType_AzureStorage DetectorType = 931 - DetectorType_PlanetScaleDb DetectorType = 932 - DetectorType_Anthropic DetectorType = 933 - DetectorType_Ramp DetectorType = 934 - DetectorType_Klaviyo DetectorType = 935 - DetectorType_SourcegraphCody DetectorType = 936 - DetectorType_Voiceflow DetectorType = 937 - DetectorType_Privacy DetectorType = 938 - DetectorType_IPInfo DetectorType = 939 - DetectorType_Ip2location DetectorType = 940 - DetectorType_Instamojo DetectorType = 941 - DetectorType_Portainer DetectorType = 942 - DetectorType_PortainerToken DetectorType = 943 - DetectorType_Loggly DetectorType = 944 - DetectorType_OpenVpn DetectorType = 945 - DetectorType_VagrantCloudPersonalToken DetectorType = 946 - DetectorType_BetterStack DetectorType = 947 - DetectorType_ZeroTier DetectorType = 948 - DetectorType_AppOptics DetectorType = 949 - DetectorType_Metabase DetectorType = 950 - // Deprecated: Marked as deprecated in detectors.proto. - DetectorType_CoinbaseWaaS DetectorType = 951 - DetectorType_LemonSqueezy DetectorType = 952 - DetectorType_Budibase DetectorType = 953 - DetectorType_DenoDeploy DetectorType = 954 - DetectorType_Stripo DetectorType = 955 - DetectorType_ReplyIO DetectorType = 956 - DetectorType_AzureBatch DetectorType = 957 - DetectorType_AzureContainerRegistry DetectorType = 958 - DetectorType_AWSSessionKey DetectorType = 959 - DetectorType_Coda DetectorType = 960 - DetectorType_LogzIO DetectorType = 961 - DetectorType_Eventbrite DetectorType = 962 - DetectorType_GrafanaServiceAccount DetectorType = 963 - DetectorType_RequestFinance DetectorType = 964 - DetectorType_Overloop DetectorType = 965 - DetectorType_Ngrok DetectorType = 966 - DetectorType_Replicate DetectorType = 967 - DetectorType_Postgres DetectorType = 968 - DetectorType_AzureActiveDirectoryApplicationSecret DetectorType = 969 - DetectorType_AzureCacheForRedisAccessKey DetectorType = 970 - DetectorType_AzureCosmosDBKeyIdentifiable DetectorType = 971 - DetectorType_AzureDevopsPersonalAccessToken DetectorType = 972 - DetectorType_AzureFunctionKey DetectorType = 973 - DetectorType_AzureMLWebServiceClassicIdentifiableKey DetectorType = 974 - DetectorType_AzureSasToken DetectorType = 975 - DetectorType_AzureSearchAdminKey DetectorType = 976 - DetectorType_AzureSearchQueryKey DetectorType = 977 - DetectorType_AzureManagementCertificate DetectorType = 978 - DetectorType_AzureSQL DetectorType = 979 - DetectorType_FlyIO DetectorType = 980 - DetectorType_BuiltWith DetectorType = 981 - DetectorType_JupiterOne DetectorType = 982 - DetectorType_GCPApplicationDefaultCredentials DetectorType = 983 - DetectorType_Wiz DetectorType = 984 - DetectorType_Pagarme DetectorType = 985 - DetectorType_Onfleet DetectorType = 986 - DetectorType_Intra42 DetectorType = 987 - DetectorType_Groq DetectorType = 988 - DetectorType_TwitterConsumerkey DetectorType = 989 - DetectorType_Eraser DetectorType = 990 - DetectorType_LarkSuite DetectorType = 991 - DetectorType_LarkSuiteApiKey DetectorType = 992 - DetectorType_EndorLabs DetectorType = 993 - DetectorType_ElevenLabs DetectorType = 994 - DetectorType_Netsuite DetectorType = 995 - DetectorType_RobinhoodCrypto DetectorType = 996 - DetectorType_NVAPI DetectorType = 997 - DetectorType_PyPI DetectorType = 998 - DetectorType_RailwayApp DetectorType = 999 - DetectorType_Meraki DetectorType = 1000 - DetectorType_SaladCloudApiKey DetectorType = 1001 - DetectorType_Box DetectorType = 1002 - DetectorType_BoxOauth DetectorType = 1003 - DetectorType_ApiMetrics DetectorType = 1004 - DetectorType_WeightsAndBiases DetectorType = 1005 - DetectorType_ZohoCRM DetectorType = 1006 - DetectorType_AzureOpenAI DetectorType = 1007 - DetectorType_GoDaddy DetectorType = 1008 - DetectorType_Flexport DetectorType = 1009 - DetectorType_TwitchAccessToken DetectorType = 1010 - DetectorType_TwilioApiKey DetectorType = 1011 - DetectorType_Sanity DetectorType = 1012 - DetectorType_AzureRefreshToken DetectorType = 1013 - DetectorType_AirtableOAuth DetectorType = 1014 - DetectorType_AirtablePersonalAccessToken DetectorType = 1015 - DetectorType_StoryblokPersonalAccessToken DetectorType = 1016 - DetectorType_SentryOrgToken DetectorType = 1017 - DetectorType_AzureApiManagementRepositoryKey DetectorType = 1018 - DetectorType_AzureAPIManagementSubscriptionKey DetectorType = 1019 - DetectorType_Harness DetectorType = 1020 - DetectorType_Langfuse DetectorType = 1021 - DetectorType_BingSubscriptionKey DetectorType = 1022 - DetectorType_XAI DetectorType = 1023 - DetectorType_AzureDirectManagementKey DetectorType = 1024 - DetectorType_AzureAppConfigConnectionString DetectorType = 1025 - DetectorType_DeepSeek DetectorType = 1026 - DetectorType_StripePaymentIntent DetectorType = 1027 - DetectorType_LangSmith DetectorType = 1028 - DetectorType_BitbucketAppPassword DetectorType = 1029 - DetectorType_Hasura DetectorType = 1030 - DetectorType_SalesforceRefreshToken DetectorType = 1031 - DetectorType_AnypointOAuth2 DetectorType = 1032 - DetectorType_WebexBot DetectorType = 1033 - DetectorType_TableauPersonalAccessToken DetectorType = 1034 - DetectorType_Rootly DetectorType = 1035 - DetectorType_HashiCorpVaultAuth DetectorType = 1036 - DetectorType_PhraseAccessToken DetectorType = 1037 - DetectorType_Photoroom DetectorType = 1038 - DetectorType_JWT DetectorType = 1039 - DetectorType_OpenAIAdmin DetectorType = 1040 - DetectorType_GoogleGeminiAPIKey DetectorType = 1041 - DetectorType_ArtifactoryReferenceToken DetectorType = 1042 - DetectorType_DatadogApikey DetectorType = 1043 -) - -// Enum value maps for DetectorType. -var ( - DetectorType_name = map[int32]string{ - 0: "Alibaba", - 1: "AMQP", - 2: "AWS", - 3: "Azure", - 4: "Circle", - 5: "Coinbase", - 6: "GCP", - 7: "Generic", - 8: "Github", - 9: "Gitlab", - 10: "JDBC", - 11: "RazorPay", - 12: "SendGrid", - 13: "Slack", - 14: "Square", - 15: "PrivateKey", - 16: "Stripe", - 17: "URI", - 18: "Dropbox", - 19: "Heroku", - 20: "Mailchimp", - 21: "Okta", - 22: "OneLogin", - 23: "PivotalTracker", - 25: "SquareApp", - 26: "Twilio", - 27: "Test", - 29: "TravisCI", - 30: "SlackWebhook", - 31: "PaypalOauth", - 32: "PagerDutyApiKey", - 33: "Firebase", - 34: "Mailgun", - 35: "HubSpot", - 36: "GitHubApp", - 37: "CircleCI", - 38: "WpEngine", - 39: "DatadogToken", - 40: "FacebookOAuth", - 41: "AsanaPersonalAccessToken", - 42: "AmplitudeApiKey", - 43: "BitLyAccessToken", - 44: "CalendlyApiKey", - 45: "ZapierWebhook", - 46: "YoutubeApiKey", - 47: "SalesforceOauth2", - 48: "TwitterApiSecret", - 49: "NpmToken", - 50: "NewRelicPersonalApiKey", - 51: "AirtableApiKey", - 52: "AkamaiToken", - 53: "AmazonMWS", - 54: "KubeConfig", - 55: "Auth0oauth", - 56: "Bitfinex", - 57: "Clarifai", - 58: "CloudflareGlobalApiKey", - 59: "CloudflareCaKey", - 60: "Confluent", - 61: "ContentfulDelivery", - 62: "DatabricksToken", - 63: "DigitalOceanSpaces", - 64: "DigitalOceanToken", - 65: "DiscordBotToken", - 66: "DiscordWebhook", - 67: "EtsyApiKey", - 68: "FastlyPersonalToken", - 69: "GoogleOauth2", - 70: "ReCAPTCHA", - 71: "GoogleApiKey", - 72: "Hunter", - 73: "IbmCloudUserKey", - 74: "Netlify", - 75: "Vonage", - 76: "EquinixOauth", - 77: "Paystack", - 78: "PlaidToken", - 79: "PlaidKey", - 80: "Plivo", - 81: "Postmark", - 82: "PubNubPublishKey", - 83: "PubNubSubscriptionKey", - 84: "PusherChannelKey", - 85: "ScalewayKey", - 86: "SendinBlueV2", - 87: "SentryToken", - 88: "ShodanKey", - 89: "SnykKey", - 90: "SpotifyKey", - 91: "TelegramBotToken", - 92: "TencentCloudKey", - 93: "TerraformCloudPersonalToken", - 94: "TrelloApiKey", - 95: "ZendeskApi", - 96: "MaxMindLicense", - 97: "AirtableMetadataApiKey", - 98: "AsanaOauth", - 99: "RapidApi", - 100: "CloudflareApiToken", - 101: "Webex", - 102: "FirebaseCloudMessaging", - 103: "ContentfulPersonalAccessToken", - 104: "MapBox", - 105: "MailJetBasicAuth", - 106: "MailJetSMS", - 107: "HubSpotApiKey", - 108: "HubSpotOauth", - 109: "SslMate", - 110: "Auth0ManagementApiToken", - 111: "MessageBird", - 112: "ElasticEmail", - 113: "FigmaPersonalAccessToken", - 114: "MicrosoftTeamsWebhook", - 115: "GitHubOld", - 116: "VultrApiKey", - 117: "Pepipost", - 118: "Postman", - 119: "CloudsightKey", - 120: "JiraToken", - 121: "NexmoApiKey", - 122: "SegmentApiKey", - 123: "SumoLogicKey", - 124: "PushBulletApiKey", - 125: "AirbrakeProjectKey", - 126: "AirbrakeUserKey", - 127: "PendoIntegrationKey", - 128: "SplunkOberservabilityToken", - 129: "LokaliseToken", - 130: "Calendarific", - 131: "Jumpcloud", - 133: "IpStack", - 134: "Notion", - 135: "DroneCI", - 136: "AdobeIO", - 137: "TwelveData", - 138: "D7Network", - 139: "ScrapingBee", - 140: "KeenIO", - 141: "Wakatime", - 142: "Buildkite", - 143: "Verimail", - 144: "Zerobounce", - 145: "Mailboxlayer", - 146: "Fastspring", - 147: "Paddle", - 148: "Sellfy", - 149: "FixerIO", - 150: "ButterCMS", - 151: "Taxjar", - 152: "Avalara", - 153: "Helpscout", - 154: "ElasticPath", - 155: "Zeplin", - 156: "Intercom", - 157: "Mailmodo", - 158: "CannyIo", - 159: "Pipedrive", - 160: "Vercel", - 161: "PosthogApp", - 162: "SinchMessage", - 163: "Ayrshare", - 164: "HelpCrunch", - 165: "LiveAgent", - 166: "Beamer", - 167: "WeChatAppKey", - 168: "LineMessaging", - 169: "UberServerToken", - 170: "AlgoliaAdminKey", - 171: "FullContact", - 172: "Mandrill", - 173: "Flutterwave", - 174: "MattermostPersonalToken", - 175: "Cloudant", - 176: "LineNotify", - 177: "LinearAPI", - 178: "Ubidots", - 179: "Anypoint", - 180: "Dwolla", - 181: "ArtifactoryAccessToken", - 182: "Surge", - 183: "Sparkpost", - 184: "GoCardless", - 185: "Codacy", - 186: "Kraken", - 187: "Checkout", - 188: "Kairos", - 189: "ClockworkSMS", - 190: "Atlassian", - 191: "LaunchDarkly", - 192: "Coveralls", - 193: "Linode", - 194: "WePay", - 195: "PlanetScale", - 196: "Doppler", - 197: "Agora", - 198: "Samsara", - 199: "FrameIO", - 200: "RubyGems", - 201: "OpenAI", - 202: "SurveySparrow", - 203: "Simvoly", - 204: "Survicate", - 205: "Omnisend", - 206: "Groovehq", - 207: "Newsapi", - 208: "Chatbot", - 209: "ClickSendsms", - 210: "Getgist", - 211: "CustomerIO", - 212: "ApiDeck", - 213: "Nftport", - 214: "Copper", - 215: "Close", - 216: "Myfreshworks", - 217: "Salesflare", - 218: "Webflow", - 219: "Duda", - 220: "Yext", - 221: "ContentStack", - 222: "StoryblokAccessToken", - 223: "GraphCMS", - 224: "Checkmarket", - 225: "Convertkit", - 226: "CustomerGuru", - 227: "Kaleyra", - 228: "Mailerlite", - 229: "Qualaroo", - 230: "SatismeterProjectkey", - 231: "SatismeterWritekey", - 232: "Simplesat", - 233: "SurveyAnyplace", - 234: "SurveyBot", - 235: "Webengage", - 236: "ZonkaFeedback", - 237: "Delighted", - 238: "Feedier", - 239: "Abyssale", - 240: "Magnetic", - 241: "Nytimes", - 242: "Polygon", - 243: "Powrbot", - 244: "ProspectIO", - 245: "Skrappio", - 246: "Monday", - 247: "Smartsheets", - 248: "Wrike", - 249: "Float", - 250: "Imagekit", - 251: "Integromat", - 252: "Salesblink", - 253: "Bored", - 254: "Campayn", - 255: "Clinchpad", - 256: "CompanyHub", - 257: "Debounce", - 258: "Dyspatch", - 259: "Guardianapi", - 260: "Harvest", - 261: "Moosend", - 262: "OpenWeather", - 263: "Siteleaf", - 264: "Squarespace", - 265: "FlowFlu", - 266: "Nimble", - 267: "LessAnnoyingCRM", - 268: "Nethunt", - 269: "Apptivo", - 270: "CapsuleCRM", - 271: "Insightly", - 272: "Kylas", - 273: "OnepageCRM", - 274: "User", - 275: "ProspectCRM", - 276: "ReallySimpleSystems", - 277: "Airship", - 278: "Artsy", - 279: "Yandex", - 280: "Clockify", - 281: "Dnscheck", - 282: "EasyInsight", - 283: "Ethplorer", - 284: "Everhour", - 285: "Fulcrum", - 286: "GeoIpifi", - 287: "Jotform", - 288: "Refiner", - 289: "Timezoneapi", - 290: "TogglTrack", - 291: "Vpnapi", - 292: "Workstack", - 293: "Apollo", - 294: "Eversign", - 295: "Juro", - 296: "KarmaCRM", - 297: "Metrilo", - 298: "Pandadoc", - 299: "RevampCRM", - 300: "Salescookie", - 301: "Alconost", - 302: "Blogger", - 303: "Accuweather", - 304: "Opengraphr", - 305: "Rawg", - 306: "Riotgames", - 307: "Clientary", - 308: "Stormglass", - 309: "Tomtom", - 310: "Twitch", - 311: "Documo", - 312: "Cloudways", - 313: "Veevavault", - 314: "KiteConnect", - 315: "ShopeeOpenPlatform", - 316: "TeamViewer", - 317: "Bulbul", - 318: "CentralStationCRM", - 319: "Teamgate", - 320: "Axonaut", - 321: "Tyntec", - 322: "Appcues", - 323: "Autoklose", - 324: "Cloudplan", - 325: "Dotdigital", - 326: "GetEmail", - 327: "GetEmails", - 328: "Kontent", - 329: "Leadfeeder", - 330: "Raven", - 331: "RocketReach", - 332: "Uplead", - 333: "Brandfetch", - 334: "Clearbit", - 335: "Crowdin", - 336: "Mapquest", - 337: "Noticeable", - 338: "Onbuka", - 339: "Todoist", - 340: "Storychief", - 341: "LinkedIn", - 342: "YouSign", - 343: "Docker", - 344: "Telesign", - 345: "Spoonacular", - 346: "Aerisweather", - 347: "Alphavantage", - 348: "Imgur", - 349: "Imagga", - 350: "SMSApi", - 351: "Distribusion", - 352: "Blablabus", - 353: "WordsApi", - 354: "Currencylayer", - 355: "Html2Pdf", - 356: "IPGeolocation", - 357: "Owlbot", - 358: "Cloudmersive", - 359: "Dynalist", - 360: "ExchangeRateAPI", - 361: "HolidayAPI", - 362: "Ipapi", - 363: "Marketstack", - 364: "Nutritionix", - 365: "Swell", - 366: "ClickupPersonalToken", - 367: "Nitro", - 368: "Rev", - 369: "RunRunIt", - 370: "Typeform", - 371: "Mixpanel", - 372: "Tradier", - 373: "Verifier", - 374: "Vouchery", - 375: "Alegra", - 376: "Audd", - 377: "Baremetrics", - 378: "Coinlib", - 379: "ExchangeRatesAPI", - 380: "CurrencyScoop", - 381: "FXMarket", - 382: "CurrencyCloud", - 383: "GetGeoAPI", - 384: "Abstract", - 385: "Billomat", - 386: "Dovico", - 387: "Bitbar", - 388: "Bugsnag", - 389: "AssemblyAI", - 390: "AdafruitIO", - 391: "Apify", - 392: "CoinGecko", - 393: "CryptoCompare", - 394: "Fullstory", - 395: "HelloSign", - 396: "Loyverse", - 397: "NetCore", - 398: "SauceLabs", - 399: "AlienVault", - 401: "Apiflash", - 402: "Coinlayer", - 403: "CurrentsAPI", - 404: "DataGov", - 405: "Enigma", - 406: "FinancialModelingPrep", - 407: "Geocodio", - 408: "HereAPI", - 409: "Macaddress", - 410: "OOPSpam", - 411: "ProtocolsIO", - 412: "ScraperAPI", - 413: "SecurityTrails", - 414: "TomorrowIO", - 415: "WorldCoinIndex", - 416: "FacePlusPlus", - 417: "Voicegain", - 418: "Deepgram", - 419: "VisualCrossing", - 420: "Finnhub", - 421: "Tiingo", - 422: "RingCentral", - 423: "Finage", - 424: "Edamam", - 425: "HypeAuditor", - 426: "Gengo", - 427: "Front", - 428: "Fleetbase", - 429: "Bubble", - 430: "Bannerbear", - 431: "Adzuna", - 432: "BitcoinAverage", - 433: "CommerceJS", - 434: "DetectLanguage", - 435: "FakeJSON", - 436: "Graphhopper", - 437: "Lexigram", - 438: "LinkPreview", - 439: "Numverify", - 440: "ProxyCrawl", - 441: "ZipCodeAPI", - 442: "Cometchat", - 443: "Keygen", - 444: "Mixcloud", - 445: "TatumIO", - 446: "Tmetric", - 447: "Lastfm", - 448: "Browshot", - 449: "JSONbin", - 450: "LocationIQ", - 451: "ScreenshotAPI", - 452: "WeatherStack", - 453: "Amadeus", - 454: "FourSquare", - 455: "Flickr", - 456: "ClickHelp", - 457: "Ambee", - 458: "Api2Cart", - 459: "Hypertrack", - 460: "KakaoTalk", - 461: "RiteKit", - 462: "Shutterstock", - 463: "Text2Data", - 464: "YouNeedABudget", - 465: "Cricket", - 466: "Filestack", - 467: "Gyazo", - 468: "Mavenlink", - 469: "Sheety", - 470: "Sportsmonk", - 471: "Stockdata", - 472: "Unsplash", - 473: "Allsports", - 474: "CalorieNinja", - 475: "WalkScore", - 476: "Strava", - 477: "Cicero", - 478: "IPQuality", - 479: "ParallelDots", - 480: "Roaring", - 481: "Mailsac", - 482: "Whoxy", - 483: "WorldWeather", - 484: "ApiFonica", - 485: "Aylien", - 486: "Geocode", - 487: "IconFinder", - 488: "Ipify", - 489: "LanguageLayer", - 490: "Lob", - 491: "OnWaterIO", - 492: "Pastebin", - 493: "PdfLayer", - 494: "Pixabay", - 495: "ReadMe", - 496: "VatLayer", - 497: "VirusTotal", - 498: "AirVisual", - 499: "Currencyfreaks", - 500: "Duffel", - 501: "FlatIO", - 502: "M3o", - 503: "Mesibo", - 504: "Openuv", - 505: "Snipcart", - 506: "Besttime", - 507: "Happyscribe", - 508: "Humanity", - 509: "Impala", - 510: "Loginradius", - 511: "AutoPilot", - 512: "Bitmex", - 513: "ClustDoc", - 514: "Messari", - 515: "PdfShift", - 516: "Poloniex", - 517: "RestpackHtmlToPdfAPI", - 518: "RestpackScreenshotAPI", - 519: "ShutterstockOAuth", - 520: "SkyBiometry", - 521: "AbuseIPDB", - 522: "AletheiaApi", - 523: "BlitApp", - 524: "Censys", - 525: "Cloverly", - 526: "CountryLayer", - 527: "FileIO", - 528: "FlightApi", - 529: "Geoapify", - 530: "IPinfoDB", - 531: "MediaStack", - 532: "NasdaqDataLink", - 533: "OpenCageData", - 534: "Paymongo", - 535: "PositionStack", - 536: "Rebrandly", - 537: "ScreenshotLayer", - 538: "Stytch", - 539: "Unplugg", - 540: "UPCDatabase", - 541: "UserStack", - 542: "Geocodify", - 543: "Newscatcher", - 544: "Nicereply", - 545: "Partnerstack", - 546: "Route4me", - 547: "Scrapeowl", - 548: "ScrapingDog", - 549: "Streak", - 550: "Veriphone", - 551: "Webscraping", - 552: "Zenscrape", - 553: "Zenserp", - 554: "CoinApi", - 555: "Gitter", - 556: "Host", - 557: "Iexcloud", - 558: "Restpack", - 559: "ScraperBox", - 560: "ScrapingAnt", - 561: "SerpStack", - 562: "SmartyStreets", - 563: "TicketMaster", - 564: "AviationStack", - 565: "BombBomb", - 566: "Commodities", - 567: "Dfuse", - 568: "EdenAI", - 569: "Glassnode", - 570: "Guru", - 571: "Hive", - 572: "Hiveage", - 573: "Kickbox", - 574: "Passbase", - 575: "PostageApp", - 576: "PureStake", - 577: "Qubole", - 578: "CarbonInterface", - 579: "Intrinio", - 580: "QuickMetrics", - 581: "ScrapeStack", - 582: "TechnicalAnalysisApi", - 583: "Urlscan", - 584: "BaseApiIO", - 585: "DailyCO", - 586: "TLy", - 587: "Shortcut", - 588: "Appfollow", - 589: "Thinkific", - 590: "Feedly", - 591: "Stitchdata", - 592: "Fetchrss", - 593: "Signupgenius", - 594: "Signaturit", - 595: "Optimizely", - 596: "OcrSpace", - 597: "WeatherBit", - 598: "BuddyNS", - 599: "ZipAPI", - 600: "ZipBooks", - 601: "Onedesk", - 602: "Bugherd", - 603: "Blazemeter", - 604: "Autodesk", - 605: "Tru", - 606: "UnifyID", - 607: "Trimble", - 608: "Smooch", - 609: "Semaphore", - 610: "Telnyx", - 611: "Signalwire", - 612: "Textmagic", - 613: "Serphouse", - 614: "Planyo", - 615: "Simplybook", - 616: "Vyte", - 617: "Nylas", - 618: "Squareup", - 619: "Dandelion", - 620: "DataFire", - 621: "DeepAI", - 622: "MeaningCloud", - 623: "NeutrinoApi", - 624: "Storecove", - 625: "Shipday", - 626: "Sentiment", - 627: "StreamChatMessaging", - 628: "TeamworkCRM", - 629: "TeamworkDesk", - 630: "TeamworkSpaces", - 631: "TheOddsApi", - 632: "Apacta", - 633: "GetSandbox", - 634: "Happi", - 635: "Oanda", - 636: "FastForex", - 637: "APIMatic", - 638: "VersionEye", - 639: "EagleEyeNetworks", - 640: "ThousandEyes", - 641: "SelectPDF", - 642: "Flightstats", - 643: "ChecIO", - 644: "Manifest", - 645: "ApiScience", - 646: "AppSynergy", - 647: "Caflou", - 648: "Caspio", - 649: "ChecklyHQ", - 650: "CloudElements", - 651: "DronaHQ", - 652: "Enablex", - 653: "Fmfw", - 654: "GoodDay", - 655: "Luno", - 656: "Meistertask", - 657: "Mindmeister", - 658: "PeopleDataLabs", - 659: "ScraperSite", - 660: "Scrapfly", - 661: "SimplyNoted", - 662: "TravelPayouts", - 663: "WebScraper", - 664: "Convier", - 665: "Courier", - 666: "Ditto", - 667: "Findl", - 668: "Lendflow", - 669: "Moderation", - 670: "Opendatasoft", - 671: "Podio", - 672: "Rockset", - 673: "Rownd", - 674: "Shotstack", - 675: "Swiftype", - 676: "Twitter", - 677: "Honey", - 678: "Freshdesk", - 679: "Upwave", - 680: "Fountain", - 681: "Freshbooks", - 682: "Mite", - 683: "Deputy", - 684: "Beebole", - 685: "Cashboard", - 686: "Kanban", - 687: "Worksnaps", - 688: "MyIntervals", - 689: "InvoiceOcean", - 690: "Sherpadesk", - 691: "Mrticktock", - 692: "Chatfule", - 693: "Aeroworkflow", - 694: "Emailoctopus", - 695: "Fusebill", - 696: "Geckoboard", - 697: "Gosquared", - 698: "Moonclerk", - 699: "Paymoapp", - 700: "Mixmax", - 701: "Processst", - 702: "Repairshopr", - 703: "Goshippo", - 704: "Sigopt", - 705: "Sugester", - 706: "Viewneo", - 707: "BoostNote", - 708: "CaptainData", - 709: "Checkvist", - 710: "Cliengo", - 711: "Cloze", - 712: "FormIO", - 713: "FormBucket", - 714: "GoCanvas", - 715: "MadKudu", - 716: "NozbeTeams", - 717: "Papyrs", - 718: "SuperNotesAPI", - 719: "Tallyfy", - 720: "ZenkitAPI", - 721: "CloudImage", - 722: "UploadCare", - 723: "Borgbase", - 724: "Pipedream", - 725: "Sirv", - 726: "Diffbot", - 727: "EightxEight", - 728: "Sendoso", - 729: "Printfection", - 730: "Authorize", - 731: "PandaScore", - 732: "Paymo", - 733: "AvazaPersonalAccessToken", - 734: "PlanviewLeanKit", - 735: "Livestorm", - 736: "KuCoin", - 737: "MetaAPI", - 738: "NiceHash", - 739: "CexIO", - 740: "Klipfolio", - 741: "Dynatrace", - 742: "MollieAPIKey", - 743: "MollieAccessToken", - 744: "BasisTheory", - 745: "Nordigen", - 746: "FlagsmithEnvironmentKey", - 747: "FlagsmithToken", - 748: "Mux", - 749: "Column", - 750: "Sendbird", - 751: "SendbirdOrganizationAPI", - 752: "Midise", - 753: "Mockaroo", - 754: "Image4", - 755: "Pinata", - 756: "BrowserStack", - 757: "CrossBrowserTesting", - 758: "Loadmill", - 759: "TestingBot", - 760: "KnapsackPro", - 761: "Qase", - 762: "Dareboost", - 763: "GTMetrix", - 764: "Holistic", - 765: "Parsers", - 766: "ScrutinizerCi", - 767: "SonarCloud", - 768: "APITemplate", - 769: "ConversionTools", - 770: "CraftMyPDF", - 771: "ExportSDK", - 772: "GlitterlyAPI", - 773: "Hybiscus", - 774: "Miro", - 775: "Statuspage", - 776: "Statuspal", - 777: "Teletype", - 778: "TimeCamp", - 779: "Userflow", - 780: "Wistia", - 781: "SportRadar", - 782: "UptimeRobot", - 783: "Codequiry", - 784: "ExtractorAPI", - 785: "Signable", - 786: "MagicBell", - 787: "Stormboard", - 788: "Apilayer", - 789: "Disqus", - 790: "Woopra", - 791: "Paperform", - 792: "Gumroad", - 793: "Paydirtapp", - 794: "Detectify", - 795: "Statuscake", - 796: "Jumpseller", - 797: "LunchMoney", - 798: "Rosette", - 799: "Yelp", - 800: "Atera", - 801: "EcoStruxureIT", - 802: "Aha", - 803: "Parsehub", - 804: "PackageCloud", - 805: "Cloudsmith", - 806: "Flowdash", - 807: "Flowdock", - 808: "Fibery", - 809: "Typetalk", - 810: "VoodooSMS", - 811: "ZulipChat", - 812: "Formcraft", - 813: "Iexapis", - 814: "Reachmail", - 815: "Chartmogul", - 816: "Appointedd", - 817: "Wit", - 818: "RechargePayments", - 819: "Diggernaut", - 820: "MonkeyLearn", - 821: "Duply", - 822: "Postbacks", - 823: "Collect2", - 824: "ZenRows", - 825: "Zipcodebase", - 826: "Tefter", - 827: "Twist", - 828: "BraintreePayments", - 829: "CloudConvert", - 830: "Grafana", - 831: "ConvertApi", - 832: "Transferwise", - 833: "Bulksms", - 834: "Databox", - 835: "Onesignal", - 836: "Rentman", - 837: "Parseur", - 838: "Docparser", - 839: "Formsite", - 840: "Tickettailor", - 841: "Lemlist", - 842: "Prodpad", - 843: "Formstack", - 844: "Codeclimate", - 845: "Codemagic", - 846: "Vbout", - 847: "Nightfall", - 848: "FlightLabs", - 849: "SpeechTextAI", - 850: "PollsAPI", - 851: "SimFin", - 852: "Scalr", - 853: "Kanbantool", - 854: "Brightlocal", - 855: "Hotwire", - 856: "Instabot", - 857: "Timekit", - 858: "Interseller", - 859: "Mojohelpdesk", - 860: "Createsend", - 861: "Getresponse", - 862: "Dynadot", - 863: "Demio", - 864: "Tokeet", - 865: "Myexperiment", - 866: "Copyscape", - 867: "Besnappy", - 868: "Salesmate", - 869: "Heatmapapi", - 870: "Websitepulse", - 871: "Uclassify", - 872: "Convert", - 873: "PDFmyURL", - 874: "Api2Convert", - 875: "Opsgenie", - 876: "Gemini", - 877: "Honeycomb", - 878: "KalturaAppToken", - 879: "KalturaSession", - 880: "BitGo", - 881: "Optidash", - 882: "Imgix", - 883: "ImageToText", - 884: "Page2Images", - 885: "Quickbase", - 886: "Redbooth", - 887: "Nubela", - 888: "Infobip", - 889: "Uproc", - 890: "Supportbee", - 891: "Aftership", - 892: "Edusign", - 893: "Teamup", - 894: "Workday", - 895: "MongoDB", - 896: "NGC", - 897: "DigitalOceanV2", - 898: "SQLServer", - 899: "FTP", - 900: "Redis", - 901: "LDAP", - 902: "Shopify", - 903: "RabbitMQ", - 904: "CustomRegex", - 905: "Etherscan", - 906: "Infura", - 907: "Alchemy", - 908: "BlockNative", - 909: "Moralis", - 910: "BscScan", - 911: "CoinMarketCap", - 912: "Percy", - 913: "TinesWebhook", - 914: "Pulumi", - 915: "SupabaseToken", - 916: "NuGetApiKey", - 917: "Aiven", - 918: "Prefect", - 919: "Docusign", - 920: "Couchbase", - 921: "Dockerhub", - 922: "TrufflehogEnterprise", - 923: "EnvoyApiKey", - 924: "GitHubOauth2", - 925: "Salesforce", - 926: "HuggingFace", - 927: "Snowflake", - 928: "Sourcegraph", - 929: "Tailscale", - 930: "Web3Storage", - 931: "AzureStorage", - 932: "PlanetScaleDb", - 933: "Anthropic", - 934: "Ramp", - 935: "Klaviyo", - 936: "SourcegraphCody", - 937: "Voiceflow", - 938: "Privacy", - 939: "IPInfo", - 940: "Ip2location", - 941: "Instamojo", - 942: "Portainer", - 943: "PortainerToken", - 944: "Loggly", - 945: "OpenVpn", - 946: "VagrantCloudPersonalToken", - 947: "BetterStack", - 948: "ZeroTier", - 949: "AppOptics", - 950: "Metabase", - 951: "CoinbaseWaaS", - 952: "LemonSqueezy", - 953: "Budibase", - 954: "DenoDeploy", - 955: "Stripo", - 956: "ReplyIO", - 957: "AzureBatch", - 958: "AzureContainerRegistry", - 959: "AWSSessionKey", - 960: "Coda", - 961: "LogzIO", - 962: "Eventbrite", - 963: "GrafanaServiceAccount", - 964: "RequestFinance", - 965: "Overloop", - 966: "Ngrok", - 967: "Replicate", - 968: "Postgres", - 969: "AzureActiveDirectoryApplicationSecret", - 970: "AzureCacheForRedisAccessKey", - 971: "AzureCosmosDBKeyIdentifiable", - 972: "AzureDevopsPersonalAccessToken", - 973: "AzureFunctionKey", - 974: "AzureMLWebServiceClassicIdentifiableKey", - 975: "AzureSasToken", - 976: "AzureSearchAdminKey", - 977: "AzureSearchQueryKey", - 978: "AzureManagementCertificate", - 979: "AzureSQL", - 980: "FlyIO", - 981: "BuiltWith", - 982: "JupiterOne", - 983: "GCPApplicationDefaultCredentials", - 984: "Wiz", - 985: "Pagarme", - 986: "Onfleet", - 987: "Intra42", - 988: "Groq", - 989: "TwitterConsumerkey", - 990: "Eraser", - 991: "LarkSuite", - 992: "LarkSuiteApiKey", - 993: "EndorLabs", - 994: "ElevenLabs", - 995: "Netsuite", - 996: "RobinhoodCrypto", - 997: "NVAPI", - 998: "PyPI", - 999: "RailwayApp", - 1000: "Meraki", - 1001: "SaladCloudApiKey", - 1002: "Box", - 1003: "BoxOauth", - 1004: "ApiMetrics", - 1005: "WeightsAndBiases", - 1006: "ZohoCRM", - 1007: "AzureOpenAI", - 1008: "GoDaddy", - 1009: "Flexport", - 1010: "TwitchAccessToken", - 1011: "TwilioApiKey", - 1012: "Sanity", - 1013: "AzureRefreshToken", - 1014: "AirtableOAuth", - 1015: "AirtablePersonalAccessToken", - 1016: "StoryblokPersonalAccessToken", - 1017: "SentryOrgToken", - 1018: "AzureApiManagementRepositoryKey", - 1019: "AzureAPIManagementSubscriptionKey", - 1020: "Harness", - 1021: "Langfuse", - 1022: "BingSubscriptionKey", - 1023: "XAI", - 1024: "AzureDirectManagementKey", - 1025: "AzureAppConfigConnectionString", - 1026: "DeepSeek", - 1027: "StripePaymentIntent", - 1028: "LangSmith", - 1029: "BitbucketAppPassword", - 1030: "Hasura", - 1031: "SalesforceRefreshToken", - 1032: "AnypointOAuth2", - 1033: "WebexBot", - 1034: "TableauPersonalAccessToken", - 1035: "Rootly", - 1036: "HashiCorpVaultAuth", - 1037: "PhraseAccessToken", - 1038: "Photoroom", - 1039: "JWT", - 1040: "OpenAIAdmin", - 1041: "GoogleGeminiAPIKey", - 1042: "ArtifactoryReferenceToken", - 1043: "DatadogApikey", - } - DetectorType_value = map[string]int32{ - "Alibaba": 0, - "AMQP": 1, - "AWS": 2, - "Azure": 3, - "Circle": 4, - "Coinbase": 5, - "GCP": 6, - "Generic": 7, - "Github": 8, - "Gitlab": 9, - "JDBC": 10, - "RazorPay": 11, - "SendGrid": 12, - "Slack": 13, - "Square": 14, - "PrivateKey": 15, - "Stripe": 16, - "URI": 17, - "Dropbox": 18, - "Heroku": 19, - "Mailchimp": 20, - "Okta": 21, - "OneLogin": 22, - "PivotalTracker": 23, - "SquareApp": 25, - "Twilio": 26, - "Test": 27, - "TravisCI": 29, - "SlackWebhook": 30, - "PaypalOauth": 31, - "PagerDutyApiKey": 32, - "Firebase": 33, - "Mailgun": 34, - "HubSpot": 35, - "GitHubApp": 36, - "CircleCI": 37, - "WpEngine": 38, - "DatadogToken": 39, - "FacebookOAuth": 40, - "AsanaPersonalAccessToken": 41, - "AmplitudeApiKey": 42, - "BitLyAccessToken": 43, - "CalendlyApiKey": 44, - "ZapierWebhook": 45, - "YoutubeApiKey": 46, - "SalesforceOauth2": 47, - "TwitterApiSecret": 48, - "NpmToken": 49, - "NewRelicPersonalApiKey": 50, - "AirtableApiKey": 51, - "AkamaiToken": 52, - "AmazonMWS": 53, - "KubeConfig": 54, - "Auth0oauth": 55, - "Bitfinex": 56, - "Clarifai": 57, - "CloudflareGlobalApiKey": 58, - "CloudflareCaKey": 59, - "Confluent": 60, - "ContentfulDelivery": 61, - "DatabricksToken": 62, - "DigitalOceanSpaces": 63, - "DigitalOceanToken": 64, - "DiscordBotToken": 65, - "DiscordWebhook": 66, - "EtsyApiKey": 67, - "FastlyPersonalToken": 68, - "GoogleOauth2": 69, - "ReCAPTCHA": 70, - "GoogleApiKey": 71, - "Hunter": 72, - "IbmCloudUserKey": 73, - "Netlify": 74, - "Vonage": 75, - "EquinixOauth": 76, - "Paystack": 77, - "PlaidToken": 78, - "PlaidKey": 79, - "Plivo": 80, - "Postmark": 81, - "PubNubPublishKey": 82, - "PubNubSubscriptionKey": 83, - "PusherChannelKey": 84, - "ScalewayKey": 85, - "SendinBlueV2": 86, - "SentryToken": 87, - "ShodanKey": 88, - "SnykKey": 89, - "SpotifyKey": 90, - "TelegramBotToken": 91, - "TencentCloudKey": 92, - "TerraformCloudPersonalToken": 93, - "TrelloApiKey": 94, - "ZendeskApi": 95, - "MaxMindLicense": 96, - "AirtableMetadataApiKey": 97, - "AsanaOauth": 98, - "RapidApi": 99, - "CloudflareApiToken": 100, - "Webex": 101, - "FirebaseCloudMessaging": 102, - "ContentfulPersonalAccessToken": 103, - "MapBox": 104, - "MailJetBasicAuth": 105, - "MailJetSMS": 106, - "HubSpotApiKey": 107, - "HubSpotOauth": 108, - "SslMate": 109, - "Auth0ManagementApiToken": 110, - "MessageBird": 111, - "ElasticEmail": 112, - "FigmaPersonalAccessToken": 113, - "MicrosoftTeamsWebhook": 114, - "GitHubOld": 115, - "VultrApiKey": 116, - "Pepipost": 117, - "Postman": 118, - "CloudsightKey": 119, - "JiraToken": 120, - "NexmoApiKey": 121, - "SegmentApiKey": 122, - "SumoLogicKey": 123, - "PushBulletApiKey": 124, - "AirbrakeProjectKey": 125, - "AirbrakeUserKey": 126, - "PendoIntegrationKey": 127, - "SplunkOberservabilityToken": 128, - "LokaliseToken": 129, - "Calendarific": 130, - "Jumpcloud": 131, - "IpStack": 133, - "Notion": 134, - "DroneCI": 135, - "AdobeIO": 136, - "TwelveData": 137, - "D7Network": 138, - "ScrapingBee": 139, - "KeenIO": 140, - "Wakatime": 141, - "Buildkite": 142, - "Verimail": 143, - "Zerobounce": 144, - "Mailboxlayer": 145, - "Fastspring": 146, - "Paddle": 147, - "Sellfy": 148, - "FixerIO": 149, - "ButterCMS": 150, - "Taxjar": 151, - "Avalara": 152, - "Helpscout": 153, - "ElasticPath": 154, - "Zeplin": 155, - "Intercom": 156, - "Mailmodo": 157, - "CannyIo": 158, - "Pipedrive": 159, - "Vercel": 160, - "PosthogApp": 161, - "SinchMessage": 162, - "Ayrshare": 163, - "HelpCrunch": 164, - "LiveAgent": 165, - "Beamer": 166, - "WeChatAppKey": 167, - "LineMessaging": 168, - "UberServerToken": 169, - "AlgoliaAdminKey": 170, - "FullContact": 171, - "Mandrill": 172, - "Flutterwave": 173, - "MattermostPersonalToken": 174, - "Cloudant": 175, - "LineNotify": 176, - "LinearAPI": 177, - "Ubidots": 178, - "Anypoint": 179, - "Dwolla": 180, - "ArtifactoryAccessToken": 181, - "Surge": 182, - "Sparkpost": 183, - "GoCardless": 184, - "Codacy": 185, - "Kraken": 186, - "Checkout": 187, - "Kairos": 188, - "ClockworkSMS": 189, - "Atlassian": 190, - "LaunchDarkly": 191, - "Coveralls": 192, - "Linode": 193, - "WePay": 194, - "PlanetScale": 195, - "Doppler": 196, - "Agora": 197, - "Samsara": 198, - "FrameIO": 199, - "RubyGems": 200, - "OpenAI": 201, - "SurveySparrow": 202, - "Simvoly": 203, - "Survicate": 204, - "Omnisend": 205, - "Groovehq": 206, - "Newsapi": 207, - "Chatbot": 208, - "ClickSendsms": 209, - "Getgist": 210, - "CustomerIO": 211, - "ApiDeck": 212, - "Nftport": 213, - "Copper": 214, - "Close": 215, - "Myfreshworks": 216, - "Salesflare": 217, - "Webflow": 218, - "Duda": 219, - "Yext": 220, - "ContentStack": 221, - "StoryblokAccessToken": 222, - "GraphCMS": 223, - "Checkmarket": 224, - "Convertkit": 225, - "CustomerGuru": 226, - "Kaleyra": 227, - "Mailerlite": 228, - "Qualaroo": 229, - "SatismeterProjectkey": 230, - "SatismeterWritekey": 231, - "Simplesat": 232, - "SurveyAnyplace": 233, - "SurveyBot": 234, - "Webengage": 235, - "ZonkaFeedback": 236, - "Delighted": 237, - "Feedier": 238, - "Abyssale": 239, - "Magnetic": 240, - "Nytimes": 241, - "Polygon": 242, - "Powrbot": 243, - "ProspectIO": 244, - "Skrappio": 245, - "Monday": 246, - "Smartsheets": 247, - "Wrike": 248, - "Float": 249, - "Imagekit": 250, - "Integromat": 251, - "Salesblink": 252, - "Bored": 253, - "Campayn": 254, - "Clinchpad": 255, - "CompanyHub": 256, - "Debounce": 257, - "Dyspatch": 258, - "Guardianapi": 259, - "Harvest": 260, - "Moosend": 261, - "OpenWeather": 262, - "Siteleaf": 263, - "Squarespace": 264, - "FlowFlu": 265, - "Nimble": 266, - "LessAnnoyingCRM": 267, - "Nethunt": 268, - "Apptivo": 269, - "CapsuleCRM": 270, - "Insightly": 271, - "Kylas": 272, - "OnepageCRM": 273, - "User": 274, - "ProspectCRM": 275, - "ReallySimpleSystems": 276, - "Airship": 277, - "Artsy": 278, - "Yandex": 279, - "Clockify": 280, - "Dnscheck": 281, - "EasyInsight": 282, - "Ethplorer": 283, - "Everhour": 284, - "Fulcrum": 285, - "GeoIpifi": 286, - "Jotform": 287, - "Refiner": 288, - "Timezoneapi": 289, - "TogglTrack": 290, - "Vpnapi": 291, - "Workstack": 292, - "Apollo": 293, - "Eversign": 294, - "Juro": 295, - "KarmaCRM": 296, - "Metrilo": 297, - "Pandadoc": 298, - "RevampCRM": 299, - "Salescookie": 300, - "Alconost": 301, - "Blogger": 302, - "Accuweather": 303, - "Opengraphr": 304, - "Rawg": 305, - "Riotgames": 306, - "Clientary": 307, - "Stormglass": 308, - "Tomtom": 309, - "Twitch": 310, - "Documo": 311, - "Cloudways": 312, - "Veevavault": 313, - "KiteConnect": 314, - "ShopeeOpenPlatform": 315, - "TeamViewer": 316, - "Bulbul": 317, - "CentralStationCRM": 318, - "Teamgate": 319, - "Axonaut": 320, - "Tyntec": 321, - "Appcues": 322, - "Autoklose": 323, - "Cloudplan": 324, - "Dotdigital": 325, - "GetEmail": 326, - "GetEmails": 327, - "Kontent": 328, - "Leadfeeder": 329, - "Raven": 330, - "RocketReach": 331, - "Uplead": 332, - "Brandfetch": 333, - "Clearbit": 334, - "Crowdin": 335, - "Mapquest": 336, - "Noticeable": 337, - "Onbuka": 338, - "Todoist": 339, - "Storychief": 340, - "LinkedIn": 341, - "YouSign": 342, - "Docker": 343, - "Telesign": 344, - "Spoonacular": 345, - "Aerisweather": 346, - "Alphavantage": 347, - "Imgur": 348, - "Imagga": 349, - "SMSApi": 350, - "Distribusion": 351, - "Blablabus": 352, - "WordsApi": 353, - "Currencylayer": 354, - "Html2Pdf": 355, - "IPGeolocation": 356, - "Owlbot": 357, - "Cloudmersive": 358, - "Dynalist": 359, - "ExchangeRateAPI": 360, - "HolidayAPI": 361, - "Ipapi": 362, - "Marketstack": 363, - "Nutritionix": 364, - "Swell": 365, - "ClickupPersonalToken": 366, - "Nitro": 367, - "Rev": 368, - "RunRunIt": 369, - "Typeform": 370, - "Mixpanel": 371, - "Tradier": 372, - "Verifier": 373, - "Vouchery": 374, - "Alegra": 375, - "Audd": 376, - "Baremetrics": 377, - "Coinlib": 378, - "ExchangeRatesAPI": 379, - "CurrencyScoop": 380, - "FXMarket": 381, - "CurrencyCloud": 382, - "GetGeoAPI": 383, - "Abstract": 384, - "Billomat": 385, - "Dovico": 386, - "Bitbar": 387, - "Bugsnag": 388, - "AssemblyAI": 389, - "AdafruitIO": 390, - "Apify": 391, - "CoinGecko": 392, - "CryptoCompare": 393, - "Fullstory": 394, - "HelloSign": 395, - "Loyverse": 396, - "NetCore": 397, - "SauceLabs": 398, - "AlienVault": 399, - "Apiflash": 401, - "Coinlayer": 402, - "CurrentsAPI": 403, - "DataGov": 404, - "Enigma": 405, - "FinancialModelingPrep": 406, - "Geocodio": 407, - "HereAPI": 408, - "Macaddress": 409, - "OOPSpam": 410, - "ProtocolsIO": 411, - "ScraperAPI": 412, - "SecurityTrails": 413, - "TomorrowIO": 414, - "WorldCoinIndex": 415, - "FacePlusPlus": 416, - "Voicegain": 417, - "Deepgram": 418, - "VisualCrossing": 419, - "Finnhub": 420, - "Tiingo": 421, - "RingCentral": 422, - "Finage": 423, - "Edamam": 424, - "HypeAuditor": 425, - "Gengo": 426, - "Front": 427, - "Fleetbase": 428, - "Bubble": 429, - "Bannerbear": 430, - "Adzuna": 431, - "BitcoinAverage": 432, - "CommerceJS": 433, - "DetectLanguage": 434, - "FakeJSON": 435, - "Graphhopper": 436, - "Lexigram": 437, - "LinkPreview": 438, - "Numverify": 439, - "ProxyCrawl": 440, - "ZipCodeAPI": 441, - "Cometchat": 442, - "Keygen": 443, - "Mixcloud": 444, - "TatumIO": 445, - "Tmetric": 446, - "Lastfm": 447, - "Browshot": 448, - "JSONbin": 449, - "LocationIQ": 450, - "ScreenshotAPI": 451, - "WeatherStack": 452, - "Amadeus": 453, - "FourSquare": 454, - "Flickr": 455, - "ClickHelp": 456, - "Ambee": 457, - "Api2Cart": 458, - "Hypertrack": 459, - "KakaoTalk": 460, - "RiteKit": 461, - "Shutterstock": 462, - "Text2Data": 463, - "YouNeedABudget": 464, - "Cricket": 465, - "Filestack": 466, - "Gyazo": 467, - "Mavenlink": 468, - "Sheety": 469, - "Sportsmonk": 470, - "Stockdata": 471, - "Unsplash": 472, - "Allsports": 473, - "CalorieNinja": 474, - "WalkScore": 475, - "Strava": 476, - "Cicero": 477, - "IPQuality": 478, - "ParallelDots": 479, - "Roaring": 480, - "Mailsac": 481, - "Whoxy": 482, - "WorldWeather": 483, - "ApiFonica": 484, - "Aylien": 485, - "Geocode": 486, - "IconFinder": 487, - "Ipify": 488, - "LanguageLayer": 489, - "Lob": 490, - "OnWaterIO": 491, - "Pastebin": 492, - "PdfLayer": 493, - "Pixabay": 494, - "ReadMe": 495, - "VatLayer": 496, - "VirusTotal": 497, - "AirVisual": 498, - "Currencyfreaks": 499, - "Duffel": 500, - "FlatIO": 501, - "M3o": 502, - "Mesibo": 503, - "Openuv": 504, - "Snipcart": 505, - "Besttime": 506, - "Happyscribe": 507, - "Humanity": 508, - "Impala": 509, - "Loginradius": 510, - "AutoPilot": 511, - "Bitmex": 512, - "ClustDoc": 513, - "Messari": 514, - "PdfShift": 515, - "Poloniex": 516, - "RestpackHtmlToPdfAPI": 517, - "RestpackScreenshotAPI": 518, - "ShutterstockOAuth": 519, - "SkyBiometry": 520, - "AbuseIPDB": 521, - "AletheiaApi": 522, - "BlitApp": 523, - "Censys": 524, - "Cloverly": 525, - "CountryLayer": 526, - "FileIO": 527, - "FlightApi": 528, - "Geoapify": 529, - "IPinfoDB": 530, - "MediaStack": 531, - "NasdaqDataLink": 532, - "OpenCageData": 533, - "Paymongo": 534, - "PositionStack": 535, - "Rebrandly": 536, - "ScreenshotLayer": 537, - "Stytch": 538, - "Unplugg": 539, - "UPCDatabase": 540, - "UserStack": 541, - "Geocodify": 542, - "Newscatcher": 543, - "Nicereply": 544, - "Partnerstack": 545, - "Route4me": 546, - "Scrapeowl": 547, - "ScrapingDog": 548, - "Streak": 549, - "Veriphone": 550, - "Webscraping": 551, - "Zenscrape": 552, - "Zenserp": 553, - "CoinApi": 554, - "Gitter": 555, - "Host": 556, - "Iexcloud": 557, - "Restpack": 558, - "ScraperBox": 559, - "ScrapingAnt": 560, - "SerpStack": 561, - "SmartyStreets": 562, - "TicketMaster": 563, - "AviationStack": 564, - "BombBomb": 565, - "Commodities": 566, - "Dfuse": 567, - "EdenAI": 568, - "Glassnode": 569, - "Guru": 570, - "Hive": 571, - "Hiveage": 572, - "Kickbox": 573, - "Passbase": 574, - "PostageApp": 575, - "PureStake": 576, - "Qubole": 577, - "CarbonInterface": 578, - "Intrinio": 579, - "QuickMetrics": 580, - "ScrapeStack": 581, - "TechnicalAnalysisApi": 582, - "Urlscan": 583, - "BaseApiIO": 584, - "DailyCO": 585, - "TLy": 586, - "Shortcut": 587, - "Appfollow": 588, - "Thinkific": 589, - "Feedly": 590, - "Stitchdata": 591, - "Fetchrss": 592, - "Signupgenius": 593, - "Signaturit": 594, - "Optimizely": 595, - "OcrSpace": 596, - "WeatherBit": 597, - "BuddyNS": 598, - "ZipAPI": 599, - "ZipBooks": 600, - "Onedesk": 601, - "Bugherd": 602, - "Blazemeter": 603, - "Autodesk": 604, - "Tru": 605, - "UnifyID": 606, - "Trimble": 607, - "Smooch": 608, - "Semaphore": 609, - "Telnyx": 610, - "Signalwire": 611, - "Textmagic": 612, - "Serphouse": 613, - "Planyo": 614, - "Simplybook": 615, - "Vyte": 616, - "Nylas": 617, - "Squareup": 618, - "Dandelion": 619, - "DataFire": 620, - "DeepAI": 621, - "MeaningCloud": 622, - "NeutrinoApi": 623, - "Storecove": 624, - "Shipday": 625, - "Sentiment": 626, - "StreamChatMessaging": 627, - "TeamworkCRM": 628, - "TeamworkDesk": 629, - "TeamworkSpaces": 630, - "TheOddsApi": 631, - "Apacta": 632, - "GetSandbox": 633, - "Happi": 634, - "Oanda": 635, - "FastForex": 636, - "APIMatic": 637, - "VersionEye": 638, - "EagleEyeNetworks": 639, - "ThousandEyes": 640, - "SelectPDF": 641, - "Flightstats": 642, - "ChecIO": 643, - "Manifest": 644, - "ApiScience": 645, - "AppSynergy": 646, - "Caflou": 647, - "Caspio": 648, - "ChecklyHQ": 649, - "CloudElements": 650, - "DronaHQ": 651, - "Enablex": 652, - "Fmfw": 653, - "GoodDay": 654, - "Luno": 655, - "Meistertask": 656, - "Mindmeister": 657, - "PeopleDataLabs": 658, - "ScraperSite": 659, - "Scrapfly": 660, - "SimplyNoted": 661, - "TravelPayouts": 662, - "WebScraper": 663, - "Convier": 664, - "Courier": 665, - "Ditto": 666, - "Findl": 667, - "Lendflow": 668, - "Moderation": 669, - "Opendatasoft": 670, - "Podio": 671, - "Rockset": 672, - "Rownd": 673, - "Shotstack": 674, - "Swiftype": 675, - "Twitter": 676, - "Honey": 677, - "Freshdesk": 678, - "Upwave": 679, - "Fountain": 680, - "Freshbooks": 681, - "Mite": 682, - "Deputy": 683, - "Beebole": 684, - "Cashboard": 685, - "Kanban": 686, - "Worksnaps": 687, - "MyIntervals": 688, - "InvoiceOcean": 689, - "Sherpadesk": 690, - "Mrticktock": 691, - "Chatfule": 692, - "Aeroworkflow": 693, - "Emailoctopus": 694, - "Fusebill": 695, - "Geckoboard": 696, - "Gosquared": 697, - "Moonclerk": 698, - "Paymoapp": 699, - "Mixmax": 700, - "Processst": 701, - "Repairshopr": 702, - "Goshippo": 703, - "Sigopt": 704, - "Sugester": 705, - "Viewneo": 706, - "BoostNote": 707, - "CaptainData": 708, - "Checkvist": 709, - "Cliengo": 710, - "Cloze": 711, - "FormIO": 712, - "FormBucket": 713, - "GoCanvas": 714, - "MadKudu": 715, - "NozbeTeams": 716, - "Papyrs": 717, - "SuperNotesAPI": 718, - "Tallyfy": 719, - "ZenkitAPI": 720, - "CloudImage": 721, - "UploadCare": 722, - "Borgbase": 723, - "Pipedream": 724, - "Sirv": 725, - "Diffbot": 726, - "EightxEight": 727, - "Sendoso": 728, - "Printfection": 729, - "Authorize": 730, - "PandaScore": 731, - "Paymo": 732, - "AvazaPersonalAccessToken": 733, - "PlanviewLeanKit": 734, - "Livestorm": 735, - "KuCoin": 736, - "MetaAPI": 737, - "NiceHash": 738, - "CexIO": 739, - "Klipfolio": 740, - "Dynatrace": 741, - "MollieAPIKey": 742, - "MollieAccessToken": 743, - "BasisTheory": 744, - "Nordigen": 745, - "FlagsmithEnvironmentKey": 746, - "FlagsmithToken": 747, - "Mux": 748, - "Column": 749, - "Sendbird": 750, - "SendbirdOrganizationAPI": 751, - "Midise": 752, - "Mockaroo": 753, - "Image4": 754, - "Pinata": 755, - "BrowserStack": 756, - "CrossBrowserTesting": 757, - "Loadmill": 758, - "TestingBot": 759, - "KnapsackPro": 760, - "Qase": 761, - "Dareboost": 762, - "GTMetrix": 763, - "Holistic": 764, - "Parsers": 765, - "ScrutinizerCi": 766, - "SonarCloud": 767, - "APITemplate": 768, - "ConversionTools": 769, - "CraftMyPDF": 770, - "ExportSDK": 771, - "GlitterlyAPI": 772, - "Hybiscus": 773, - "Miro": 774, - "Statuspage": 775, - "Statuspal": 776, - "Teletype": 777, - "TimeCamp": 778, - "Userflow": 779, - "Wistia": 780, - "SportRadar": 781, - "UptimeRobot": 782, - "Codequiry": 783, - "ExtractorAPI": 784, - "Signable": 785, - "MagicBell": 786, - "Stormboard": 787, - "Apilayer": 788, - "Disqus": 789, - "Woopra": 790, - "Paperform": 791, - "Gumroad": 792, - "Paydirtapp": 793, - "Detectify": 794, - "Statuscake": 795, - "Jumpseller": 796, - "LunchMoney": 797, - "Rosette": 798, - "Yelp": 799, - "Atera": 800, - "EcoStruxureIT": 801, - "Aha": 802, - "Parsehub": 803, - "PackageCloud": 804, - "Cloudsmith": 805, - "Flowdash": 806, - "Flowdock": 807, - "Fibery": 808, - "Typetalk": 809, - "VoodooSMS": 810, - "ZulipChat": 811, - "Formcraft": 812, - "Iexapis": 813, - "Reachmail": 814, - "Chartmogul": 815, - "Appointedd": 816, - "Wit": 817, - "RechargePayments": 818, - "Diggernaut": 819, - "MonkeyLearn": 820, - "Duply": 821, - "Postbacks": 822, - "Collect2": 823, - "ZenRows": 824, - "Zipcodebase": 825, - "Tefter": 826, - "Twist": 827, - "BraintreePayments": 828, - "CloudConvert": 829, - "Grafana": 830, - "ConvertApi": 831, - "Transferwise": 832, - "Bulksms": 833, - "Databox": 834, - "Onesignal": 835, - "Rentman": 836, - "Parseur": 837, - "Docparser": 838, - "Formsite": 839, - "Tickettailor": 840, - "Lemlist": 841, - "Prodpad": 842, - "Formstack": 843, - "Codeclimate": 844, - "Codemagic": 845, - "Vbout": 846, - "Nightfall": 847, - "FlightLabs": 848, - "SpeechTextAI": 849, - "PollsAPI": 850, - "SimFin": 851, - "Scalr": 852, - "Kanbantool": 853, - "Brightlocal": 854, - "Hotwire": 855, - "Instabot": 856, - "Timekit": 857, - "Interseller": 858, - "Mojohelpdesk": 859, - "Createsend": 860, - "Getresponse": 861, - "Dynadot": 862, - "Demio": 863, - "Tokeet": 864, - "Myexperiment": 865, - "Copyscape": 866, - "Besnappy": 867, - "Salesmate": 868, - "Heatmapapi": 869, - "Websitepulse": 870, - "Uclassify": 871, - "Convert": 872, - "PDFmyURL": 873, - "Api2Convert": 874, - "Opsgenie": 875, - "Gemini": 876, - "Honeycomb": 877, - "KalturaAppToken": 878, - "KalturaSession": 879, - "BitGo": 880, - "Optidash": 881, - "Imgix": 882, - "ImageToText": 883, - "Page2Images": 884, - "Quickbase": 885, - "Redbooth": 886, - "Nubela": 887, - "Infobip": 888, - "Uproc": 889, - "Supportbee": 890, - "Aftership": 891, - "Edusign": 892, - "Teamup": 893, - "Workday": 894, - "MongoDB": 895, - "NGC": 896, - "DigitalOceanV2": 897, - "SQLServer": 898, - "FTP": 899, - "Redis": 900, - "LDAP": 901, - "Shopify": 902, - "RabbitMQ": 903, - "CustomRegex": 904, - "Etherscan": 905, - "Infura": 906, - "Alchemy": 907, - "BlockNative": 908, - "Moralis": 909, - "BscScan": 910, - "CoinMarketCap": 911, - "Percy": 912, - "TinesWebhook": 913, - "Pulumi": 914, - "SupabaseToken": 915, - "NuGetApiKey": 916, - "Aiven": 917, - "Prefect": 918, - "Docusign": 919, - "Couchbase": 920, - "Dockerhub": 921, - "TrufflehogEnterprise": 922, - "EnvoyApiKey": 923, - "GitHubOauth2": 924, - "Salesforce": 925, - "HuggingFace": 926, - "Snowflake": 927, - "Sourcegraph": 928, - "Tailscale": 929, - "Web3Storage": 930, - "AzureStorage": 931, - "PlanetScaleDb": 932, - "Anthropic": 933, - "Ramp": 934, - "Klaviyo": 935, - "SourcegraphCody": 936, - "Voiceflow": 937, - "Privacy": 938, - "IPInfo": 939, - "Ip2location": 940, - "Instamojo": 941, - "Portainer": 942, - "PortainerToken": 943, - "Loggly": 944, - "OpenVpn": 945, - "VagrantCloudPersonalToken": 946, - "BetterStack": 947, - "ZeroTier": 948, - "AppOptics": 949, - "Metabase": 950, - "CoinbaseWaaS": 951, - "LemonSqueezy": 952, - "Budibase": 953, - "DenoDeploy": 954, - "Stripo": 955, - "ReplyIO": 956, - "AzureBatch": 957, - "AzureContainerRegistry": 958, - "AWSSessionKey": 959, - "Coda": 960, - "LogzIO": 961, - "Eventbrite": 962, - "GrafanaServiceAccount": 963, - "RequestFinance": 964, - "Overloop": 965, - "Ngrok": 966, - "Replicate": 967, - "Postgres": 968, - "AzureActiveDirectoryApplicationSecret": 969, - "AzureCacheForRedisAccessKey": 970, - "AzureCosmosDBKeyIdentifiable": 971, - "AzureDevopsPersonalAccessToken": 972, - "AzureFunctionKey": 973, - "AzureMLWebServiceClassicIdentifiableKey": 974, - "AzureSasToken": 975, - "AzureSearchAdminKey": 976, - "AzureSearchQueryKey": 977, - "AzureManagementCertificate": 978, - "AzureSQL": 979, - "FlyIO": 980, - "BuiltWith": 981, - "JupiterOne": 982, - "GCPApplicationDefaultCredentials": 983, - "Wiz": 984, - "Pagarme": 985, - "Onfleet": 986, - "Intra42": 987, - "Groq": 988, - "TwitterConsumerkey": 989, - "Eraser": 990, - "LarkSuite": 991, - "LarkSuiteApiKey": 992, - "EndorLabs": 993, - "ElevenLabs": 994, - "Netsuite": 995, - "RobinhoodCrypto": 996, - "NVAPI": 997, - "PyPI": 998, - "RailwayApp": 999, - "Meraki": 1000, - "SaladCloudApiKey": 1001, - "Box": 1002, - "BoxOauth": 1003, - "ApiMetrics": 1004, - "WeightsAndBiases": 1005, - "ZohoCRM": 1006, - "AzureOpenAI": 1007, - "GoDaddy": 1008, - "Flexport": 1009, - "TwitchAccessToken": 1010, - "TwilioApiKey": 1011, - "Sanity": 1012, - "AzureRefreshToken": 1013, - "AirtableOAuth": 1014, - "AirtablePersonalAccessToken": 1015, - "StoryblokPersonalAccessToken": 1016, - "SentryOrgToken": 1017, - "AzureApiManagementRepositoryKey": 1018, - "AzureAPIManagementSubscriptionKey": 1019, - "Harness": 1020, - "Langfuse": 1021, - "BingSubscriptionKey": 1022, - "XAI": 1023, - "AzureDirectManagementKey": 1024, - "AzureAppConfigConnectionString": 1025, - "DeepSeek": 1026, - "StripePaymentIntent": 1027, - "LangSmith": 1028, - "BitbucketAppPassword": 1029, - "Hasura": 1030, - "SalesforceRefreshToken": 1031, - "AnypointOAuth2": 1032, - "WebexBot": 1033, - "TableauPersonalAccessToken": 1034, - "Rootly": 1035, - "HashiCorpVaultAuth": 1036, - "PhraseAccessToken": 1037, - "Photoroom": 1038, - "JWT": 1039, - "OpenAIAdmin": 1040, - "GoogleGeminiAPIKey": 1041, - "ArtifactoryReferenceToken": 1042, - "DatadogApikey": 1043, - } -) - -func (x DetectorType) Enum() *DetectorType { - p := new(DetectorType) - *p = x - return p -} - -func (x DetectorType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (DetectorType) Descriptor() protoreflect.EnumDescriptor { - return file_detectors_proto_enumTypes[1].Descriptor() -} - -func (DetectorType) Type() protoreflect.EnumType { - return &file_detectors_proto_enumTypes[1] -} - -func (x DetectorType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use DetectorType.Descriptor instead. -func (DetectorType) EnumDescriptor() ([]byte, []int) { - return file_detectors_proto_rawDescGZIP(), []int{1} -} - type Result struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -3690,1094 +498,11 @@ var file_detectors_proto_rawDesc = []byte{ 0x4c, 0x41, 0x49, 0x4e, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x42, 0x41, 0x53, 0x45, 0x36, 0x34, 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x55, 0x54, 0x46, 0x31, 0x36, 0x10, 0x03, 0x12, 0x13, 0x0a, 0x0f, 0x45, 0x53, 0x43, 0x41, 0x50, 0x45, 0x44, 0x5f, 0x55, 0x4e, 0x49, 0x43, 0x4f, 0x44, 0x45, - 0x10, 0x04, 0x2a, 0xa4, 0x87, 0x01, 0x0a, 0x0c, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x6f, 0x72, - 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x41, 0x6c, 0x69, 0x62, 0x61, 0x62, 0x61, 0x10, - 0x00, 0x12, 0x08, 0x0a, 0x04, 0x41, 0x4d, 0x51, 0x50, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x41, - 0x57, 0x53, 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x41, 0x7a, 0x75, 0x72, 0x65, 0x10, 0x03, 0x12, - 0x0a, 0x0a, 0x06, 0x43, 0x69, 0x72, 0x63, 0x6c, 0x65, 0x10, 0x04, 0x12, 0x0c, 0x0a, 0x08, 0x43, - 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x10, 0x05, 0x12, 0x07, 0x0a, 0x03, 0x47, 0x43, 0x50, - 0x10, 0x06, 0x12, 0x0b, 0x0a, 0x07, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x10, 0x07, 0x12, - 0x0a, 0x0a, 0x06, 0x47, 0x69, 0x74, 0x68, 0x75, 0x62, 0x10, 0x08, 0x12, 0x0a, 0x0a, 0x06, 0x47, - 0x69, 0x74, 0x6c, 0x61, 0x62, 0x10, 0x09, 0x12, 0x08, 0x0a, 0x04, 0x4a, 0x44, 0x42, 0x43, 0x10, - 0x0a, 0x12, 0x0c, 0x0a, 0x08, 0x52, 0x61, 0x7a, 0x6f, 0x72, 0x50, 0x61, 0x79, 0x10, 0x0b, 0x12, - 0x0c, 0x0a, 0x08, 0x53, 0x65, 0x6e, 0x64, 0x47, 0x72, 0x69, 0x64, 0x10, 0x0c, 0x12, 0x09, 0x0a, - 0x05, 0x53, 0x6c, 0x61, 0x63, 0x6b, 0x10, 0x0d, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x71, 0x75, 0x61, - 0x72, 0x65, 0x10, 0x0e, 0x12, 0x0e, 0x0a, 0x0a, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, - 0x65, 0x79, 0x10, 0x0f, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x74, 0x72, 0x69, 0x70, 0x65, 0x10, 0x10, - 0x12, 0x07, 0x0a, 0x03, 0x55, 0x52, 0x49, 0x10, 0x11, 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x72, 0x6f, - 0x70, 0x62, 0x6f, 0x78, 0x10, 0x12, 0x12, 0x0a, 0x0a, 0x06, 0x48, 0x65, 0x72, 0x6f, 0x6b, 0x75, - 0x10, 0x13, 0x12, 0x0d, 0x0a, 0x09, 0x4d, 0x61, 0x69, 0x6c, 0x63, 0x68, 0x69, 0x6d, 0x70, 0x10, - 0x14, 0x12, 0x08, 0x0a, 0x04, 0x4f, 0x6b, 0x74, 0x61, 0x10, 0x15, 0x12, 0x0c, 0x0a, 0x08, 0x4f, - 0x6e, 0x65, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x10, 0x16, 0x12, 0x12, 0x0a, 0x0e, 0x50, 0x69, 0x76, - 0x6f, 0x74, 0x61, 0x6c, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x65, 0x72, 0x10, 0x17, 0x12, 0x0d, 0x0a, - 0x09, 0x53, 0x71, 0x75, 0x61, 0x72, 0x65, 0x41, 0x70, 0x70, 0x10, 0x19, 0x12, 0x0a, 0x0a, 0x06, - 0x54, 0x77, 0x69, 0x6c, 0x69, 0x6f, 0x10, 0x1a, 0x12, 0x08, 0x0a, 0x04, 0x54, 0x65, 0x73, 0x74, - 0x10, 0x1b, 0x12, 0x0c, 0x0a, 0x08, 0x54, 0x72, 0x61, 0x76, 0x69, 0x73, 0x43, 0x49, 0x10, 0x1d, - 0x12, 0x10, 0x0a, 0x0c, 0x53, 0x6c, 0x61, 0x63, 0x6b, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, - 0x10, 0x1e, 0x12, 0x0f, 0x0a, 0x0b, 0x50, 0x61, 0x79, 0x70, 0x61, 0x6c, 0x4f, 0x61, 0x75, 0x74, - 0x68, 0x10, 0x1f, 0x12, 0x13, 0x0a, 0x0f, 0x50, 0x61, 0x67, 0x65, 0x72, 0x44, 0x75, 0x74, 0x79, - 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x10, 0x20, 0x12, 0x0c, 0x0a, 0x08, 0x46, 0x69, 0x72, 0x65, - 0x62, 0x61, 0x73, 0x65, 0x10, 0x21, 0x12, 0x0b, 0x0a, 0x07, 0x4d, 0x61, 0x69, 0x6c, 0x67, 0x75, - 0x6e, 0x10, 0x22, 0x12, 0x0b, 0x0a, 0x07, 0x48, 0x75, 0x62, 0x53, 0x70, 0x6f, 0x74, 0x10, 0x23, - 0x12, 0x0d, 0x0a, 0x09, 0x47, 0x69, 0x74, 0x48, 0x75, 0x62, 0x41, 0x70, 0x70, 0x10, 0x24, 0x12, - 0x0c, 0x0a, 0x08, 0x43, 0x69, 0x72, 0x63, 0x6c, 0x65, 0x43, 0x49, 0x10, 0x25, 0x12, 0x0c, 0x0a, - 0x08, 0x57, 0x70, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x10, 0x26, 0x12, 0x10, 0x0a, 0x0c, 0x44, - 0x61, 0x74, 0x61, 0x64, 0x6f, 0x67, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x10, 0x27, 0x12, 0x11, 0x0a, - 0x0d, 0x46, 0x61, 0x63, 0x65, 0x62, 0x6f, 0x6f, 0x6b, 0x4f, 0x41, 0x75, 0x74, 0x68, 0x10, 0x28, - 0x12, 0x1c, 0x0a, 0x18, 0x41, 0x73, 0x61, 0x6e, 0x61, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x61, - 0x6c, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x10, 0x29, 0x12, 0x13, - 0x0a, 0x0f, 0x41, 0x6d, 0x70, 0x6c, 0x69, 0x74, 0x75, 0x64, 0x65, 0x41, 0x70, 0x69, 0x4b, 0x65, - 0x79, 0x10, 0x2a, 0x12, 0x14, 0x0a, 0x10, 0x42, 0x69, 0x74, 0x4c, 0x79, 0x41, 0x63, 0x63, 0x65, - 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x10, 0x2b, 0x12, 0x12, 0x0a, 0x0e, 0x43, 0x61, 0x6c, - 0x65, 0x6e, 0x64, 0x6c, 0x79, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x10, 0x2c, 0x12, 0x11, 0x0a, - 0x0d, 0x5a, 0x61, 0x70, 0x69, 0x65, 0x72, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x10, 0x2d, - 0x12, 0x11, 0x0a, 0x0d, 0x59, 0x6f, 0x75, 0x74, 0x75, 0x62, 0x65, 0x41, 0x70, 0x69, 0x4b, 0x65, - 0x79, 0x10, 0x2e, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x61, 0x6c, 0x65, 0x73, 0x66, 0x6f, 0x72, 0x63, - 0x65, 0x4f, 0x61, 0x75, 0x74, 0x68, 0x32, 0x10, 0x2f, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x77, 0x69, - 0x74, 0x74, 0x65, 0x72, 0x41, 0x70, 0x69, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x10, 0x30, 0x12, - 0x0c, 0x0a, 0x08, 0x4e, 0x70, 0x6d, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x10, 0x31, 0x12, 0x1a, 0x0a, - 0x16, 0x4e, 0x65, 0x77, 0x52, 0x65, 0x6c, 0x69, 0x63, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x61, - 0x6c, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x10, 0x32, 0x12, 0x16, 0x0a, 0x0e, 0x41, 0x69, 0x72, - 0x74, 0x61, 0x62, 0x6c, 0x65, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x10, 0x33, 0x1a, 0x02, 0x08, - 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x41, 0x6b, 0x61, 0x6d, 0x61, 0x69, 0x54, 0x6f, 0x6b, 0x65, 0x6e, - 0x10, 0x34, 0x12, 0x0d, 0x0a, 0x09, 0x41, 0x6d, 0x61, 0x7a, 0x6f, 0x6e, 0x4d, 0x57, 0x53, 0x10, - 0x35, 0x12, 0x0e, 0x0a, 0x0a, 0x4b, 0x75, 0x62, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x10, - 0x36, 0x12, 0x0e, 0x0a, 0x0a, 0x41, 0x75, 0x74, 0x68, 0x30, 0x6f, 0x61, 0x75, 0x74, 0x68, 0x10, - 0x37, 0x12, 0x0c, 0x0a, 0x08, 0x42, 0x69, 0x74, 0x66, 0x69, 0x6e, 0x65, 0x78, 0x10, 0x38, 0x12, - 0x0c, 0x0a, 0x08, 0x43, 0x6c, 0x61, 0x72, 0x69, 0x66, 0x61, 0x69, 0x10, 0x39, 0x12, 0x1a, 0x0a, - 0x16, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x66, 0x6c, 0x61, 0x72, 0x65, 0x47, 0x6c, 0x6f, 0x62, 0x61, - 0x6c, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x10, 0x3a, 0x12, 0x13, 0x0a, 0x0f, 0x43, 0x6c, 0x6f, - 0x75, 0x64, 0x66, 0x6c, 0x61, 0x72, 0x65, 0x43, 0x61, 0x4b, 0x65, 0x79, 0x10, 0x3b, 0x12, 0x0d, - 0x0a, 0x09, 0x43, 0x6f, 0x6e, 0x66, 0x6c, 0x75, 0x65, 0x6e, 0x74, 0x10, 0x3c, 0x12, 0x16, 0x0a, - 0x12, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x66, 0x75, 0x6c, 0x44, 0x65, 0x6c, 0x69, 0x76, - 0x65, 0x72, 0x79, 0x10, 0x3d, 0x12, 0x13, 0x0a, 0x0f, 0x44, 0x61, 0x74, 0x61, 0x62, 0x72, 0x69, - 0x63, 0x6b, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x10, 0x3e, 0x12, 0x16, 0x0a, 0x12, 0x44, 0x69, - 0x67, 0x69, 0x74, 0x61, 0x6c, 0x4f, 0x63, 0x65, 0x61, 0x6e, 0x53, 0x70, 0x61, 0x63, 0x65, 0x73, - 0x10, 0x3f, 0x12, 0x15, 0x0a, 0x11, 0x44, 0x69, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x4f, 0x63, 0x65, - 0x61, 0x6e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x10, 0x40, 0x12, 0x13, 0x0a, 0x0f, 0x44, 0x69, 0x73, - 0x63, 0x6f, 0x72, 0x64, 0x42, 0x6f, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x10, 0x41, 0x12, 0x12, - 0x0a, 0x0e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x72, 0x64, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, - 0x10, 0x42, 0x12, 0x12, 0x0a, 0x0a, 0x45, 0x74, 0x73, 0x79, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, - 0x10, 0x43, 0x1a, 0x02, 0x08, 0x01, 0x12, 0x17, 0x0a, 0x13, 0x46, 0x61, 0x73, 0x74, 0x6c, 0x79, - 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x61, 0x6c, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x10, 0x44, 0x12, - 0x10, 0x0a, 0x0c, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x4f, 0x61, 0x75, 0x74, 0x68, 0x32, 0x10, - 0x45, 0x12, 0x0d, 0x0a, 0x09, 0x52, 0x65, 0x43, 0x41, 0x50, 0x54, 0x43, 0x48, 0x41, 0x10, 0x46, - 0x12, 0x10, 0x0a, 0x0c, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, - 0x10, 0x47, 0x12, 0x0a, 0x0a, 0x06, 0x48, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x10, 0x48, 0x12, 0x13, - 0x0a, 0x0f, 0x49, 0x62, 0x6d, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, - 0x79, 0x10, 0x49, 0x12, 0x0b, 0x0a, 0x07, 0x4e, 0x65, 0x74, 0x6c, 0x69, 0x66, 0x79, 0x10, 0x4a, - 0x12, 0x0a, 0x0a, 0x06, 0x56, 0x6f, 0x6e, 0x61, 0x67, 0x65, 0x10, 0x4b, 0x12, 0x10, 0x0a, 0x0c, - 0x45, 0x71, 0x75, 0x69, 0x6e, 0x69, 0x78, 0x4f, 0x61, 0x75, 0x74, 0x68, 0x10, 0x4c, 0x12, 0x0c, - 0x0a, 0x08, 0x50, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x10, 0x4d, 0x12, 0x0e, 0x0a, 0x0a, - 0x50, 0x6c, 0x61, 0x69, 0x64, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x10, 0x4e, 0x12, 0x0c, 0x0a, 0x08, - 0x50, 0x6c, 0x61, 0x69, 0x64, 0x4b, 0x65, 0x79, 0x10, 0x4f, 0x12, 0x09, 0x0a, 0x05, 0x50, 0x6c, - 0x69, 0x76, 0x6f, 0x10, 0x50, 0x12, 0x0c, 0x0a, 0x08, 0x50, 0x6f, 0x73, 0x74, 0x6d, 0x61, 0x72, - 0x6b, 0x10, 0x51, 0x12, 0x14, 0x0a, 0x10, 0x50, 0x75, 0x62, 0x4e, 0x75, 0x62, 0x50, 0x75, 0x62, - 0x6c, 0x69, 0x73, 0x68, 0x4b, 0x65, 0x79, 0x10, 0x52, 0x12, 0x19, 0x0a, 0x15, 0x50, 0x75, 0x62, - 0x4e, 0x75, 0x62, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x4b, - 0x65, 0x79, 0x10, 0x53, 0x12, 0x14, 0x0a, 0x10, 0x50, 0x75, 0x73, 0x68, 0x65, 0x72, 0x43, 0x68, - 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x4b, 0x65, 0x79, 0x10, 0x54, 0x12, 0x0f, 0x0a, 0x0b, 0x53, 0x63, - 0x61, 0x6c, 0x65, 0x77, 0x61, 0x79, 0x4b, 0x65, 0x79, 0x10, 0x55, 0x12, 0x10, 0x0a, 0x0c, 0x53, - 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x42, 0x6c, 0x75, 0x65, 0x56, 0x32, 0x10, 0x56, 0x12, 0x0f, 0x0a, - 0x0b, 0x53, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x10, 0x57, 0x12, 0x0d, - 0x0a, 0x09, 0x53, 0x68, 0x6f, 0x64, 0x61, 0x6e, 0x4b, 0x65, 0x79, 0x10, 0x58, 0x12, 0x0b, 0x0a, - 0x07, 0x53, 0x6e, 0x79, 0x6b, 0x4b, 0x65, 0x79, 0x10, 0x59, 0x12, 0x0e, 0x0a, 0x0a, 0x53, 0x70, - 0x6f, 0x74, 0x69, 0x66, 0x79, 0x4b, 0x65, 0x79, 0x10, 0x5a, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x65, - 0x6c, 0x65, 0x67, 0x72, 0x61, 0x6d, 0x42, 0x6f, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x10, 0x5b, - 0x12, 0x13, 0x0a, 0x0f, 0x54, 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x74, 0x43, 0x6c, 0x6f, 0x75, 0x64, - 0x4b, 0x65, 0x79, 0x10, 0x5c, 0x12, 0x1f, 0x0a, 0x1b, 0x54, 0x65, 0x72, 0x72, 0x61, 0x66, 0x6f, - 0x72, 0x6d, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x61, 0x6c, 0x54, - 0x6f, 0x6b, 0x65, 0x6e, 0x10, 0x5d, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x72, 0x65, 0x6c, 0x6c, 0x6f, - 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x10, 0x5e, 0x12, 0x0e, 0x0a, 0x0a, 0x5a, 0x65, 0x6e, 0x64, - 0x65, 0x73, 0x6b, 0x41, 0x70, 0x69, 0x10, 0x5f, 0x12, 0x12, 0x0a, 0x0e, 0x4d, 0x61, 0x78, 0x4d, - 0x69, 0x6e, 0x64, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x10, 0x60, 0x12, 0x1a, 0x0a, 0x16, - 0x41, 0x69, 0x72, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x10, 0x61, 0x12, 0x0e, 0x0a, 0x0a, 0x41, 0x73, 0x61, 0x6e, - 0x61, 0x4f, 0x61, 0x75, 0x74, 0x68, 0x10, 0x62, 0x12, 0x0c, 0x0a, 0x08, 0x52, 0x61, 0x70, 0x69, - 0x64, 0x41, 0x70, 0x69, 0x10, 0x63, 0x12, 0x16, 0x0a, 0x12, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x66, - 0x6c, 0x61, 0x72, 0x65, 0x41, 0x70, 0x69, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x10, 0x64, 0x12, 0x09, - 0x0a, 0x05, 0x57, 0x65, 0x62, 0x65, 0x78, 0x10, 0x65, 0x12, 0x1a, 0x0a, 0x16, 0x46, 0x69, 0x72, - 0x65, 0x62, 0x61, 0x73, 0x65, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x69, 0x6e, 0x67, 0x10, 0x66, 0x12, 0x21, 0x0a, 0x1d, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, - 0x66, 0x75, 0x6c, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x61, 0x6c, 0x41, 0x63, 0x63, 0x65, 0x73, - 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x10, 0x67, 0x12, 0x0a, 0x0a, 0x06, 0x4d, 0x61, 0x70, 0x42, - 0x6f, 0x78, 0x10, 0x68, 0x12, 0x14, 0x0a, 0x10, 0x4d, 0x61, 0x69, 0x6c, 0x4a, 0x65, 0x74, 0x42, - 0x61, 0x73, 0x69, 0x63, 0x41, 0x75, 0x74, 0x68, 0x10, 0x69, 0x12, 0x0e, 0x0a, 0x0a, 0x4d, 0x61, - 0x69, 0x6c, 0x4a, 0x65, 0x74, 0x53, 0x4d, 0x53, 0x10, 0x6a, 0x12, 0x11, 0x0a, 0x0d, 0x48, 0x75, - 0x62, 0x53, 0x70, 0x6f, 0x74, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x10, 0x6b, 0x12, 0x10, 0x0a, - 0x0c, 0x48, 0x75, 0x62, 0x53, 0x70, 0x6f, 0x74, 0x4f, 0x61, 0x75, 0x74, 0x68, 0x10, 0x6c, 0x12, - 0x0b, 0x0a, 0x07, 0x53, 0x73, 0x6c, 0x4d, 0x61, 0x74, 0x65, 0x10, 0x6d, 0x12, 0x1b, 0x0a, 0x17, - 0x41, 0x75, 0x74, 0x68, 0x30, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x41, - 0x70, 0x69, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x10, 0x6e, 0x12, 0x0f, 0x0a, 0x0b, 0x4d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x42, 0x69, 0x72, 0x64, 0x10, 0x6f, 0x12, 0x10, 0x0a, 0x0c, 0x45, 0x6c, - 0x61, 0x73, 0x74, 0x69, 0x63, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x10, 0x70, 0x12, 0x1c, 0x0a, 0x18, - 0x46, 0x69, 0x67, 0x6d, 0x61, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x61, 0x6c, 0x41, 0x63, 0x63, - 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x10, 0x71, 0x12, 0x19, 0x0a, 0x15, 0x4d, 0x69, - 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x73, 0x57, 0x65, 0x62, 0x68, - 0x6f, 0x6f, 0x6b, 0x10, 0x72, 0x12, 0x0d, 0x0a, 0x09, 0x47, 0x69, 0x74, 0x48, 0x75, 0x62, 0x4f, - 0x6c, 0x64, 0x10, 0x73, 0x12, 0x0f, 0x0a, 0x0b, 0x56, 0x75, 0x6c, 0x74, 0x72, 0x41, 0x70, 0x69, - 0x4b, 0x65, 0x79, 0x10, 0x74, 0x12, 0x0c, 0x0a, 0x08, 0x50, 0x65, 0x70, 0x69, 0x70, 0x6f, 0x73, - 0x74, 0x10, 0x75, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x6f, 0x73, 0x74, 0x6d, 0x61, 0x6e, 0x10, 0x76, - 0x12, 0x11, 0x0a, 0x0d, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x73, 0x69, 0x67, 0x68, 0x74, 0x4b, 0x65, - 0x79, 0x10, 0x77, 0x12, 0x0d, 0x0a, 0x09, 0x4a, 0x69, 0x72, 0x61, 0x54, 0x6f, 0x6b, 0x65, 0x6e, - 0x10, 0x78, 0x12, 0x0f, 0x0a, 0x0b, 0x4e, 0x65, 0x78, 0x6d, 0x6f, 0x41, 0x70, 0x69, 0x4b, 0x65, - 0x79, 0x10, 0x79, 0x12, 0x11, 0x0a, 0x0d, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x41, 0x70, - 0x69, 0x4b, 0x65, 0x79, 0x10, 0x7a, 0x12, 0x10, 0x0a, 0x0c, 0x53, 0x75, 0x6d, 0x6f, 0x4c, 0x6f, - 0x67, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x10, 0x7b, 0x12, 0x14, 0x0a, 0x10, 0x50, 0x75, 0x73, 0x68, - 0x42, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x10, 0x7c, 0x12, 0x16, - 0x0a, 0x12, 0x41, 0x69, 0x72, 0x62, 0x72, 0x61, 0x6b, 0x65, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, - 0x74, 0x4b, 0x65, 0x79, 0x10, 0x7d, 0x12, 0x13, 0x0a, 0x0f, 0x41, 0x69, 0x72, 0x62, 0x72, 0x61, - 0x6b, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x10, 0x7e, 0x12, 0x17, 0x0a, 0x13, 0x50, - 0x65, 0x6e, 0x64, 0x6f, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4b, - 0x65, 0x79, 0x10, 0x7f, 0x12, 0x1f, 0x0a, 0x1a, 0x53, 0x70, 0x6c, 0x75, 0x6e, 0x6b, 0x4f, 0x62, - 0x65, 0x72, 0x73, 0x65, 0x72, 0x76, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x54, 0x6f, 0x6b, - 0x65, 0x6e, 0x10, 0x80, 0x01, 0x12, 0x12, 0x0a, 0x0d, 0x4c, 0x6f, 0x6b, 0x61, 0x6c, 0x69, 0x73, - 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x10, 0x81, 0x01, 0x12, 0x11, 0x0a, 0x0c, 0x43, 0x61, 0x6c, - 0x65, 0x6e, 0x64, 0x61, 0x72, 0x69, 0x66, 0x69, 0x63, 0x10, 0x82, 0x01, 0x12, 0x0e, 0x0a, 0x09, - 0x4a, 0x75, 0x6d, 0x70, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x10, 0x83, 0x01, 0x12, 0x0c, 0x0a, 0x07, - 0x49, 0x70, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x10, 0x85, 0x01, 0x12, 0x0b, 0x0a, 0x06, 0x4e, 0x6f, - 0x74, 0x69, 0x6f, 0x6e, 0x10, 0x86, 0x01, 0x12, 0x0c, 0x0a, 0x07, 0x44, 0x72, 0x6f, 0x6e, 0x65, - 0x43, 0x49, 0x10, 0x87, 0x01, 0x12, 0x0c, 0x0a, 0x07, 0x41, 0x64, 0x6f, 0x62, 0x65, 0x49, 0x4f, - 0x10, 0x88, 0x01, 0x12, 0x0f, 0x0a, 0x0a, 0x54, 0x77, 0x65, 0x6c, 0x76, 0x65, 0x44, 0x61, 0x74, - 0x61, 0x10, 0x89, 0x01, 0x12, 0x0e, 0x0a, 0x09, 0x44, 0x37, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, - 0x6b, 0x10, 0x8a, 0x01, 0x12, 0x10, 0x0a, 0x0b, 0x53, 0x63, 0x72, 0x61, 0x70, 0x69, 0x6e, 0x67, - 0x42, 0x65, 0x65, 0x10, 0x8b, 0x01, 0x12, 0x0b, 0x0a, 0x06, 0x4b, 0x65, 0x65, 0x6e, 0x49, 0x4f, - 0x10, 0x8c, 0x01, 0x12, 0x0d, 0x0a, 0x08, 0x57, 0x61, 0x6b, 0x61, 0x74, 0x69, 0x6d, 0x65, 0x10, - 0x8d, 0x01, 0x12, 0x0e, 0x0a, 0x09, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x6b, 0x69, 0x74, 0x65, 0x10, - 0x8e, 0x01, 0x12, 0x0d, 0x0a, 0x08, 0x56, 0x65, 0x72, 0x69, 0x6d, 0x61, 0x69, 0x6c, 0x10, 0x8f, - 0x01, 0x12, 0x0f, 0x0a, 0x0a, 0x5a, 0x65, 0x72, 0x6f, 0x62, 0x6f, 0x75, 0x6e, 0x63, 0x65, 0x10, - 0x90, 0x01, 0x12, 0x11, 0x0a, 0x0c, 0x4d, 0x61, 0x69, 0x6c, 0x62, 0x6f, 0x78, 0x6c, 0x61, 0x79, - 0x65, 0x72, 0x10, 0x91, 0x01, 0x12, 0x0f, 0x0a, 0x0a, 0x46, 0x61, 0x73, 0x74, 0x73, 0x70, 0x72, - 0x69, 0x6e, 0x67, 0x10, 0x92, 0x01, 0x12, 0x0b, 0x0a, 0x06, 0x50, 0x61, 0x64, 0x64, 0x6c, 0x65, - 0x10, 0x93, 0x01, 0x12, 0x0b, 0x0a, 0x06, 0x53, 0x65, 0x6c, 0x6c, 0x66, 0x79, 0x10, 0x94, 0x01, - 0x12, 0x0c, 0x0a, 0x07, 0x46, 0x69, 0x78, 0x65, 0x72, 0x49, 0x4f, 0x10, 0x95, 0x01, 0x12, 0x0e, - 0x0a, 0x09, 0x42, 0x75, 0x74, 0x74, 0x65, 0x72, 0x43, 0x4d, 0x53, 0x10, 0x96, 0x01, 0x12, 0x0b, - 0x0a, 0x06, 0x54, 0x61, 0x78, 0x6a, 0x61, 0x72, 0x10, 0x97, 0x01, 0x12, 0x0c, 0x0a, 0x07, 0x41, - 0x76, 0x61, 0x6c, 0x61, 0x72, 0x61, 0x10, 0x98, 0x01, 0x12, 0x0e, 0x0a, 0x09, 0x48, 0x65, 0x6c, - 0x70, 0x73, 0x63, 0x6f, 0x75, 0x74, 0x10, 0x99, 0x01, 0x12, 0x10, 0x0a, 0x0b, 0x45, 0x6c, 0x61, - 0x73, 0x74, 0x69, 0x63, 0x50, 0x61, 0x74, 0x68, 0x10, 0x9a, 0x01, 0x12, 0x0b, 0x0a, 0x06, 0x5a, - 0x65, 0x70, 0x6c, 0x69, 0x6e, 0x10, 0x9b, 0x01, 0x12, 0x0d, 0x0a, 0x08, 0x49, 0x6e, 0x74, 0x65, - 0x72, 0x63, 0x6f, 0x6d, 0x10, 0x9c, 0x01, 0x12, 0x0d, 0x0a, 0x08, 0x4d, 0x61, 0x69, 0x6c, 0x6d, - 0x6f, 0x64, 0x6f, 0x10, 0x9d, 0x01, 0x12, 0x0c, 0x0a, 0x07, 0x43, 0x61, 0x6e, 0x6e, 0x79, 0x49, - 0x6f, 0x10, 0x9e, 0x01, 0x12, 0x0e, 0x0a, 0x09, 0x50, 0x69, 0x70, 0x65, 0x64, 0x72, 0x69, 0x76, - 0x65, 0x10, 0x9f, 0x01, 0x12, 0x0b, 0x0a, 0x06, 0x56, 0x65, 0x72, 0x63, 0x65, 0x6c, 0x10, 0xa0, - 0x01, 0x12, 0x0f, 0x0a, 0x0a, 0x50, 0x6f, 0x73, 0x74, 0x68, 0x6f, 0x67, 0x41, 0x70, 0x70, 0x10, - 0xa1, 0x01, 0x12, 0x11, 0x0a, 0x0c, 0x53, 0x69, 0x6e, 0x63, 0x68, 0x4d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x10, 0xa2, 0x01, 0x12, 0x0d, 0x0a, 0x08, 0x41, 0x79, 0x72, 0x73, 0x68, 0x61, 0x72, - 0x65, 0x10, 0xa3, 0x01, 0x12, 0x0f, 0x0a, 0x0a, 0x48, 0x65, 0x6c, 0x70, 0x43, 0x72, 0x75, 0x6e, - 0x63, 0x68, 0x10, 0xa4, 0x01, 0x12, 0x0e, 0x0a, 0x09, 0x4c, 0x69, 0x76, 0x65, 0x41, 0x67, 0x65, - 0x6e, 0x74, 0x10, 0xa5, 0x01, 0x12, 0x0b, 0x0a, 0x06, 0x42, 0x65, 0x61, 0x6d, 0x65, 0x72, 0x10, - 0xa6, 0x01, 0x12, 0x11, 0x0a, 0x0c, 0x57, 0x65, 0x43, 0x68, 0x61, 0x74, 0x41, 0x70, 0x70, 0x4b, - 0x65, 0x79, 0x10, 0xa7, 0x01, 0x12, 0x12, 0x0a, 0x0d, 0x4c, 0x69, 0x6e, 0x65, 0x4d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x69, 0x6e, 0x67, 0x10, 0xa8, 0x01, 0x12, 0x14, 0x0a, 0x0f, 0x55, 0x62, 0x65, - 0x72, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x10, 0xa9, 0x01, 0x12, - 0x14, 0x0a, 0x0f, 0x41, 0x6c, 0x67, 0x6f, 0x6c, 0x69, 0x61, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x4b, - 0x65, 0x79, 0x10, 0xaa, 0x01, 0x12, 0x10, 0x0a, 0x0b, 0x46, 0x75, 0x6c, 0x6c, 0x43, 0x6f, 0x6e, - 0x74, 0x61, 0x63, 0x74, 0x10, 0xab, 0x01, 0x12, 0x0d, 0x0a, 0x08, 0x4d, 0x61, 0x6e, 0x64, 0x72, - 0x69, 0x6c, 0x6c, 0x10, 0xac, 0x01, 0x12, 0x10, 0x0a, 0x0b, 0x46, 0x6c, 0x75, 0x74, 0x74, 0x65, - 0x72, 0x77, 0x61, 0x76, 0x65, 0x10, 0xad, 0x01, 0x12, 0x1c, 0x0a, 0x17, 0x4d, 0x61, 0x74, 0x74, - 0x65, 0x72, 0x6d, 0x6f, 0x73, 0x74, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x61, 0x6c, 0x54, 0x6f, - 0x6b, 0x65, 0x6e, 0x10, 0xae, 0x01, 0x12, 0x0d, 0x0a, 0x08, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x61, - 0x6e, 0x74, 0x10, 0xaf, 0x01, 0x12, 0x0f, 0x0a, 0x0a, 0x4c, 0x69, 0x6e, 0x65, 0x4e, 0x6f, 0x74, - 0x69, 0x66, 0x79, 0x10, 0xb0, 0x01, 0x12, 0x0e, 0x0a, 0x09, 0x4c, 0x69, 0x6e, 0x65, 0x61, 0x72, - 0x41, 0x50, 0x49, 0x10, 0xb1, 0x01, 0x12, 0x0c, 0x0a, 0x07, 0x55, 0x62, 0x69, 0x64, 0x6f, 0x74, - 0x73, 0x10, 0xb2, 0x01, 0x12, 0x0d, 0x0a, 0x08, 0x41, 0x6e, 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, - 0x10, 0xb3, 0x01, 0x12, 0x0b, 0x0a, 0x06, 0x44, 0x77, 0x6f, 0x6c, 0x6c, 0x61, 0x10, 0xb4, 0x01, - 0x12, 0x1b, 0x0a, 0x16, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x41, - 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x10, 0xb5, 0x01, 0x12, 0x0a, 0x0a, - 0x05, 0x53, 0x75, 0x72, 0x67, 0x65, 0x10, 0xb6, 0x01, 0x12, 0x0e, 0x0a, 0x09, 0x53, 0x70, 0x61, - 0x72, 0x6b, 0x70, 0x6f, 0x73, 0x74, 0x10, 0xb7, 0x01, 0x12, 0x0f, 0x0a, 0x0a, 0x47, 0x6f, 0x43, - 0x61, 0x72, 0x64, 0x6c, 0x65, 0x73, 0x73, 0x10, 0xb8, 0x01, 0x12, 0x0b, 0x0a, 0x06, 0x43, 0x6f, - 0x64, 0x61, 0x63, 0x79, 0x10, 0xb9, 0x01, 0x12, 0x0b, 0x0a, 0x06, 0x4b, 0x72, 0x61, 0x6b, 0x65, - 0x6e, 0x10, 0xba, 0x01, 0x12, 0x0d, 0x0a, 0x08, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x6f, 0x75, 0x74, - 0x10, 0xbb, 0x01, 0x12, 0x0b, 0x0a, 0x06, 0x4b, 0x61, 0x69, 0x72, 0x6f, 0x73, 0x10, 0xbc, 0x01, - 0x12, 0x11, 0x0a, 0x0c, 0x43, 0x6c, 0x6f, 0x63, 0x6b, 0x77, 0x6f, 0x72, 0x6b, 0x53, 0x4d, 0x53, - 0x10, 0xbd, 0x01, 0x12, 0x0e, 0x0a, 0x09, 0x41, 0x74, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x61, 0x6e, - 0x10, 0xbe, 0x01, 0x12, 0x11, 0x0a, 0x0c, 0x4c, 0x61, 0x75, 0x6e, 0x63, 0x68, 0x44, 0x61, 0x72, - 0x6b, 0x6c, 0x79, 0x10, 0xbf, 0x01, 0x12, 0x0e, 0x0a, 0x09, 0x43, 0x6f, 0x76, 0x65, 0x72, 0x61, - 0x6c, 0x6c, 0x73, 0x10, 0xc0, 0x01, 0x12, 0x0b, 0x0a, 0x06, 0x4c, 0x69, 0x6e, 0x6f, 0x64, 0x65, - 0x10, 0xc1, 0x01, 0x12, 0x0a, 0x0a, 0x05, 0x57, 0x65, 0x50, 0x61, 0x79, 0x10, 0xc2, 0x01, 0x12, - 0x10, 0x0a, 0x0b, 0x50, 0x6c, 0x61, 0x6e, 0x65, 0x74, 0x53, 0x63, 0x61, 0x6c, 0x65, 0x10, 0xc3, - 0x01, 0x12, 0x0c, 0x0a, 0x07, 0x44, 0x6f, 0x70, 0x70, 0x6c, 0x65, 0x72, 0x10, 0xc4, 0x01, 0x12, - 0x0a, 0x0a, 0x05, 0x41, 0x67, 0x6f, 0x72, 0x61, 0x10, 0xc5, 0x01, 0x12, 0x0c, 0x0a, 0x07, 0x53, - 0x61, 0x6d, 0x73, 0x61, 0x72, 0x61, 0x10, 0xc6, 0x01, 0x12, 0x0c, 0x0a, 0x07, 0x46, 0x72, 0x61, - 0x6d, 0x65, 0x49, 0x4f, 0x10, 0xc7, 0x01, 0x12, 0x0d, 0x0a, 0x08, 0x52, 0x75, 0x62, 0x79, 0x47, - 0x65, 0x6d, 0x73, 0x10, 0xc8, 0x01, 0x12, 0x0b, 0x0a, 0x06, 0x4f, 0x70, 0x65, 0x6e, 0x41, 0x49, - 0x10, 0xc9, 0x01, 0x12, 0x12, 0x0a, 0x0d, 0x53, 0x75, 0x72, 0x76, 0x65, 0x79, 0x53, 0x70, 0x61, - 0x72, 0x72, 0x6f, 0x77, 0x10, 0xca, 0x01, 0x12, 0x0c, 0x0a, 0x07, 0x53, 0x69, 0x6d, 0x76, 0x6f, - 0x6c, 0x79, 0x10, 0xcb, 0x01, 0x12, 0x0e, 0x0a, 0x09, 0x53, 0x75, 0x72, 0x76, 0x69, 0x63, 0x61, - 0x74, 0x65, 0x10, 0xcc, 0x01, 0x12, 0x0d, 0x0a, 0x08, 0x4f, 0x6d, 0x6e, 0x69, 0x73, 0x65, 0x6e, - 0x64, 0x10, 0xcd, 0x01, 0x12, 0x0d, 0x0a, 0x08, 0x47, 0x72, 0x6f, 0x6f, 0x76, 0x65, 0x68, 0x71, - 0x10, 0xce, 0x01, 0x12, 0x0c, 0x0a, 0x07, 0x4e, 0x65, 0x77, 0x73, 0x61, 0x70, 0x69, 0x10, 0xcf, - 0x01, 0x12, 0x0c, 0x0a, 0x07, 0x43, 0x68, 0x61, 0x74, 0x62, 0x6f, 0x74, 0x10, 0xd0, 0x01, 0x12, - 0x11, 0x0a, 0x0c, 0x43, 0x6c, 0x69, 0x63, 0x6b, 0x53, 0x65, 0x6e, 0x64, 0x73, 0x6d, 0x73, 0x10, - 0xd1, 0x01, 0x12, 0x0c, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x67, 0x69, 0x73, 0x74, 0x10, 0xd2, 0x01, - 0x12, 0x0f, 0x0a, 0x0a, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x49, 0x4f, 0x10, 0xd3, - 0x01, 0x12, 0x0c, 0x0a, 0x07, 0x41, 0x70, 0x69, 0x44, 0x65, 0x63, 0x6b, 0x10, 0xd4, 0x01, 0x12, - 0x0c, 0x0a, 0x07, 0x4e, 0x66, 0x74, 0x70, 0x6f, 0x72, 0x74, 0x10, 0xd5, 0x01, 0x12, 0x0b, 0x0a, - 0x06, 0x43, 0x6f, 0x70, 0x70, 0x65, 0x72, 0x10, 0xd6, 0x01, 0x12, 0x0a, 0x0a, 0x05, 0x43, 0x6c, - 0x6f, 0x73, 0x65, 0x10, 0xd7, 0x01, 0x12, 0x11, 0x0a, 0x0c, 0x4d, 0x79, 0x66, 0x72, 0x65, 0x73, - 0x68, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x10, 0xd8, 0x01, 0x12, 0x0f, 0x0a, 0x0a, 0x53, 0x61, 0x6c, - 0x65, 0x73, 0x66, 0x6c, 0x61, 0x72, 0x65, 0x10, 0xd9, 0x01, 0x12, 0x0c, 0x0a, 0x07, 0x57, 0x65, - 0x62, 0x66, 0x6c, 0x6f, 0x77, 0x10, 0xda, 0x01, 0x12, 0x09, 0x0a, 0x04, 0x44, 0x75, 0x64, 0x61, - 0x10, 0xdb, 0x01, 0x12, 0x09, 0x0a, 0x04, 0x59, 0x65, 0x78, 0x74, 0x10, 0xdc, 0x01, 0x12, 0x11, - 0x0a, 0x0c, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x10, 0xdd, - 0x01, 0x12, 0x19, 0x0a, 0x14, 0x53, 0x74, 0x6f, 0x72, 0x79, 0x62, 0x6c, 0x6f, 0x6b, 0x41, 0x63, - 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x10, 0xde, 0x01, 0x12, 0x0d, 0x0a, 0x08, - 0x47, 0x72, 0x61, 0x70, 0x68, 0x43, 0x4d, 0x53, 0x10, 0xdf, 0x01, 0x12, 0x10, 0x0a, 0x0b, 0x43, - 0x68, 0x65, 0x63, 0x6b, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x10, 0xe0, 0x01, 0x12, 0x0f, 0x0a, - 0x0a, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x6b, 0x69, 0x74, 0x10, 0xe1, 0x01, 0x12, 0x11, - 0x0a, 0x0c, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x47, 0x75, 0x72, 0x75, 0x10, 0xe2, - 0x01, 0x12, 0x0c, 0x0a, 0x07, 0x4b, 0x61, 0x6c, 0x65, 0x79, 0x72, 0x61, 0x10, 0xe3, 0x01, 0x12, - 0x0f, 0x0a, 0x0a, 0x4d, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x6c, 0x69, 0x74, 0x65, 0x10, 0xe4, 0x01, - 0x12, 0x0d, 0x0a, 0x08, 0x51, 0x75, 0x61, 0x6c, 0x61, 0x72, 0x6f, 0x6f, 0x10, 0xe5, 0x01, 0x12, - 0x19, 0x0a, 0x14, 0x53, 0x61, 0x74, 0x69, 0x73, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x50, 0x72, 0x6f, - 0x6a, 0x65, 0x63, 0x74, 0x6b, 0x65, 0x79, 0x10, 0xe6, 0x01, 0x12, 0x17, 0x0a, 0x12, 0x53, 0x61, - 0x74, 0x69, 0x73, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x57, 0x72, 0x69, 0x74, 0x65, 0x6b, 0x65, 0x79, - 0x10, 0xe7, 0x01, 0x12, 0x0e, 0x0a, 0x09, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x61, 0x74, - 0x10, 0xe8, 0x01, 0x12, 0x13, 0x0a, 0x0e, 0x53, 0x75, 0x72, 0x76, 0x65, 0x79, 0x41, 0x6e, 0x79, - 0x70, 0x6c, 0x61, 0x63, 0x65, 0x10, 0xe9, 0x01, 0x12, 0x0e, 0x0a, 0x09, 0x53, 0x75, 0x72, 0x76, - 0x65, 0x79, 0x42, 0x6f, 0x74, 0x10, 0xea, 0x01, 0x12, 0x0e, 0x0a, 0x09, 0x57, 0x65, 0x62, 0x65, - 0x6e, 0x67, 0x61, 0x67, 0x65, 0x10, 0xeb, 0x01, 0x12, 0x12, 0x0a, 0x0d, 0x5a, 0x6f, 0x6e, 0x6b, - 0x61, 0x46, 0x65, 0x65, 0x64, 0x62, 0x61, 0x63, 0x6b, 0x10, 0xec, 0x01, 0x12, 0x0e, 0x0a, 0x09, - 0x44, 0x65, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x10, 0xed, 0x01, 0x12, 0x0c, 0x0a, 0x07, - 0x46, 0x65, 0x65, 0x64, 0x69, 0x65, 0x72, 0x10, 0xee, 0x01, 0x12, 0x0d, 0x0a, 0x08, 0x41, 0x62, - 0x79, 0x73, 0x73, 0x61, 0x6c, 0x65, 0x10, 0xef, 0x01, 0x12, 0x0d, 0x0a, 0x08, 0x4d, 0x61, 0x67, - 0x6e, 0x65, 0x74, 0x69, 0x63, 0x10, 0xf0, 0x01, 0x12, 0x10, 0x0a, 0x07, 0x4e, 0x79, 0x74, 0x69, - 0x6d, 0x65, 0x73, 0x10, 0xf1, 0x01, 0x1a, 0x02, 0x08, 0x01, 0x12, 0x0c, 0x0a, 0x07, 0x50, 0x6f, - 0x6c, 0x79, 0x67, 0x6f, 0x6e, 0x10, 0xf2, 0x01, 0x12, 0x0c, 0x0a, 0x07, 0x50, 0x6f, 0x77, 0x72, - 0x62, 0x6f, 0x74, 0x10, 0xf3, 0x01, 0x12, 0x13, 0x0a, 0x0a, 0x50, 0x72, 0x6f, 0x73, 0x70, 0x65, - 0x63, 0x74, 0x49, 0x4f, 0x10, 0xf4, 0x01, 0x1a, 0x02, 0x08, 0x01, 0x12, 0x0d, 0x0a, 0x08, 0x53, - 0x6b, 0x72, 0x61, 0x70, 0x70, 0x69, 0x6f, 0x10, 0xf5, 0x01, 0x12, 0x0b, 0x0a, 0x06, 0x4d, 0x6f, - 0x6e, 0x64, 0x61, 0x79, 0x10, 0xf6, 0x01, 0x12, 0x10, 0x0a, 0x0b, 0x53, 0x6d, 0x61, 0x72, 0x74, - 0x73, 0x68, 0x65, 0x65, 0x74, 0x73, 0x10, 0xf7, 0x01, 0x12, 0x0a, 0x0a, 0x05, 0x57, 0x72, 0x69, - 0x6b, 0x65, 0x10, 0xf8, 0x01, 0x12, 0x0a, 0x0a, 0x05, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x10, 0xf9, - 0x01, 0x12, 0x0d, 0x0a, 0x08, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x6b, 0x69, 0x74, 0x10, 0xfa, 0x01, - 0x12, 0x13, 0x0a, 0x0a, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x6f, 0x6d, 0x61, 0x74, 0x10, 0xfb, - 0x01, 0x1a, 0x02, 0x08, 0x01, 0x12, 0x0f, 0x0a, 0x0a, 0x53, 0x61, 0x6c, 0x65, 0x73, 0x62, 0x6c, - 0x69, 0x6e, 0x6b, 0x10, 0xfc, 0x01, 0x12, 0x0a, 0x0a, 0x05, 0x42, 0x6f, 0x72, 0x65, 0x64, 0x10, - 0xfd, 0x01, 0x12, 0x0c, 0x0a, 0x07, 0x43, 0x61, 0x6d, 0x70, 0x61, 0x79, 0x6e, 0x10, 0xfe, 0x01, - 0x12, 0x0e, 0x0a, 0x09, 0x43, 0x6c, 0x69, 0x6e, 0x63, 0x68, 0x70, 0x61, 0x64, 0x10, 0xff, 0x01, - 0x12, 0x0f, 0x0a, 0x0a, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x48, 0x75, 0x62, 0x10, 0x80, - 0x02, 0x12, 0x0d, 0x0a, 0x08, 0x44, 0x65, 0x62, 0x6f, 0x75, 0x6e, 0x63, 0x65, 0x10, 0x81, 0x02, - 0x12, 0x0d, 0x0a, 0x08, 0x44, 0x79, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x10, 0x82, 0x02, 0x12, - 0x10, 0x0a, 0x0b, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x61, 0x70, 0x69, 0x10, 0x83, - 0x02, 0x12, 0x0c, 0x0a, 0x07, 0x48, 0x61, 0x72, 0x76, 0x65, 0x73, 0x74, 0x10, 0x84, 0x02, 0x12, - 0x0c, 0x0a, 0x07, 0x4d, 0x6f, 0x6f, 0x73, 0x65, 0x6e, 0x64, 0x10, 0x85, 0x02, 0x12, 0x10, 0x0a, - 0x0b, 0x4f, 0x70, 0x65, 0x6e, 0x57, 0x65, 0x61, 0x74, 0x68, 0x65, 0x72, 0x10, 0x86, 0x02, 0x12, - 0x0d, 0x0a, 0x08, 0x53, 0x69, 0x74, 0x65, 0x6c, 0x65, 0x61, 0x66, 0x10, 0x87, 0x02, 0x12, 0x10, - 0x0a, 0x0b, 0x53, 0x71, 0x75, 0x61, 0x72, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x10, 0x88, 0x02, - 0x12, 0x0c, 0x0a, 0x07, 0x46, 0x6c, 0x6f, 0x77, 0x46, 0x6c, 0x75, 0x10, 0x89, 0x02, 0x12, 0x0b, - 0x0a, 0x06, 0x4e, 0x69, 0x6d, 0x62, 0x6c, 0x65, 0x10, 0x8a, 0x02, 0x12, 0x14, 0x0a, 0x0f, 0x4c, - 0x65, 0x73, 0x73, 0x41, 0x6e, 0x6e, 0x6f, 0x79, 0x69, 0x6e, 0x67, 0x43, 0x52, 0x4d, 0x10, 0x8b, - 0x02, 0x12, 0x0c, 0x0a, 0x07, 0x4e, 0x65, 0x74, 0x68, 0x75, 0x6e, 0x74, 0x10, 0x8c, 0x02, 0x12, - 0x0c, 0x0a, 0x07, 0x41, 0x70, 0x70, 0x74, 0x69, 0x76, 0x6f, 0x10, 0x8d, 0x02, 0x12, 0x0f, 0x0a, - 0x0a, 0x43, 0x61, 0x70, 0x73, 0x75, 0x6c, 0x65, 0x43, 0x52, 0x4d, 0x10, 0x8e, 0x02, 0x12, 0x0e, - 0x0a, 0x09, 0x49, 0x6e, 0x73, 0x69, 0x67, 0x68, 0x74, 0x6c, 0x79, 0x10, 0x8f, 0x02, 0x12, 0x0a, - 0x0a, 0x05, 0x4b, 0x79, 0x6c, 0x61, 0x73, 0x10, 0x90, 0x02, 0x12, 0x0f, 0x0a, 0x0a, 0x4f, 0x6e, - 0x65, 0x70, 0x61, 0x67, 0x65, 0x43, 0x52, 0x4d, 0x10, 0x91, 0x02, 0x12, 0x09, 0x0a, 0x04, 0x55, - 0x73, 0x65, 0x72, 0x10, 0x92, 0x02, 0x12, 0x10, 0x0a, 0x0b, 0x50, 0x72, 0x6f, 0x73, 0x70, 0x65, - 0x63, 0x74, 0x43, 0x52, 0x4d, 0x10, 0x93, 0x02, 0x12, 0x18, 0x0a, 0x13, 0x52, 0x65, 0x61, 0x6c, - 0x6c, 0x79, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x73, 0x10, - 0x94, 0x02, 0x12, 0x0c, 0x0a, 0x07, 0x41, 0x69, 0x72, 0x73, 0x68, 0x69, 0x70, 0x10, 0x95, 0x02, - 0x12, 0x0a, 0x0a, 0x05, 0x41, 0x72, 0x74, 0x73, 0x79, 0x10, 0x96, 0x02, 0x12, 0x0b, 0x0a, 0x06, - 0x59, 0x61, 0x6e, 0x64, 0x65, 0x78, 0x10, 0x97, 0x02, 0x12, 0x0d, 0x0a, 0x08, 0x43, 0x6c, 0x6f, - 0x63, 0x6b, 0x69, 0x66, 0x79, 0x10, 0x98, 0x02, 0x12, 0x0d, 0x0a, 0x08, 0x44, 0x6e, 0x73, 0x63, - 0x68, 0x65, 0x63, 0x6b, 0x10, 0x99, 0x02, 0x12, 0x10, 0x0a, 0x0b, 0x45, 0x61, 0x73, 0x79, 0x49, - 0x6e, 0x73, 0x69, 0x67, 0x68, 0x74, 0x10, 0x9a, 0x02, 0x12, 0x0e, 0x0a, 0x09, 0x45, 0x74, 0x68, - 0x70, 0x6c, 0x6f, 0x72, 0x65, 0x72, 0x10, 0x9b, 0x02, 0x12, 0x0d, 0x0a, 0x08, 0x45, 0x76, 0x65, - 0x72, 0x68, 0x6f, 0x75, 0x72, 0x10, 0x9c, 0x02, 0x12, 0x0c, 0x0a, 0x07, 0x46, 0x75, 0x6c, 0x63, - 0x72, 0x75, 0x6d, 0x10, 0x9d, 0x02, 0x12, 0x0d, 0x0a, 0x08, 0x47, 0x65, 0x6f, 0x49, 0x70, 0x69, - 0x66, 0x69, 0x10, 0x9e, 0x02, 0x12, 0x0c, 0x0a, 0x07, 0x4a, 0x6f, 0x74, 0x66, 0x6f, 0x72, 0x6d, - 0x10, 0x9f, 0x02, 0x12, 0x0c, 0x0a, 0x07, 0x52, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x72, 0x10, 0xa0, - 0x02, 0x12, 0x10, 0x0a, 0x0b, 0x54, 0x69, 0x6d, 0x65, 0x7a, 0x6f, 0x6e, 0x65, 0x61, 0x70, 0x69, - 0x10, 0xa1, 0x02, 0x12, 0x0f, 0x0a, 0x0a, 0x54, 0x6f, 0x67, 0x67, 0x6c, 0x54, 0x72, 0x61, 0x63, - 0x6b, 0x10, 0xa2, 0x02, 0x12, 0x0b, 0x0a, 0x06, 0x56, 0x70, 0x6e, 0x61, 0x70, 0x69, 0x10, 0xa3, - 0x02, 0x12, 0x0e, 0x0a, 0x09, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x10, 0xa4, - 0x02, 0x12, 0x0b, 0x0a, 0x06, 0x41, 0x70, 0x6f, 0x6c, 0x6c, 0x6f, 0x10, 0xa5, 0x02, 0x12, 0x0d, - 0x0a, 0x08, 0x45, 0x76, 0x65, 0x72, 0x73, 0x69, 0x67, 0x6e, 0x10, 0xa6, 0x02, 0x12, 0x09, 0x0a, - 0x04, 0x4a, 0x75, 0x72, 0x6f, 0x10, 0xa7, 0x02, 0x12, 0x0d, 0x0a, 0x08, 0x4b, 0x61, 0x72, 0x6d, - 0x61, 0x43, 0x52, 0x4d, 0x10, 0xa8, 0x02, 0x12, 0x0c, 0x0a, 0x07, 0x4d, 0x65, 0x74, 0x72, 0x69, - 0x6c, 0x6f, 0x10, 0xa9, 0x02, 0x12, 0x0d, 0x0a, 0x08, 0x50, 0x61, 0x6e, 0x64, 0x61, 0x64, 0x6f, - 0x63, 0x10, 0xaa, 0x02, 0x12, 0x0e, 0x0a, 0x09, 0x52, 0x65, 0x76, 0x61, 0x6d, 0x70, 0x43, 0x52, - 0x4d, 0x10, 0xab, 0x02, 0x12, 0x10, 0x0a, 0x0b, 0x53, 0x61, 0x6c, 0x65, 0x73, 0x63, 0x6f, 0x6f, - 0x6b, 0x69, 0x65, 0x10, 0xac, 0x02, 0x12, 0x0d, 0x0a, 0x08, 0x41, 0x6c, 0x63, 0x6f, 0x6e, 0x6f, - 0x73, 0x74, 0x10, 0xad, 0x02, 0x12, 0x0c, 0x0a, 0x07, 0x42, 0x6c, 0x6f, 0x67, 0x67, 0x65, 0x72, - 0x10, 0xae, 0x02, 0x12, 0x10, 0x0a, 0x0b, 0x41, 0x63, 0x63, 0x75, 0x77, 0x65, 0x61, 0x74, 0x68, - 0x65, 0x72, 0x10, 0xaf, 0x02, 0x12, 0x13, 0x0a, 0x0a, 0x4f, 0x70, 0x65, 0x6e, 0x67, 0x72, 0x61, - 0x70, 0x68, 0x72, 0x10, 0xb0, 0x02, 0x1a, 0x02, 0x08, 0x01, 0x12, 0x09, 0x0a, 0x04, 0x52, 0x61, - 0x77, 0x67, 0x10, 0xb1, 0x02, 0x12, 0x0e, 0x0a, 0x09, 0x52, 0x69, 0x6f, 0x74, 0x67, 0x61, 0x6d, - 0x65, 0x73, 0x10, 0xb2, 0x02, 0x12, 0x0e, 0x0a, 0x09, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x61, - 0x72, 0x79, 0x10, 0xb3, 0x02, 0x12, 0x0f, 0x0a, 0x0a, 0x53, 0x74, 0x6f, 0x72, 0x6d, 0x67, 0x6c, - 0x61, 0x73, 0x73, 0x10, 0xb4, 0x02, 0x12, 0x0b, 0x0a, 0x06, 0x54, 0x6f, 0x6d, 0x74, 0x6f, 0x6d, - 0x10, 0xb5, 0x02, 0x12, 0x0b, 0x0a, 0x06, 0x54, 0x77, 0x69, 0x74, 0x63, 0x68, 0x10, 0xb6, 0x02, - 0x12, 0x0b, 0x0a, 0x06, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x6f, 0x10, 0xb7, 0x02, 0x12, 0x0e, 0x0a, - 0x09, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x77, 0x61, 0x79, 0x73, 0x10, 0xb8, 0x02, 0x12, 0x0f, 0x0a, - 0x0a, 0x56, 0x65, 0x65, 0x76, 0x61, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x10, 0xb9, 0x02, 0x12, 0x10, - 0x0a, 0x0b, 0x4b, 0x69, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x10, 0xba, 0x02, - 0x12, 0x17, 0x0a, 0x12, 0x53, 0x68, 0x6f, 0x70, 0x65, 0x65, 0x4f, 0x70, 0x65, 0x6e, 0x50, 0x6c, - 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x10, 0xbb, 0x02, 0x12, 0x0f, 0x0a, 0x0a, 0x54, 0x65, 0x61, - 0x6d, 0x56, 0x69, 0x65, 0x77, 0x65, 0x72, 0x10, 0xbc, 0x02, 0x12, 0x0b, 0x0a, 0x06, 0x42, 0x75, - 0x6c, 0x62, 0x75, 0x6c, 0x10, 0xbd, 0x02, 0x12, 0x16, 0x0a, 0x11, 0x43, 0x65, 0x6e, 0x74, 0x72, - 0x61, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x52, 0x4d, 0x10, 0xbe, 0x02, 0x12, - 0x0d, 0x0a, 0x08, 0x54, 0x65, 0x61, 0x6d, 0x67, 0x61, 0x74, 0x65, 0x10, 0xbf, 0x02, 0x12, 0x0c, - 0x0a, 0x07, 0x41, 0x78, 0x6f, 0x6e, 0x61, 0x75, 0x74, 0x10, 0xc0, 0x02, 0x12, 0x0b, 0x0a, 0x06, - 0x54, 0x79, 0x6e, 0x74, 0x65, 0x63, 0x10, 0xc1, 0x02, 0x12, 0x0c, 0x0a, 0x07, 0x41, 0x70, 0x70, - 0x63, 0x75, 0x65, 0x73, 0x10, 0xc2, 0x02, 0x12, 0x0e, 0x0a, 0x09, 0x41, 0x75, 0x74, 0x6f, 0x6b, - 0x6c, 0x6f, 0x73, 0x65, 0x10, 0xc3, 0x02, 0x12, 0x0e, 0x0a, 0x09, 0x43, 0x6c, 0x6f, 0x75, 0x64, - 0x70, 0x6c, 0x61, 0x6e, 0x10, 0xc4, 0x02, 0x12, 0x0f, 0x0a, 0x0a, 0x44, 0x6f, 0x74, 0x64, 0x69, - 0x67, 0x69, 0x74, 0x61, 0x6c, 0x10, 0xc5, 0x02, 0x12, 0x0d, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x45, - 0x6d, 0x61, 0x69, 0x6c, 0x10, 0xc6, 0x02, 0x12, 0x0e, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x45, 0x6d, - 0x61, 0x69, 0x6c, 0x73, 0x10, 0xc7, 0x02, 0x12, 0x0c, 0x0a, 0x07, 0x4b, 0x6f, 0x6e, 0x74, 0x65, - 0x6e, 0x74, 0x10, 0xc8, 0x02, 0x12, 0x0f, 0x0a, 0x0a, 0x4c, 0x65, 0x61, 0x64, 0x66, 0x65, 0x65, - 0x64, 0x65, 0x72, 0x10, 0xc9, 0x02, 0x12, 0x0a, 0x0a, 0x05, 0x52, 0x61, 0x76, 0x65, 0x6e, 0x10, - 0xca, 0x02, 0x12, 0x10, 0x0a, 0x0b, 0x52, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x61, 0x63, - 0x68, 0x10, 0xcb, 0x02, 0x12, 0x0b, 0x0a, 0x06, 0x55, 0x70, 0x6c, 0x65, 0x61, 0x64, 0x10, 0xcc, - 0x02, 0x12, 0x0f, 0x0a, 0x0a, 0x42, 0x72, 0x61, 0x6e, 0x64, 0x66, 0x65, 0x74, 0x63, 0x68, 0x10, - 0xcd, 0x02, 0x12, 0x0d, 0x0a, 0x08, 0x43, 0x6c, 0x65, 0x61, 0x72, 0x62, 0x69, 0x74, 0x10, 0xce, - 0x02, 0x12, 0x0c, 0x0a, 0x07, 0x43, 0x72, 0x6f, 0x77, 0x64, 0x69, 0x6e, 0x10, 0xcf, 0x02, 0x12, - 0x0d, 0x0a, 0x08, 0x4d, 0x61, 0x70, 0x71, 0x75, 0x65, 0x73, 0x74, 0x10, 0xd0, 0x02, 0x12, 0x0f, - 0x0a, 0x0a, 0x4e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x61, 0x62, 0x6c, 0x65, 0x10, 0xd1, 0x02, 0x12, - 0x0b, 0x0a, 0x06, 0x4f, 0x6e, 0x62, 0x75, 0x6b, 0x61, 0x10, 0xd2, 0x02, 0x12, 0x0c, 0x0a, 0x07, - 0x54, 0x6f, 0x64, 0x6f, 0x69, 0x73, 0x74, 0x10, 0xd3, 0x02, 0x12, 0x0f, 0x0a, 0x0a, 0x53, 0x74, - 0x6f, 0x72, 0x79, 0x63, 0x68, 0x69, 0x65, 0x66, 0x10, 0xd4, 0x02, 0x12, 0x0d, 0x0a, 0x08, 0x4c, - 0x69, 0x6e, 0x6b, 0x65, 0x64, 0x49, 0x6e, 0x10, 0xd5, 0x02, 0x12, 0x0c, 0x0a, 0x07, 0x59, 0x6f, - 0x75, 0x53, 0x69, 0x67, 0x6e, 0x10, 0xd6, 0x02, 0x12, 0x0b, 0x0a, 0x06, 0x44, 0x6f, 0x63, 0x6b, - 0x65, 0x72, 0x10, 0xd7, 0x02, 0x12, 0x0d, 0x0a, 0x08, 0x54, 0x65, 0x6c, 0x65, 0x73, 0x69, 0x67, - 0x6e, 0x10, 0xd8, 0x02, 0x12, 0x10, 0x0a, 0x0b, 0x53, 0x70, 0x6f, 0x6f, 0x6e, 0x61, 0x63, 0x75, - 0x6c, 0x61, 0x72, 0x10, 0xd9, 0x02, 0x12, 0x11, 0x0a, 0x0c, 0x41, 0x65, 0x72, 0x69, 0x73, 0x77, - 0x65, 0x61, 0x74, 0x68, 0x65, 0x72, 0x10, 0xda, 0x02, 0x12, 0x11, 0x0a, 0x0c, 0x41, 0x6c, 0x70, - 0x68, 0x61, 0x76, 0x61, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x10, 0xdb, 0x02, 0x12, 0x0a, 0x0a, 0x05, - 0x49, 0x6d, 0x67, 0x75, 0x72, 0x10, 0xdc, 0x02, 0x12, 0x0b, 0x0a, 0x06, 0x49, 0x6d, 0x61, 0x67, - 0x67, 0x61, 0x10, 0xdd, 0x02, 0x12, 0x0b, 0x0a, 0x06, 0x53, 0x4d, 0x53, 0x41, 0x70, 0x69, 0x10, - 0xde, 0x02, 0x12, 0x11, 0x0a, 0x0c, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x73, 0x69, - 0x6f, 0x6e, 0x10, 0xdf, 0x02, 0x12, 0x12, 0x0a, 0x09, 0x42, 0x6c, 0x61, 0x62, 0x6c, 0x61, 0x62, - 0x75, 0x73, 0x10, 0xe0, 0x02, 0x1a, 0x02, 0x08, 0x01, 0x12, 0x0d, 0x0a, 0x08, 0x57, 0x6f, 0x72, - 0x64, 0x73, 0x41, 0x70, 0x69, 0x10, 0xe1, 0x02, 0x12, 0x12, 0x0a, 0x0d, 0x43, 0x75, 0x72, 0x72, - 0x65, 0x6e, 0x63, 0x79, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x10, 0xe2, 0x02, 0x12, 0x0d, 0x0a, 0x08, - 0x48, 0x74, 0x6d, 0x6c, 0x32, 0x50, 0x64, 0x66, 0x10, 0xe3, 0x02, 0x12, 0x12, 0x0a, 0x0d, 0x49, - 0x50, 0x47, 0x65, 0x6f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x10, 0xe4, 0x02, 0x12, - 0x0b, 0x0a, 0x06, 0x4f, 0x77, 0x6c, 0x62, 0x6f, 0x74, 0x10, 0xe5, 0x02, 0x12, 0x11, 0x0a, 0x0c, - 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x6d, 0x65, 0x72, 0x73, 0x69, 0x76, 0x65, 0x10, 0xe6, 0x02, 0x12, - 0x0d, 0x0a, 0x08, 0x44, 0x79, 0x6e, 0x61, 0x6c, 0x69, 0x73, 0x74, 0x10, 0xe7, 0x02, 0x12, 0x14, - 0x0a, 0x0f, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x61, 0x74, 0x65, 0x41, 0x50, - 0x49, 0x10, 0xe8, 0x02, 0x12, 0x0f, 0x0a, 0x0a, 0x48, 0x6f, 0x6c, 0x69, 0x64, 0x61, 0x79, 0x41, - 0x50, 0x49, 0x10, 0xe9, 0x02, 0x12, 0x0a, 0x0a, 0x05, 0x49, 0x70, 0x61, 0x70, 0x69, 0x10, 0xea, - 0x02, 0x12, 0x10, 0x0a, 0x0b, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x74, 0x61, 0x63, 0x6b, - 0x10, 0xeb, 0x02, 0x12, 0x10, 0x0a, 0x0b, 0x4e, 0x75, 0x74, 0x72, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x69, 0x78, 0x10, 0xec, 0x02, 0x12, 0x0a, 0x0a, 0x05, 0x53, 0x77, 0x65, 0x6c, 0x6c, 0x10, 0xed, - 0x02, 0x12, 0x19, 0x0a, 0x14, 0x43, 0x6c, 0x69, 0x63, 0x6b, 0x75, 0x70, 0x50, 0x65, 0x72, 0x73, - 0x6f, 0x6e, 0x61, 0x6c, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x10, 0xee, 0x02, 0x12, 0x0e, 0x0a, 0x05, - 0x4e, 0x69, 0x74, 0x72, 0x6f, 0x10, 0xef, 0x02, 0x1a, 0x02, 0x08, 0x01, 0x12, 0x08, 0x0a, 0x03, - 0x52, 0x65, 0x76, 0x10, 0xf0, 0x02, 0x12, 0x0d, 0x0a, 0x08, 0x52, 0x75, 0x6e, 0x52, 0x75, 0x6e, - 0x49, 0x74, 0x10, 0xf1, 0x02, 0x12, 0x0d, 0x0a, 0x08, 0x54, 0x79, 0x70, 0x65, 0x66, 0x6f, 0x72, - 0x6d, 0x10, 0xf2, 0x02, 0x12, 0x0d, 0x0a, 0x08, 0x4d, 0x69, 0x78, 0x70, 0x61, 0x6e, 0x65, 0x6c, - 0x10, 0xf3, 0x02, 0x12, 0x0c, 0x0a, 0x07, 0x54, 0x72, 0x61, 0x64, 0x69, 0x65, 0x72, 0x10, 0xf4, - 0x02, 0x12, 0x0d, 0x0a, 0x08, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x72, 0x10, 0xf5, 0x02, - 0x12, 0x0d, 0x0a, 0x08, 0x56, 0x6f, 0x75, 0x63, 0x68, 0x65, 0x72, 0x79, 0x10, 0xf6, 0x02, 0x12, - 0x0b, 0x0a, 0x06, 0x41, 0x6c, 0x65, 0x67, 0x72, 0x61, 0x10, 0xf7, 0x02, 0x12, 0x09, 0x0a, 0x04, - 0x41, 0x75, 0x64, 0x64, 0x10, 0xf8, 0x02, 0x12, 0x10, 0x0a, 0x0b, 0x42, 0x61, 0x72, 0x65, 0x6d, - 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x10, 0xf9, 0x02, 0x12, 0x0c, 0x0a, 0x07, 0x43, 0x6f, 0x69, - 0x6e, 0x6c, 0x69, 0x62, 0x10, 0xfa, 0x02, 0x12, 0x15, 0x0a, 0x10, 0x45, 0x78, 0x63, 0x68, 0x61, - 0x6e, 0x67, 0x65, 0x52, 0x61, 0x74, 0x65, 0x73, 0x41, 0x50, 0x49, 0x10, 0xfb, 0x02, 0x12, 0x12, - 0x0a, 0x0d, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x53, 0x63, 0x6f, 0x6f, 0x70, 0x10, - 0xfc, 0x02, 0x12, 0x0d, 0x0a, 0x08, 0x46, 0x58, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x10, 0xfd, - 0x02, 0x12, 0x12, 0x0a, 0x0d, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x43, 0x6c, 0x6f, - 0x75, 0x64, 0x10, 0xfe, 0x02, 0x12, 0x0e, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x47, 0x65, 0x6f, 0x41, - 0x50, 0x49, 0x10, 0xff, 0x02, 0x12, 0x0d, 0x0a, 0x08, 0x41, 0x62, 0x73, 0x74, 0x72, 0x61, 0x63, - 0x74, 0x10, 0x80, 0x03, 0x12, 0x0d, 0x0a, 0x08, 0x42, 0x69, 0x6c, 0x6c, 0x6f, 0x6d, 0x61, 0x74, - 0x10, 0x81, 0x03, 0x12, 0x0b, 0x0a, 0x06, 0x44, 0x6f, 0x76, 0x69, 0x63, 0x6f, 0x10, 0x82, 0x03, - 0x12, 0x0b, 0x0a, 0x06, 0x42, 0x69, 0x74, 0x62, 0x61, 0x72, 0x10, 0x83, 0x03, 0x12, 0x0c, 0x0a, - 0x07, 0x42, 0x75, 0x67, 0x73, 0x6e, 0x61, 0x67, 0x10, 0x84, 0x03, 0x12, 0x0f, 0x0a, 0x0a, 0x41, - 0x73, 0x73, 0x65, 0x6d, 0x62, 0x6c, 0x79, 0x41, 0x49, 0x10, 0x85, 0x03, 0x12, 0x0f, 0x0a, 0x0a, - 0x41, 0x64, 0x61, 0x66, 0x72, 0x75, 0x69, 0x74, 0x49, 0x4f, 0x10, 0x86, 0x03, 0x12, 0x0a, 0x0a, - 0x05, 0x41, 0x70, 0x69, 0x66, 0x79, 0x10, 0x87, 0x03, 0x12, 0x0e, 0x0a, 0x09, 0x43, 0x6f, 0x69, - 0x6e, 0x47, 0x65, 0x63, 0x6b, 0x6f, 0x10, 0x88, 0x03, 0x12, 0x12, 0x0a, 0x0d, 0x43, 0x72, 0x79, - 0x70, 0x74, 0x6f, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x72, 0x65, 0x10, 0x89, 0x03, 0x12, 0x0e, 0x0a, - 0x09, 0x46, 0x75, 0x6c, 0x6c, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x10, 0x8a, 0x03, 0x12, 0x0e, 0x0a, - 0x09, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x53, 0x69, 0x67, 0x6e, 0x10, 0x8b, 0x03, 0x12, 0x0d, 0x0a, - 0x08, 0x4c, 0x6f, 0x79, 0x76, 0x65, 0x72, 0x73, 0x65, 0x10, 0x8c, 0x03, 0x12, 0x0c, 0x0a, 0x07, - 0x4e, 0x65, 0x74, 0x43, 0x6f, 0x72, 0x65, 0x10, 0x8d, 0x03, 0x12, 0x0e, 0x0a, 0x09, 0x53, 0x61, - 0x75, 0x63, 0x65, 0x4c, 0x61, 0x62, 0x73, 0x10, 0x8e, 0x03, 0x12, 0x0f, 0x0a, 0x0a, 0x41, 0x6c, - 0x69, 0x65, 0x6e, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x10, 0x8f, 0x03, 0x12, 0x0d, 0x0a, 0x08, 0x41, - 0x70, 0x69, 0x66, 0x6c, 0x61, 0x73, 0x68, 0x10, 0x91, 0x03, 0x12, 0x0e, 0x0a, 0x09, 0x43, 0x6f, - 0x69, 0x6e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x10, 0x92, 0x03, 0x12, 0x10, 0x0a, 0x0b, 0x43, 0x75, - 0x72, 0x72, 0x65, 0x6e, 0x74, 0x73, 0x41, 0x50, 0x49, 0x10, 0x93, 0x03, 0x12, 0x0c, 0x0a, 0x07, - 0x44, 0x61, 0x74, 0x61, 0x47, 0x6f, 0x76, 0x10, 0x94, 0x03, 0x12, 0x0b, 0x0a, 0x06, 0x45, 0x6e, - 0x69, 0x67, 0x6d, 0x61, 0x10, 0x95, 0x03, 0x12, 0x1a, 0x0a, 0x15, 0x46, 0x69, 0x6e, 0x61, 0x6e, - 0x63, 0x69, 0x61, 0x6c, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x65, 0x70, - 0x10, 0x96, 0x03, 0x12, 0x0d, 0x0a, 0x08, 0x47, 0x65, 0x6f, 0x63, 0x6f, 0x64, 0x69, 0x6f, 0x10, - 0x97, 0x03, 0x12, 0x0c, 0x0a, 0x07, 0x48, 0x65, 0x72, 0x65, 0x41, 0x50, 0x49, 0x10, 0x98, 0x03, - 0x12, 0x13, 0x0a, 0x0a, 0x4d, 0x61, 0x63, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x10, 0x99, - 0x03, 0x1a, 0x02, 0x08, 0x01, 0x12, 0x0c, 0x0a, 0x07, 0x4f, 0x4f, 0x50, 0x53, 0x70, 0x61, 0x6d, - 0x10, 0x9a, 0x03, 0x12, 0x10, 0x0a, 0x0b, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, - 0x49, 0x4f, 0x10, 0x9b, 0x03, 0x12, 0x0f, 0x0a, 0x0a, 0x53, 0x63, 0x72, 0x61, 0x70, 0x65, 0x72, - 0x41, 0x50, 0x49, 0x10, 0x9c, 0x03, 0x12, 0x13, 0x0a, 0x0e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, - 0x74, 0x79, 0x54, 0x72, 0x61, 0x69, 0x6c, 0x73, 0x10, 0x9d, 0x03, 0x12, 0x0f, 0x0a, 0x0a, 0x54, - 0x6f, 0x6d, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x49, 0x4f, 0x10, 0x9e, 0x03, 0x12, 0x13, 0x0a, 0x0e, - 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x43, 0x6f, 0x69, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x10, 0x9f, - 0x03, 0x12, 0x11, 0x0a, 0x0c, 0x46, 0x61, 0x63, 0x65, 0x50, 0x6c, 0x75, 0x73, 0x50, 0x6c, 0x75, - 0x73, 0x10, 0xa0, 0x03, 0x12, 0x0e, 0x0a, 0x09, 0x56, 0x6f, 0x69, 0x63, 0x65, 0x67, 0x61, 0x69, - 0x6e, 0x10, 0xa1, 0x03, 0x12, 0x0d, 0x0a, 0x08, 0x44, 0x65, 0x65, 0x70, 0x67, 0x72, 0x61, 0x6d, - 0x10, 0xa2, 0x03, 0x12, 0x13, 0x0a, 0x0e, 0x56, 0x69, 0x73, 0x75, 0x61, 0x6c, 0x43, 0x72, 0x6f, - 0x73, 0x73, 0x69, 0x6e, 0x67, 0x10, 0xa3, 0x03, 0x12, 0x0c, 0x0a, 0x07, 0x46, 0x69, 0x6e, 0x6e, - 0x68, 0x75, 0x62, 0x10, 0xa4, 0x03, 0x12, 0x0b, 0x0a, 0x06, 0x54, 0x69, 0x69, 0x6e, 0x67, 0x6f, - 0x10, 0xa5, 0x03, 0x12, 0x10, 0x0a, 0x0b, 0x52, 0x69, 0x6e, 0x67, 0x43, 0x65, 0x6e, 0x74, 0x72, - 0x61, 0x6c, 0x10, 0xa6, 0x03, 0x12, 0x0b, 0x0a, 0x06, 0x46, 0x69, 0x6e, 0x61, 0x67, 0x65, 0x10, - 0xa7, 0x03, 0x12, 0x0b, 0x0a, 0x06, 0x45, 0x64, 0x61, 0x6d, 0x61, 0x6d, 0x10, 0xa8, 0x03, 0x12, - 0x10, 0x0a, 0x0b, 0x48, 0x79, 0x70, 0x65, 0x41, 0x75, 0x64, 0x69, 0x74, 0x6f, 0x72, 0x10, 0xa9, - 0x03, 0x12, 0x0a, 0x0a, 0x05, 0x47, 0x65, 0x6e, 0x67, 0x6f, 0x10, 0xaa, 0x03, 0x12, 0x0a, 0x0a, - 0x05, 0x46, 0x72, 0x6f, 0x6e, 0x74, 0x10, 0xab, 0x03, 0x12, 0x0e, 0x0a, 0x09, 0x46, 0x6c, 0x65, - 0x65, 0x74, 0x62, 0x61, 0x73, 0x65, 0x10, 0xac, 0x03, 0x12, 0x0b, 0x0a, 0x06, 0x42, 0x75, 0x62, - 0x62, 0x6c, 0x65, 0x10, 0xad, 0x03, 0x12, 0x0f, 0x0a, 0x0a, 0x42, 0x61, 0x6e, 0x6e, 0x65, 0x72, - 0x62, 0x65, 0x61, 0x72, 0x10, 0xae, 0x03, 0x12, 0x0b, 0x0a, 0x06, 0x41, 0x64, 0x7a, 0x75, 0x6e, - 0x61, 0x10, 0xaf, 0x03, 0x12, 0x13, 0x0a, 0x0e, 0x42, 0x69, 0x74, 0x63, 0x6f, 0x69, 0x6e, 0x41, - 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x10, 0xb0, 0x03, 0x12, 0x0f, 0x0a, 0x0a, 0x43, 0x6f, 0x6d, - 0x6d, 0x65, 0x72, 0x63, 0x65, 0x4a, 0x53, 0x10, 0xb1, 0x03, 0x12, 0x13, 0x0a, 0x0e, 0x44, 0x65, - 0x74, 0x65, 0x63, 0x74, 0x4c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x10, 0xb2, 0x03, 0x12, - 0x11, 0x0a, 0x08, 0x46, 0x61, 0x6b, 0x65, 0x4a, 0x53, 0x4f, 0x4e, 0x10, 0xb3, 0x03, 0x1a, 0x02, - 0x08, 0x01, 0x12, 0x10, 0x0a, 0x0b, 0x47, 0x72, 0x61, 0x70, 0x68, 0x68, 0x6f, 0x70, 0x70, 0x65, - 0x72, 0x10, 0xb4, 0x03, 0x12, 0x0d, 0x0a, 0x08, 0x4c, 0x65, 0x78, 0x69, 0x67, 0x72, 0x61, 0x6d, - 0x10, 0xb5, 0x03, 0x12, 0x10, 0x0a, 0x0b, 0x4c, 0x69, 0x6e, 0x6b, 0x50, 0x72, 0x65, 0x76, 0x69, - 0x65, 0x77, 0x10, 0xb6, 0x03, 0x12, 0x0e, 0x0a, 0x09, 0x4e, 0x75, 0x6d, 0x76, 0x65, 0x72, 0x69, - 0x66, 0x79, 0x10, 0xb7, 0x03, 0x12, 0x0f, 0x0a, 0x0a, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x43, 0x72, - 0x61, 0x77, 0x6c, 0x10, 0xb8, 0x03, 0x12, 0x0f, 0x0a, 0x0a, 0x5a, 0x69, 0x70, 0x43, 0x6f, 0x64, - 0x65, 0x41, 0x50, 0x49, 0x10, 0xb9, 0x03, 0x12, 0x0e, 0x0a, 0x09, 0x43, 0x6f, 0x6d, 0x65, 0x74, - 0x63, 0x68, 0x61, 0x74, 0x10, 0xba, 0x03, 0x12, 0x0b, 0x0a, 0x06, 0x4b, 0x65, 0x79, 0x67, 0x65, - 0x6e, 0x10, 0xbb, 0x03, 0x12, 0x0d, 0x0a, 0x08, 0x4d, 0x69, 0x78, 0x63, 0x6c, 0x6f, 0x75, 0x64, - 0x10, 0xbc, 0x03, 0x12, 0x0c, 0x0a, 0x07, 0x54, 0x61, 0x74, 0x75, 0x6d, 0x49, 0x4f, 0x10, 0xbd, - 0x03, 0x12, 0x0c, 0x0a, 0x07, 0x54, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x10, 0xbe, 0x03, 0x12, - 0x0f, 0x0a, 0x06, 0x4c, 0x61, 0x73, 0x74, 0x66, 0x6d, 0x10, 0xbf, 0x03, 0x1a, 0x02, 0x08, 0x01, - 0x12, 0x0d, 0x0a, 0x08, 0x42, 0x72, 0x6f, 0x77, 0x73, 0x68, 0x6f, 0x74, 0x10, 0xc0, 0x03, 0x12, - 0x0c, 0x0a, 0x07, 0x4a, 0x53, 0x4f, 0x4e, 0x62, 0x69, 0x6e, 0x10, 0xc1, 0x03, 0x12, 0x0f, 0x0a, - 0x0a, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x51, 0x10, 0xc2, 0x03, 0x12, 0x12, - 0x0a, 0x0d, 0x53, 0x63, 0x72, 0x65, 0x65, 0x6e, 0x73, 0x68, 0x6f, 0x74, 0x41, 0x50, 0x49, 0x10, - 0xc3, 0x03, 0x12, 0x11, 0x0a, 0x0c, 0x57, 0x65, 0x61, 0x74, 0x68, 0x65, 0x72, 0x53, 0x74, 0x61, - 0x63, 0x6b, 0x10, 0xc4, 0x03, 0x12, 0x0c, 0x0a, 0x07, 0x41, 0x6d, 0x61, 0x64, 0x65, 0x75, 0x73, - 0x10, 0xc5, 0x03, 0x12, 0x0f, 0x0a, 0x0a, 0x46, 0x6f, 0x75, 0x72, 0x53, 0x71, 0x75, 0x61, 0x72, - 0x65, 0x10, 0xc6, 0x03, 0x12, 0x0b, 0x0a, 0x06, 0x46, 0x6c, 0x69, 0x63, 0x6b, 0x72, 0x10, 0xc7, - 0x03, 0x12, 0x0e, 0x0a, 0x09, 0x43, 0x6c, 0x69, 0x63, 0x6b, 0x48, 0x65, 0x6c, 0x70, 0x10, 0xc8, - 0x03, 0x12, 0x0a, 0x0a, 0x05, 0x41, 0x6d, 0x62, 0x65, 0x65, 0x10, 0xc9, 0x03, 0x12, 0x0d, 0x0a, - 0x08, 0x41, 0x70, 0x69, 0x32, 0x43, 0x61, 0x72, 0x74, 0x10, 0xca, 0x03, 0x12, 0x0f, 0x0a, 0x0a, - 0x48, 0x79, 0x70, 0x65, 0x72, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x10, 0xcb, 0x03, 0x12, 0x0e, 0x0a, - 0x09, 0x4b, 0x61, 0x6b, 0x61, 0x6f, 0x54, 0x61, 0x6c, 0x6b, 0x10, 0xcc, 0x03, 0x12, 0x0c, 0x0a, - 0x07, 0x52, 0x69, 0x74, 0x65, 0x4b, 0x69, 0x74, 0x10, 0xcd, 0x03, 0x12, 0x11, 0x0a, 0x0c, 0x53, - 0x68, 0x75, 0x74, 0x74, 0x65, 0x72, 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x10, 0xce, 0x03, 0x12, 0x12, - 0x0a, 0x09, 0x54, 0x65, 0x78, 0x74, 0x32, 0x44, 0x61, 0x74, 0x61, 0x10, 0xcf, 0x03, 0x1a, 0x02, - 0x08, 0x01, 0x12, 0x13, 0x0a, 0x0e, 0x59, 0x6f, 0x75, 0x4e, 0x65, 0x65, 0x64, 0x41, 0x42, 0x75, - 0x64, 0x67, 0x65, 0x74, 0x10, 0xd0, 0x03, 0x12, 0x0c, 0x0a, 0x07, 0x43, 0x72, 0x69, 0x63, 0x6b, - 0x65, 0x74, 0x10, 0xd1, 0x03, 0x12, 0x0e, 0x0a, 0x09, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x74, 0x61, - 0x63, 0x6b, 0x10, 0xd2, 0x03, 0x12, 0x0a, 0x0a, 0x05, 0x47, 0x79, 0x61, 0x7a, 0x6f, 0x10, 0xd3, - 0x03, 0x12, 0x0e, 0x0a, 0x09, 0x4d, 0x61, 0x76, 0x65, 0x6e, 0x6c, 0x69, 0x6e, 0x6b, 0x10, 0xd4, - 0x03, 0x12, 0x0b, 0x0a, 0x06, 0x53, 0x68, 0x65, 0x65, 0x74, 0x79, 0x10, 0xd5, 0x03, 0x12, 0x0f, - 0x0a, 0x0a, 0x53, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x6d, 0x6f, 0x6e, 0x6b, 0x10, 0xd6, 0x03, 0x12, - 0x0e, 0x0a, 0x09, 0x53, 0x74, 0x6f, 0x63, 0x6b, 0x64, 0x61, 0x74, 0x61, 0x10, 0xd7, 0x03, 0x12, - 0x0d, 0x0a, 0x08, 0x55, 0x6e, 0x73, 0x70, 0x6c, 0x61, 0x73, 0x68, 0x10, 0xd8, 0x03, 0x12, 0x0e, - 0x0a, 0x09, 0x41, 0x6c, 0x6c, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x10, 0xd9, 0x03, 0x12, 0x11, - 0x0a, 0x0c, 0x43, 0x61, 0x6c, 0x6f, 0x72, 0x69, 0x65, 0x4e, 0x69, 0x6e, 0x6a, 0x61, 0x10, 0xda, - 0x03, 0x12, 0x0e, 0x0a, 0x09, 0x57, 0x61, 0x6c, 0x6b, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x10, 0xdb, - 0x03, 0x12, 0x0b, 0x0a, 0x06, 0x53, 0x74, 0x72, 0x61, 0x76, 0x61, 0x10, 0xdc, 0x03, 0x12, 0x0b, - 0x0a, 0x06, 0x43, 0x69, 0x63, 0x65, 0x72, 0x6f, 0x10, 0xdd, 0x03, 0x12, 0x0e, 0x0a, 0x09, 0x49, - 0x50, 0x51, 0x75, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x10, 0xde, 0x03, 0x12, 0x11, 0x0a, 0x0c, 0x50, - 0x61, 0x72, 0x61, 0x6c, 0x6c, 0x65, 0x6c, 0x44, 0x6f, 0x74, 0x73, 0x10, 0xdf, 0x03, 0x12, 0x0c, - 0x0a, 0x07, 0x52, 0x6f, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x10, 0xe0, 0x03, 0x12, 0x0c, 0x0a, 0x07, - 0x4d, 0x61, 0x69, 0x6c, 0x73, 0x61, 0x63, 0x10, 0xe1, 0x03, 0x12, 0x0a, 0x0a, 0x05, 0x57, 0x68, - 0x6f, 0x78, 0x79, 0x10, 0xe2, 0x03, 0x12, 0x11, 0x0a, 0x0c, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x57, - 0x65, 0x61, 0x74, 0x68, 0x65, 0x72, 0x10, 0xe3, 0x03, 0x12, 0x0e, 0x0a, 0x09, 0x41, 0x70, 0x69, - 0x46, 0x6f, 0x6e, 0x69, 0x63, 0x61, 0x10, 0xe4, 0x03, 0x12, 0x0b, 0x0a, 0x06, 0x41, 0x79, 0x6c, - 0x69, 0x65, 0x6e, 0x10, 0xe5, 0x03, 0x12, 0x0c, 0x0a, 0x07, 0x47, 0x65, 0x6f, 0x63, 0x6f, 0x64, - 0x65, 0x10, 0xe6, 0x03, 0x12, 0x0f, 0x0a, 0x0a, 0x49, 0x63, 0x6f, 0x6e, 0x46, 0x69, 0x6e, 0x64, - 0x65, 0x72, 0x10, 0xe7, 0x03, 0x12, 0x0e, 0x0a, 0x05, 0x49, 0x70, 0x69, 0x66, 0x79, 0x10, 0xe8, - 0x03, 0x1a, 0x02, 0x08, 0x01, 0x12, 0x12, 0x0a, 0x0d, 0x4c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, - 0x65, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x10, 0xe9, 0x03, 0x12, 0x08, 0x0a, 0x03, 0x4c, 0x6f, 0x62, - 0x10, 0xea, 0x03, 0x12, 0x12, 0x0a, 0x09, 0x4f, 0x6e, 0x57, 0x61, 0x74, 0x65, 0x72, 0x49, 0x4f, - 0x10, 0xeb, 0x03, 0x1a, 0x02, 0x08, 0x01, 0x12, 0x0d, 0x0a, 0x08, 0x50, 0x61, 0x73, 0x74, 0x65, - 0x62, 0x69, 0x6e, 0x10, 0xec, 0x03, 0x12, 0x0d, 0x0a, 0x08, 0x50, 0x64, 0x66, 0x4c, 0x61, 0x79, - 0x65, 0x72, 0x10, 0xed, 0x03, 0x12, 0x0c, 0x0a, 0x07, 0x50, 0x69, 0x78, 0x61, 0x62, 0x61, 0x79, - 0x10, 0xee, 0x03, 0x12, 0x0b, 0x0a, 0x06, 0x52, 0x65, 0x61, 0x64, 0x4d, 0x65, 0x10, 0xef, 0x03, - 0x12, 0x0d, 0x0a, 0x08, 0x56, 0x61, 0x74, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x10, 0xf0, 0x03, 0x12, - 0x0f, 0x0a, 0x0a, 0x56, 0x69, 0x72, 0x75, 0x73, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x10, 0xf1, 0x03, - 0x12, 0x0e, 0x0a, 0x09, 0x41, 0x69, 0x72, 0x56, 0x69, 0x73, 0x75, 0x61, 0x6c, 0x10, 0xf2, 0x03, - 0x12, 0x13, 0x0a, 0x0e, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x66, 0x72, 0x65, 0x61, - 0x6b, 0x73, 0x10, 0xf3, 0x03, 0x12, 0x0b, 0x0a, 0x06, 0x44, 0x75, 0x66, 0x66, 0x65, 0x6c, 0x10, - 0xf4, 0x03, 0x12, 0x0b, 0x0a, 0x06, 0x46, 0x6c, 0x61, 0x74, 0x49, 0x4f, 0x10, 0xf5, 0x03, 0x12, - 0x08, 0x0a, 0x03, 0x4d, 0x33, 0x6f, 0x10, 0xf6, 0x03, 0x12, 0x0b, 0x0a, 0x06, 0x4d, 0x65, 0x73, - 0x69, 0x62, 0x6f, 0x10, 0xf7, 0x03, 0x12, 0x0b, 0x0a, 0x06, 0x4f, 0x70, 0x65, 0x6e, 0x75, 0x76, - 0x10, 0xf8, 0x03, 0x12, 0x0d, 0x0a, 0x08, 0x53, 0x6e, 0x69, 0x70, 0x63, 0x61, 0x72, 0x74, 0x10, - 0xf9, 0x03, 0x12, 0x0d, 0x0a, 0x08, 0x42, 0x65, 0x73, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x10, 0xfa, - 0x03, 0x12, 0x10, 0x0a, 0x0b, 0x48, 0x61, 0x70, 0x70, 0x79, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, - 0x10, 0xfb, 0x03, 0x12, 0x0d, 0x0a, 0x08, 0x48, 0x75, 0x6d, 0x61, 0x6e, 0x69, 0x74, 0x79, 0x10, - 0xfc, 0x03, 0x12, 0x0b, 0x0a, 0x06, 0x49, 0x6d, 0x70, 0x61, 0x6c, 0x61, 0x10, 0xfd, 0x03, 0x12, - 0x10, 0x0a, 0x0b, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x72, 0x61, 0x64, 0x69, 0x75, 0x73, 0x10, 0xfe, - 0x03, 0x12, 0x0e, 0x0a, 0x09, 0x41, 0x75, 0x74, 0x6f, 0x50, 0x69, 0x6c, 0x6f, 0x74, 0x10, 0xff, - 0x03, 0x12, 0x0b, 0x0a, 0x06, 0x42, 0x69, 0x74, 0x6d, 0x65, 0x78, 0x10, 0x80, 0x04, 0x12, 0x0d, - 0x0a, 0x08, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x44, 0x6f, 0x63, 0x10, 0x81, 0x04, 0x12, 0x0c, 0x0a, - 0x07, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x72, 0x69, 0x10, 0x82, 0x04, 0x12, 0x0d, 0x0a, 0x08, 0x50, - 0x64, 0x66, 0x53, 0x68, 0x69, 0x66, 0x74, 0x10, 0x83, 0x04, 0x12, 0x0d, 0x0a, 0x08, 0x50, 0x6f, - 0x6c, 0x6f, 0x6e, 0x69, 0x65, 0x78, 0x10, 0x84, 0x04, 0x12, 0x19, 0x0a, 0x14, 0x52, 0x65, 0x73, - 0x74, 0x70, 0x61, 0x63, 0x6b, 0x48, 0x74, 0x6d, 0x6c, 0x54, 0x6f, 0x50, 0x64, 0x66, 0x41, 0x50, - 0x49, 0x10, 0x85, 0x04, 0x12, 0x1a, 0x0a, 0x15, 0x52, 0x65, 0x73, 0x74, 0x70, 0x61, 0x63, 0x6b, - 0x53, 0x63, 0x72, 0x65, 0x65, 0x6e, 0x73, 0x68, 0x6f, 0x74, 0x41, 0x50, 0x49, 0x10, 0x86, 0x04, - 0x12, 0x16, 0x0a, 0x11, 0x53, 0x68, 0x75, 0x74, 0x74, 0x65, 0x72, 0x73, 0x74, 0x6f, 0x63, 0x6b, - 0x4f, 0x41, 0x75, 0x74, 0x68, 0x10, 0x87, 0x04, 0x12, 0x10, 0x0a, 0x0b, 0x53, 0x6b, 0x79, 0x42, - 0x69, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x10, 0x88, 0x04, 0x12, 0x0e, 0x0a, 0x09, 0x41, 0x62, - 0x75, 0x73, 0x65, 0x49, 0x50, 0x44, 0x42, 0x10, 0x89, 0x04, 0x12, 0x10, 0x0a, 0x0b, 0x41, 0x6c, - 0x65, 0x74, 0x68, 0x65, 0x69, 0x61, 0x41, 0x70, 0x69, 0x10, 0x8a, 0x04, 0x12, 0x0c, 0x0a, 0x07, - 0x42, 0x6c, 0x69, 0x74, 0x41, 0x70, 0x70, 0x10, 0x8b, 0x04, 0x12, 0x0b, 0x0a, 0x06, 0x43, 0x65, - 0x6e, 0x73, 0x79, 0x73, 0x10, 0x8c, 0x04, 0x12, 0x0d, 0x0a, 0x08, 0x43, 0x6c, 0x6f, 0x76, 0x65, - 0x72, 0x6c, 0x79, 0x10, 0x8d, 0x04, 0x12, 0x11, 0x0a, 0x0c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x72, - 0x79, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x10, 0x8e, 0x04, 0x12, 0x0b, 0x0a, 0x06, 0x46, 0x69, 0x6c, - 0x65, 0x49, 0x4f, 0x10, 0x8f, 0x04, 0x12, 0x0e, 0x0a, 0x09, 0x46, 0x6c, 0x69, 0x67, 0x68, 0x74, - 0x41, 0x70, 0x69, 0x10, 0x90, 0x04, 0x12, 0x0d, 0x0a, 0x08, 0x47, 0x65, 0x6f, 0x61, 0x70, 0x69, - 0x66, 0x79, 0x10, 0x91, 0x04, 0x12, 0x0d, 0x0a, 0x08, 0x49, 0x50, 0x69, 0x6e, 0x66, 0x6f, 0x44, - 0x42, 0x10, 0x92, 0x04, 0x12, 0x0f, 0x0a, 0x0a, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x53, 0x74, 0x61, - 0x63, 0x6b, 0x10, 0x93, 0x04, 0x12, 0x13, 0x0a, 0x0e, 0x4e, 0x61, 0x73, 0x64, 0x61, 0x71, 0x44, - 0x61, 0x74, 0x61, 0x4c, 0x69, 0x6e, 0x6b, 0x10, 0x94, 0x04, 0x12, 0x11, 0x0a, 0x0c, 0x4f, 0x70, - 0x65, 0x6e, 0x43, 0x61, 0x67, 0x65, 0x44, 0x61, 0x74, 0x61, 0x10, 0x95, 0x04, 0x12, 0x0d, 0x0a, - 0x08, 0x50, 0x61, 0x79, 0x6d, 0x6f, 0x6e, 0x67, 0x6f, 0x10, 0x96, 0x04, 0x12, 0x12, 0x0a, 0x0d, - 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x10, 0x97, 0x04, - 0x12, 0x0e, 0x0a, 0x09, 0x52, 0x65, 0x62, 0x72, 0x61, 0x6e, 0x64, 0x6c, 0x79, 0x10, 0x98, 0x04, - 0x12, 0x14, 0x0a, 0x0f, 0x53, 0x63, 0x72, 0x65, 0x65, 0x6e, 0x73, 0x68, 0x6f, 0x74, 0x4c, 0x61, - 0x79, 0x65, 0x72, 0x10, 0x99, 0x04, 0x12, 0x0b, 0x0a, 0x06, 0x53, 0x74, 0x79, 0x74, 0x63, 0x68, - 0x10, 0x9a, 0x04, 0x12, 0x0c, 0x0a, 0x07, 0x55, 0x6e, 0x70, 0x6c, 0x75, 0x67, 0x67, 0x10, 0x9b, - 0x04, 0x12, 0x10, 0x0a, 0x0b, 0x55, 0x50, 0x43, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, - 0x10, 0x9c, 0x04, 0x12, 0x0e, 0x0a, 0x09, 0x55, 0x73, 0x65, 0x72, 0x53, 0x74, 0x61, 0x63, 0x6b, - 0x10, 0x9d, 0x04, 0x12, 0x0e, 0x0a, 0x09, 0x47, 0x65, 0x6f, 0x63, 0x6f, 0x64, 0x69, 0x66, 0x79, - 0x10, 0x9e, 0x04, 0x12, 0x10, 0x0a, 0x0b, 0x4e, 0x65, 0x77, 0x73, 0x63, 0x61, 0x74, 0x63, 0x68, - 0x65, 0x72, 0x10, 0x9f, 0x04, 0x12, 0x0e, 0x0a, 0x09, 0x4e, 0x69, 0x63, 0x65, 0x72, 0x65, 0x70, - 0x6c, 0x79, 0x10, 0xa0, 0x04, 0x12, 0x11, 0x0a, 0x0c, 0x50, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, - 0x73, 0x74, 0x61, 0x63, 0x6b, 0x10, 0xa1, 0x04, 0x12, 0x0d, 0x0a, 0x08, 0x52, 0x6f, 0x75, 0x74, - 0x65, 0x34, 0x6d, 0x65, 0x10, 0xa2, 0x04, 0x12, 0x0e, 0x0a, 0x09, 0x53, 0x63, 0x72, 0x61, 0x70, - 0x65, 0x6f, 0x77, 0x6c, 0x10, 0xa3, 0x04, 0x12, 0x10, 0x0a, 0x0b, 0x53, 0x63, 0x72, 0x61, 0x70, - 0x69, 0x6e, 0x67, 0x44, 0x6f, 0x67, 0x10, 0xa4, 0x04, 0x12, 0x0b, 0x0a, 0x06, 0x53, 0x74, 0x72, - 0x65, 0x61, 0x6b, 0x10, 0xa5, 0x04, 0x12, 0x0e, 0x0a, 0x09, 0x56, 0x65, 0x72, 0x69, 0x70, 0x68, - 0x6f, 0x6e, 0x65, 0x10, 0xa6, 0x04, 0x12, 0x10, 0x0a, 0x0b, 0x57, 0x65, 0x62, 0x73, 0x63, 0x72, - 0x61, 0x70, 0x69, 0x6e, 0x67, 0x10, 0xa7, 0x04, 0x12, 0x0e, 0x0a, 0x09, 0x5a, 0x65, 0x6e, 0x73, - 0x63, 0x72, 0x61, 0x70, 0x65, 0x10, 0xa8, 0x04, 0x12, 0x0c, 0x0a, 0x07, 0x5a, 0x65, 0x6e, 0x73, - 0x65, 0x72, 0x70, 0x10, 0xa9, 0x04, 0x12, 0x0c, 0x0a, 0x07, 0x43, 0x6f, 0x69, 0x6e, 0x41, 0x70, - 0x69, 0x10, 0xaa, 0x04, 0x12, 0x0b, 0x0a, 0x06, 0x47, 0x69, 0x74, 0x74, 0x65, 0x72, 0x10, 0xab, - 0x04, 0x12, 0x09, 0x0a, 0x04, 0x48, 0x6f, 0x73, 0x74, 0x10, 0xac, 0x04, 0x12, 0x0d, 0x0a, 0x08, - 0x49, 0x65, 0x78, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x10, 0xad, 0x04, 0x12, 0x11, 0x0a, 0x08, 0x52, - 0x65, 0x73, 0x74, 0x70, 0x61, 0x63, 0x6b, 0x10, 0xae, 0x04, 0x1a, 0x02, 0x08, 0x01, 0x12, 0x0f, - 0x0a, 0x0a, 0x53, 0x63, 0x72, 0x61, 0x70, 0x65, 0x72, 0x42, 0x6f, 0x78, 0x10, 0xaf, 0x04, 0x12, - 0x10, 0x0a, 0x0b, 0x53, 0x63, 0x72, 0x61, 0x70, 0x69, 0x6e, 0x67, 0x41, 0x6e, 0x74, 0x10, 0xb0, - 0x04, 0x12, 0x0e, 0x0a, 0x09, 0x53, 0x65, 0x72, 0x70, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x10, 0xb1, - 0x04, 0x12, 0x12, 0x0a, 0x0d, 0x53, 0x6d, 0x61, 0x72, 0x74, 0x79, 0x53, 0x74, 0x72, 0x65, 0x65, - 0x74, 0x73, 0x10, 0xb2, 0x04, 0x12, 0x11, 0x0a, 0x0c, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x4d, - 0x61, 0x73, 0x74, 0x65, 0x72, 0x10, 0xb3, 0x04, 0x12, 0x12, 0x0a, 0x0d, 0x41, 0x76, 0x69, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x10, 0xb4, 0x04, 0x12, 0x0d, 0x0a, 0x08, - 0x42, 0x6f, 0x6d, 0x62, 0x42, 0x6f, 0x6d, 0x62, 0x10, 0xb5, 0x04, 0x12, 0x10, 0x0a, 0x0b, 0x43, - 0x6f, 0x6d, 0x6d, 0x6f, 0x64, 0x69, 0x74, 0x69, 0x65, 0x73, 0x10, 0xb6, 0x04, 0x12, 0x0a, 0x0a, - 0x05, 0x44, 0x66, 0x75, 0x73, 0x65, 0x10, 0xb7, 0x04, 0x12, 0x0b, 0x0a, 0x06, 0x45, 0x64, 0x65, - 0x6e, 0x41, 0x49, 0x10, 0xb8, 0x04, 0x12, 0x0e, 0x0a, 0x09, 0x47, 0x6c, 0x61, 0x73, 0x73, 0x6e, - 0x6f, 0x64, 0x65, 0x10, 0xb9, 0x04, 0x12, 0x09, 0x0a, 0x04, 0x47, 0x75, 0x72, 0x75, 0x10, 0xba, - 0x04, 0x12, 0x09, 0x0a, 0x04, 0x48, 0x69, 0x76, 0x65, 0x10, 0xbb, 0x04, 0x12, 0x0c, 0x0a, 0x07, - 0x48, 0x69, 0x76, 0x65, 0x61, 0x67, 0x65, 0x10, 0xbc, 0x04, 0x12, 0x0c, 0x0a, 0x07, 0x4b, 0x69, - 0x63, 0x6b, 0x62, 0x6f, 0x78, 0x10, 0xbd, 0x04, 0x12, 0x11, 0x0a, 0x08, 0x50, 0x61, 0x73, 0x73, - 0x62, 0x61, 0x73, 0x65, 0x10, 0xbe, 0x04, 0x1a, 0x02, 0x08, 0x01, 0x12, 0x0f, 0x0a, 0x0a, 0x50, - 0x6f, 0x73, 0x74, 0x61, 0x67, 0x65, 0x41, 0x70, 0x70, 0x10, 0xbf, 0x04, 0x12, 0x0e, 0x0a, 0x09, - 0x50, 0x75, 0x72, 0x65, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x10, 0xc0, 0x04, 0x12, 0x0b, 0x0a, 0x06, - 0x51, 0x75, 0x62, 0x6f, 0x6c, 0x65, 0x10, 0xc1, 0x04, 0x12, 0x14, 0x0a, 0x0f, 0x43, 0x61, 0x72, - 0x62, 0x6f, 0x6e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x10, 0xc2, 0x04, 0x12, - 0x0d, 0x0a, 0x08, 0x49, 0x6e, 0x74, 0x72, 0x69, 0x6e, 0x69, 0x6f, 0x10, 0xc3, 0x04, 0x12, 0x15, - 0x0a, 0x0c, 0x51, 0x75, 0x69, 0x63, 0x6b, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x10, 0xc4, - 0x04, 0x1a, 0x02, 0x08, 0x01, 0x12, 0x10, 0x0a, 0x0b, 0x53, 0x63, 0x72, 0x61, 0x70, 0x65, 0x53, - 0x74, 0x61, 0x63, 0x6b, 0x10, 0xc5, 0x04, 0x12, 0x19, 0x0a, 0x14, 0x54, 0x65, 0x63, 0x68, 0x6e, - 0x69, 0x63, 0x61, 0x6c, 0x41, 0x6e, 0x61, 0x6c, 0x79, 0x73, 0x69, 0x73, 0x41, 0x70, 0x69, 0x10, - 0xc6, 0x04, 0x12, 0x0c, 0x0a, 0x07, 0x55, 0x72, 0x6c, 0x73, 0x63, 0x61, 0x6e, 0x10, 0xc7, 0x04, - 0x12, 0x0e, 0x0a, 0x09, 0x42, 0x61, 0x73, 0x65, 0x41, 0x70, 0x69, 0x49, 0x4f, 0x10, 0xc8, 0x04, - 0x12, 0x0c, 0x0a, 0x07, 0x44, 0x61, 0x69, 0x6c, 0x79, 0x43, 0x4f, 0x10, 0xc9, 0x04, 0x12, 0x08, - 0x0a, 0x03, 0x54, 0x4c, 0x79, 0x10, 0xca, 0x04, 0x12, 0x0d, 0x0a, 0x08, 0x53, 0x68, 0x6f, 0x72, - 0x74, 0x63, 0x75, 0x74, 0x10, 0xcb, 0x04, 0x12, 0x0e, 0x0a, 0x09, 0x41, 0x70, 0x70, 0x66, 0x6f, - 0x6c, 0x6c, 0x6f, 0x77, 0x10, 0xcc, 0x04, 0x12, 0x0e, 0x0a, 0x09, 0x54, 0x68, 0x69, 0x6e, 0x6b, - 0x69, 0x66, 0x69, 0x63, 0x10, 0xcd, 0x04, 0x12, 0x0b, 0x0a, 0x06, 0x46, 0x65, 0x65, 0x64, 0x6c, - 0x79, 0x10, 0xce, 0x04, 0x12, 0x0f, 0x0a, 0x0a, 0x53, 0x74, 0x69, 0x74, 0x63, 0x68, 0x64, 0x61, - 0x74, 0x61, 0x10, 0xcf, 0x04, 0x12, 0x0d, 0x0a, 0x08, 0x46, 0x65, 0x74, 0x63, 0x68, 0x72, 0x73, - 0x73, 0x10, 0xd0, 0x04, 0x12, 0x11, 0x0a, 0x0c, 0x53, 0x69, 0x67, 0x6e, 0x75, 0x70, 0x67, 0x65, - 0x6e, 0x69, 0x75, 0x73, 0x10, 0xd1, 0x04, 0x12, 0x0f, 0x0a, 0x0a, 0x53, 0x69, 0x67, 0x6e, 0x61, - 0x74, 0x75, 0x72, 0x69, 0x74, 0x10, 0xd2, 0x04, 0x12, 0x0f, 0x0a, 0x0a, 0x4f, 0x70, 0x74, 0x69, - 0x6d, 0x69, 0x7a, 0x65, 0x6c, 0x79, 0x10, 0xd3, 0x04, 0x12, 0x0d, 0x0a, 0x08, 0x4f, 0x63, 0x72, - 0x53, 0x70, 0x61, 0x63, 0x65, 0x10, 0xd4, 0x04, 0x12, 0x0f, 0x0a, 0x0a, 0x57, 0x65, 0x61, 0x74, - 0x68, 0x65, 0x72, 0x42, 0x69, 0x74, 0x10, 0xd5, 0x04, 0x12, 0x0c, 0x0a, 0x07, 0x42, 0x75, 0x64, - 0x64, 0x79, 0x4e, 0x53, 0x10, 0xd6, 0x04, 0x12, 0x0b, 0x0a, 0x06, 0x5a, 0x69, 0x70, 0x41, 0x50, - 0x49, 0x10, 0xd7, 0x04, 0x12, 0x0d, 0x0a, 0x08, 0x5a, 0x69, 0x70, 0x42, 0x6f, 0x6f, 0x6b, 0x73, - 0x10, 0xd8, 0x04, 0x12, 0x0c, 0x0a, 0x07, 0x4f, 0x6e, 0x65, 0x64, 0x65, 0x73, 0x6b, 0x10, 0xd9, - 0x04, 0x12, 0x0c, 0x0a, 0x07, 0x42, 0x75, 0x67, 0x68, 0x65, 0x72, 0x64, 0x10, 0xda, 0x04, 0x12, - 0x0f, 0x0a, 0x0a, 0x42, 0x6c, 0x61, 0x7a, 0x65, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x10, 0xdb, 0x04, - 0x12, 0x0d, 0x0a, 0x08, 0x41, 0x75, 0x74, 0x6f, 0x64, 0x65, 0x73, 0x6b, 0x10, 0xdc, 0x04, 0x12, - 0x08, 0x0a, 0x03, 0x54, 0x72, 0x75, 0x10, 0xdd, 0x04, 0x12, 0x0c, 0x0a, 0x07, 0x55, 0x6e, 0x69, - 0x66, 0x79, 0x49, 0x44, 0x10, 0xde, 0x04, 0x12, 0x0c, 0x0a, 0x07, 0x54, 0x72, 0x69, 0x6d, 0x62, - 0x6c, 0x65, 0x10, 0xdf, 0x04, 0x12, 0x0b, 0x0a, 0x06, 0x53, 0x6d, 0x6f, 0x6f, 0x63, 0x68, 0x10, - 0xe0, 0x04, 0x12, 0x0e, 0x0a, 0x09, 0x53, 0x65, 0x6d, 0x61, 0x70, 0x68, 0x6f, 0x72, 0x65, 0x10, - 0xe1, 0x04, 0x12, 0x0b, 0x0a, 0x06, 0x54, 0x65, 0x6c, 0x6e, 0x79, 0x78, 0x10, 0xe2, 0x04, 0x12, - 0x0f, 0x0a, 0x0a, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x77, 0x69, 0x72, 0x65, 0x10, 0xe3, 0x04, - 0x12, 0x0e, 0x0a, 0x09, 0x54, 0x65, 0x78, 0x74, 0x6d, 0x61, 0x67, 0x69, 0x63, 0x10, 0xe4, 0x04, - 0x12, 0x0e, 0x0a, 0x09, 0x53, 0x65, 0x72, 0x70, 0x68, 0x6f, 0x75, 0x73, 0x65, 0x10, 0xe5, 0x04, - 0x12, 0x0b, 0x0a, 0x06, 0x50, 0x6c, 0x61, 0x6e, 0x79, 0x6f, 0x10, 0xe6, 0x04, 0x12, 0x0f, 0x0a, - 0x0a, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x79, 0x62, 0x6f, 0x6f, 0x6b, 0x10, 0xe7, 0x04, 0x12, 0x09, - 0x0a, 0x04, 0x56, 0x79, 0x74, 0x65, 0x10, 0xe8, 0x04, 0x12, 0x0a, 0x0a, 0x05, 0x4e, 0x79, 0x6c, - 0x61, 0x73, 0x10, 0xe9, 0x04, 0x12, 0x0d, 0x0a, 0x08, 0x53, 0x71, 0x75, 0x61, 0x72, 0x65, 0x75, - 0x70, 0x10, 0xea, 0x04, 0x12, 0x0e, 0x0a, 0x09, 0x44, 0x61, 0x6e, 0x64, 0x65, 0x6c, 0x69, 0x6f, - 0x6e, 0x10, 0xeb, 0x04, 0x12, 0x11, 0x0a, 0x08, 0x44, 0x61, 0x74, 0x61, 0x46, 0x69, 0x72, 0x65, - 0x10, 0xec, 0x04, 0x1a, 0x02, 0x08, 0x01, 0x12, 0x0b, 0x0a, 0x06, 0x44, 0x65, 0x65, 0x70, 0x41, - 0x49, 0x10, 0xed, 0x04, 0x12, 0x11, 0x0a, 0x0c, 0x4d, 0x65, 0x61, 0x6e, 0x69, 0x6e, 0x67, 0x43, - 0x6c, 0x6f, 0x75, 0x64, 0x10, 0xee, 0x04, 0x12, 0x10, 0x0a, 0x0b, 0x4e, 0x65, 0x75, 0x74, 0x72, - 0x69, 0x6e, 0x6f, 0x41, 0x70, 0x69, 0x10, 0xef, 0x04, 0x12, 0x0e, 0x0a, 0x09, 0x53, 0x74, 0x6f, - 0x72, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x10, 0xf0, 0x04, 0x12, 0x0c, 0x0a, 0x07, 0x53, 0x68, 0x69, - 0x70, 0x64, 0x61, 0x79, 0x10, 0xf1, 0x04, 0x12, 0x12, 0x0a, 0x09, 0x53, 0x65, 0x6e, 0x74, 0x69, - 0x6d, 0x65, 0x6e, 0x74, 0x10, 0xf2, 0x04, 0x1a, 0x02, 0x08, 0x01, 0x12, 0x18, 0x0a, 0x13, 0x53, - 0x74, 0x72, 0x65, 0x61, 0x6d, 0x43, 0x68, 0x61, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x69, - 0x6e, 0x67, 0x10, 0xf3, 0x04, 0x12, 0x10, 0x0a, 0x0b, 0x54, 0x65, 0x61, 0x6d, 0x77, 0x6f, 0x72, - 0x6b, 0x43, 0x52, 0x4d, 0x10, 0xf4, 0x04, 0x12, 0x11, 0x0a, 0x0c, 0x54, 0x65, 0x61, 0x6d, 0x77, - 0x6f, 0x72, 0x6b, 0x44, 0x65, 0x73, 0x6b, 0x10, 0xf5, 0x04, 0x12, 0x13, 0x0a, 0x0e, 0x54, 0x65, - 0x61, 0x6d, 0x77, 0x6f, 0x72, 0x6b, 0x53, 0x70, 0x61, 0x63, 0x65, 0x73, 0x10, 0xf6, 0x04, 0x12, - 0x0f, 0x0a, 0x0a, 0x54, 0x68, 0x65, 0x4f, 0x64, 0x64, 0x73, 0x41, 0x70, 0x69, 0x10, 0xf7, 0x04, - 0x12, 0x0b, 0x0a, 0x06, 0x41, 0x70, 0x61, 0x63, 0x74, 0x61, 0x10, 0xf8, 0x04, 0x12, 0x0f, 0x0a, - 0x0a, 0x47, 0x65, 0x74, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x10, 0xf9, 0x04, 0x12, 0x0e, - 0x0a, 0x05, 0x48, 0x61, 0x70, 0x70, 0x69, 0x10, 0xfa, 0x04, 0x1a, 0x02, 0x08, 0x01, 0x12, 0x0a, - 0x0a, 0x05, 0x4f, 0x61, 0x6e, 0x64, 0x61, 0x10, 0xfb, 0x04, 0x12, 0x0e, 0x0a, 0x09, 0x46, 0x61, - 0x73, 0x74, 0x46, 0x6f, 0x72, 0x65, 0x78, 0x10, 0xfc, 0x04, 0x12, 0x0d, 0x0a, 0x08, 0x41, 0x50, - 0x49, 0x4d, 0x61, 0x74, 0x69, 0x63, 0x10, 0xfd, 0x04, 0x12, 0x0f, 0x0a, 0x0a, 0x56, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x45, 0x79, 0x65, 0x10, 0xfe, 0x04, 0x12, 0x15, 0x0a, 0x10, 0x45, 0x61, - 0x67, 0x6c, 0x65, 0x45, 0x79, 0x65, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x10, 0xff, - 0x04, 0x12, 0x11, 0x0a, 0x0c, 0x54, 0x68, 0x6f, 0x75, 0x73, 0x61, 0x6e, 0x64, 0x45, 0x79, 0x65, - 0x73, 0x10, 0x80, 0x05, 0x12, 0x0e, 0x0a, 0x09, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x50, 0x44, - 0x46, 0x10, 0x81, 0x05, 0x12, 0x10, 0x0a, 0x0b, 0x46, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x73, 0x74, - 0x61, 0x74, 0x73, 0x10, 0x82, 0x05, 0x12, 0x0b, 0x0a, 0x06, 0x43, 0x68, 0x65, 0x63, 0x49, 0x4f, - 0x10, 0x83, 0x05, 0x12, 0x0d, 0x0a, 0x08, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x10, - 0x84, 0x05, 0x12, 0x13, 0x0a, 0x0a, 0x41, 0x70, 0x69, 0x53, 0x63, 0x69, 0x65, 0x6e, 0x63, 0x65, - 0x10, 0x85, 0x05, 0x1a, 0x02, 0x08, 0x01, 0x12, 0x0f, 0x0a, 0x0a, 0x41, 0x70, 0x70, 0x53, 0x79, - 0x6e, 0x65, 0x72, 0x67, 0x79, 0x10, 0x86, 0x05, 0x12, 0x0b, 0x0a, 0x06, 0x43, 0x61, 0x66, 0x6c, - 0x6f, 0x75, 0x10, 0x87, 0x05, 0x12, 0x0b, 0x0a, 0x06, 0x43, 0x61, 0x73, 0x70, 0x69, 0x6f, 0x10, - 0x88, 0x05, 0x12, 0x0e, 0x0a, 0x09, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x6c, 0x79, 0x48, 0x51, 0x10, - 0x89, 0x05, 0x12, 0x12, 0x0a, 0x0d, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x45, 0x6c, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x73, 0x10, 0x8a, 0x05, 0x12, 0x0c, 0x0a, 0x07, 0x44, 0x72, 0x6f, 0x6e, 0x61, 0x48, - 0x51, 0x10, 0x8b, 0x05, 0x12, 0x0c, 0x0a, 0x07, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x78, 0x10, - 0x8c, 0x05, 0x12, 0x09, 0x0a, 0x04, 0x46, 0x6d, 0x66, 0x77, 0x10, 0x8d, 0x05, 0x12, 0x0c, 0x0a, - 0x07, 0x47, 0x6f, 0x6f, 0x64, 0x44, 0x61, 0x79, 0x10, 0x8e, 0x05, 0x12, 0x09, 0x0a, 0x04, 0x4c, - 0x75, 0x6e, 0x6f, 0x10, 0x8f, 0x05, 0x12, 0x10, 0x0a, 0x0b, 0x4d, 0x65, 0x69, 0x73, 0x74, 0x65, - 0x72, 0x74, 0x61, 0x73, 0x6b, 0x10, 0x90, 0x05, 0x12, 0x10, 0x0a, 0x0b, 0x4d, 0x69, 0x6e, 0x64, - 0x6d, 0x65, 0x69, 0x73, 0x74, 0x65, 0x72, 0x10, 0x91, 0x05, 0x12, 0x13, 0x0a, 0x0e, 0x50, 0x65, - 0x6f, 0x70, 0x6c, 0x65, 0x44, 0x61, 0x74, 0x61, 0x4c, 0x61, 0x62, 0x73, 0x10, 0x92, 0x05, 0x12, - 0x14, 0x0a, 0x0b, 0x53, 0x63, 0x72, 0x61, 0x70, 0x65, 0x72, 0x53, 0x69, 0x74, 0x65, 0x10, 0x93, - 0x05, 0x1a, 0x02, 0x08, 0x01, 0x12, 0x0d, 0x0a, 0x08, 0x53, 0x63, 0x72, 0x61, 0x70, 0x66, 0x6c, - 0x79, 0x10, 0x94, 0x05, 0x12, 0x10, 0x0a, 0x0b, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x79, 0x4e, 0x6f, - 0x74, 0x65, 0x64, 0x10, 0x95, 0x05, 0x12, 0x12, 0x0a, 0x0d, 0x54, 0x72, 0x61, 0x76, 0x65, 0x6c, - 0x50, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x73, 0x10, 0x96, 0x05, 0x12, 0x0f, 0x0a, 0x0a, 0x57, 0x65, - 0x62, 0x53, 0x63, 0x72, 0x61, 0x70, 0x65, 0x72, 0x10, 0x97, 0x05, 0x12, 0x0c, 0x0a, 0x07, 0x43, - 0x6f, 0x6e, 0x76, 0x69, 0x65, 0x72, 0x10, 0x98, 0x05, 0x12, 0x0c, 0x0a, 0x07, 0x43, 0x6f, 0x75, - 0x72, 0x69, 0x65, 0x72, 0x10, 0x99, 0x05, 0x12, 0x0a, 0x0a, 0x05, 0x44, 0x69, 0x74, 0x74, 0x6f, - 0x10, 0x9a, 0x05, 0x12, 0x0a, 0x0a, 0x05, 0x46, 0x69, 0x6e, 0x64, 0x6c, 0x10, 0x9b, 0x05, 0x12, - 0x0d, 0x0a, 0x08, 0x4c, 0x65, 0x6e, 0x64, 0x66, 0x6c, 0x6f, 0x77, 0x10, 0x9c, 0x05, 0x12, 0x0f, - 0x0a, 0x0a, 0x4d, 0x6f, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x10, 0x9d, 0x05, 0x12, - 0x11, 0x0a, 0x0c, 0x4f, 0x70, 0x65, 0x6e, 0x64, 0x61, 0x74, 0x61, 0x73, 0x6f, 0x66, 0x74, 0x10, - 0x9e, 0x05, 0x12, 0x0a, 0x0a, 0x05, 0x50, 0x6f, 0x64, 0x69, 0x6f, 0x10, 0x9f, 0x05, 0x12, 0x10, - 0x0a, 0x07, 0x52, 0x6f, 0x63, 0x6b, 0x73, 0x65, 0x74, 0x10, 0xa0, 0x05, 0x1a, 0x02, 0x08, 0x01, - 0x12, 0x0a, 0x0a, 0x05, 0x52, 0x6f, 0x77, 0x6e, 0x64, 0x10, 0xa1, 0x05, 0x12, 0x0e, 0x0a, 0x09, - 0x53, 0x68, 0x6f, 0x74, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x10, 0xa2, 0x05, 0x12, 0x0d, 0x0a, 0x08, - 0x53, 0x77, 0x69, 0x66, 0x74, 0x79, 0x70, 0x65, 0x10, 0xa3, 0x05, 0x12, 0x0c, 0x0a, 0x07, 0x54, - 0x77, 0x69, 0x74, 0x74, 0x65, 0x72, 0x10, 0xa4, 0x05, 0x12, 0x0a, 0x0a, 0x05, 0x48, 0x6f, 0x6e, - 0x65, 0x79, 0x10, 0xa5, 0x05, 0x12, 0x0e, 0x0a, 0x09, 0x46, 0x72, 0x65, 0x73, 0x68, 0x64, 0x65, - 0x73, 0x6b, 0x10, 0xa6, 0x05, 0x12, 0x0b, 0x0a, 0x06, 0x55, 0x70, 0x77, 0x61, 0x76, 0x65, 0x10, - 0xa7, 0x05, 0x12, 0x0d, 0x0a, 0x08, 0x46, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x10, 0xa8, - 0x05, 0x12, 0x0f, 0x0a, 0x0a, 0x46, 0x72, 0x65, 0x73, 0x68, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x10, - 0xa9, 0x05, 0x12, 0x09, 0x0a, 0x04, 0x4d, 0x69, 0x74, 0x65, 0x10, 0xaa, 0x05, 0x12, 0x0b, 0x0a, - 0x06, 0x44, 0x65, 0x70, 0x75, 0x74, 0x79, 0x10, 0xab, 0x05, 0x12, 0x0c, 0x0a, 0x07, 0x42, 0x65, - 0x65, 0x62, 0x6f, 0x6c, 0x65, 0x10, 0xac, 0x05, 0x12, 0x0e, 0x0a, 0x09, 0x43, 0x61, 0x73, 0x68, - 0x62, 0x6f, 0x61, 0x72, 0x64, 0x10, 0xad, 0x05, 0x12, 0x0b, 0x0a, 0x06, 0x4b, 0x61, 0x6e, 0x62, - 0x61, 0x6e, 0x10, 0xae, 0x05, 0x12, 0x0e, 0x0a, 0x09, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x6e, 0x61, - 0x70, 0x73, 0x10, 0xaf, 0x05, 0x12, 0x10, 0x0a, 0x0b, 0x4d, 0x79, 0x49, 0x6e, 0x74, 0x65, 0x72, - 0x76, 0x61, 0x6c, 0x73, 0x10, 0xb0, 0x05, 0x12, 0x11, 0x0a, 0x0c, 0x49, 0x6e, 0x76, 0x6f, 0x69, - 0x63, 0x65, 0x4f, 0x63, 0x65, 0x61, 0x6e, 0x10, 0xb1, 0x05, 0x12, 0x0f, 0x0a, 0x0a, 0x53, 0x68, - 0x65, 0x72, 0x70, 0x61, 0x64, 0x65, 0x73, 0x6b, 0x10, 0xb2, 0x05, 0x12, 0x0f, 0x0a, 0x0a, 0x4d, - 0x72, 0x74, 0x69, 0x63, 0x6b, 0x74, 0x6f, 0x63, 0x6b, 0x10, 0xb3, 0x05, 0x12, 0x0d, 0x0a, 0x08, - 0x43, 0x68, 0x61, 0x74, 0x66, 0x75, 0x6c, 0x65, 0x10, 0xb4, 0x05, 0x12, 0x11, 0x0a, 0x0c, 0x41, - 0x65, 0x72, 0x6f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x10, 0xb5, 0x05, 0x12, 0x11, - 0x0a, 0x0c, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x6f, 0x63, 0x74, 0x6f, 0x70, 0x75, 0x73, 0x10, 0xb6, - 0x05, 0x12, 0x11, 0x0a, 0x08, 0x46, 0x75, 0x73, 0x65, 0x62, 0x69, 0x6c, 0x6c, 0x10, 0xb7, 0x05, - 0x1a, 0x02, 0x08, 0x01, 0x12, 0x0f, 0x0a, 0x0a, 0x47, 0x65, 0x63, 0x6b, 0x6f, 0x62, 0x6f, 0x61, - 0x72, 0x64, 0x10, 0xb8, 0x05, 0x12, 0x0e, 0x0a, 0x09, 0x47, 0x6f, 0x73, 0x71, 0x75, 0x61, 0x72, - 0x65, 0x64, 0x10, 0xb9, 0x05, 0x12, 0x0e, 0x0a, 0x09, 0x4d, 0x6f, 0x6f, 0x6e, 0x63, 0x6c, 0x65, - 0x72, 0x6b, 0x10, 0xba, 0x05, 0x12, 0x0d, 0x0a, 0x08, 0x50, 0x61, 0x79, 0x6d, 0x6f, 0x61, 0x70, - 0x70, 0x10, 0xbb, 0x05, 0x12, 0x0b, 0x0a, 0x06, 0x4d, 0x69, 0x78, 0x6d, 0x61, 0x78, 0x10, 0xbc, - 0x05, 0x12, 0x0e, 0x0a, 0x09, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x73, 0x74, 0x10, 0xbd, - 0x05, 0x12, 0x10, 0x0a, 0x0b, 0x52, 0x65, 0x70, 0x61, 0x69, 0x72, 0x73, 0x68, 0x6f, 0x70, 0x72, - 0x10, 0xbe, 0x05, 0x12, 0x0d, 0x0a, 0x08, 0x47, 0x6f, 0x73, 0x68, 0x69, 0x70, 0x70, 0x6f, 0x10, - 0xbf, 0x05, 0x12, 0x0b, 0x0a, 0x06, 0x53, 0x69, 0x67, 0x6f, 0x70, 0x74, 0x10, 0xc0, 0x05, 0x12, - 0x0d, 0x0a, 0x08, 0x53, 0x75, 0x67, 0x65, 0x73, 0x74, 0x65, 0x72, 0x10, 0xc1, 0x05, 0x12, 0x0c, - 0x0a, 0x07, 0x56, 0x69, 0x65, 0x77, 0x6e, 0x65, 0x6f, 0x10, 0xc2, 0x05, 0x12, 0x0e, 0x0a, 0x09, - 0x42, 0x6f, 0x6f, 0x73, 0x74, 0x4e, 0x6f, 0x74, 0x65, 0x10, 0xc3, 0x05, 0x12, 0x10, 0x0a, 0x0b, - 0x43, 0x61, 0x70, 0x74, 0x61, 0x69, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x10, 0xc4, 0x05, 0x12, 0x0e, - 0x0a, 0x09, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x76, 0x69, 0x73, 0x74, 0x10, 0xc5, 0x05, 0x12, 0x0c, - 0x0a, 0x07, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x67, 0x6f, 0x10, 0xc6, 0x05, 0x12, 0x0a, 0x0a, 0x05, - 0x43, 0x6c, 0x6f, 0x7a, 0x65, 0x10, 0xc7, 0x05, 0x12, 0x0b, 0x0a, 0x06, 0x46, 0x6f, 0x72, 0x6d, - 0x49, 0x4f, 0x10, 0xc8, 0x05, 0x12, 0x0f, 0x0a, 0x0a, 0x46, 0x6f, 0x72, 0x6d, 0x42, 0x75, 0x63, - 0x6b, 0x65, 0x74, 0x10, 0xc9, 0x05, 0x12, 0x0d, 0x0a, 0x08, 0x47, 0x6f, 0x43, 0x61, 0x6e, 0x76, - 0x61, 0x73, 0x10, 0xca, 0x05, 0x12, 0x0c, 0x0a, 0x07, 0x4d, 0x61, 0x64, 0x4b, 0x75, 0x64, 0x75, - 0x10, 0xcb, 0x05, 0x12, 0x0f, 0x0a, 0x0a, 0x4e, 0x6f, 0x7a, 0x62, 0x65, 0x54, 0x65, 0x61, 0x6d, - 0x73, 0x10, 0xcc, 0x05, 0x12, 0x0b, 0x0a, 0x06, 0x50, 0x61, 0x70, 0x79, 0x72, 0x73, 0x10, 0xcd, - 0x05, 0x12, 0x12, 0x0a, 0x0d, 0x53, 0x75, 0x70, 0x65, 0x72, 0x4e, 0x6f, 0x74, 0x65, 0x73, 0x41, - 0x50, 0x49, 0x10, 0xce, 0x05, 0x12, 0x0c, 0x0a, 0x07, 0x54, 0x61, 0x6c, 0x6c, 0x79, 0x66, 0x79, - 0x10, 0xcf, 0x05, 0x12, 0x0e, 0x0a, 0x09, 0x5a, 0x65, 0x6e, 0x6b, 0x69, 0x74, 0x41, 0x50, 0x49, - 0x10, 0xd0, 0x05, 0x12, 0x0f, 0x0a, 0x0a, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x49, 0x6d, 0x61, 0x67, - 0x65, 0x10, 0xd1, 0x05, 0x12, 0x0f, 0x0a, 0x0a, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x43, 0x61, - 0x72, 0x65, 0x10, 0xd2, 0x05, 0x12, 0x0d, 0x0a, 0x08, 0x42, 0x6f, 0x72, 0x67, 0x62, 0x61, 0x73, - 0x65, 0x10, 0xd3, 0x05, 0x12, 0x0e, 0x0a, 0x09, 0x50, 0x69, 0x70, 0x65, 0x64, 0x72, 0x65, 0x61, - 0x6d, 0x10, 0xd4, 0x05, 0x12, 0x09, 0x0a, 0x04, 0x53, 0x69, 0x72, 0x76, 0x10, 0xd5, 0x05, 0x12, - 0x0c, 0x0a, 0x07, 0x44, 0x69, 0x66, 0x66, 0x62, 0x6f, 0x74, 0x10, 0xd6, 0x05, 0x12, 0x10, 0x0a, - 0x0b, 0x45, 0x69, 0x67, 0x68, 0x74, 0x78, 0x45, 0x69, 0x67, 0x68, 0x74, 0x10, 0xd7, 0x05, 0x12, - 0x0c, 0x0a, 0x07, 0x53, 0x65, 0x6e, 0x64, 0x6f, 0x73, 0x6f, 0x10, 0xd8, 0x05, 0x12, 0x11, 0x0a, - 0x0c, 0x50, 0x72, 0x69, 0x6e, 0x74, 0x66, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x10, 0xd9, 0x05, - 0x12, 0x0e, 0x0a, 0x09, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x10, 0xda, 0x05, - 0x12, 0x0f, 0x0a, 0x0a, 0x50, 0x61, 0x6e, 0x64, 0x61, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x10, 0xdb, - 0x05, 0x12, 0x0a, 0x0a, 0x05, 0x50, 0x61, 0x79, 0x6d, 0x6f, 0x10, 0xdc, 0x05, 0x12, 0x1d, 0x0a, - 0x18, 0x41, 0x76, 0x61, 0x7a, 0x61, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x61, 0x6c, 0x41, 0x63, - 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x10, 0xdd, 0x05, 0x12, 0x14, 0x0a, 0x0f, - 0x50, 0x6c, 0x61, 0x6e, 0x76, 0x69, 0x65, 0x77, 0x4c, 0x65, 0x61, 0x6e, 0x4b, 0x69, 0x74, 0x10, - 0xde, 0x05, 0x12, 0x0e, 0x0a, 0x09, 0x4c, 0x69, 0x76, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x6d, 0x10, - 0xdf, 0x05, 0x12, 0x0b, 0x0a, 0x06, 0x4b, 0x75, 0x43, 0x6f, 0x69, 0x6e, 0x10, 0xe0, 0x05, 0x12, - 0x0c, 0x0a, 0x07, 0x4d, 0x65, 0x74, 0x61, 0x41, 0x50, 0x49, 0x10, 0xe1, 0x05, 0x12, 0x0d, 0x0a, - 0x08, 0x4e, 0x69, 0x63, 0x65, 0x48, 0x61, 0x73, 0x68, 0x10, 0xe2, 0x05, 0x12, 0x0a, 0x0a, 0x05, - 0x43, 0x65, 0x78, 0x49, 0x4f, 0x10, 0xe3, 0x05, 0x12, 0x0e, 0x0a, 0x09, 0x4b, 0x6c, 0x69, 0x70, - 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x10, 0xe4, 0x05, 0x12, 0x0e, 0x0a, 0x09, 0x44, 0x79, 0x6e, 0x61, - 0x74, 0x72, 0x61, 0x63, 0x65, 0x10, 0xe5, 0x05, 0x12, 0x11, 0x0a, 0x0c, 0x4d, 0x6f, 0x6c, 0x6c, - 0x69, 0x65, 0x41, 0x50, 0x49, 0x4b, 0x65, 0x79, 0x10, 0xe6, 0x05, 0x12, 0x16, 0x0a, 0x11, 0x4d, - 0x6f, 0x6c, 0x6c, 0x69, 0x65, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, - 0x10, 0xe7, 0x05, 0x12, 0x10, 0x0a, 0x0b, 0x42, 0x61, 0x73, 0x69, 0x73, 0x54, 0x68, 0x65, 0x6f, - 0x72, 0x79, 0x10, 0xe8, 0x05, 0x12, 0x0d, 0x0a, 0x08, 0x4e, 0x6f, 0x72, 0x64, 0x69, 0x67, 0x65, - 0x6e, 0x10, 0xe9, 0x05, 0x12, 0x1c, 0x0a, 0x17, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x6d, 0x69, 0x74, - 0x68, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x4b, 0x65, 0x79, 0x10, - 0xea, 0x05, 0x12, 0x13, 0x0a, 0x0e, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x6d, 0x69, 0x74, 0x68, 0x54, - 0x6f, 0x6b, 0x65, 0x6e, 0x10, 0xeb, 0x05, 0x12, 0x08, 0x0a, 0x03, 0x4d, 0x75, 0x78, 0x10, 0xec, - 0x05, 0x12, 0x0b, 0x0a, 0x06, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x10, 0xed, 0x05, 0x12, 0x0d, - 0x0a, 0x08, 0x53, 0x65, 0x6e, 0x64, 0x62, 0x69, 0x72, 0x64, 0x10, 0xee, 0x05, 0x12, 0x1c, 0x0a, - 0x17, 0x53, 0x65, 0x6e, 0x64, 0x62, 0x69, 0x72, 0x64, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x50, 0x49, 0x10, 0xef, 0x05, 0x12, 0x0b, 0x0a, 0x06, 0x4d, - 0x69, 0x64, 0x69, 0x73, 0x65, 0x10, 0xf0, 0x05, 0x12, 0x0d, 0x0a, 0x08, 0x4d, 0x6f, 0x63, 0x6b, - 0x61, 0x72, 0x6f, 0x6f, 0x10, 0xf1, 0x05, 0x12, 0x0b, 0x0a, 0x06, 0x49, 0x6d, 0x61, 0x67, 0x65, - 0x34, 0x10, 0xf2, 0x05, 0x12, 0x0b, 0x0a, 0x06, 0x50, 0x69, 0x6e, 0x61, 0x74, 0x61, 0x10, 0xf3, - 0x05, 0x12, 0x11, 0x0a, 0x0c, 0x42, 0x72, 0x6f, 0x77, 0x73, 0x65, 0x72, 0x53, 0x74, 0x61, 0x63, - 0x6b, 0x10, 0xf4, 0x05, 0x12, 0x1c, 0x0a, 0x13, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x42, 0x72, 0x6f, - 0x77, 0x73, 0x65, 0x72, 0x54, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x10, 0xf5, 0x05, 0x1a, 0x02, - 0x08, 0x01, 0x12, 0x0d, 0x0a, 0x08, 0x4c, 0x6f, 0x61, 0x64, 0x6d, 0x69, 0x6c, 0x6c, 0x10, 0xf6, - 0x05, 0x12, 0x0f, 0x0a, 0x0a, 0x54, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x42, 0x6f, 0x74, 0x10, - 0xf7, 0x05, 0x12, 0x10, 0x0a, 0x0b, 0x4b, 0x6e, 0x61, 0x70, 0x73, 0x61, 0x63, 0x6b, 0x50, 0x72, - 0x6f, 0x10, 0xf8, 0x05, 0x12, 0x09, 0x0a, 0x04, 0x51, 0x61, 0x73, 0x65, 0x10, 0xf9, 0x05, 0x12, - 0x0e, 0x0a, 0x09, 0x44, 0x61, 0x72, 0x65, 0x62, 0x6f, 0x6f, 0x73, 0x74, 0x10, 0xfa, 0x05, 0x12, - 0x0d, 0x0a, 0x08, 0x47, 0x54, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x78, 0x10, 0xfb, 0x05, 0x12, 0x0d, - 0x0a, 0x08, 0x48, 0x6f, 0x6c, 0x69, 0x73, 0x74, 0x69, 0x63, 0x10, 0xfc, 0x05, 0x12, 0x0c, 0x0a, - 0x07, 0x50, 0x61, 0x72, 0x73, 0x65, 0x72, 0x73, 0x10, 0xfd, 0x05, 0x12, 0x12, 0x0a, 0x0d, 0x53, - 0x63, 0x72, 0x75, 0x74, 0x69, 0x6e, 0x69, 0x7a, 0x65, 0x72, 0x43, 0x69, 0x10, 0xfe, 0x05, 0x12, - 0x0f, 0x0a, 0x0a, 0x53, 0x6f, 0x6e, 0x61, 0x72, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x10, 0xff, 0x05, - 0x12, 0x10, 0x0a, 0x0b, 0x41, 0x50, 0x49, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x10, - 0x80, 0x06, 0x12, 0x14, 0x0a, 0x0f, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x54, 0x6f, 0x6f, 0x6c, 0x73, 0x10, 0x81, 0x06, 0x12, 0x0f, 0x0a, 0x0a, 0x43, 0x72, 0x61, 0x66, - 0x74, 0x4d, 0x79, 0x50, 0x44, 0x46, 0x10, 0x82, 0x06, 0x12, 0x0e, 0x0a, 0x09, 0x45, 0x78, 0x70, - 0x6f, 0x72, 0x74, 0x53, 0x44, 0x4b, 0x10, 0x83, 0x06, 0x12, 0x15, 0x0a, 0x0c, 0x47, 0x6c, 0x69, - 0x74, 0x74, 0x65, 0x72, 0x6c, 0x79, 0x41, 0x50, 0x49, 0x10, 0x84, 0x06, 0x1a, 0x02, 0x08, 0x01, - 0x12, 0x0d, 0x0a, 0x08, 0x48, 0x79, 0x62, 0x69, 0x73, 0x63, 0x75, 0x73, 0x10, 0x85, 0x06, 0x12, - 0x09, 0x0a, 0x04, 0x4d, 0x69, 0x72, 0x6f, 0x10, 0x86, 0x06, 0x12, 0x0f, 0x0a, 0x0a, 0x53, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x70, 0x61, 0x67, 0x65, 0x10, 0x87, 0x06, 0x12, 0x0e, 0x0a, 0x09, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x70, 0x61, 0x6c, 0x10, 0x88, 0x06, 0x12, 0x0d, 0x0a, 0x08, 0x54, - 0x65, 0x6c, 0x65, 0x74, 0x79, 0x70, 0x65, 0x10, 0x89, 0x06, 0x12, 0x0d, 0x0a, 0x08, 0x54, 0x69, - 0x6d, 0x65, 0x43, 0x61, 0x6d, 0x70, 0x10, 0x8a, 0x06, 0x12, 0x0d, 0x0a, 0x08, 0x55, 0x73, 0x65, - 0x72, 0x66, 0x6c, 0x6f, 0x77, 0x10, 0x8b, 0x06, 0x12, 0x0b, 0x0a, 0x06, 0x57, 0x69, 0x73, 0x74, - 0x69, 0x61, 0x10, 0x8c, 0x06, 0x12, 0x13, 0x0a, 0x0a, 0x53, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x61, - 0x64, 0x61, 0x72, 0x10, 0x8d, 0x06, 0x1a, 0x02, 0x08, 0x01, 0x12, 0x10, 0x0a, 0x0b, 0x55, 0x70, - 0x74, 0x69, 0x6d, 0x65, 0x52, 0x6f, 0x62, 0x6f, 0x74, 0x10, 0x8e, 0x06, 0x12, 0x0e, 0x0a, 0x09, - 0x43, 0x6f, 0x64, 0x65, 0x71, 0x75, 0x69, 0x72, 0x79, 0x10, 0x8f, 0x06, 0x12, 0x11, 0x0a, 0x0c, - 0x45, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x41, 0x50, 0x49, 0x10, 0x90, 0x06, 0x12, - 0x0d, 0x0a, 0x08, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x10, 0x91, 0x06, 0x12, 0x0e, - 0x0a, 0x09, 0x4d, 0x61, 0x67, 0x69, 0x63, 0x42, 0x65, 0x6c, 0x6c, 0x10, 0x92, 0x06, 0x12, 0x0f, - 0x0a, 0x0a, 0x53, 0x74, 0x6f, 0x72, 0x6d, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x10, 0x93, 0x06, 0x12, - 0x0d, 0x0a, 0x08, 0x41, 0x70, 0x69, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x10, 0x94, 0x06, 0x12, 0x0b, - 0x0a, 0x06, 0x44, 0x69, 0x73, 0x71, 0x75, 0x73, 0x10, 0x95, 0x06, 0x12, 0x0b, 0x0a, 0x06, 0x57, - 0x6f, 0x6f, 0x70, 0x72, 0x61, 0x10, 0x96, 0x06, 0x12, 0x0e, 0x0a, 0x09, 0x50, 0x61, 0x70, 0x65, - 0x72, 0x66, 0x6f, 0x72, 0x6d, 0x10, 0x97, 0x06, 0x12, 0x0c, 0x0a, 0x07, 0x47, 0x75, 0x6d, 0x72, - 0x6f, 0x61, 0x64, 0x10, 0x98, 0x06, 0x12, 0x0f, 0x0a, 0x0a, 0x50, 0x61, 0x79, 0x64, 0x69, 0x72, - 0x74, 0x61, 0x70, 0x70, 0x10, 0x99, 0x06, 0x12, 0x0e, 0x0a, 0x09, 0x44, 0x65, 0x74, 0x65, 0x63, - 0x74, 0x69, 0x66, 0x79, 0x10, 0x9a, 0x06, 0x12, 0x0f, 0x0a, 0x0a, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x63, 0x61, 0x6b, 0x65, 0x10, 0x9b, 0x06, 0x12, 0x0f, 0x0a, 0x0a, 0x4a, 0x75, 0x6d, 0x70, - 0x73, 0x65, 0x6c, 0x6c, 0x65, 0x72, 0x10, 0x9c, 0x06, 0x12, 0x0f, 0x0a, 0x0a, 0x4c, 0x75, 0x6e, - 0x63, 0x68, 0x4d, 0x6f, 0x6e, 0x65, 0x79, 0x10, 0x9d, 0x06, 0x12, 0x0c, 0x0a, 0x07, 0x52, 0x6f, - 0x73, 0x65, 0x74, 0x74, 0x65, 0x10, 0x9e, 0x06, 0x12, 0x09, 0x0a, 0x04, 0x59, 0x65, 0x6c, 0x70, - 0x10, 0x9f, 0x06, 0x12, 0x0a, 0x0a, 0x05, 0x41, 0x74, 0x65, 0x72, 0x61, 0x10, 0xa0, 0x06, 0x12, - 0x12, 0x0a, 0x0d, 0x45, 0x63, 0x6f, 0x53, 0x74, 0x72, 0x75, 0x78, 0x75, 0x72, 0x65, 0x49, 0x54, - 0x10, 0xa1, 0x06, 0x12, 0x08, 0x0a, 0x03, 0x41, 0x68, 0x61, 0x10, 0xa2, 0x06, 0x12, 0x0d, 0x0a, - 0x08, 0x50, 0x61, 0x72, 0x73, 0x65, 0x68, 0x75, 0x62, 0x10, 0xa3, 0x06, 0x12, 0x11, 0x0a, 0x0c, - 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x10, 0xa4, 0x06, 0x12, - 0x0f, 0x0a, 0x0a, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x73, 0x6d, 0x69, 0x74, 0x68, 0x10, 0xa5, 0x06, - 0x12, 0x11, 0x0a, 0x08, 0x46, 0x6c, 0x6f, 0x77, 0x64, 0x61, 0x73, 0x68, 0x10, 0xa6, 0x06, 0x1a, - 0x02, 0x08, 0x01, 0x12, 0x11, 0x0a, 0x08, 0x46, 0x6c, 0x6f, 0x77, 0x64, 0x6f, 0x63, 0x6b, 0x10, - 0xa7, 0x06, 0x1a, 0x02, 0x08, 0x01, 0x12, 0x0b, 0x0a, 0x06, 0x46, 0x69, 0x62, 0x65, 0x72, 0x79, - 0x10, 0xa8, 0x06, 0x12, 0x0d, 0x0a, 0x08, 0x54, 0x79, 0x70, 0x65, 0x74, 0x61, 0x6c, 0x6b, 0x10, - 0xa9, 0x06, 0x12, 0x0e, 0x0a, 0x09, 0x56, 0x6f, 0x6f, 0x64, 0x6f, 0x6f, 0x53, 0x4d, 0x53, 0x10, - 0xaa, 0x06, 0x12, 0x0e, 0x0a, 0x09, 0x5a, 0x75, 0x6c, 0x69, 0x70, 0x43, 0x68, 0x61, 0x74, 0x10, - 0xab, 0x06, 0x12, 0x0e, 0x0a, 0x09, 0x46, 0x6f, 0x72, 0x6d, 0x63, 0x72, 0x61, 0x66, 0x74, 0x10, - 0xac, 0x06, 0x12, 0x0c, 0x0a, 0x07, 0x49, 0x65, 0x78, 0x61, 0x70, 0x69, 0x73, 0x10, 0xad, 0x06, - 0x12, 0x0e, 0x0a, 0x09, 0x52, 0x65, 0x61, 0x63, 0x68, 0x6d, 0x61, 0x69, 0x6c, 0x10, 0xae, 0x06, - 0x12, 0x0f, 0x0a, 0x0a, 0x43, 0x68, 0x61, 0x72, 0x74, 0x6d, 0x6f, 0x67, 0x75, 0x6c, 0x10, 0xaf, - 0x06, 0x12, 0x0f, 0x0a, 0x0a, 0x41, 0x70, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x65, 0x64, 0x64, 0x10, - 0xb0, 0x06, 0x12, 0x08, 0x0a, 0x03, 0x57, 0x69, 0x74, 0x10, 0xb1, 0x06, 0x12, 0x15, 0x0a, 0x10, - 0x52, 0x65, 0x63, 0x68, 0x61, 0x72, 0x67, 0x65, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, - 0x10, 0xb2, 0x06, 0x12, 0x0f, 0x0a, 0x0a, 0x44, 0x69, 0x67, 0x67, 0x65, 0x72, 0x6e, 0x61, 0x75, - 0x74, 0x10, 0xb3, 0x06, 0x12, 0x10, 0x0a, 0x0b, 0x4d, 0x6f, 0x6e, 0x6b, 0x65, 0x79, 0x4c, 0x65, - 0x61, 0x72, 0x6e, 0x10, 0xb4, 0x06, 0x12, 0x0a, 0x0a, 0x05, 0x44, 0x75, 0x70, 0x6c, 0x79, 0x10, - 0xb5, 0x06, 0x12, 0x0e, 0x0a, 0x09, 0x50, 0x6f, 0x73, 0x74, 0x62, 0x61, 0x63, 0x6b, 0x73, 0x10, - 0xb6, 0x06, 0x12, 0x0d, 0x0a, 0x08, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x32, 0x10, 0xb7, - 0x06, 0x12, 0x0c, 0x0a, 0x07, 0x5a, 0x65, 0x6e, 0x52, 0x6f, 0x77, 0x73, 0x10, 0xb8, 0x06, 0x12, - 0x10, 0x0a, 0x0b, 0x5a, 0x69, 0x70, 0x63, 0x6f, 0x64, 0x65, 0x62, 0x61, 0x73, 0x65, 0x10, 0xb9, - 0x06, 0x12, 0x0b, 0x0a, 0x06, 0x54, 0x65, 0x66, 0x74, 0x65, 0x72, 0x10, 0xba, 0x06, 0x12, 0x0a, - 0x0a, 0x05, 0x54, 0x77, 0x69, 0x73, 0x74, 0x10, 0xbb, 0x06, 0x12, 0x16, 0x0a, 0x11, 0x42, 0x72, - 0x61, 0x69, 0x6e, 0x74, 0x72, 0x65, 0x65, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x10, - 0xbc, 0x06, 0x12, 0x11, 0x0a, 0x0c, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x43, 0x6f, 0x6e, 0x76, 0x65, - 0x72, 0x74, 0x10, 0xbd, 0x06, 0x12, 0x0c, 0x0a, 0x07, 0x47, 0x72, 0x61, 0x66, 0x61, 0x6e, 0x61, - 0x10, 0xbe, 0x06, 0x12, 0x0f, 0x0a, 0x0a, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x41, 0x70, - 0x69, 0x10, 0xbf, 0x06, 0x12, 0x11, 0x0a, 0x0c, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, - 0x77, 0x69, 0x73, 0x65, 0x10, 0xc0, 0x06, 0x12, 0x0c, 0x0a, 0x07, 0x42, 0x75, 0x6c, 0x6b, 0x73, - 0x6d, 0x73, 0x10, 0xc1, 0x06, 0x12, 0x0c, 0x0a, 0x07, 0x44, 0x61, 0x74, 0x61, 0x62, 0x6f, 0x78, - 0x10, 0xc2, 0x06, 0x12, 0x0e, 0x0a, 0x09, 0x4f, 0x6e, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, - 0x10, 0xc3, 0x06, 0x12, 0x0c, 0x0a, 0x07, 0x52, 0x65, 0x6e, 0x74, 0x6d, 0x61, 0x6e, 0x10, 0xc4, - 0x06, 0x12, 0x0c, 0x0a, 0x07, 0x50, 0x61, 0x72, 0x73, 0x65, 0x75, 0x72, 0x10, 0xc5, 0x06, 0x12, - 0x0e, 0x0a, 0x09, 0x44, 0x6f, 0x63, 0x70, 0x61, 0x72, 0x73, 0x65, 0x72, 0x10, 0xc6, 0x06, 0x12, - 0x0d, 0x0a, 0x08, 0x46, 0x6f, 0x72, 0x6d, 0x73, 0x69, 0x74, 0x65, 0x10, 0xc7, 0x06, 0x12, 0x11, - 0x0a, 0x0c, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x74, 0x61, 0x69, 0x6c, 0x6f, 0x72, 0x10, 0xc8, - 0x06, 0x12, 0x0c, 0x0a, 0x07, 0x4c, 0x65, 0x6d, 0x6c, 0x69, 0x73, 0x74, 0x10, 0xc9, 0x06, 0x12, - 0x0c, 0x0a, 0x07, 0x50, 0x72, 0x6f, 0x64, 0x70, 0x61, 0x64, 0x10, 0xca, 0x06, 0x12, 0x0e, 0x0a, - 0x09, 0x46, 0x6f, 0x72, 0x6d, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x10, 0xcb, 0x06, 0x12, 0x10, 0x0a, - 0x0b, 0x43, 0x6f, 0x64, 0x65, 0x63, 0x6c, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x10, 0xcc, 0x06, 0x12, - 0x0e, 0x0a, 0x09, 0x43, 0x6f, 0x64, 0x65, 0x6d, 0x61, 0x67, 0x69, 0x63, 0x10, 0xcd, 0x06, 0x12, - 0x0a, 0x0a, 0x05, 0x56, 0x62, 0x6f, 0x75, 0x74, 0x10, 0xce, 0x06, 0x12, 0x0e, 0x0a, 0x09, 0x4e, - 0x69, 0x67, 0x68, 0x74, 0x66, 0x61, 0x6c, 0x6c, 0x10, 0xcf, 0x06, 0x12, 0x0f, 0x0a, 0x0a, 0x46, - 0x6c, 0x69, 0x67, 0x68, 0x74, 0x4c, 0x61, 0x62, 0x73, 0x10, 0xd0, 0x06, 0x12, 0x11, 0x0a, 0x0c, - 0x53, 0x70, 0x65, 0x65, 0x63, 0x68, 0x54, 0x65, 0x78, 0x74, 0x41, 0x49, 0x10, 0xd1, 0x06, 0x12, - 0x0d, 0x0a, 0x08, 0x50, 0x6f, 0x6c, 0x6c, 0x73, 0x41, 0x50, 0x49, 0x10, 0xd2, 0x06, 0x12, 0x0b, - 0x0a, 0x06, 0x53, 0x69, 0x6d, 0x46, 0x69, 0x6e, 0x10, 0xd3, 0x06, 0x12, 0x0a, 0x0a, 0x05, 0x53, - 0x63, 0x61, 0x6c, 0x72, 0x10, 0xd4, 0x06, 0x12, 0x0f, 0x0a, 0x0a, 0x4b, 0x61, 0x6e, 0x62, 0x61, - 0x6e, 0x74, 0x6f, 0x6f, 0x6c, 0x10, 0xd5, 0x06, 0x12, 0x10, 0x0a, 0x0b, 0x42, 0x72, 0x69, 0x67, - 0x68, 0x74, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x10, 0xd6, 0x06, 0x12, 0x0c, 0x0a, 0x07, 0x48, 0x6f, - 0x74, 0x77, 0x69, 0x72, 0x65, 0x10, 0xd7, 0x06, 0x12, 0x0d, 0x0a, 0x08, 0x49, 0x6e, 0x73, 0x74, - 0x61, 0x62, 0x6f, 0x74, 0x10, 0xd8, 0x06, 0x12, 0x0c, 0x0a, 0x07, 0x54, 0x69, 0x6d, 0x65, 0x6b, - 0x69, 0x74, 0x10, 0xd9, 0x06, 0x12, 0x10, 0x0a, 0x0b, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x73, 0x65, - 0x6c, 0x6c, 0x65, 0x72, 0x10, 0xda, 0x06, 0x12, 0x11, 0x0a, 0x0c, 0x4d, 0x6f, 0x6a, 0x6f, 0x68, - 0x65, 0x6c, 0x70, 0x64, 0x65, 0x73, 0x6b, 0x10, 0xdb, 0x06, 0x12, 0x0f, 0x0a, 0x0a, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x73, 0x65, 0x6e, 0x64, 0x10, 0xdc, 0x06, 0x12, 0x10, 0x0a, 0x0b, 0x47, - 0x65, 0x74, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x10, 0xdd, 0x06, 0x12, 0x0c, 0x0a, - 0x07, 0x44, 0x79, 0x6e, 0x61, 0x64, 0x6f, 0x74, 0x10, 0xde, 0x06, 0x12, 0x0a, 0x0a, 0x05, 0x44, - 0x65, 0x6d, 0x69, 0x6f, 0x10, 0xdf, 0x06, 0x12, 0x0b, 0x0a, 0x06, 0x54, 0x6f, 0x6b, 0x65, 0x65, - 0x74, 0x10, 0xe0, 0x06, 0x12, 0x11, 0x0a, 0x0c, 0x4d, 0x79, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, - 0x6d, 0x65, 0x6e, 0x74, 0x10, 0xe1, 0x06, 0x12, 0x0e, 0x0a, 0x09, 0x43, 0x6f, 0x70, 0x79, 0x73, - 0x63, 0x61, 0x70, 0x65, 0x10, 0xe2, 0x06, 0x12, 0x0d, 0x0a, 0x08, 0x42, 0x65, 0x73, 0x6e, 0x61, - 0x70, 0x70, 0x79, 0x10, 0xe3, 0x06, 0x12, 0x0e, 0x0a, 0x09, 0x53, 0x61, 0x6c, 0x65, 0x73, 0x6d, - 0x61, 0x74, 0x65, 0x10, 0xe4, 0x06, 0x12, 0x13, 0x0a, 0x0a, 0x48, 0x65, 0x61, 0x74, 0x6d, 0x61, - 0x70, 0x61, 0x70, 0x69, 0x10, 0xe5, 0x06, 0x1a, 0x02, 0x08, 0x01, 0x12, 0x11, 0x0a, 0x0c, 0x57, - 0x65, 0x62, 0x73, 0x69, 0x74, 0x65, 0x70, 0x75, 0x6c, 0x73, 0x65, 0x10, 0xe6, 0x06, 0x12, 0x0e, - 0x0a, 0x09, 0x55, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x79, 0x10, 0xe7, 0x06, 0x12, 0x0c, - 0x0a, 0x07, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x10, 0xe8, 0x06, 0x12, 0x0d, 0x0a, 0x08, - 0x50, 0x44, 0x46, 0x6d, 0x79, 0x55, 0x52, 0x4c, 0x10, 0xe9, 0x06, 0x12, 0x10, 0x0a, 0x0b, 0x41, - 0x70, 0x69, 0x32, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x10, 0xea, 0x06, 0x12, 0x0d, 0x0a, - 0x08, 0x4f, 0x70, 0x73, 0x67, 0x65, 0x6e, 0x69, 0x65, 0x10, 0xeb, 0x06, 0x12, 0x0b, 0x0a, 0x06, - 0x47, 0x65, 0x6d, 0x69, 0x6e, 0x69, 0x10, 0xec, 0x06, 0x12, 0x0e, 0x0a, 0x09, 0x48, 0x6f, 0x6e, - 0x65, 0x79, 0x63, 0x6f, 0x6d, 0x62, 0x10, 0xed, 0x06, 0x12, 0x14, 0x0a, 0x0f, 0x4b, 0x61, 0x6c, - 0x74, 0x75, 0x72, 0x61, 0x41, 0x70, 0x70, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x10, 0xee, 0x06, 0x12, - 0x13, 0x0a, 0x0e, 0x4b, 0x61, 0x6c, 0x74, 0x75, 0x72, 0x61, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x10, 0xef, 0x06, 0x12, 0x0a, 0x0a, 0x05, 0x42, 0x69, 0x74, 0x47, 0x6f, 0x10, 0xf0, 0x06, - 0x12, 0x0d, 0x0a, 0x08, 0x4f, 0x70, 0x74, 0x69, 0x64, 0x61, 0x73, 0x68, 0x10, 0xf1, 0x06, 0x12, - 0x0a, 0x0a, 0x05, 0x49, 0x6d, 0x67, 0x69, 0x78, 0x10, 0xf2, 0x06, 0x12, 0x10, 0x0a, 0x0b, 0x49, - 0x6d, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x54, 0x65, 0x78, 0x74, 0x10, 0xf3, 0x06, 0x12, 0x10, 0x0a, - 0x0b, 0x50, 0x61, 0x67, 0x65, 0x32, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x10, 0xf4, 0x06, 0x12, - 0x0e, 0x0a, 0x09, 0x51, 0x75, 0x69, 0x63, 0x6b, 0x62, 0x61, 0x73, 0x65, 0x10, 0xf5, 0x06, 0x12, - 0x0d, 0x0a, 0x08, 0x52, 0x65, 0x64, 0x62, 0x6f, 0x6f, 0x74, 0x68, 0x10, 0xf6, 0x06, 0x12, 0x0b, - 0x0a, 0x06, 0x4e, 0x75, 0x62, 0x65, 0x6c, 0x61, 0x10, 0xf7, 0x06, 0x12, 0x0c, 0x0a, 0x07, 0x49, - 0x6e, 0x66, 0x6f, 0x62, 0x69, 0x70, 0x10, 0xf8, 0x06, 0x12, 0x0a, 0x0a, 0x05, 0x55, 0x70, 0x72, - 0x6f, 0x63, 0x10, 0xf9, 0x06, 0x12, 0x0f, 0x0a, 0x0a, 0x53, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, - 0x62, 0x65, 0x65, 0x10, 0xfa, 0x06, 0x12, 0x0e, 0x0a, 0x09, 0x41, 0x66, 0x74, 0x65, 0x72, 0x73, - 0x68, 0x69, 0x70, 0x10, 0xfb, 0x06, 0x12, 0x0c, 0x0a, 0x07, 0x45, 0x64, 0x75, 0x73, 0x69, 0x67, - 0x6e, 0x10, 0xfc, 0x06, 0x12, 0x0b, 0x0a, 0x06, 0x54, 0x65, 0x61, 0x6d, 0x75, 0x70, 0x10, 0xfd, - 0x06, 0x12, 0x0c, 0x0a, 0x07, 0x57, 0x6f, 0x72, 0x6b, 0x64, 0x61, 0x79, 0x10, 0xfe, 0x06, 0x12, - 0x0c, 0x0a, 0x07, 0x4d, 0x6f, 0x6e, 0x67, 0x6f, 0x44, 0x42, 0x10, 0xff, 0x06, 0x12, 0x08, 0x0a, - 0x03, 0x4e, 0x47, 0x43, 0x10, 0x80, 0x07, 0x12, 0x13, 0x0a, 0x0e, 0x44, 0x69, 0x67, 0x69, 0x74, - 0x61, 0x6c, 0x4f, 0x63, 0x65, 0x61, 0x6e, 0x56, 0x32, 0x10, 0x81, 0x07, 0x12, 0x0e, 0x0a, 0x09, - 0x53, 0x51, 0x4c, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x10, 0x82, 0x07, 0x12, 0x08, 0x0a, 0x03, - 0x46, 0x54, 0x50, 0x10, 0x83, 0x07, 0x12, 0x0a, 0x0a, 0x05, 0x52, 0x65, 0x64, 0x69, 0x73, 0x10, - 0x84, 0x07, 0x12, 0x09, 0x0a, 0x04, 0x4c, 0x44, 0x41, 0x50, 0x10, 0x85, 0x07, 0x12, 0x0c, 0x0a, - 0x07, 0x53, 0x68, 0x6f, 0x70, 0x69, 0x66, 0x79, 0x10, 0x86, 0x07, 0x12, 0x0d, 0x0a, 0x08, 0x52, - 0x61, 0x62, 0x62, 0x69, 0x74, 0x4d, 0x51, 0x10, 0x87, 0x07, 0x12, 0x10, 0x0a, 0x0b, 0x43, 0x75, - 0x73, 0x74, 0x6f, 0x6d, 0x52, 0x65, 0x67, 0x65, 0x78, 0x10, 0x88, 0x07, 0x12, 0x0e, 0x0a, 0x09, - 0x45, 0x74, 0x68, 0x65, 0x72, 0x73, 0x63, 0x61, 0x6e, 0x10, 0x89, 0x07, 0x12, 0x0b, 0x0a, 0x06, - 0x49, 0x6e, 0x66, 0x75, 0x72, 0x61, 0x10, 0x8a, 0x07, 0x12, 0x0c, 0x0a, 0x07, 0x41, 0x6c, 0x63, - 0x68, 0x65, 0x6d, 0x79, 0x10, 0x8b, 0x07, 0x12, 0x10, 0x0a, 0x0b, 0x42, 0x6c, 0x6f, 0x63, 0x6b, - 0x4e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x10, 0x8c, 0x07, 0x12, 0x0c, 0x0a, 0x07, 0x4d, 0x6f, 0x72, - 0x61, 0x6c, 0x69, 0x73, 0x10, 0x8d, 0x07, 0x12, 0x0c, 0x0a, 0x07, 0x42, 0x73, 0x63, 0x53, 0x63, - 0x61, 0x6e, 0x10, 0x8e, 0x07, 0x12, 0x16, 0x0a, 0x0d, 0x43, 0x6f, 0x69, 0x6e, 0x4d, 0x61, 0x72, - 0x6b, 0x65, 0x74, 0x43, 0x61, 0x70, 0x10, 0x8f, 0x07, 0x1a, 0x02, 0x08, 0x01, 0x12, 0x0a, 0x0a, - 0x05, 0x50, 0x65, 0x72, 0x63, 0x79, 0x10, 0x90, 0x07, 0x12, 0x11, 0x0a, 0x0c, 0x54, 0x69, 0x6e, - 0x65, 0x73, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x10, 0x91, 0x07, 0x12, 0x0b, 0x0a, 0x06, - 0x50, 0x75, 0x6c, 0x75, 0x6d, 0x69, 0x10, 0x92, 0x07, 0x12, 0x12, 0x0a, 0x0d, 0x53, 0x75, 0x70, - 0x61, 0x62, 0x61, 0x73, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x10, 0x93, 0x07, 0x12, 0x10, 0x0a, - 0x0b, 0x4e, 0x75, 0x47, 0x65, 0x74, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x10, 0x94, 0x07, 0x12, - 0x0a, 0x0a, 0x05, 0x41, 0x69, 0x76, 0x65, 0x6e, 0x10, 0x95, 0x07, 0x12, 0x0c, 0x0a, 0x07, 0x50, - 0x72, 0x65, 0x66, 0x65, 0x63, 0x74, 0x10, 0x96, 0x07, 0x12, 0x0d, 0x0a, 0x08, 0x44, 0x6f, 0x63, - 0x75, 0x73, 0x69, 0x67, 0x6e, 0x10, 0x97, 0x07, 0x12, 0x0e, 0x0a, 0x09, 0x43, 0x6f, 0x75, 0x63, - 0x68, 0x62, 0x61, 0x73, 0x65, 0x10, 0x98, 0x07, 0x12, 0x0e, 0x0a, 0x09, 0x44, 0x6f, 0x63, 0x6b, - 0x65, 0x72, 0x68, 0x75, 0x62, 0x10, 0x99, 0x07, 0x12, 0x19, 0x0a, 0x14, 0x54, 0x72, 0x75, 0x66, - 0x66, 0x6c, 0x65, 0x68, 0x6f, 0x67, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x69, 0x73, 0x65, - 0x10, 0x9a, 0x07, 0x12, 0x10, 0x0a, 0x0b, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x41, 0x70, 0x69, 0x4b, - 0x65, 0x79, 0x10, 0x9b, 0x07, 0x12, 0x11, 0x0a, 0x0c, 0x47, 0x69, 0x74, 0x48, 0x75, 0x62, 0x4f, - 0x61, 0x75, 0x74, 0x68, 0x32, 0x10, 0x9c, 0x07, 0x12, 0x0f, 0x0a, 0x0a, 0x53, 0x61, 0x6c, 0x65, - 0x73, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x10, 0x9d, 0x07, 0x12, 0x10, 0x0a, 0x0b, 0x48, 0x75, 0x67, - 0x67, 0x69, 0x6e, 0x67, 0x46, 0x61, 0x63, 0x65, 0x10, 0x9e, 0x07, 0x12, 0x0e, 0x0a, 0x09, 0x53, - 0x6e, 0x6f, 0x77, 0x66, 0x6c, 0x61, 0x6b, 0x65, 0x10, 0x9f, 0x07, 0x12, 0x10, 0x0a, 0x0b, 0x53, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x67, 0x72, 0x61, 0x70, 0x68, 0x10, 0xa0, 0x07, 0x12, 0x0e, 0x0a, - 0x09, 0x54, 0x61, 0x69, 0x6c, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x10, 0xa1, 0x07, 0x12, 0x10, 0x0a, - 0x0b, 0x57, 0x65, 0x62, 0x33, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x10, 0xa2, 0x07, 0x12, - 0x11, 0x0a, 0x0c, 0x41, 0x7a, 0x75, 0x72, 0x65, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x10, - 0xa3, 0x07, 0x12, 0x12, 0x0a, 0x0d, 0x50, 0x6c, 0x61, 0x6e, 0x65, 0x74, 0x53, 0x63, 0x61, 0x6c, - 0x65, 0x44, 0x62, 0x10, 0xa4, 0x07, 0x12, 0x0e, 0x0a, 0x09, 0x41, 0x6e, 0x74, 0x68, 0x72, 0x6f, - 0x70, 0x69, 0x63, 0x10, 0xa5, 0x07, 0x12, 0x09, 0x0a, 0x04, 0x52, 0x61, 0x6d, 0x70, 0x10, 0xa6, - 0x07, 0x12, 0x0c, 0x0a, 0x07, 0x4b, 0x6c, 0x61, 0x76, 0x69, 0x79, 0x6f, 0x10, 0xa7, 0x07, 0x12, - 0x14, 0x0a, 0x0f, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x67, 0x72, 0x61, 0x70, 0x68, 0x43, 0x6f, - 0x64, 0x79, 0x10, 0xa8, 0x07, 0x12, 0x0e, 0x0a, 0x09, 0x56, 0x6f, 0x69, 0x63, 0x65, 0x66, 0x6c, - 0x6f, 0x77, 0x10, 0xa9, 0x07, 0x12, 0x0c, 0x0a, 0x07, 0x50, 0x72, 0x69, 0x76, 0x61, 0x63, 0x79, - 0x10, 0xaa, 0x07, 0x12, 0x0b, 0x0a, 0x06, 0x49, 0x50, 0x49, 0x6e, 0x66, 0x6f, 0x10, 0xab, 0x07, - 0x12, 0x10, 0x0a, 0x0b, 0x49, 0x70, 0x32, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x10, - 0xac, 0x07, 0x12, 0x0e, 0x0a, 0x09, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6d, 0x6f, 0x6a, 0x6f, 0x10, - 0xad, 0x07, 0x12, 0x0e, 0x0a, 0x09, 0x50, 0x6f, 0x72, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x10, - 0xae, 0x07, 0x12, 0x13, 0x0a, 0x0e, 0x50, 0x6f, 0x72, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x54, - 0x6f, 0x6b, 0x65, 0x6e, 0x10, 0xaf, 0x07, 0x12, 0x0b, 0x0a, 0x06, 0x4c, 0x6f, 0x67, 0x67, 0x6c, - 0x79, 0x10, 0xb0, 0x07, 0x12, 0x0c, 0x0a, 0x07, 0x4f, 0x70, 0x65, 0x6e, 0x56, 0x70, 0x6e, 0x10, - 0xb1, 0x07, 0x12, 0x1e, 0x0a, 0x19, 0x56, 0x61, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x43, 0x6c, 0x6f, - 0x75, 0x64, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x61, 0x6c, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x10, - 0xb2, 0x07, 0x12, 0x10, 0x0a, 0x0b, 0x42, 0x65, 0x74, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x63, - 0x6b, 0x10, 0xb3, 0x07, 0x12, 0x0d, 0x0a, 0x08, 0x5a, 0x65, 0x72, 0x6f, 0x54, 0x69, 0x65, 0x72, - 0x10, 0xb4, 0x07, 0x12, 0x0e, 0x0a, 0x09, 0x41, 0x70, 0x70, 0x4f, 0x70, 0x74, 0x69, 0x63, 0x73, - 0x10, 0xb5, 0x07, 0x12, 0x0d, 0x0a, 0x08, 0x4d, 0x65, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x10, - 0xb6, 0x07, 0x12, 0x15, 0x0a, 0x0c, 0x43, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x57, 0x61, - 0x61, 0x53, 0x10, 0xb7, 0x07, 0x1a, 0x02, 0x08, 0x01, 0x12, 0x11, 0x0a, 0x0c, 0x4c, 0x65, 0x6d, - 0x6f, 0x6e, 0x53, 0x71, 0x75, 0x65, 0x65, 0x7a, 0x79, 0x10, 0xb8, 0x07, 0x12, 0x0d, 0x0a, 0x08, - 0x42, 0x75, 0x64, 0x69, 0x62, 0x61, 0x73, 0x65, 0x10, 0xb9, 0x07, 0x12, 0x0f, 0x0a, 0x0a, 0x44, - 0x65, 0x6e, 0x6f, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x10, 0xba, 0x07, 0x12, 0x0b, 0x0a, 0x06, - 0x53, 0x74, 0x72, 0x69, 0x70, 0x6f, 0x10, 0xbb, 0x07, 0x12, 0x0c, 0x0a, 0x07, 0x52, 0x65, 0x70, - 0x6c, 0x79, 0x49, 0x4f, 0x10, 0xbc, 0x07, 0x12, 0x0f, 0x0a, 0x0a, 0x41, 0x7a, 0x75, 0x72, 0x65, - 0x42, 0x61, 0x74, 0x63, 0x68, 0x10, 0xbd, 0x07, 0x12, 0x1b, 0x0a, 0x16, 0x41, 0x7a, 0x75, 0x72, - 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, - 0x72, 0x79, 0x10, 0xbe, 0x07, 0x12, 0x12, 0x0a, 0x0d, 0x41, 0x57, 0x53, 0x53, 0x65, 0x73, 0x73, - 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x10, 0xbf, 0x07, 0x12, 0x09, 0x0a, 0x04, 0x43, 0x6f, 0x64, - 0x61, 0x10, 0xc0, 0x07, 0x12, 0x0b, 0x0a, 0x06, 0x4c, 0x6f, 0x67, 0x7a, 0x49, 0x4f, 0x10, 0xc1, - 0x07, 0x12, 0x0f, 0x0a, 0x0a, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x62, 0x72, 0x69, 0x74, 0x65, 0x10, - 0xc2, 0x07, 0x12, 0x1a, 0x0a, 0x15, 0x47, 0x72, 0x61, 0x66, 0x61, 0x6e, 0x61, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x10, 0xc3, 0x07, 0x12, 0x13, - 0x0a, 0x0e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x46, 0x69, 0x6e, 0x61, 0x6e, 0x63, 0x65, - 0x10, 0xc4, 0x07, 0x12, 0x0d, 0x0a, 0x08, 0x4f, 0x76, 0x65, 0x72, 0x6c, 0x6f, 0x6f, 0x70, 0x10, - 0xc5, 0x07, 0x12, 0x0a, 0x0a, 0x05, 0x4e, 0x67, 0x72, 0x6f, 0x6b, 0x10, 0xc6, 0x07, 0x12, 0x0e, - 0x0a, 0x09, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x65, 0x10, 0xc7, 0x07, 0x12, 0x0d, - 0x0a, 0x08, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x10, 0xc8, 0x07, 0x12, 0x2a, 0x0a, - 0x25, 0x41, 0x7a, 0x75, 0x72, 0x65, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x44, 0x69, 0x72, 0x65, - 0x63, 0x74, 0x6f, 0x72, 0x79, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x10, 0xc9, 0x07, 0x12, 0x20, 0x0a, 0x1b, 0x41, 0x7a, 0x75, - 0x72, 0x65, 0x43, 0x61, 0x63, 0x68, 0x65, 0x46, 0x6f, 0x72, 0x52, 0x65, 0x64, 0x69, 0x73, 0x41, - 0x63, 0x63, 0x65, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x10, 0xca, 0x07, 0x12, 0x21, 0x0a, 0x1c, 0x41, - 0x7a, 0x75, 0x72, 0x65, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x44, 0x42, 0x4b, 0x65, 0x79, 0x49, - 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x10, 0xcb, 0x07, 0x12, 0x23, - 0x0a, 0x1e, 0x41, 0x7a, 0x75, 0x72, 0x65, 0x44, 0x65, 0x76, 0x6f, 0x70, 0x73, 0x50, 0x65, 0x72, - 0x73, 0x6f, 0x6e, 0x61, 0x6c, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, - 0x10, 0xcc, 0x07, 0x12, 0x15, 0x0a, 0x10, 0x41, 0x7a, 0x75, 0x72, 0x65, 0x46, 0x75, 0x6e, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x10, 0xcd, 0x07, 0x12, 0x2c, 0x0a, 0x27, 0x41, 0x7a, - 0x75, 0x72, 0x65, 0x4d, 0x4c, 0x57, 0x65, 0x62, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, - 0x6c, 0x61, 0x73, 0x73, 0x69, 0x63, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x61, 0x62, - 0x6c, 0x65, 0x4b, 0x65, 0x79, 0x10, 0xce, 0x07, 0x12, 0x12, 0x0a, 0x0d, 0x41, 0x7a, 0x75, 0x72, - 0x65, 0x53, 0x61, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x10, 0xcf, 0x07, 0x12, 0x18, 0x0a, 0x13, - 0x41, 0x7a, 0x75, 0x72, 0x65, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x41, 0x64, 0x6d, 0x69, 0x6e, - 0x4b, 0x65, 0x79, 0x10, 0xd0, 0x07, 0x12, 0x18, 0x0a, 0x13, 0x41, 0x7a, 0x75, 0x72, 0x65, 0x53, - 0x65, 0x61, 0x72, 0x63, 0x68, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4b, 0x65, 0x79, 0x10, 0xd1, 0x07, - 0x12, 0x1f, 0x0a, 0x1a, 0x41, 0x7a, 0x75, 0x72, 0x65, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x10, 0xd2, - 0x07, 0x12, 0x0d, 0x0a, 0x08, 0x41, 0x7a, 0x75, 0x72, 0x65, 0x53, 0x51, 0x4c, 0x10, 0xd3, 0x07, - 0x12, 0x0a, 0x0a, 0x05, 0x46, 0x6c, 0x79, 0x49, 0x4f, 0x10, 0xd4, 0x07, 0x12, 0x0e, 0x0a, 0x09, - 0x42, 0x75, 0x69, 0x6c, 0x74, 0x57, 0x69, 0x74, 0x68, 0x10, 0xd5, 0x07, 0x12, 0x0f, 0x0a, 0x0a, - 0x4a, 0x75, 0x70, 0x69, 0x74, 0x65, 0x72, 0x4f, 0x6e, 0x65, 0x10, 0xd6, 0x07, 0x12, 0x25, 0x0a, - 0x20, 0x47, 0x43, 0x50, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, - 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, - 0x73, 0x10, 0xd7, 0x07, 0x12, 0x08, 0x0a, 0x03, 0x57, 0x69, 0x7a, 0x10, 0xd8, 0x07, 0x12, 0x0c, - 0x0a, 0x07, 0x50, 0x61, 0x67, 0x61, 0x72, 0x6d, 0x65, 0x10, 0xd9, 0x07, 0x12, 0x0c, 0x0a, 0x07, - 0x4f, 0x6e, 0x66, 0x6c, 0x65, 0x65, 0x74, 0x10, 0xda, 0x07, 0x12, 0x0c, 0x0a, 0x07, 0x49, 0x6e, - 0x74, 0x72, 0x61, 0x34, 0x32, 0x10, 0xdb, 0x07, 0x12, 0x09, 0x0a, 0x04, 0x47, 0x72, 0x6f, 0x71, - 0x10, 0xdc, 0x07, 0x12, 0x17, 0x0a, 0x12, 0x54, 0x77, 0x69, 0x74, 0x74, 0x65, 0x72, 0x43, 0x6f, - 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72, 0x6b, 0x65, 0x79, 0x10, 0xdd, 0x07, 0x12, 0x0b, 0x0a, 0x06, - 0x45, 0x72, 0x61, 0x73, 0x65, 0x72, 0x10, 0xde, 0x07, 0x12, 0x0e, 0x0a, 0x09, 0x4c, 0x61, 0x72, - 0x6b, 0x53, 0x75, 0x69, 0x74, 0x65, 0x10, 0xdf, 0x07, 0x12, 0x14, 0x0a, 0x0f, 0x4c, 0x61, 0x72, - 0x6b, 0x53, 0x75, 0x69, 0x74, 0x65, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x10, 0xe0, 0x07, 0x12, - 0x0e, 0x0a, 0x09, 0x45, 0x6e, 0x64, 0x6f, 0x72, 0x4c, 0x61, 0x62, 0x73, 0x10, 0xe1, 0x07, 0x12, - 0x0f, 0x0a, 0x0a, 0x45, 0x6c, 0x65, 0x76, 0x65, 0x6e, 0x4c, 0x61, 0x62, 0x73, 0x10, 0xe2, 0x07, - 0x12, 0x0d, 0x0a, 0x08, 0x4e, 0x65, 0x74, 0x73, 0x75, 0x69, 0x74, 0x65, 0x10, 0xe3, 0x07, 0x12, - 0x14, 0x0a, 0x0f, 0x52, 0x6f, 0x62, 0x69, 0x6e, 0x68, 0x6f, 0x6f, 0x64, 0x43, 0x72, 0x79, 0x70, - 0x74, 0x6f, 0x10, 0xe4, 0x07, 0x12, 0x0a, 0x0a, 0x05, 0x4e, 0x56, 0x41, 0x50, 0x49, 0x10, 0xe5, - 0x07, 0x12, 0x09, 0x0a, 0x04, 0x50, 0x79, 0x50, 0x49, 0x10, 0xe6, 0x07, 0x12, 0x0f, 0x0a, 0x0a, - 0x52, 0x61, 0x69, 0x6c, 0x77, 0x61, 0x79, 0x41, 0x70, 0x70, 0x10, 0xe7, 0x07, 0x12, 0x0b, 0x0a, - 0x06, 0x4d, 0x65, 0x72, 0x61, 0x6b, 0x69, 0x10, 0xe8, 0x07, 0x12, 0x15, 0x0a, 0x10, 0x53, 0x61, - 0x6c, 0x61, 0x64, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x10, 0xe9, - 0x07, 0x12, 0x08, 0x0a, 0x03, 0x42, 0x6f, 0x78, 0x10, 0xea, 0x07, 0x12, 0x0d, 0x0a, 0x08, 0x42, - 0x6f, 0x78, 0x4f, 0x61, 0x75, 0x74, 0x68, 0x10, 0xeb, 0x07, 0x12, 0x0f, 0x0a, 0x0a, 0x41, 0x70, - 0x69, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x10, 0xec, 0x07, 0x12, 0x15, 0x0a, 0x10, 0x57, - 0x65, 0x69, 0x67, 0x68, 0x74, 0x73, 0x41, 0x6e, 0x64, 0x42, 0x69, 0x61, 0x73, 0x65, 0x73, 0x10, - 0xed, 0x07, 0x12, 0x0c, 0x0a, 0x07, 0x5a, 0x6f, 0x68, 0x6f, 0x43, 0x52, 0x4d, 0x10, 0xee, 0x07, - 0x12, 0x10, 0x0a, 0x0b, 0x41, 0x7a, 0x75, 0x72, 0x65, 0x4f, 0x70, 0x65, 0x6e, 0x41, 0x49, 0x10, - 0xef, 0x07, 0x12, 0x0c, 0x0a, 0x07, 0x47, 0x6f, 0x44, 0x61, 0x64, 0x64, 0x79, 0x10, 0xf0, 0x07, - 0x12, 0x0d, 0x0a, 0x08, 0x46, 0x6c, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x10, 0xf1, 0x07, 0x12, - 0x16, 0x0a, 0x11, 0x54, 0x77, 0x69, 0x74, 0x63, 0x68, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, - 0x6f, 0x6b, 0x65, 0x6e, 0x10, 0xf2, 0x07, 0x12, 0x11, 0x0a, 0x0c, 0x54, 0x77, 0x69, 0x6c, 0x69, - 0x6f, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x10, 0xf3, 0x07, 0x12, 0x0b, 0x0a, 0x06, 0x53, 0x61, - 0x6e, 0x69, 0x74, 0x79, 0x10, 0xf4, 0x07, 0x12, 0x16, 0x0a, 0x11, 0x41, 0x7a, 0x75, 0x72, 0x65, - 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x10, 0xf5, 0x07, 0x12, - 0x12, 0x0a, 0x0d, 0x41, 0x69, 0x72, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x4f, 0x41, 0x75, 0x74, 0x68, - 0x10, 0xf6, 0x07, 0x12, 0x20, 0x0a, 0x1b, 0x41, 0x69, 0x72, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x50, - 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x61, 0x6c, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, - 0x65, 0x6e, 0x10, 0xf7, 0x07, 0x12, 0x21, 0x0a, 0x1c, 0x53, 0x74, 0x6f, 0x72, 0x79, 0x62, 0x6c, - 0x6f, 0x6b, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x61, 0x6c, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, - 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x10, 0xf8, 0x07, 0x12, 0x13, 0x0a, 0x0e, 0x53, 0x65, 0x6e, 0x74, - 0x72, 0x79, 0x4f, 0x72, 0x67, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x10, 0xf9, 0x07, 0x12, 0x24, 0x0a, - 0x1f, 0x41, 0x7a, 0x75, 0x72, 0x65, 0x41, 0x70, 0x69, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x4b, 0x65, 0x79, - 0x10, 0xfa, 0x07, 0x12, 0x26, 0x0a, 0x21, 0x41, 0x7a, 0x75, 0x72, 0x65, 0x41, 0x50, 0x49, 0x4d, - 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x10, 0xfb, 0x07, 0x12, 0x0c, 0x0a, 0x07, 0x48, - 0x61, 0x72, 0x6e, 0x65, 0x73, 0x73, 0x10, 0xfc, 0x07, 0x12, 0x0d, 0x0a, 0x08, 0x4c, 0x61, 0x6e, - 0x67, 0x66, 0x75, 0x73, 0x65, 0x10, 0xfd, 0x07, 0x12, 0x18, 0x0a, 0x13, 0x42, 0x69, 0x6e, 0x67, - 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x10, - 0xfe, 0x07, 0x12, 0x08, 0x0a, 0x03, 0x58, 0x41, 0x49, 0x10, 0xff, 0x07, 0x12, 0x1d, 0x0a, 0x18, - 0x41, 0x7a, 0x75, 0x72, 0x65, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x6e, 0x61, 0x67, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x4b, 0x65, 0x79, 0x10, 0x80, 0x08, 0x12, 0x23, 0x0a, 0x1e, 0x41, - 0x7a, 0x75, 0x72, 0x65, 0x41, 0x70, 0x70, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x43, 0x6f, 0x6e, - 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x10, 0x81, 0x08, - 0x12, 0x0d, 0x0a, 0x08, 0x44, 0x65, 0x65, 0x70, 0x53, 0x65, 0x65, 0x6b, 0x10, 0x82, 0x08, 0x12, - 0x18, 0x0a, 0x13, 0x53, 0x74, 0x72, 0x69, 0x70, 0x65, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, - 0x49, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x10, 0x83, 0x08, 0x12, 0x0e, 0x0a, 0x09, 0x4c, 0x61, 0x6e, - 0x67, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x10, 0x84, 0x08, 0x12, 0x19, 0x0a, 0x14, 0x42, 0x69, 0x74, - 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x41, 0x70, 0x70, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, - 0x64, 0x10, 0x85, 0x08, 0x12, 0x0b, 0x0a, 0x06, 0x48, 0x61, 0x73, 0x75, 0x72, 0x61, 0x10, 0x86, - 0x08, 0x12, 0x1b, 0x0a, 0x16, 0x53, 0x61, 0x6c, 0x65, 0x73, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x52, - 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x10, 0x87, 0x08, 0x12, 0x13, - 0x0a, 0x0e, 0x41, 0x6e, 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x4f, 0x41, 0x75, 0x74, 0x68, 0x32, - 0x10, 0x88, 0x08, 0x12, 0x0d, 0x0a, 0x08, 0x57, 0x65, 0x62, 0x65, 0x78, 0x42, 0x6f, 0x74, 0x10, - 0x89, 0x08, 0x12, 0x1f, 0x0a, 0x1a, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x61, 0x75, 0x50, 0x65, 0x72, - 0x73, 0x6f, 0x6e, 0x61, 0x6c, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, - 0x10, 0x8a, 0x08, 0x12, 0x0b, 0x0a, 0x06, 0x52, 0x6f, 0x6f, 0x74, 0x6c, 0x79, 0x10, 0x8b, 0x08, - 0x12, 0x17, 0x0a, 0x12, 0x48, 0x61, 0x73, 0x68, 0x69, 0x43, 0x6f, 0x72, 0x70, 0x56, 0x61, 0x75, - 0x6c, 0x74, 0x41, 0x75, 0x74, 0x68, 0x10, 0x8c, 0x08, 0x12, 0x16, 0x0a, 0x11, 0x50, 0x68, 0x72, - 0x61, 0x73, 0x65, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x10, 0x8d, - 0x08, 0x12, 0x0e, 0x0a, 0x09, 0x50, 0x68, 0x6f, 0x74, 0x6f, 0x72, 0x6f, 0x6f, 0x6d, 0x10, 0x8e, - 0x08, 0x12, 0x08, 0x0a, 0x03, 0x4a, 0x57, 0x54, 0x10, 0x8f, 0x08, 0x12, 0x10, 0x0a, 0x0b, 0x4f, - 0x70, 0x65, 0x6e, 0x41, 0x49, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x10, 0x90, 0x08, 0x12, 0x17, 0x0a, - 0x12, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x47, 0x65, 0x6d, 0x69, 0x6e, 0x69, 0x41, 0x50, 0x49, - 0x4b, 0x65, 0x79, 0x10, 0x91, 0x08, 0x12, 0x1e, 0x0a, 0x19, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, - 0x63, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x54, 0x6f, - 0x6b, 0x65, 0x6e, 0x10, 0x92, 0x08, 0x12, 0x12, 0x0a, 0x0d, 0x44, 0x61, 0x74, 0x61, 0x64, 0x6f, - 0x67, 0x41, 0x70, 0x69, 0x6b, 0x65, 0x79, 0x10, 0x93, 0x08, 0x42, 0x3d, 0x5a, 0x3b, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x74, 0x72, 0x75, 0x66, 0x66, 0x6c, 0x65, - 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x2f, 0x74, 0x72, 0x75, 0x66, 0x66, 0x6c, 0x65, - 0x68, 0x6f, 0x67, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x62, 0x2f, 0x64, 0x65, - 0x74, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x10, 0x04, 0x42, 0x3d, 0x5a, 0x3b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x74, 0x72, 0x75, 0x66, 0x66, 0x6c, 0x65, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, + 0x2f, 0x74, 0x72, 0x75, 0x66, 0x66, 0x6c, 0x65, 0x68, 0x6f, 0x67, 0x2f, 0x76, 0x33, 0x2f, 0x70, + 0x6b, 0x67, 0x2f, 0x70, 0x62, 0x2f, 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x70, + 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -4792,25 +517,24 @@ func file_detectors_proto_rawDescGZIP() []byte { return file_detectors_proto_rawDescData } -var file_detectors_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_detectors_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_detectors_proto_msgTypes = make([]protoimpl.MessageInfo, 6) var file_detectors_proto_goTypes = []interface{}{ (DecoderType)(0), // 0: detectors.DecoderType - (DetectorType)(0), // 1: detectors.DetectorType - (*Result)(nil), // 2: detectors.Result - (*FalsePositiveInfo)(nil), // 3: detectors.FalsePositiveInfo - (*StructuredData)(nil), // 4: detectors.StructuredData - (*TlsPrivateKey)(nil), // 5: detectors.TlsPrivateKey - (*GitHubSSHKey)(nil), // 6: detectors.GitHubSSHKey - nil, // 7: detectors.Result.ExtraDataEntry + (*Result)(nil), // 1: detectors.Result + (*FalsePositiveInfo)(nil), // 2: detectors.FalsePositiveInfo + (*StructuredData)(nil), // 3: detectors.StructuredData + (*TlsPrivateKey)(nil), // 4: detectors.TlsPrivateKey + (*GitHubSSHKey)(nil), // 5: detectors.GitHubSSHKey + nil, // 6: detectors.Result.ExtraDataEntry } var file_detectors_proto_depIdxs = []int32{ - 7, // 0: detectors.Result.extra_data:type_name -> detectors.Result.ExtraDataEntry - 4, // 1: detectors.Result.structured_data:type_name -> detectors.StructuredData + 6, // 0: detectors.Result.extra_data:type_name -> detectors.Result.ExtraDataEntry + 3, // 1: detectors.Result.structured_data:type_name -> detectors.StructuredData 0, // 2: detectors.Result.decoder_type:type_name -> detectors.DecoderType - 3, // 3: detectors.Result.false_positive_info:type_name -> detectors.FalsePositiveInfo - 5, // 4: detectors.StructuredData.tls_private_key:type_name -> detectors.TlsPrivateKey - 6, // 5: detectors.StructuredData.github_ssh_key:type_name -> detectors.GitHubSSHKey + 2, // 3: detectors.Result.false_positive_info:type_name -> detectors.FalsePositiveInfo + 4, // 4: detectors.StructuredData.tls_private_key:type_name -> detectors.TlsPrivateKey + 5, // 5: detectors.StructuredData.github_ssh_key:type_name -> detectors.GitHubSSHKey 6, // [6:6] is the sub-list for method output_type 6, // [6:6] is the sub-list for method input_type 6, // [6:6] is the sub-list for extension type_name @@ -4890,7 +614,7 @@ func file_detectors_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_detectors_proto_rawDesc, - NumEnums: 2, + NumEnums: 1, NumMessages: 6, NumExtensions: 0, NumServices: 0, diff --git a/pkg/verificationcache/verification_cache_test.go b/pkg/verificationcache/verification_cache_test.go index c40a30216562..ec6aaecffd9a 100644 --- a/pkg/verificationcache/verification_cache_test.go +++ b/pkg/verificationcache/verification_cache_test.go @@ -11,7 +11,7 @@ import ( "github.com/trufflesecurity/trufflehog/v3/pkg/cache/simple" logContext "github.com/trufflesecurity/trufflehog/v3/pkg/context" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" - "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb" ) type testDetector struct { @@ -37,9 +37,9 @@ func (t *testDetector) FromData(_ context.Context, verify bool, _ []byte) ([]det return results, nil } -func (t *testDetector) Keywords() []string { return nil } -func (t *testDetector) Type() detectorspb.DetectorType { return -1 } -func (t *testDetector) Description() string { return "" } +func (t *testDetector) Keywords() []string { return nil } +func (t *testDetector) Type() detector_typepb.DetectorType { return -1 } +func (t *testDetector) Description() string { return "" } var _ detectors.Detector = (*testDetector)(nil) @@ -254,7 +254,7 @@ func TestVerificationCache_FromData_SameRawDifferentType_CacheMiss(t *testing.T) if assert.NoError(t, err) { if assert.Len(t, res, 1) { - assert.Equal(t, detectorspb.DetectorType(-2), res[0].DetectorType) + assert.Equal(t, detector_typepb.DetectorType(-2), res[0].DetectorType) } } assert.Len(t, cache.resultCache.Values(), 2) @@ -275,7 +275,7 @@ func TestVerificationCache_FromData_SameRawV2DifferentType_CacheMiss(t *testing. if assert.NoError(t, err) { if assert.Len(t, res, 1) { - assert.Equal(t, detectorspb.DetectorType(-2), res[0].DetectorType) + assert.Equal(t, detector_typepb.DetectorType(-2), res[0].DetectorType) } } assert.Len(t, cache.resultCache.Values(), 2) diff --git a/proto/detectors.proto b/proto/detectors.proto index bb7bbe69dcff..7df5994a6c6d 100644 --- a/proto/detectors.proto +++ b/proto/detectors.proto @@ -12,1049 +12,6 @@ enum DecoderType { ESCAPED_UNICODE = 4; } -enum DetectorType { - Alibaba = 0; - AMQP = 1; // Not yet implemented - AWS = 2; - Azure = 3; - Circle = 4; - Coinbase = 5; - GCP = 6; - Generic = 7; - Github = 8; - Gitlab = 9; - JDBC = 10; - RazorPay = 11; - SendGrid = 12; - Slack = 13; - Square = 14; - PrivateKey = 15; - Stripe = 16; - URI = 17; - Dropbox = 18; - Heroku = 19; - Mailchimp = 20; - Okta = 21; - OneLogin = 22; - PivotalTracker = 23; - SquareApp = 25; - Twilio = 26; - Test = 27; - TravisCI = 29; - SlackWebhook = 30; - PaypalOauth = 31; - PagerDutyApiKey = 32; - Firebase = 33; // Not yet implemented - Mailgun = 34; - HubSpot = 35; - GitHubApp = 36; - CircleCI = 37; // Not yet implemented - WpEngine = 38; // Not yet implemented - DatadogToken = 39; - FacebookOAuth = 40; - AsanaPersonalAccessToken = 41; - AmplitudeApiKey = 42; - BitLyAccessToken = 43; - CalendlyApiKey = 44; - ZapierWebhook = 45; - YoutubeApiKey = 46; - SalesforceOauth2 = 47; // Not yet implemented - TwitterApiSecret = 48; // Not yet implemented - NpmToken = 49; - NewRelicPersonalApiKey = 50; - AirtableApiKey = 51 [deprecated = true]; - AkamaiToken = 52; // Not yet implemented - AmazonMWS = 53; // Not yet implemented - KubeConfig = 54; // Not yet implemented - Auth0oauth = 55; - Bitfinex = 56; - Clarifai = 57; - CloudflareGlobalApiKey = 58; - CloudflareCaKey = 59; - Confluent = 60; - ContentfulDelivery = 61; // Not yet implemented - DatabricksToken = 62; - DigitalOceanSpaces = 63; // Not yet implemented - DigitalOceanToken = 64; - DiscordBotToken = 65; - DiscordWebhook = 66; - EtsyApiKey = 67 [deprecated = true]; - FastlyPersonalToken = 68; - GoogleOauth2 = 69; // Not yet implemented - ReCAPTCHA = 70; // Not yet implemented - GoogleApiKey = 71; // Not yet implemented - Hunter = 72; - IbmCloudUserKey = 73; - Netlify = 74; - Vonage = 75; // Not yet implemented - EquinixOauth = 76; // Not yet implemented - Paystack = 77; - PlaidToken = 78; // Not yet implemented - PlaidKey = 79; - Plivo = 80; - Postmark = 81; - PubNubPublishKey = 82; - PubNubSubscriptionKey = 83; - PusherChannelKey = 84; - ScalewayKey = 85; - SendinBlueV2 = 86; - SentryToken = 87; - ShodanKey = 88; - SnykKey = 89; - SpotifyKey = 90; - TelegramBotToken = 91; - TencentCloudKey = 92; // Not yet implemented - TerraformCloudPersonalToken = 93; - TrelloApiKey = 94; - ZendeskApi = 95; - MaxMindLicense = 96; - AirtableMetadataApiKey = 97; // Not yet implemented - AsanaOauth = 98; - RapidApi = 99; - CloudflareApiToken = 100; - Webex = 101; - FirebaseCloudMessaging = 102; // Not yet implemented - ContentfulPersonalAccessToken = 103; - MapBox = 104; - MailJetBasicAuth = 105; - MailJetSMS = 106; - HubSpotApiKey = 107; - HubSpotOauth = 108; // Not yet implemented - SslMate = 109; - Auth0ManagementApiToken = 110; - MessageBird = 111; - ElasticEmail = 112; - FigmaPersonalAccessToken = 113; - MicrosoftTeamsWebhook = 114; - GitHubOld = 115; // Not yet implemented - VultrApiKey = 116; - Pepipost = 117; - Postman = 118; - CloudsightKey = 119; // Not yet implemented - JiraToken = 120; - NexmoApiKey = 121; - SegmentApiKey = 122; - SumoLogicKey = 123; - PushBulletApiKey = 124; - AirbrakeProjectKey = 125; - AirbrakeUserKey = 126; - PendoIntegrationKey = 127; // Not yet implemented - SplunkOberservabilityToken = 128; - LokaliseToken = 129; - Calendarific = 130; - Jumpcloud = 131; - IpStack = 133; - Notion = 134; - DroneCI = 135; - AdobeIO = 136; - TwelveData = 137; - D7Network = 138; - ScrapingBee = 139; - KeenIO = 140; - Wakatime = 141; // Not yet implemented - Buildkite = 142; - Verimail = 143; - Zerobounce = 144; - Mailboxlayer = 145; - Fastspring = 146; // Not yet implemented - Paddle = 147; // Not yet implemented - Sellfy = 148; // Not yet implemented - FixerIO = 149; - ButterCMS = 150; - Taxjar = 151; - Avalara = 152; // Not yet implemented - Helpscout = 153; - ElasticPath = 154; // Not yet implemented - Zeplin = 155; - Intercom = 156; - Mailmodo = 157; - CannyIo = 158; - Pipedrive = 159; - Vercel = 160; - PosthogApp = 161; - SinchMessage = 162; - Ayrshare = 163; - HelpCrunch = 164; - LiveAgent = 165; - Beamer = 166; - WeChatAppKey = 167; // Not yet implemented - LineMessaging = 168; - UberServerToken = 169; // Not yet implemented - AlgoliaAdminKey = 170; - FullContact = 171; // Not yet implemented - Mandrill = 172; - Flutterwave = 173; - MattermostPersonalToken = 174; - Cloudant = 175; // Not yet implemented - LineNotify = 176; - LinearAPI = 177; - Ubidots = 178; - Anypoint = 179; - Dwolla = 180; - ArtifactoryAccessToken = 181; - Surge = 182; // Not yet implemented - Sparkpost = 183; - GoCardless = 184; - Codacy = 185; - Kraken = 186; - Checkout = 187; - Kairos = 188; // Not yet implemented - ClockworkSMS = 189; - Atlassian = 190; // Not yet implemented - LaunchDarkly = 191; - Coveralls = 192; - Linode = 193; // Not yet implemented - WePay = 194; - PlanetScale = 195; - Doppler = 196; - Agora = 197; - Samsara = 198; // Not yet implemented - FrameIO = 199; - RubyGems = 200; - OpenAI = 201; - SurveySparrow = 202; - Simvoly = 203; - Survicate = 204; - Omnisend = 205; - Groovehq = 206; - Newsapi = 207; - Chatbot = 208; - ClickSendsms = 209; - Getgist = 210; - CustomerIO = 211; - ApiDeck = 212; - Nftport = 213; - Copper = 214; - Close = 215; - Myfreshworks = 216; - Salesflare = 217; - Webflow = 218; - Duda = 219; // Not yet implemented - Yext = 220; // Not yet implemented - ContentStack = 221; // Not yet implemented - StoryblokAccessToken = 222; - GraphCMS = 223; - Checkmarket = 224; // Not yet implemented - Convertkit = 225; - CustomerGuru = 226; - Kaleyra = 227; // Not yet implemented - Mailerlite = 228; - Qualaroo = 229; - SatismeterProjectkey = 230; - SatismeterWritekey = 231; - Simplesat = 232; - SurveyAnyplace = 233; - SurveyBot = 234; - Webengage = 235; // Not yet implemented - ZonkaFeedback = 236; - Delighted = 237; - Feedier = 238; - Abyssale = 239; - Magnetic = 240; - Nytimes = 241 [deprecated = true]; - Polygon = 242; - Powrbot = 243; - ProspectIO = 244 [deprecated = true]; - Skrappio = 245; - Monday = 246; - Smartsheets = 247; - Wrike = 248; - Float = 249; - Imagekit = 250; - Integromat = 251 [deprecated = true]; - Salesblink = 252; - Bored = 253; // Not yet implemented - Campayn = 254; - Clinchpad = 255; - CompanyHub = 256; - Debounce = 257; - Dyspatch = 258; - Guardianapi = 259; - Harvest = 260; - Moosend = 261; - OpenWeather = 262; - Siteleaf = 263; - Squarespace = 264; - FlowFlu = 265; - Nimble = 266; - LessAnnoyingCRM = 267; - Nethunt = 268; - Apptivo = 269; - CapsuleCRM = 270; - Insightly = 271; - Kylas = 272; - OnepageCRM = 273; - User = 274; - ProspectCRM = 275; - ReallySimpleSystems = 276; - Airship = 277; - Artsy = 278; - Yandex = 279; - Clockify = 280; - Dnscheck = 281; - EasyInsight = 282; - Ethplorer = 283; - Everhour = 284; - Fulcrum = 285; - GeoIpifi = 286; - Jotform = 287; - Refiner = 288; - Timezoneapi = 289; - TogglTrack = 290; - Vpnapi = 291; - Workstack = 292; - Apollo = 293; - Eversign = 294; // Not yet implemented - Juro = 295; - KarmaCRM = 296; - Metrilo = 297; - Pandadoc = 298; - RevampCRM = 299; - Salescookie = 300; - Alconost = 301; - Blogger = 302; - Accuweather = 303; - Opengraphr = 304 [deprecated = true]; - Rawg = 305; - Riotgames = 306; // Not yet implemented - Clientary = 307; - Stormglass = 308; - Tomtom = 309; - Twitch = 310; - Documo = 311; - Cloudways = 312; // Not yet implemented - Veevavault = 313; // Not yet implemented - KiteConnect = 314; // Not yet implemented - ShopeeOpenPlatform = 315; // Not yet implemented - TeamViewer = 316; // Not yet implemented - Bulbul = 317; - CentralStationCRM = 318; - Teamgate = 319; - Axonaut = 320; - Tyntec = 321; - Appcues = 322; - Autoklose = 323; - Cloudplan = 324; - Dotdigital = 325; - GetEmail = 326; - GetEmails = 327; - Kontent = 328; - Leadfeeder = 329; - Raven = 330; - RocketReach = 331; - Uplead = 332; - Brandfetch = 333; - Clearbit = 334; - Crowdin = 335; - Mapquest = 336; - Noticeable = 337; - Onbuka = 338; // Not yet implemented - Todoist = 339; - Storychief = 340; - LinkedIn = 341; // Not yet implemented - YouSign = 342; - Docker = 343; - Telesign = 344; // Not yet implemented - Spoonacular = 345; - Aerisweather = 346; // Not yet implemented - Alphavantage = 347; // Not yet implemented - Imgur = 348; // Not yet implemented - Imagga = 349; - SMSApi = 350; // Not yet implemented - Distribusion = 351; // Not yet implemented - Blablabus = 352 [deprecated = true]; - WordsApi = 353; // Not yet implemented - Currencylayer = 354; - Html2Pdf = 355; - IPGeolocation = 356; - Owlbot = 357; - Cloudmersive = 358; - Dynalist = 359; - ExchangeRateAPI = 360; - HolidayAPI = 361; - Ipapi = 362; - Marketstack = 363; - Nutritionix = 364; - Swell = 365; - ClickupPersonalToken = 366; - Nitro = 367 [deprecated = true]; - Rev = 368; - RunRunIt = 369; - Typeform = 370; - Mixpanel = 371; - Tradier = 372; - Verifier = 373; - Vouchery = 374; - Alegra = 375; - Audd = 376; - Baremetrics = 377; - Coinlib = 378; - ExchangeRatesAPI = 379; - CurrencyScoop = 380; - FXMarket = 381; - CurrencyCloud = 382; - GetGeoAPI = 383; - Abstract = 384; - Billomat = 385; - Dovico = 386; - Bitbar = 387; - Bugsnag = 388; - AssemblyAI = 389; - AdafruitIO = 390; - Apify = 391; - CoinGecko = 392; // Not yet implemented - CryptoCompare = 393; - Fullstory = 394; - HelloSign = 395; - Loyverse = 396; - NetCore = 397; // Not yet implemented - SauceLabs = 398; - AlienVault = 399; - Apiflash = 401; - Coinlayer = 402; - CurrentsAPI = 403; - DataGov = 404; - Enigma = 405; - FinancialModelingPrep = 406; - Geocodio = 407; - HereAPI = 408; - Macaddress = 409 [deprecated = true]; - OOPSpam = 410; - ProtocolsIO = 411; - ScraperAPI = 412; - SecurityTrails = 413; - TomorrowIO = 414; - WorldCoinIndex = 415; - FacePlusPlus = 416; - Voicegain = 417; - Deepgram = 418; - VisualCrossing = 419; - Finnhub = 420; - Tiingo = 421; - RingCentral = 422; - Finage = 423; - Edamam = 424; - HypeAuditor = 425; // Not yet implemented - Gengo = 426; - Front = 427; - Fleetbase = 428; - Bubble = 429; // Not yet implemented - Bannerbear = 430; - Adzuna = 431; - BitcoinAverage = 432; - CommerceJS = 433; - DetectLanguage = 434; - FakeJSON = 435 [deprecated = true]; - Graphhopper = 436; - Lexigram = 437; - LinkPreview = 438; - Numverify = 439; - ProxyCrawl = 440; - ZipCodeAPI = 441; - Cometchat = 442; // Not yet implemented - Keygen = 443; // Not yet implemented - Mixcloud = 444; // Not yet implemented - TatumIO = 445; - Tmetric = 446; - Lastfm = 447 [deprecated = true]; - Browshot = 448; - JSONbin = 449; // Not yet implemented - LocationIQ = 450; - ScreenshotAPI = 451; - WeatherStack = 452; - Amadeus = 453; - FourSquare = 454; - Flickr = 455; - ClickHelp = 456; - Ambee = 457; - Api2Cart = 458; - Hypertrack = 459; - KakaoTalk = 460; // Not yet implemented - RiteKit = 461; - Shutterstock = 462; - Text2Data = 463 [deprecated = true];; - YouNeedABudget = 464; - Cricket = 465; // Not yet implemented - Filestack = 466; // Not yet implemented - Gyazo = 467; - Mavenlink = 468; - Sheety = 469; - Sportsmonk = 470; - Stockdata = 471; - Unsplash = 472; - Allsports = 473; - CalorieNinja = 474; - WalkScore = 475; - Strava = 476; - Cicero = 477; - IPQuality = 478; - ParallelDots = 479; - Roaring = 480; - Mailsac = 481; - Whoxy = 482; - WorldWeather = 483; - ApiFonica = 484; - Aylien = 485; - Geocode = 486; - IconFinder = 487; - Ipify = 488 [deprecated = true]; - LanguageLayer = 489; - Lob = 490; - OnWaterIO = 491 [deprecated = true]; - Pastebin = 492; - PdfLayer = 493; - Pixabay = 494; - ReadMe = 495; - VatLayer = 496; - VirusTotal = 497; - AirVisual = 498; - Currencyfreaks = 499; - Duffel = 500; // Not yet implemented - FlatIO = 501; - M3o = 502; - Mesibo = 503; - Openuv = 504; - Snipcart = 505; - Besttime = 506; - Happyscribe = 507; - Humanity = 508; - Impala = 509; - Loginradius = 510; - AutoPilot = 511; - Bitmex = 512; - ClustDoc = 513; - Messari = 514; // Not yet implemented - PdfShift = 515; - Poloniex = 516; - RestpackHtmlToPdfAPI = 517; - RestpackScreenshotAPI = 518; - ShutterstockOAuth = 519; - SkyBiometry = 520; - AbuseIPDB = 521; - AletheiaApi = 522; - BlitApp = 523; - Censys = 524; - Cloverly = 525; - CountryLayer = 526; - FileIO = 527; - FlightApi = 528; - Geoapify = 529; - IPinfoDB = 530; - MediaStack = 531; - NasdaqDataLink = 532; - OpenCageData = 533; - Paymongo = 534; - PositionStack = 535; - Rebrandly = 536; - ScreenshotLayer = 537; - Stytch = 538; - Unplugg = 539; - UPCDatabase = 540; - UserStack = 541; - Geocodify = 542; - Newscatcher = 543; - Nicereply = 544; - Partnerstack = 545; - Route4me = 546; - Scrapeowl = 547; - ScrapingDog = 548; // Not yet implemented - Streak = 549; - Veriphone = 550; - Webscraping = 551; - Zenscrape = 552; - Zenserp = 553; - CoinApi = 554; - Gitter = 555; - Host = 556; - Iexcloud = 557; - Restpack = 558 [deprecated = true]; - ScraperBox = 559; - ScrapingAnt = 560; - SerpStack = 561; - SmartyStreets = 562; - TicketMaster = 563; - AviationStack = 564; - BombBomb = 565; - Commodities = 566; - Dfuse = 567; - EdenAI = 568; - Glassnode = 569; - Guru = 570; - Hive = 571; - Hiveage = 572; - Kickbox = 573; - Passbase = 574 [deprecated = true]; - PostageApp = 575; - PureStake = 576; - Qubole = 577; - CarbonInterface = 578; - Intrinio = 579; - QuickMetrics = 580 [deprecated = true]; - ScrapeStack = 581; - TechnicalAnalysisApi = 582; - Urlscan = 583; - BaseApiIO = 584; // Not yet implemented - DailyCO = 585; - TLy = 586; - Shortcut = 587; - Appfollow = 588; - Thinkific = 589; - Feedly = 590; // Not yet implemented - Stitchdata = 591; - Fetchrss = 592; - Signupgenius = 593; - Signaturit = 594; - Optimizely = 595; - OcrSpace = 596; // Not yet implemented - WeatherBit = 597; - BuddyNS = 598; - ZipAPI = 599; - ZipBooks = 600; - Onedesk = 601; - Bugherd = 602; - Blazemeter = 603; - Autodesk = 604; - Tru = 605; - UnifyID = 606; - Trimble = 607; // Not yet implemented - Smooch = 608; - Semaphore = 609; - Telnyx = 610; - Signalwire = 611; - Textmagic = 612; - Serphouse = 613; - Planyo = 614; - Simplybook = 615; // Not yet implemented - Vyte = 616; - Nylas = 617; - Squareup = 618; - Dandelion = 619; - DataFire = 620 [deprecated = true]; - DeepAI = 621; - MeaningCloud = 622; - NeutrinoApi = 623; - Storecove = 624; - Shipday = 625; - Sentiment = 626 [deprecated = true]; - StreamChatMessaging = 627; // Not yet implemented - TeamworkCRM = 628; - TeamworkDesk = 629; - TeamworkSpaces = 630; - TheOddsApi = 631; - Apacta = 632; - GetSandbox = 633; - Happi = 634 [deprecated = true]; - Oanda = 635; - FastForex = 636; - APIMatic = 637; - VersionEye = 638; - EagleEyeNetworks = 639; - ThousandEyes = 640; - SelectPDF = 641; - Flightstats = 642; - ChecIO = 643; - Manifest = 644; - ApiScience = 645 [deprecated = true]; - AppSynergy = 646; - Caflou = 647; - Caspio = 648; - ChecklyHQ = 649; - CloudElements = 650; - DronaHQ = 651; - Enablex = 652; - Fmfw = 653; - GoodDay = 654; - Luno = 655; - Meistertask = 656; - Mindmeister = 657; - PeopleDataLabs = 658; - ScraperSite = 659 [deprecated = true]; - Scrapfly = 660; - SimplyNoted = 661; - TravelPayouts = 662; - WebScraper = 663; - Convier = 664; - Courier = 665; - Ditto = 666; - Findl = 667; - Lendflow = 668; - Moderation = 669; - Opendatasoft = 670; // Not yet implemented - Podio = 671; - Rockset = 672 [deprecated = true]; - Rownd = 673; - Shotstack = 674; - Swiftype = 675; - Twitter = 676; - Honey = 677; - Freshdesk = 678; - Upwave = 679; - Fountain = 680; // Not yet implemented - Freshbooks = 681; - Mite = 682; - Deputy = 683; - Beebole = 684; - Cashboard = 685; - Kanban = 686; - Worksnaps = 687; - MyIntervals = 688; - InvoiceOcean = 689; - Sherpadesk = 690; - Mrticktock = 691; - Chatfule = 692; - Aeroworkflow = 693; - Emailoctopus = 694; // Not yet implemented - Fusebill = 695 [deprecated = true]; - Geckoboard = 696; - Gosquared = 697; // Not yet implemented - Moonclerk = 698; - Paymoapp = 699; - Mixmax = 700; - Processst = 701; // Not yet implemented - Repairshopr = 702; - Goshippo = 703; // Not yet implemented - Sigopt = 704; - Sugester = 705; - Viewneo = 706; - BoostNote = 707; - CaptainData = 708; - Checkvist = 709; - Cliengo = 710; - Cloze = 711; - FormIO = 712; - FormBucket = 713; - GoCanvas = 714; - MadKudu = 715; - NozbeTeams = 716; - Papyrs = 717; // Not yet implemented - SuperNotesAPI = 718; - Tallyfy = 719; - ZenkitAPI = 720; - CloudImage = 721; - UploadCare = 722; - Borgbase = 723; - Pipedream = 724; - Sirv = 725; - Diffbot = 726; - EightxEight = 727; - Sendoso = 728; // Not yet implemented - Printfection = 729; // Not yet implemented - Authorize = 730; // Not yet implemented - PandaScore = 731; - Paymo = 732; - AvazaPersonalAccessToken = 733; - PlanviewLeanKit = 734; - Livestorm = 735; - KuCoin = 736; - MetaAPI = 737; - NiceHash = 738; // Not yet implemented - CexIO = 739; - Klipfolio = 740; - Dynatrace = 741; // Not yet implemented - MollieAPIKey = 742; // Not yet implemented - MollieAccessToken = 743; // Not yet implemented - BasisTheory = 744; // Not yet implemented - Nordigen = 745; // Not yet implemented - FlagsmithEnvironmentKey = 746; // Not yet implemented - FlagsmithToken = 747; // Not yet implemented - Mux = 748; - Column = 749; - Sendbird = 750; - SendbirdOrganizationAPI = 751; - Midise = 752; // Not yet implemented - Mockaroo = 753; - Image4 = 754; // Not yet implemented - Pinata = 755; - BrowserStack = 756; - CrossBrowserTesting = 757 [deprecated = true]; - Loadmill = 758; - TestingBot = 759; - KnapsackPro = 760; - Qase = 761; - Dareboost = 762; - GTMetrix = 763; - Holistic = 764; - Parsers = 765; - ScrutinizerCi = 766; - SonarCloud = 767; - APITemplate = 768; - ConversionTools = 769; - CraftMyPDF = 770; - ExportSDK = 771; - GlitterlyAPI = 772 [deprecated = true]; - Hybiscus = 773; - Miro = 774; - Statuspage = 775; - Statuspal = 776; - Teletype = 777; - TimeCamp = 778; - Userflow = 779; - Wistia = 780; - SportRadar = 781 [deprecated = true];; - UptimeRobot = 782; - Codequiry = 783; - ExtractorAPI = 784; - Signable = 785; - MagicBell = 786; - Stormboard = 787; - Apilayer = 788; - Disqus = 789; - Woopra = 790; // Not yet implemented - Paperform = 791; - Gumroad = 792; - Paydirtapp = 793; - Detectify = 794; - Statuscake = 795; - Jumpseller = 796; // Not yet implemented - LunchMoney = 797; - Rosette = 798; // Not yet implemented - Yelp = 799; - Atera = 800; - EcoStruxureIT = 801; - Aha = 802; - Parsehub = 803; - PackageCloud = 804; - Cloudsmith = 805; - Flowdash = 806 [deprecated = true]; - Flowdock = 807 [deprecated = true]; - Fibery = 808; - Typetalk = 809; - VoodooSMS = 810; - ZulipChat = 811; - Formcraft = 812; - Iexapis = 813; - Reachmail = 814; - Chartmogul = 815; - Appointedd = 816; - Wit = 817; - RechargePayments = 818; - Diggernaut = 819; - MonkeyLearn = 820; - Duply = 821; - Postbacks = 822; - Collect2 = 823; - ZenRows = 824; - Zipcodebase = 825; - Tefter = 826; - Twist = 827; - BraintreePayments = 828; - CloudConvert = 829; - Grafana = 830; - ConvertApi = 831; - Transferwise = 832; - Bulksms = 833; - Databox = 834; - Onesignal = 835; - Rentman = 836; - Parseur = 837; - Docparser = 838; - Formsite = 839; - Tickettailor = 840; - Lemlist = 841; - Prodpad = 842; - Formstack = 843; // Not yet implemented - Codeclimate = 844; - Codemagic = 845; - Vbout = 846; - Nightfall = 847; - FlightLabs = 848; - SpeechTextAI = 849; - PollsAPI = 850; - SimFin = 851; - Scalr = 852; - Kanbantool = 853; - Brightlocal = 854; // Not yet implemented - Hotwire = 855; // Not yet implemented - Instabot = 856; - Timekit = 857; // Not yet implemented - Interseller = 858; - Mojohelpdesk = 859; // Not yet implemented - Createsend = 860; // Not yet implemented - Getresponse = 861; - Dynadot = 862; // Not yet implemented - Demio = 863; - Tokeet = 864; - Myexperiment = 865; // Not yet implemented - Copyscape = 866; // Not yet implemented - Besnappy = 867; - Salesmate = 868; - Heatmapapi = 869 [deprecated = true];; - Websitepulse = 870; - Uclassify = 871; - Convert = 872; - PDFmyURL = 873; // Not yet implemented - Api2Convert = 874; // Not yet implemented - Opsgenie = 875; - Gemini = 876; - Honeycomb = 877; - KalturaAppToken = 878; // Not yet implemented - KalturaSession = 879; // Not yet implemented - BitGo = 880; // Not yet implemented - Optidash = 881; // Not yet implemented - Imgix = 882; // Not yet implemented - ImageToText = 883; // Not yet implemented - Page2Images = 884; // Not yet implemented - Quickbase = 885; // Not yet implemented - Redbooth = 886; // Not yet implemented - Nubela = 887; // Not yet implemented - Infobip = 888; // Not yet implemented - Uproc = 889; // Not yet implemented - Supportbee = 890; // Not yet implemented - Aftership = 891; // Not yet implemented - Edusign = 892; // Not yet implemented - Teamup = 893; // Not yet implemented - Workday = 894; // Not yet implemented - MongoDB = 895; - NGC = 896; - DigitalOceanV2 = 897; - SQLServer = 898; - FTP = 899; - Redis = 900; - LDAP = 901; - Shopify = 902; - RabbitMQ = 903; - CustomRegex = 904; - Etherscan = 905; - Infura = 906; - Alchemy = 907; - BlockNative = 908; - Moralis = 909; - BscScan = 910; - CoinMarketCap = 911 [deprecated = true]; - Percy = 912; - TinesWebhook = 913; - Pulumi = 914; - SupabaseToken = 915; - NuGetApiKey = 916; - Aiven = 917; - Prefect = 918; - Docusign = 919; - Couchbase = 920; - Dockerhub = 921; - TrufflehogEnterprise = 922; - EnvoyApiKey = 923; - GitHubOauth2 = 924; - Salesforce = 925; - HuggingFace = 926; - Snowflake = 927; - Sourcegraph = 928; - Tailscale = 929; - Web3Storage = 930; - AzureStorage = 931; - PlanetScaleDb = 932; - Anthropic = 933; - Ramp = 934; - Klaviyo = 935; - SourcegraphCody = 936; - Voiceflow = 937; - Privacy = 938; - IPInfo = 939; - Ip2location = 940; - Instamojo = 941; - Portainer = 942; - PortainerToken = 943; - Loggly = 944; - OpenVpn = 945; - VagrantCloudPersonalToken = 946; - BetterStack = 947; - ZeroTier = 948; - AppOptics = 949; - Metabase = 950; - CoinbaseWaaS = 951 [deprecated = true]; - LemonSqueezy = 952; - Budibase = 953; - DenoDeploy = 954; - Stripo = 955; - ReplyIO = 956; - AzureBatch = 957; - AzureContainerRegistry = 958; - AWSSessionKey = 959; - Coda = 960; - LogzIO = 961; - Eventbrite = 962; - GrafanaServiceAccount = 963; - RequestFinance = 964; - Overloop = 965; - Ngrok = 966; - Replicate = 967; - Postgres = 968; - AzureActiveDirectoryApplicationSecret = 969; - AzureCacheForRedisAccessKey = 970; - AzureCosmosDBKeyIdentifiable = 971; - AzureDevopsPersonalAccessToken = 972; - AzureFunctionKey = 973; - AzureMLWebServiceClassicIdentifiableKey = 974; - AzureSasToken = 975; - AzureSearchAdminKey = 976; - AzureSearchQueryKey = 977; - AzureManagementCertificate = 978; - AzureSQL = 979; - FlyIO = 980; - BuiltWith = 981; - JupiterOne = 982; - GCPApplicationDefaultCredentials = 983; - Wiz = 984; - Pagarme = 985; - Onfleet = 986; - Intra42 = 987; - Groq = 988; - TwitterConsumerkey = 989; - Eraser = 990; - LarkSuite = 991; - LarkSuiteApiKey = 992; - EndorLabs = 993; - ElevenLabs = 994; - Netsuite = 995; - RobinhoodCrypto = 996; - NVAPI = 997; - PyPI = 998; - RailwayApp = 999; - Meraki = 1000; - SaladCloudApiKey = 1001; - Box = 1002; - BoxOauth = 1003; - ApiMetrics = 1004; - WeightsAndBiases = 1005; - ZohoCRM = 1006; - AzureOpenAI = 1007; - GoDaddy = 1008; - Flexport = 1009; - TwitchAccessToken = 1010; - TwilioApiKey = 1011; - Sanity = 1012; - AzureRefreshToken = 1013; - AirtableOAuth = 1014; - AirtablePersonalAccessToken = 1015; - StoryblokPersonalAccessToken = 1016; - SentryOrgToken = 1017; - AzureApiManagementRepositoryKey = 1018; - AzureAPIManagementSubscriptionKey = 1019; - Harness = 1020; - Langfuse = 1021; - BingSubscriptionKey = 1022; - XAI = 1023; - AzureDirectManagementKey = 1024; - AzureAppConfigConnectionString = 1025; - DeepSeek = 1026; - StripePaymentIntent = 1027; - LangSmith = 1028; - BitbucketAppPassword = 1029; - Hasura = 1030; - SalesforceRefreshToken = 1031; - AnypointOAuth2 = 1032; - WebexBot = 1033; - TableauPersonalAccessToken = 1034; - Rootly = 1035; - HashiCorpVaultAuth = 1036; - PhraseAccessToken = 1037; - Photoroom = 1038; - JWT = 1039; - OpenAIAdmin = 1040; - GoogleGeminiAPIKey = 1041; - ArtifactoryReferenceToken = 1042; - DatadogApikey = 1043; -} - message Result { int64 source_id = 2; string redacted = 3; From 7f8da0af2a87ebd392bf0205667100654dd9e800 Mon Sep 17 00:00:00 2001 From: Casey Tran Date: Fri, 27 Mar 2026 18:42:31 -0500 Subject: [PATCH 2/2] add new detector_type.proto and generated files --- pkg/pb/detector_typepb/detector_type.pb.go | 4357 +++++++++++++++++ .../detector_type.pb.validate.go | 36 + proto/detector_type.proto | 1048 ++++ 3 files changed, 5441 insertions(+) create mode 100644 pkg/pb/detector_typepb/detector_type.pb.go create mode 100644 pkg/pb/detector_typepb/detector_type.pb.validate.go create mode 100644 proto/detector_type.proto diff --git a/pkg/pb/detector_typepb/detector_type.pb.go b/pkg/pb/detector_typepb/detector_type.pb.go new file mode 100644 index 000000000000..5563645baa71 --- /dev/null +++ b/pkg/pb/detector_typepb/detector_type.pb.go @@ -0,0 +1,4357 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.33.0 +// protoc v4.25.3 +// source: detector_type.proto + +package detector_typepb + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type DetectorType int32 + +const ( + DetectorType_Alibaba DetectorType = 0 + DetectorType_AMQP DetectorType = 1 // Not yet implemented + DetectorType_AWS DetectorType = 2 + DetectorType_Azure DetectorType = 3 + DetectorType_Circle DetectorType = 4 + DetectorType_Coinbase DetectorType = 5 + DetectorType_GCP DetectorType = 6 + DetectorType_Generic DetectorType = 7 + DetectorType_Github DetectorType = 8 + DetectorType_Gitlab DetectorType = 9 + DetectorType_JDBC DetectorType = 10 + DetectorType_RazorPay DetectorType = 11 + DetectorType_SendGrid DetectorType = 12 + DetectorType_Slack DetectorType = 13 + DetectorType_Square DetectorType = 14 + DetectorType_PrivateKey DetectorType = 15 + DetectorType_Stripe DetectorType = 16 + DetectorType_URI DetectorType = 17 + DetectorType_Dropbox DetectorType = 18 + DetectorType_Heroku DetectorType = 19 + DetectorType_Mailchimp DetectorType = 20 + DetectorType_Okta DetectorType = 21 + DetectorType_OneLogin DetectorType = 22 + DetectorType_PivotalTracker DetectorType = 23 + DetectorType_SquareApp DetectorType = 25 + DetectorType_Twilio DetectorType = 26 + DetectorType_Test DetectorType = 27 + DetectorType_TravisCI DetectorType = 29 + DetectorType_SlackWebhook DetectorType = 30 + DetectorType_PaypalOauth DetectorType = 31 + DetectorType_PagerDutyApiKey DetectorType = 32 + DetectorType_Firebase DetectorType = 33 // Not yet implemented + DetectorType_Mailgun DetectorType = 34 + DetectorType_HubSpot DetectorType = 35 + DetectorType_GitHubApp DetectorType = 36 + DetectorType_CircleCI DetectorType = 37 // Not yet implemented + DetectorType_WpEngine DetectorType = 38 // Not yet implemented + DetectorType_DatadogToken DetectorType = 39 + DetectorType_FacebookOAuth DetectorType = 40 + DetectorType_AsanaPersonalAccessToken DetectorType = 41 + DetectorType_AmplitudeApiKey DetectorType = 42 + DetectorType_BitLyAccessToken DetectorType = 43 + DetectorType_CalendlyApiKey DetectorType = 44 + DetectorType_ZapierWebhook DetectorType = 45 + DetectorType_YoutubeApiKey DetectorType = 46 + DetectorType_SalesforceOauth2 DetectorType = 47 // Not yet implemented + DetectorType_TwitterApiSecret DetectorType = 48 // Not yet implemented + DetectorType_NpmToken DetectorType = 49 + DetectorType_NewRelicPersonalApiKey DetectorType = 50 + // Deprecated: Marked as deprecated in detector_type.proto. + DetectorType_AirtableApiKey DetectorType = 51 + DetectorType_AkamaiToken DetectorType = 52 // Not yet implemented + DetectorType_AmazonMWS DetectorType = 53 // Not yet implemented + DetectorType_KubeConfig DetectorType = 54 // Not yet implemented + DetectorType_Auth0oauth DetectorType = 55 + DetectorType_Bitfinex DetectorType = 56 + DetectorType_Clarifai DetectorType = 57 + DetectorType_CloudflareGlobalApiKey DetectorType = 58 + DetectorType_CloudflareCaKey DetectorType = 59 + DetectorType_Confluent DetectorType = 60 + DetectorType_ContentfulDelivery DetectorType = 61 // Not yet implemented + DetectorType_DatabricksToken DetectorType = 62 + DetectorType_DigitalOceanSpaces DetectorType = 63 // Not yet implemented + DetectorType_DigitalOceanToken DetectorType = 64 + DetectorType_DiscordBotToken DetectorType = 65 + DetectorType_DiscordWebhook DetectorType = 66 + // Deprecated: Marked as deprecated in detector_type.proto. + DetectorType_EtsyApiKey DetectorType = 67 + DetectorType_FastlyPersonalToken DetectorType = 68 + DetectorType_GoogleOauth2 DetectorType = 69 // Not yet implemented + DetectorType_ReCAPTCHA DetectorType = 70 // Not yet implemented + DetectorType_GoogleApiKey DetectorType = 71 // Not yet implemented + DetectorType_Hunter DetectorType = 72 + DetectorType_IbmCloudUserKey DetectorType = 73 + DetectorType_Netlify DetectorType = 74 + DetectorType_Vonage DetectorType = 75 // Not yet implemented + DetectorType_EquinixOauth DetectorType = 76 // Not yet implemented + DetectorType_Paystack DetectorType = 77 + DetectorType_PlaidToken DetectorType = 78 // Not yet implemented + DetectorType_PlaidKey DetectorType = 79 + DetectorType_Plivo DetectorType = 80 + DetectorType_Postmark DetectorType = 81 + DetectorType_PubNubPublishKey DetectorType = 82 + DetectorType_PubNubSubscriptionKey DetectorType = 83 + DetectorType_PusherChannelKey DetectorType = 84 + DetectorType_ScalewayKey DetectorType = 85 + DetectorType_SendinBlueV2 DetectorType = 86 + DetectorType_SentryToken DetectorType = 87 + DetectorType_ShodanKey DetectorType = 88 + DetectorType_SnykKey DetectorType = 89 + DetectorType_SpotifyKey DetectorType = 90 + DetectorType_TelegramBotToken DetectorType = 91 + DetectorType_TencentCloudKey DetectorType = 92 // Not yet implemented + DetectorType_TerraformCloudPersonalToken DetectorType = 93 + DetectorType_TrelloApiKey DetectorType = 94 + DetectorType_ZendeskApi DetectorType = 95 + DetectorType_MaxMindLicense DetectorType = 96 + DetectorType_AirtableMetadataApiKey DetectorType = 97 // Not yet implemented + DetectorType_AsanaOauth DetectorType = 98 + DetectorType_RapidApi DetectorType = 99 + DetectorType_CloudflareApiToken DetectorType = 100 + DetectorType_Webex DetectorType = 101 + DetectorType_FirebaseCloudMessaging DetectorType = 102 // Not yet implemented + DetectorType_ContentfulPersonalAccessToken DetectorType = 103 + DetectorType_MapBox DetectorType = 104 + DetectorType_MailJetBasicAuth DetectorType = 105 + DetectorType_MailJetSMS DetectorType = 106 + DetectorType_HubSpotApiKey DetectorType = 107 + DetectorType_HubSpotOauth DetectorType = 108 // Not yet implemented + DetectorType_SslMate DetectorType = 109 + DetectorType_Auth0ManagementApiToken DetectorType = 110 + DetectorType_MessageBird DetectorType = 111 + DetectorType_ElasticEmail DetectorType = 112 + DetectorType_FigmaPersonalAccessToken DetectorType = 113 + DetectorType_MicrosoftTeamsWebhook DetectorType = 114 + DetectorType_GitHubOld DetectorType = 115 // Not yet implemented + DetectorType_VultrApiKey DetectorType = 116 + DetectorType_Pepipost DetectorType = 117 + DetectorType_Postman DetectorType = 118 + DetectorType_CloudsightKey DetectorType = 119 // Not yet implemented + DetectorType_JiraToken DetectorType = 120 + DetectorType_NexmoApiKey DetectorType = 121 + DetectorType_SegmentApiKey DetectorType = 122 + DetectorType_SumoLogicKey DetectorType = 123 + DetectorType_PushBulletApiKey DetectorType = 124 + DetectorType_AirbrakeProjectKey DetectorType = 125 + DetectorType_AirbrakeUserKey DetectorType = 126 + DetectorType_PendoIntegrationKey DetectorType = 127 // Not yet implemented + DetectorType_SplunkOberservabilityToken DetectorType = 128 + DetectorType_LokaliseToken DetectorType = 129 + DetectorType_Calendarific DetectorType = 130 + DetectorType_Jumpcloud DetectorType = 131 + DetectorType_IpStack DetectorType = 133 + DetectorType_Notion DetectorType = 134 + DetectorType_DroneCI DetectorType = 135 + DetectorType_AdobeIO DetectorType = 136 + DetectorType_TwelveData DetectorType = 137 + DetectorType_D7Network DetectorType = 138 + DetectorType_ScrapingBee DetectorType = 139 + DetectorType_KeenIO DetectorType = 140 + DetectorType_Wakatime DetectorType = 141 // Not yet implemented + DetectorType_Buildkite DetectorType = 142 + DetectorType_Verimail DetectorType = 143 + DetectorType_Zerobounce DetectorType = 144 + DetectorType_Mailboxlayer DetectorType = 145 + DetectorType_Fastspring DetectorType = 146 // Not yet implemented + DetectorType_Paddle DetectorType = 147 // Not yet implemented + DetectorType_Sellfy DetectorType = 148 // Not yet implemented + DetectorType_FixerIO DetectorType = 149 + DetectorType_ButterCMS DetectorType = 150 + DetectorType_Taxjar DetectorType = 151 + DetectorType_Avalara DetectorType = 152 // Not yet implemented + DetectorType_Helpscout DetectorType = 153 + DetectorType_ElasticPath DetectorType = 154 // Not yet implemented + DetectorType_Zeplin DetectorType = 155 + DetectorType_Intercom DetectorType = 156 + DetectorType_Mailmodo DetectorType = 157 + DetectorType_CannyIo DetectorType = 158 + DetectorType_Pipedrive DetectorType = 159 + DetectorType_Vercel DetectorType = 160 + DetectorType_PosthogApp DetectorType = 161 + DetectorType_SinchMessage DetectorType = 162 + DetectorType_Ayrshare DetectorType = 163 + DetectorType_HelpCrunch DetectorType = 164 + DetectorType_LiveAgent DetectorType = 165 + DetectorType_Beamer DetectorType = 166 + DetectorType_WeChatAppKey DetectorType = 167 // Not yet implemented + DetectorType_LineMessaging DetectorType = 168 + DetectorType_UberServerToken DetectorType = 169 // Not yet implemented + DetectorType_AlgoliaAdminKey DetectorType = 170 + DetectorType_FullContact DetectorType = 171 // Not yet implemented + DetectorType_Mandrill DetectorType = 172 + DetectorType_Flutterwave DetectorType = 173 + DetectorType_MattermostPersonalToken DetectorType = 174 + DetectorType_Cloudant DetectorType = 175 // Not yet implemented + DetectorType_LineNotify DetectorType = 176 + DetectorType_LinearAPI DetectorType = 177 + DetectorType_Ubidots DetectorType = 178 + DetectorType_Anypoint DetectorType = 179 + DetectorType_Dwolla DetectorType = 180 + DetectorType_ArtifactoryAccessToken DetectorType = 181 + DetectorType_Surge DetectorType = 182 // Not yet implemented + DetectorType_Sparkpost DetectorType = 183 + DetectorType_GoCardless DetectorType = 184 + DetectorType_Codacy DetectorType = 185 + DetectorType_Kraken DetectorType = 186 + DetectorType_Checkout DetectorType = 187 + DetectorType_Kairos DetectorType = 188 // Not yet implemented + DetectorType_ClockworkSMS DetectorType = 189 + DetectorType_Atlassian DetectorType = 190 // Not yet implemented + DetectorType_LaunchDarkly DetectorType = 191 + DetectorType_Coveralls DetectorType = 192 + DetectorType_Linode DetectorType = 193 // Not yet implemented + DetectorType_WePay DetectorType = 194 + DetectorType_PlanetScale DetectorType = 195 + DetectorType_Doppler DetectorType = 196 + DetectorType_Agora DetectorType = 197 + DetectorType_Samsara DetectorType = 198 // Not yet implemented + DetectorType_FrameIO DetectorType = 199 + DetectorType_RubyGems DetectorType = 200 + DetectorType_OpenAI DetectorType = 201 + DetectorType_SurveySparrow DetectorType = 202 + DetectorType_Simvoly DetectorType = 203 + DetectorType_Survicate DetectorType = 204 + DetectorType_Omnisend DetectorType = 205 + DetectorType_Groovehq DetectorType = 206 + DetectorType_Newsapi DetectorType = 207 + DetectorType_Chatbot DetectorType = 208 + DetectorType_ClickSendsms DetectorType = 209 + DetectorType_Getgist DetectorType = 210 + DetectorType_CustomerIO DetectorType = 211 + DetectorType_ApiDeck DetectorType = 212 + DetectorType_Nftport DetectorType = 213 + DetectorType_Copper DetectorType = 214 + DetectorType_Close DetectorType = 215 + DetectorType_Myfreshworks DetectorType = 216 + DetectorType_Salesflare DetectorType = 217 + DetectorType_Webflow DetectorType = 218 + DetectorType_Duda DetectorType = 219 // Not yet implemented + DetectorType_Yext DetectorType = 220 // Not yet implemented + DetectorType_ContentStack DetectorType = 221 // Not yet implemented + DetectorType_StoryblokAccessToken DetectorType = 222 + DetectorType_GraphCMS DetectorType = 223 + DetectorType_Checkmarket DetectorType = 224 // Not yet implemented + DetectorType_Convertkit DetectorType = 225 + DetectorType_CustomerGuru DetectorType = 226 + DetectorType_Kaleyra DetectorType = 227 // Not yet implemented + DetectorType_Mailerlite DetectorType = 228 + DetectorType_Qualaroo DetectorType = 229 + DetectorType_SatismeterProjectkey DetectorType = 230 + DetectorType_SatismeterWritekey DetectorType = 231 + DetectorType_Simplesat DetectorType = 232 + DetectorType_SurveyAnyplace DetectorType = 233 + DetectorType_SurveyBot DetectorType = 234 + DetectorType_Webengage DetectorType = 235 // Not yet implemented + DetectorType_ZonkaFeedback DetectorType = 236 + DetectorType_Delighted DetectorType = 237 + DetectorType_Feedier DetectorType = 238 + DetectorType_Abyssale DetectorType = 239 + DetectorType_Magnetic DetectorType = 240 + // Deprecated: Marked as deprecated in detector_type.proto. + DetectorType_Nytimes DetectorType = 241 + DetectorType_Polygon DetectorType = 242 + DetectorType_Powrbot DetectorType = 243 + // Deprecated: Marked as deprecated in detector_type.proto. + DetectorType_ProspectIO DetectorType = 244 + DetectorType_Skrappio DetectorType = 245 + DetectorType_Monday DetectorType = 246 + DetectorType_Smartsheets DetectorType = 247 + DetectorType_Wrike DetectorType = 248 + DetectorType_Float DetectorType = 249 + DetectorType_Imagekit DetectorType = 250 + // Deprecated: Marked as deprecated in detector_type.proto. + DetectorType_Integromat DetectorType = 251 + DetectorType_Salesblink DetectorType = 252 + DetectorType_Bored DetectorType = 253 // Not yet implemented + DetectorType_Campayn DetectorType = 254 + DetectorType_Clinchpad DetectorType = 255 + DetectorType_CompanyHub DetectorType = 256 + DetectorType_Debounce DetectorType = 257 + DetectorType_Dyspatch DetectorType = 258 + DetectorType_Guardianapi DetectorType = 259 + DetectorType_Harvest DetectorType = 260 + DetectorType_Moosend DetectorType = 261 + DetectorType_OpenWeather DetectorType = 262 + DetectorType_Siteleaf DetectorType = 263 + DetectorType_Squarespace DetectorType = 264 + DetectorType_FlowFlu DetectorType = 265 + DetectorType_Nimble DetectorType = 266 + DetectorType_LessAnnoyingCRM DetectorType = 267 + DetectorType_Nethunt DetectorType = 268 + DetectorType_Apptivo DetectorType = 269 + DetectorType_CapsuleCRM DetectorType = 270 + DetectorType_Insightly DetectorType = 271 + DetectorType_Kylas DetectorType = 272 + DetectorType_OnepageCRM DetectorType = 273 + DetectorType_User DetectorType = 274 + DetectorType_ProspectCRM DetectorType = 275 + DetectorType_ReallySimpleSystems DetectorType = 276 + DetectorType_Airship DetectorType = 277 + DetectorType_Artsy DetectorType = 278 + DetectorType_Yandex DetectorType = 279 + DetectorType_Clockify DetectorType = 280 + DetectorType_Dnscheck DetectorType = 281 + DetectorType_EasyInsight DetectorType = 282 + DetectorType_Ethplorer DetectorType = 283 + DetectorType_Everhour DetectorType = 284 + DetectorType_Fulcrum DetectorType = 285 + DetectorType_GeoIpifi DetectorType = 286 + DetectorType_Jotform DetectorType = 287 + DetectorType_Refiner DetectorType = 288 + DetectorType_Timezoneapi DetectorType = 289 + DetectorType_TogglTrack DetectorType = 290 + DetectorType_Vpnapi DetectorType = 291 + DetectorType_Workstack DetectorType = 292 + DetectorType_Apollo DetectorType = 293 + DetectorType_Eversign DetectorType = 294 // Not yet implemented + DetectorType_Juro DetectorType = 295 + DetectorType_KarmaCRM DetectorType = 296 + DetectorType_Metrilo DetectorType = 297 + DetectorType_Pandadoc DetectorType = 298 + DetectorType_RevampCRM DetectorType = 299 + DetectorType_Salescookie DetectorType = 300 + DetectorType_Alconost DetectorType = 301 + DetectorType_Blogger DetectorType = 302 + DetectorType_Accuweather DetectorType = 303 + // Deprecated: Marked as deprecated in detector_type.proto. + DetectorType_Opengraphr DetectorType = 304 + DetectorType_Rawg DetectorType = 305 + DetectorType_Riotgames DetectorType = 306 // Not yet implemented + DetectorType_Clientary DetectorType = 307 + DetectorType_Stormglass DetectorType = 308 + DetectorType_Tomtom DetectorType = 309 + DetectorType_Twitch DetectorType = 310 + DetectorType_Documo DetectorType = 311 + DetectorType_Cloudways DetectorType = 312 // Not yet implemented + DetectorType_Veevavault DetectorType = 313 // Not yet implemented + DetectorType_KiteConnect DetectorType = 314 // Not yet implemented + DetectorType_ShopeeOpenPlatform DetectorType = 315 // Not yet implemented + DetectorType_TeamViewer DetectorType = 316 // Not yet implemented + DetectorType_Bulbul DetectorType = 317 + DetectorType_CentralStationCRM DetectorType = 318 + DetectorType_Teamgate DetectorType = 319 + DetectorType_Axonaut DetectorType = 320 + DetectorType_Tyntec DetectorType = 321 + DetectorType_Appcues DetectorType = 322 + DetectorType_Autoklose DetectorType = 323 + DetectorType_Cloudplan DetectorType = 324 + DetectorType_Dotdigital DetectorType = 325 + DetectorType_GetEmail DetectorType = 326 + DetectorType_GetEmails DetectorType = 327 + DetectorType_Kontent DetectorType = 328 + DetectorType_Leadfeeder DetectorType = 329 + DetectorType_Raven DetectorType = 330 + DetectorType_RocketReach DetectorType = 331 + DetectorType_Uplead DetectorType = 332 + DetectorType_Brandfetch DetectorType = 333 + DetectorType_Clearbit DetectorType = 334 + DetectorType_Crowdin DetectorType = 335 + DetectorType_Mapquest DetectorType = 336 + DetectorType_Noticeable DetectorType = 337 + DetectorType_Onbuka DetectorType = 338 // Not yet implemented + DetectorType_Todoist DetectorType = 339 + DetectorType_Storychief DetectorType = 340 + DetectorType_LinkedIn DetectorType = 341 // Not yet implemented + DetectorType_YouSign DetectorType = 342 + DetectorType_Docker DetectorType = 343 + DetectorType_Telesign DetectorType = 344 // Not yet implemented + DetectorType_Spoonacular DetectorType = 345 + DetectorType_Aerisweather DetectorType = 346 // Not yet implemented + DetectorType_Alphavantage DetectorType = 347 // Not yet implemented + DetectorType_Imgur DetectorType = 348 // Not yet implemented + DetectorType_Imagga DetectorType = 349 + DetectorType_SMSApi DetectorType = 350 // Not yet implemented + DetectorType_Distribusion DetectorType = 351 // Not yet implemented + // Deprecated: Marked as deprecated in detector_type.proto. + DetectorType_Blablabus DetectorType = 352 + DetectorType_WordsApi DetectorType = 353 // Not yet implemented + DetectorType_Currencylayer DetectorType = 354 + DetectorType_Html2Pdf DetectorType = 355 + DetectorType_IPGeolocation DetectorType = 356 + DetectorType_Owlbot DetectorType = 357 + DetectorType_Cloudmersive DetectorType = 358 + DetectorType_Dynalist DetectorType = 359 + DetectorType_ExchangeRateAPI DetectorType = 360 + DetectorType_HolidayAPI DetectorType = 361 + DetectorType_Ipapi DetectorType = 362 + DetectorType_Marketstack DetectorType = 363 + DetectorType_Nutritionix DetectorType = 364 + DetectorType_Swell DetectorType = 365 + DetectorType_ClickupPersonalToken DetectorType = 366 + // Deprecated: Marked as deprecated in detector_type.proto. + DetectorType_Nitro DetectorType = 367 + DetectorType_Rev DetectorType = 368 + DetectorType_RunRunIt DetectorType = 369 + DetectorType_Typeform DetectorType = 370 + DetectorType_Mixpanel DetectorType = 371 + DetectorType_Tradier DetectorType = 372 + DetectorType_Verifier DetectorType = 373 + DetectorType_Vouchery DetectorType = 374 + DetectorType_Alegra DetectorType = 375 + DetectorType_Audd DetectorType = 376 + DetectorType_Baremetrics DetectorType = 377 + DetectorType_Coinlib DetectorType = 378 + DetectorType_ExchangeRatesAPI DetectorType = 379 + DetectorType_CurrencyScoop DetectorType = 380 + DetectorType_FXMarket DetectorType = 381 + DetectorType_CurrencyCloud DetectorType = 382 + DetectorType_GetGeoAPI DetectorType = 383 + DetectorType_Abstract DetectorType = 384 + DetectorType_Billomat DetectorType = 385 + DetectorType_Dovico DetectorType = 386 + DetectorType_Bitbar DetectorType = 387 + DetectorType_Bugsnag DetectorType = 388 + DetectorType_AssemblyAI DetectorType = 389 + DetectorType_AdafruitIO DetectorType = 390 + DetectorType_Apify DetectorType = 391 + DetectorType_CoinGecko DetectorType = 392 // Not yet implemented + DetectorType_CryptoCompare DetectorType = 393 + DetectorType_Fullstory DetectorType = 394 + DetectorType_HelloSign DetectorType = 395 + DetectorType_Loyverse DetectorType = 396 + DetectorType_NetCore DetectorType = 397 // Not yet implemented + DetectorType_SauceLabs DetectorType = 398 + DetectorType_AlienVault DetectorType = 399 + DetectorType_Apiflash DetectorType = 401 + DetectorType_Coinlayer DetectorType = 402 + DetectorType_CurrentsAPI DetectorType = 403 + DetectorType_DataGov DetectorType = 404 + DetectorType_Enigma DetectorType = 405 + DetectorType_FinancialModelingPrep DetectorType = 406 + DetectorType_Geocodio DetectorType = 407 + DetectorType_HereAPI DetectorType = 408 + // Deprecated: Marked as deprecated in detector_type.proto. + DetectorType_Macaddress DetectorType = 409 + DetectorType_OOPSpam DetectorType = 410 + DetectorType_ProtocolsIO DetectorType = 411 + DetectorType_ScraperAPI DetectorType = 412 + DetectorType_SecurityTrails DetectorType = 413 + DetectorType_TomorrowIO DetectorType = 414 + DetectorType_WorldCoinIndex DetectorType = 415 + DetectorType_FacePlusPlus DetectorType = 416 + DetectorType_Voicegain DetectorType = 417 + DetectorType_Deepgram DetectorType = 418 + DetectorType_VisualCrossing DetectorType = 419 + DetectorType_Finnhub DetectorType = 420 + DetectorType_Tiingo DetectorType = 421 + DetectorType_RingCentral DetectorType = 422 + DetectorType_Finage DetectorType = 423 + DetectorType_Edamam DetectorType = 424 + DetectorType_HypeAuditor DetectorType = 425 // Not yet implemented + DetectorType_Gengo DetectorType = 426 + DetectorType_Front DetectorType = 427 + DetectorType_Fleetbase DetectorType = 428 + DetectorType_Bubble DetectorType = 429 // Not yet implemented + DetectorType_Bannerbear DetectorType = 430 + DetectorType_Adzuna DetectorType = 431 + DetectorType_BitcoinAverage DetectorType = 432 + DetectorType_CommerceJS DetectorType = 433 + DetectorType_DetectLanguage DetectorType = 434 + // Deprecated: Marked as deprecated in detector_type.proto. + DetectorType_FakeJSON DetectorType = 435 + DetectorType_Graphhopper DetectorType = 436 + DetectorType_Lexigram DetectorType = 437 + DetectorType_LinkPreview DetectorType = 438 + DetectorType_Numverify DetectorType = 439 + DetectorType_ProxyCrawl DetectorType = 440 + DetectorType_ZipCodeAPI DetectorType = 441 + DetectorType_Cometchat DetectorType = 442 // Not yet implemented + DetectorType_Keygen DetectorType = 443 // Not yet implemented + DetectorType_Mixcloud DetectorType = 444 // Not yet implemented + DetectorType_TatumIO DetectorType = 445 + DetectorType_Tmetric DetectorType = 446 + // Deprecated: Marked as deprecated in detector_type.proto. + DetectorType_Lastfm DetectorType = 447 + DetectorType_Browshot DetectorType = 448 + DetectorType_JSONbin DetectorType = 449 // Not yet implemented + DetectorType_LocationIQ DetectorType = 450 + DetectorType_ScreenshotAPI DetectorType = 451 + DetectorType_WeatherStack DetectorType = 452 + DetectorType_Amadeus DetectorType = 453 + DetectorType_FourSquare DetectorType = 454 + DetectorType_Flickr DetectorType = 455 + DetectorType_ClickHelp DetectorType = 456 + DetectorType_Ambee DetectorType = 457 + DetectorType_Api2Cart DetectorType = 458 + DetectorType_Hypertrack DetectorType = 459 + DetectorType_KakaoTalk DetectorType = 460 // Not yet implemented + DetectorType_RiteKit DetectorType = 461 + DetectorType_Shutterstock DetectorType = 462 + // Deprecated: Marked as deprecated in detector_type.proto. + DetectorType_Text2Data DetectorType = 463 + DetectorType_YouNeedABudget DetectorType = 464 + DetectorType_Cricket DetectorType = 465 // Not yet implemented + DetectorType_Filestack DetectorType = 466 // Not yet implemented + DetectorType_Gyazo DetectorType = 467 + DetectorType_Mavenlink DetectorType = 468 + DetectorType_Sheety DetectorType = 469 + DetectorType_Sportsmonk DetectorType = 470 + DetectorType_Stockdata DetectorType = 471 + DetectorType_Unsplash DetectorType = 472 + DetectorType_Allsports DetectorType = 473 + DetectorType_CalorieNinja DetectorType = 474 + DetectorType_WalkScore DetectorType = 475 + DetectorType_Strava DetectorType = 476 + DetectorType_Cicero DetectorType = 477 + DetectorType_IPQuality DetectorType = 478 + DetectorType_ParallelDots DetectorType = 479 + DetectorType_Roaring DetectorType = 480 + DetectorType_Mailsac DetectorType = 481 + DetectorType_Whoxy DetectorType = 482 + DetectorType_WorldWeather DetectorType = 483 + DetectorType_ApiFonica DetectorType = 484 + DetectorType_Aylien DetectorType = 485 + DetectorType_Geocode DetectorType = 486 + DetectorType_IconFinder DetectorType = 487 + // Deprecated: Marked as deprecated in detector_type.proto. + DetectorType_Ipify DetectorType = 488 + DetectorType_LanguageLayer DetectorType = 489 + DetectorType_Lob DetectorType = 490 + // Deprecated: Marked as deprecated in detector_type.proto. + DetectorType_OnWaterIO DetectorType = 491 + DetectorType_Pastebin DetectorType = 492 + DetectorType_PdfLayer DetectorType = 493 + DetectorType_Pixabay DetectorType = 494 + DetectorType_ReadMe DetectorType = 495 + DetectorType_VatLayer DetectorType = 496 + DetectorType_VirusTotal DetectorType = 497 + DetectorType_AirVisual DetectorType = 498 + DetectorType_Currencyfreaks DetectorType = 499 + DetectorType_Duffel DetectorType = 500 // Not yet implemented + DetectorType_FlatIO DetectorType = 501 + DetectorType_M3o DetectorType = 502 + DetectorType_Mesibo DetectorType = 503 + DetectorType_Openuv DetectorType = 504 + DetectorType_Snipcart DetectorType = 505 + DetectorType_Besttime DetectorType = 506 + DetectorType_Happyscribe DetectorType = 507 + DetectorType_Humanity DetectorType = 508 + DetectorType_Impala DetectorType = 509 + DetectorType_Loginradius DetectorType = 510 + DetectorType_AutoPilot DetectorType = 511 + DetectorType_Bitmex DetectorType = 512 + DetectorType_ClustDoc DetectorType = 513 + DetectorType_Messari DetectorType = 514 // Not yet implemented + DetectorType_PdfShift DetectorType = 515 + DetectorType_Poloniex DetectorType = 516 + DetectorType_RestpackHtmlToPdfAPI DetectorType = 517 + DetectorType_RestpackScreenshotAPI DetectorType = 518 + DetectorType_ShutterstockOAuth DetectorType = 519 + DetectorType_SkyBiometry DetectorType = 520 + DetectorType_AbuseIPDB DetectorType = 521 + DetectorType_AletheiaApi DetectorType = 522 + DetectorType_BlitApp DetectorType = 523 + DetectorType_Censys DetectorType = 524 + DetectorType_Cloverly DetectorType = 525 + DetectorType_CountryLayer DetectorType = 526 + DetectorType_FileIO DetectorType = 527 + DetectorType_FlightApi DetectorType = 528 + DetectorType_Geoapify DetectorType = 529 + DetectorType_IPinfoDB DetectorType = 530 + DetectorType_MediaStack DetectorType = 531 + DetectorType_NasdaqDataLink DetectorType = 532 + DetectorType_OpenCageData DetectorType = 533 + DetectorType_Paymongo DetectorType = 534 + DetectorType_PositionStack DetectorType = 535 + DetectorType_Rebrandly DetectorType = 536 + DetectorType_ScreenshotLayer DetectorType = 537 + DetectorType_Stytch DetectorType = 538 + DetectorType_Unplugg DetectorType = 539 + DetectorType_UPCDatabase DetectorType = 540 + DetectorType_UserStack DetectorType = 541 + DetectorType_Geocodify DetectorType = 542 + DetectorType_Newscatcher DetectorType = 543 + DetectorType_Nicereply DetectorType = 544 + DetectorType_Partnerstack DetectorType = 545 + DetectorType_Route4me DetectorType = 546 + DetectorType_Scrapeowl DetectorType = 547 + DetectorType_ScrapingDog DetectorType = 548 // Not yet implemented + DetectorType_Streak DetectorType = 549 + DetectorType_Veriphone DetectorType = 550 + DetectorType_Webscraping DetectorType = 551 + DetectorType_Zenscrape DetectorType = 552 + DetectorType_Zenserp DetectorType = 553 + DetectorType_CoinApi DetectorType = 554 + DetectorType_Gitter DetectorType = 555 + DetectorType_Host DetectorType = 556 + DetectorType_Iexcloud DetectorType = 557 + // Deprecated: Marked as deprecated in detector_type.proto. + DetectorType_Restpack DetectorType = 558 + DetectorType_ScraperBox DetectorType = 559 + DetectorType_ScrapingAnt DetectorType = 560 + DetectorType_SerpStack DetectorType = 561 + DetectorType_SmartyStreets DetectorType = 562 + DetectorType_TicketMaster DetectorType = 563 + DetectorType_AviationStack DetectorType = 564 + DetectorType_BombBomb DetectorType = 565 + DetectorType_Commodities DetectorType = 566 + DetectorType_Dfuse DetectorType = 567 + DetectorType_EdenAI DetectorType = 568 + DetectorType_Glassnode DetectorType = 569 + DetectorType_Guru DetectorType = 570 + DetectorType_Hive DetectorType = 571 + DetectorType_Hiveage DetectorType = 572 + DetectorType_Kickbox DetectorType = 573 + // Deprecated: Marked as deprecated in detector_type.proto. + DetectorType_Passbase DetectorType = 574 + DetectorType_PostageApp DetectorType = 575 + DetectorType_PureStake DetectorType = 576 + DetectorType_Qubole DetectorType = 577 + DetectorType_CarbonInterface DetectorType = 578 + DetectorType_Intrinio DetectorType = 579 + // Deprecated: Marked as deprecated in detector_type.proto. + DetectorType_QuickMetrics DetectorType = 580 + DetectorType_ScrapeStack DetectorType = 581 + DetectorType_TechnicalAnalysisApi DetectorType = 582 + DetectorType_Urlscan DetectorType = 583 + DetectorType_BaseApiIO DetectorType = 584 // Not yet implemented + DetectorType_DailyCO DetectorType = 585 + DetectorType_TLy DetectorType = 586 + DetectorType_Shortcut DetectorType = 587 + DetectorType_Appfollow DetectorType = 588 + DetectorType_Thinkific DetectorType = 589 + DetectorType_Feedly DetectorType = 590 // Not yet implemented + DetectorType_Stitchdata DetectorType = 591 + DetectorType_Fetchrss DetectorType = 592 + DetectorType_Signupgenius DetectorType = 593 + DetectorType_Signaturit DetectorType = 594 + DetectorType_Optimizely DetectorType = 595 + DetectorType_OcrSpace DetectorType = 596 // Not yet implemented + DetectorType_WeatherBit DetectorType = 597 + DetectorType_BuddyNS DetectorType = 598 + DetectorType_ZipAPI DetectorType = 599 + DetectorType_ZipBooks DetectorType = 600 + DetectorType_Onedesk DetectorType = 601 + DetectorType_Bugherd DetectorType = 602 + DetectorType_Blazemeter DetectorType = 603 + DetectorType_Autodesk DetectorType = 604 + DetectorType_Tru DetectorType = 605 + DetectorType_UnifyID DetectorType = 606 + DetectorType_Trimble DetectorType = 607 // Not yet implemented + DetectorType_Smooch DetectorType = 608 + DetectorType_Semaphore DetectorType = 609 + DetectorType_Telnyx DetectorType = 610 + DetectorType_Signalwire DetectorType = 611 + DetectorType_Textmagic DetectorType = 612 + DetectorType_Serphouse DetectorType = 613 + DetectorType_Planyo DetectorType = 614 + DetectorType_Simplybook DetectorType = 615 // Not yet implemented + DetectorType_Vyte DetectorType = 616 + DetectorType_Nylas DetectorType = 617 + DetectorType_Squareup DetectorType = 618 + DetectorType_Dandelion DetectorType = 619 + // Deprecated: Marked as deprecated in detector_type.proto. + DetectorType_DataFire DetectorType = 620 + DetectorType_DeepAI DetectorType = 621 + DetectorType_MeaningCloud DetectorType = 622 + DetectorType_NeutrinoApi DetectorType = 623 + DetectorType_Storecove DetectorType = 624 + DetectorType_Shipday DetectorType = 625 + // Deprecated: Marked as deprecated in detector_type.proto. + DetectorType_Sentiment DetectorType = 626 + DetectorType_StreamChatMessaging DetectorType = 627 // Not yet implemented + DetectorType_TeamworkCRM DetectorType = 628 + DetectorType_TeamworkDesk DetectorType = 629 + DetectorType_TeamworkSpaces DetectorType = 630 + DetectorType_TheOddsApi DetectorType = 631 + DetectorType_Apacta DetectorType = 632 + DetectorType_GetSandbox DetectorType = 633 + // Deprecated: Marked as deprecated in detector_type.proto. + DetectorType_Happi DetectorType = 634 + DetectorType_Oanda DetectorType = 635 + DetectorType_FastForex DetectorType = 636 + DetectorType_APIMatic DetectorType = 637 + DetectorType_VersionEye DetectorType = 638 + DetectorType_EagleEyeNetworks DetectorType = 639 + DetectorType_ThousandEyes DetectorType = 640 + DetectorType_SelectPDF DetectorType = 641 + DetectorType_Flightstats DetectorType = 642 + DetectorType_ChecIO DetectorType = 643 + DetectorType_Manifest DetectorType = 644 + // Deprecated: Marked as deprecated in detector_type.proto. + DetectorType_ApiScience DetectorType = 645 + DetectorType_AppSynergy DetectorType = 646 + DetectorType_Caflou DetectorType = 647 + DetectorType_Caspio DetectorType = 648 + DetectorType_ChecklyHQ DetectorType = 649 + DetectorType_CloudElements DetectorType = 650 + DetectorType_DronaHQ DetectorType = 651 + DetectorType_Enablex DetectorType = 652 + DetectorType_Fmfw DetectorType = 653 + DetectorType_GoodDay DetectorType = 654 + DetectorType_Luno DetectorType = 655 + DetectorType_Meistertask DetectorType = 656 + DetectorType_Mindmeister DetectorType = 657 + DetectorType_PeopleDataLabs DetectorType = 658 + // Deprecated: Marked as deprecated in detector_type.proto. + DetectorType_ScraperSite DetectorType = 659 + DetectorType_Scrapfly DetectorType = 660 + DetectorType_SimplyNoted DetectorType = 661 + DetectorType_TravelPayouts DetectorType = 662 + DetectorType_WebScraper DetectorType = 663 + DetectorType_Convier DetectorType = 664 + DetectorType_Courier DetectorType = 665 + DetectorType_Ditto DetectorType = 666 + DetectorType_Findl DetectorType = 667 + DetectorType_Lendflow DetectorType = 668 + DetectorType_Moderation DetectorType = 669 + DetectorType_Opendatasoft DetectorType = 670 // Not yet implemented + DetectorType_Podio DetectorType = 671 + // Deprecated: Marked as deprecated in detector_type.proto. + DetectorType_Rockset DetectorType = 672 + DetectorType_Rownd DetectorType = 673 + DetectorType_Shotstack DetectorType = 674 + DetectorType_Swiftype DetectorType = 675 + DetectorType_Twitter DetectorType = 676 + DetectorType_Honey DetectorType = 677 + DetectorType_Freshdesk DetectorType = 678 + DetectorType_Upwave DetectorType = 679 + DetectorType_Fountain DetectorType = 680 // Not yet implemented + DetectorType_Freshbooks DetectorType = 681 + DetectorType_Mite DetectorType = 682 + DetectorType_Deputy DetectorType = 683 + DetectorType_Beebole DetectorType = 684 + DetectorType_Cashboard DetectorType = 685 + DetectorType_Kanban DetectorType = 686 + DetectorType_Worksnaps DetectorType = 687 + DetectorType_MyIntervals DetectorType = 688 + DetectorType_InvoiceOcean DetectorType = 689 + DetectorType_Sherpadesk DetectorType = 690 + DetectorType_Mrticktock DetectorType = 691 + DetectorType_Chatfule DetectorType = 692 + DetectorType_Aeroworkflow DetectorType = 693 + DetectorType_Emailoctopus DetectorType = 694 // Not yet implemented + // Deprecated: Marked as deprecated in detector_type.proto. + DetectorType_Fusebill DetectorType = 695 + DetectorType_Geckoboard DetectorType = 696 + DetectorType_Gosquared DetectorType = 697 // Not yet implemented + DetectorType_Moonclerk DetectorType = 698 + DetectorType_Paymoapp DetectorType = 699 + DetectorType_Mixmax DetectorType = 700 + DetectorType_Processst DetectorType = 701 // Not yet implemented + DetectorType_Repairshopr DetectorType = 702 + DetectorType_Goshippo DetectorType = 703 // Not yet implemented + DetectorType_Sigopt DetectorType = 704 + DetectorType_Sugester DetectorType = 705 + DetectorType_Viewneo DetectorType = 706 + DetectorType_BoostNote DetectorType = 707 + DetectorType_CaptainData DetectorType = 708 + DetectorType_Checkvist DetectorType = 709 + DetectorType_Cliengo DetectorType = 710 + DetectorType_Cloze DetectorType = 711 + DetectorType_FormIO DetectorType = 712 + DetectorType_FormBucket DetectorType = 713 + DetectorType_GoCanvas DetectorType = 714 + DetectorType_MadKudu DetectorType = 715 + DetectorType_NozbeTeams DetectorType = 716 + DetectorType_Papyrs DetectorType = 717 // Not yet implemented + DetectorType_SuperNotesAPI DetectorType = 718 + DetectorType_Tallyfy DetectorType = 719 + DetectorType_ZenkitAPI DetectorType = 720 + DetectorType_CloudImage DetectorType = 721 + DetectorType_UploadCare DetectorType = 722 + DetectorType_Borgbase DetectorType = 723 + DetectorType_Pipedream DetectorType = 724 + DetectorType_Sirv DetectorType = 725 + DetectorType_Diffbot DetectorType = 726 + DetectorType_EightxEight DetectorType = 727 + DetectorType_Sendoso DetectorType = 728 // Not yet implemented + DetectorType_Printfection DetectorType = 729 // Not yet implemented + DetectorType_Authorize DetectorType = 730 // Not yet implemented + DetectorType_PandaScore DetectorType = 731 + DetectorType_Paymo DetectorType = 732 + DetectorType_AvazaPersonalAccessToken DetectorType = 733 + DetectorType_PlanviewLeanKit DetectorType = 734 + DetectorType_Livestorm DetectorType = 735 + DetectorType_KuCoin DetectorType = 736 + DetectorType_MetaAPI DetectorType = 737 + DetectorType_NiceHash DetectorType = 738 // Not yet implemented + DetectorType_CexIO DetectorType = 739 + DetectorType_Klipfolio DetectorType = 740 + DetectorType_Dynatrace DetectorType = 741 // Not yet implemented + DetectorType_MollieAPIKey DetectorType = 742 // Not yet implemented + DetectorType_MollieAccessToken DetectorType = 743 // Not yet implemented + DetectorType_BasisTheory DetectorType = 744 // Not yet implemented + DetectorType_Nordigen DetectorType = 745 // Not yet implemented + DetectorType_FlagsmithEnvironmentKey DetectorType = 746 // Not yet implemented + DetectorType_FlagsmithToken DetectorType = 747 // Not yet implemented + DetectorType_Mux DetectorType = 748 + DetectorType_Column DetectorType = 749 + DetectorType_Sendbird DetectorType = 750 + DetectorType_SendbirdOrganizationAPI DetectorType = 751 + DetectorType_Midise DetectorType = 752 // Not yet implemented + DetectorType_Mockaroo DetectorType = 753 + DetectorType_Image4 DetectorType = 754 // Not yet implemented + DetectorType_Pinata DetectorType = 755 + DetectorType_BrowserStack DetectorType = 756 + // Deprecated: Marked as deprecated in detector_type.proto. + DetectorType_CrossBrowserTesting DetectorType = 757 + DetectorType_Loadmill DetectorType = 758 + DetectorType_TestingBot DetectorType = 759 + DetectorType_KnapsackPro DetectorType = 760 + DetectorType_Qase DetectorType = 761 + DetectorType_Dareboost DetectorType = 762 + DetectorType_GTMetrix DetectorType = 763 + DetectorType_Holistic DetectorType = 764 + DetectorType_Parsers DetectorType = 765 + DetectorType_ScrutinizerCi DetectorType = 766 + DetectorType_SonarCloud DetectorType = 767 + DetectorType_APITemplate DetectorType = 768 + DetectorType_ConversionTools DetectorType = 769 + DetectorType_CraftMyPDF DetectorType = 770 + DetectorType_ExportSDK DetectorType = 771 + // Deprecated: Marked as deprecated in detector_type.proto. + DetectorType_GlitterlyAPI DetectorType = 772 + DetectorType_Hybiscus DetectorType = 773 + DetectorType_Miro DetectorType = 774 + DetectorType_Statuspage DetectorType = 775 + DetectorType_Statuspal DetectorType = 776 + DetectorType_Teletype DetectorType = 777 + DetectorType_TimeCamp DetectorType = 778 + DetectorType_Userflow DetectorType = 779 + DetectorType_Wistia DetectorType = 780 + // Deprecated: Marked as deprecated in detector_type.proto. + DetectorType_SportRadar DetectorType = 781 + DetectorType_UptimeRobot DetectorType = 782 + DetectorType_Codequiry DetectorType = 783 + DetectorType_ExtractorAPI DetectorType = 784 + DetectorType_Signable DetectorType = 785 + DetectorType_MagicBell DetectorType = 786 + DetectorType_Stormboard DetectorType = 787 + DetectorType_Apilayer DetectorType = 788 + DetectorType_Disqus DetectorType = 789 + DetectorType_Woopra DetectorType = 790 // Not yet implemented + DetectorType_Paperform DetectorType = 791 + DetectorType_Gumroad DetectorType = 792 + DetectorType_Paydirtapp DetectorType = 793 + DetectorType_Detectify DetectorType = 794 + DetectorType_Statuscake DetectorType = 795 + DetectorType_Jumpseller DetectorType = 796 // Not yet implemented + DetectorType_LunchMoney DetectorType = 797 + DetectorType_Rosette DetectorType = 798 // Not yet implemented + DetectorType_Yelp DetectorType = 799 + DetectorType_Atera DetectorType = 800 + DetectorType_EcoStruxureIT DetectorType = 801 + DetectorType_Aha DetectorType = 802 + DetectorType_Parsehub DetectorType = 803 + DetectorType_PackageCloud DetectorType = 804 + DetectorType_Cloudsmith DetectorType = 805 + // Deprecated: Marked as deprecated in detector_type.proto. + DetectorType_Flowdash DetectorType = 806 + // Deprecated: Marked as deprecated in detector_type.proto. + DetectorType_Flowdock DetectorType = 807 + DetectorType_Fibery DetectorType = 808 + DetectorType_Typetalk DetectorType = 809 + DetectorType_VoodooSMS DetectorType = 810 + DetectorType_ZulipChat DetectorType = 811 + DetectorType_Formcraft DetectorType = 812 + DetectorType_Iexapis DetectorType = 813 + DetectorType_Reachmail DetectorType = 814 + DetectorType_Chartmogul DetectorType = 815 + DetectorType_Appointedd DetectorType = 816 + DetectorType_Wit DetectorType = 817 + DetectorType_RechargePayments DetectorType = 818 + DetectorType_Diggernaut DetectorType = 819 + DetectorType_MonkeyLearn DetectorType = 820 + DetectorType_Duply DetectorType = 821 + DetectorType_Postbacks DetectorType = 822 + DetectorType_Collect2 DetectorType = 823 + DetectorType_ZenRows DetectorType = 824 + DetectorType_Zipcodebase DetectorType = 825 + DetectorType_Tefter DetectorType = 826 + DetectorType_Twist DetectorType = 827 + DetectorType_BraintreePayments DetectorType = 828 + DetectorType_CloudConvert DetectorType = 829 + DetectorType_Grafana DetectorType = 830 + DetectorType_ConvertApi DetectorType = 831 + DetectorType_Transferwise DetectorType = 832 + DetectorType_Bulksms DetectorType = 833 + DetectorType_Databox DetectorType = 834 + DetectorType_Onesignal DetectorType = 835 + DetectorType_Rentman DetectorType = 836 + DetectorType_Parseur DetectorType = 837 + DetectorType_Docparser DetectorType = 838 + DetectorType_Formsite DetectorType = 839 + DetectorType_Tickettailor DetectorType = 840 + DetectorType_Lemlist DetectorType = 841 + DetectorType_Prodpad DetectorType = 842 + DetectorType_Formstack DetectorType = 843 // Not yet implemented + DetectorType_Codeclimate DetectorType = 844 + DetectorType_Codemagic DetectorType = 845 + DetectorType_Vbout DetectorType = 846 + DetectorType_Nightfall DetectorType = 847 + DetectorType_FlightLabs DetectorType = 848 + DetectorType_SpeechTextAI DetectorType = 849 + DetectorType_PollsAPI DetectorType = 850 + DetectorType_SimFin DetectorType = 851 + DetectorType_Scalr DetectorType = 852 + DetectorType_Kanbantool DetectorType = 853 + DetectorType_Brightlocal DetectorType = 854 // Not yet implemented + DetectorType_Hotwire DetectorType = 855 // Not yet implemented + DetectorType_Instabot DetectorType = 856 + DetectorType_Timekit DetectorType = 857 // Not yet implemented + DetectorType_Interseller DetectorType = 858 + DetectorType_Mojohelpdesk DetectorType = 859 // Not yet implemented + DetectorType_Createsend DetectorType = 860 // Not yet implemented + DetectorType_Getresponse DetectorType = 861 + DetectorType_Dynadot DetectorType = 862 // Not yet implemented + DetectorType_Demio DetectorType = 863 + DetectorType_Tokeet DetectorType = 864 + DetectorType_Myexperiment DetectorType = 865 // Not yet implemented + DetectorType_Copyscape DetectorType = 866 // Not yet implemented + DetectorType_Besnappy DetectorType = 867 + DetectorType_Salesmate DetectorType = 868 + // Deprecated: Marked as deprecated in detector_type.proto. + DetectorType_Heatmapapi DetectorType = 869 + DetectorType_Websitepulse DetectorType = 870 + DetectorType_Uclassify DetectorType = 871 + DetectorType_Convert DetectorType = 872 + DetectorType_PDFmyURL DetectorType = 873 // Not yet implemented + DetectorType_Api2Convert DetectorType = 874 // Not yet implemented + DetectorType_Opsgenie DetectorType = 875 + DetectorType_Gemini DetectorType = 876 + DetectorType_Honeycomb DetectorType = 877 + DetectorType_KalturaAppToken DetectorType = 878 // Not yet implemented + DetectorType_KalturaSession DetectorType = 879 // Not yet implemented + DetectorType_BitGo DetectorType = 880 // Not yet implemented + DetectorType_Optidash DetectorType = 881 // Not yet implemented + DetectorType_Imgix DetectorType = 882 // Not yet implemented + DetectorType_ImageToText DetectorType = 883 // Not yet implemented + DetectorType_Page2Images DetectorType = 884 // Not yet implemented + DetectorType_Quickbase DetectorType = 885 // Not yet implemented + DetectorType_Redbooth DetectorType = 886 // Not yet implemented + DetectorType_Nubela DetectorType = 887 // Not yet implemented + DetectorType_Infobip DetectorType = 888 // Not yet implemented + DetectorType_Uproc DetectorType = 889 // Not yet implemented + DetectorType_Supportbee DetectorType = 890 // Not yet implemented + DetectorType_Aftership DetectorType = 891 // Not yet implemented + DetectorType_Edusign DetectorType = 892 // Not yet implemented + DetectorType_Teamup DetectorType = 893 // Not yet implemented + DetectorType_Workday DetectorType = 894 // Not yet implemented + DetectorType_MongoDB DetectorType = 895 + DetectorType_NGC DetectorType = 896 + DetectorType_DigitalOceanV2 DetectorType = 897 + DetectorType_SQLServer DetectorType = 898 + DetectorType_FTP DetectorType = 899 + DetectorType_Redis DetectorType = 900 + DetectorType_LDAP DetectorType = 901 + DetectorType_Shopify DetectorType = 902 + DetectorType_RabbitMQ DetectorType = 903 + DetectorType_CustomRegex DetectorType = 904 + DetectorType_Etherscan DetectorType = 905 + DetectorType_Infura DetectorType = 906 + DetectorType_Alchemy DetectorType = 907 + DetectorType_BlockNative DetectorType = 908 + DetectorType_Moralis DetectorType = 909 + DetectorType_BscScan DetectorType = 910 + // Deprecated: Marked as deprecated in detector_type.proto. + DetectorType_CoinMarketCap DetectorType = 911 + DetectorType_Percy DetectorType = 912 + DetectorType_TinesWebhook DetectorType = 913 + DetectorType_Pulumi DetectorType = 914 + DetectorType_SupabaseToken DetectorType = 915 + DetectorType_NuGetApiKey DetectorType = 916 + DetectorType_Aiven DetectorType = 917 + DetectorType_Prefect DetectorType = 918 + DetectorType_Docusign DetectorType = 919 + DetectorType_Couchbase DetectorType = 920 + DetectorType_Dockerhub DetectorType = 921 + DetectorType_TrufflehogEnterprise DetectorType = 922 + DetectorType_EnvoyApiKey DetectorType = 923 + DetectorType_GitHubOauth2 DetectorType = 924 + DetectorType_Salesforce DetectorType = 925 + DetectorType_HuggingFace DetectorType = 926 + DetectorType_Snowflake DetectorType = 927 + DetectorType_Sourcegraph DetectorType = 928 + DetectorType_Tailscale DetectorType = 929 + DetectorType_Web3Storage DetectorType = 930 + DetectorType_AzureStorage DetectorType = 931 + DetectorType_PlanetScaleDb DetectorType = 932 + DetectorType_Anthropic DetectorType = 933 + DetectorType_Ramp DetectorType = 934 + DetectorType_Klaviyo DetectorType = 935 + DetectorType_SourcegraphCody DetectorType = 936 + DetectorType_Voiceflow DetectorType = 937 + DetectorType_Privacy DetectorType = 938 + DetectorType_IPInfo DetectorType = 939 + DetectorType_Ip2location DetectorType = 940 + DetectorType_Instamojo DetectorType = 941 + DetectorType_Portainer DetectorType = 942 + DetectorType_PortainerToken DetectorType = 943 + DetectorType_Loggly DetectorType = 944 + DetectorType_OpenVpn DetectorType = 945 + DetectorType_VagrantCloudPersonalToken DetectorType = 946 + DetectorType_BetterStack DetectorType = 947 + DetectorType_ZeroTier DetectorType = 948 + DetectorType_AppOptics DetectorType = 949 + DetectorType_Metabase DetectorType = 950 + // Deprecated: Marked as deprecated in detector_type.proto. + DetectorType_CoinbaseWaaS DetectorType = 951 + DetectorType_LemonSqueezy DetectorType = 952 + DetectorType_Budibase DetectorType = 953 + DetectorType_DenoDeploy DetectorType = 954 + DetectorType_Stripo DetectorType = 955 + DetectorType_ReplyIO DetectorType = 956 + DetectorType_AzureBatch DetectorType = 957 + DetectorType_AzureContainerRegistry DetectorType = 958 + DetectorType_AWSSessionKey DetectorType = 959 + DetectorType_Coda DetectorType = 960 + DetectorType_LogzIO DetectorType = 961 + DetectorType_Eventbrite DetectorType = 962 + DetectorType_GrafanaServiceAccount DetectorType = 963 + DetectorType_RequestFinance DetectorType = 964 + DetectorType_Overloop DetectorType = 965 + DetectorType_Ngrok DetectorType = 966 + DetectorType_Replicate DetectorType = 967 + DetectorType_Postgres DetectorType = 968 + DetectorType_AzureActiveDirectoryApplicationSecret DetectorType = 969 + DetectorType_AzureCacheForRedisAccessKey DetectorType = 970 + DetectorType_AzureCosmosDBKeyIdentifiable DetectorType = 971 + DetectorType_AzureDevopsPersonalAccessToken DetectorType = 972 + DetectorType_AzureFunctionKey DetectorType = 973 + DetectorType_AzureMLWebServiceClassicIdentifiableKey DetectorType = 974 + DetectorType_AzureSasToken DetectorType = 975 + DetectorType_AzureSearchAdminKey DetectorType = 976 + DetectorType_AzureSearchQueryKey DetectorType = 977 + DetectorType_AzureManagementCertificate DetectorType = 978 + DetectorType_AzureSQL DetectorType = 979 + DetectorType_FlyIO DetectorType = 980 + DetectorType_BuiltWith DetectorType = 981 + DetectorType_JupiterOne DetectorType = 982 + DetectorType_GCPApplicationDefaultCredentials DetectorType = 983 + DetectorType_Wiz DetectorType = 984 + DetectorType_Pagarme DetectorType = 985 + DetectorType_Onfleet DetectorType = 986 + DetectorType_Intra42 DetectorType = 987 + DetectorType_Groq DetectorType = 988 + DetectorType_TwitterConsumerkey DetectorType = 989 + DetectorType_Eraser DetectorType = 990 + DetectorType_LarkSuite DetectorType = 991 + DetectorType_LarkSuiteApiKey DetectorType = 992 + DetectorType_EndorLabs DetectorType = 993 + DetectorType_ElevenLabs DetectorType = 994 + DetectorType_Netsuite DetectorType = 995 + DetectorType_RobinhoodCrypto DetectorType = 996 + DetectorType_NVAPI DetectorType = 997 + DetectorType_PyPI DetectorType = 998 + DetectorType_RailwayApp DetectorType = 999 + DetectorType_Meraki DetectorType = 1000 + DetectorType_SaladCloudApiKey DetectorType = 1001 + DetectorType_Box DetectorType = 1002 + DetectorType_BoxOauth DetectorType = 1003 + DetectorType_ApiMetrics DetectorType = 1004 + DetectorType_WeightsAndBiases DetectorType = 1005 + DetectorType_ZohoCRM DetectorType = 1006 + DetectorType_AzureOpenAI DetectorType = 1007 + DetectorType_GoDaddy DetectorType = 1008 + DetectorType_Flexport DetectorType = 1009 + DetectorType_TwitchAccessToken DetectorType = 1010 + DetectorType_TwilioApiKey DetectorType = 1011 + DetectorType_Sanity DetectorType = 1012 + DetectorType_AzureRefreshToken DetectorType = 1013 + DetectorType_AirtableOAuth DetectorType = 1014 + DetectorType_AirtablePersonalAccessToken DetectorType = 1015 + DetectorType_StoryblokPersonalAccessToken DetectorType = 1016 + DetectorType_SentryOrgToken DetectorType = 1017 + DetectorType_AzureApiManagementRepositoryKey DetectorType = 1018 + DetectorType_AzureAPIManagementSubscriptionKey DetectorType = 1019 + DetectorType_Harness DetectorType = 1020 + DetectorType_Langfuse DetectorType = 1021 + DetectorType_BingSubscriptionKey DetectorType = 1022 + DetectorType_XAI DetectorType = 1023 + DetectorType_AzureDirectManagementKey DetectorType = 1024 + DetectorType_AzureAppConfigConnectionString DetectorType = 1025 + DetectorType_DeepSeek DetectorType = 1026 + DetectorType_StripePaymentIntent DetectorType = 1027 + DetectorType_LangSmith DetectorType = 1028 + DetectorType_BitbucketAppPassword DetectorType = 1029 + DetectorType_Hasura DetectorType = 1030 + DetectorType_SalesforceRefreshToken DetectorType = 1031 + DetectorType_AnypointOAuth2 DetectorType = 1032 + DetectorType_WebexBot DetectorType = 1033 + DetectorType_TableauPersonalAccessToken DetectorType = 1034 + DetectorType_Rootly DetectorType = 1035 + DetectorType_HashiCorpVaultAuth DetectorType = 1036 + DetectorType_PhraseAccessToken DetectorType = 1037 + DetectorType_Photoroom DetectorType = 1038 + DetectorType_JWT DetectorType = 1039 + DetectorType_OpenAIAdmin DetectorType = 1040 + DetectorType_GoogleGeminiAPIKey DetectorType = 1041 + DetectorType_ArtifactoryReferenceToken DetectorType = 1042 + DetectorType_DatadogApikey DetectorType = 1043 +) + +// Enum value maps for DetectorType. +var ( + DetectorType_name = map[int32]string{ + 0: "Alibaba", + 1: "AMQP", + 2: "AWS", + 3: "Azure", + 4: "Circle", + 5: "Coinbase", + 6: "GCP", + 7: "Generic", + 8: "Github", + 9: "Gitlab", + 10: "JDBC", + 11: "RazorPay", + 12: "SendGrid", + 13: "Slack", + 14: "Square", + 15: "PrivateKey", + 16: "Stripe", + 17: "URI", + 18: "Dropbox", + 19: "Heroku", + 20: "Mailchimp", + 21: "Okta", + 22: "OneLogin", + 23: "PivotalTracker", + 25: "SquareApp", + 26: "Twilio", + 27: "Test", + 29: "TravisCI", + 30: "SlackWebhook", + 31: "PaypalOauth", + 32: "PagerDutyApiKey", + 33: "Firebase", + 34: "Mailgun", + 35: "HubSpot", + 36: "GitHubApp", + 37: "CircleCI", + 38: "WpEngine", + 39: "DatadogToken", + 40: "FacebookOAuth", + 41: "AsanaPersonalAccessToken", + 42: "AmplitudeApiKey", + 43: "BitLyAccessToken", + 44: "CalendlyApiKey", + 45: "ZapierWebhook", + 46: "YoutubeApiKey", + 47: "SalesforceOauth2", + 48: "TwitterApiSecret", + 49: "NpmToken", + 50: "NewRelicPersonalApiKey", + 51: "AirtableApiKey", + 52: "AkamaiToken", + 53: "AmazonMWS", + 54: "KubeConfig", + 55: "Auth0oauth", + 56: "Bitfinex", + 57: "Clarifai", + 58: "CloudflareGlobalApiKey", + 59: "CloudflareCaKey", + 60: "Confluent", + 61: "ContentfulDelivery", + 62: "DatabricksToken", + 63: "DigitalOceanSpaces", + 64: "DigitalOceanToken", + 65: "DiscordBotToken", + 66: "DiscordWebhook", + 67: "EtsyApiKey", + 68: "FastlyPersonalToken", + 69: "GoogleOauth2", + 70: "ReCAPTCHA", + 71: "GoogleApiKey", + 72: "Hunter", + 73: "IbmCloudUserKey", + 74: "Netlify", + 75: "Vonage", + 76: "EquinixOauth", + 77: "Paystack", + 78: "PlaidToken", + 79: "PlaidKey", + 80: "Plivo", + 81: "Postmark", + 82: "PubNubPublishKey", + 83: "PubNubSubscriptionKey", + 84: "PusherChannelKey", + 85: "ScalewayKey", + 86: "SendinBlueV2", + 87: "SentryToken", + 88: "ShodanKey", + 89: "SnykKey", + 90: "SpotifyKey", + 91: "TelegramBotToken", + 92: "TencentCloudKey", + 93: "TerraformCloudPersonalToken", + 94: "TrelloApiKey", + 95: "ZendeskApi", + 96: "MaxMindLicense", + 97: "AirtableMetadataApiKey", + 98: "AsanaOauth", + 99: "RapidApi", + 100: "CloudflareApiToken", + 101: "Webex", + 102: "FirebaseCloudMessaging", + 103: "ContentfulPersonalAccessToken", + 104: "MapBox", + 105: "MailJetBasicAuth", + 106: "MailJetSMS", + 107: "HubSpotApiKey", + 108: "HubSpotOauth", + 109: "SslMate", + 110: "Auth0ManagementApiToken", + 111: "MessageBird", + 112: "ElasticEmail", + 113: "FigmaPersonalAccessToken", + 114: "MicrosoftTeamsWebhook", + 115: "GitHubOld", + 116: "VultrApiKey", + 117: "Pepipost", + 118: "Postman", + 119: "CloudsightKey", + 120: "JiraToken", + 121: "NexmoApiKey", + 122: "SegmentApiKey", + 123: "SumoLogicKey", + 124: "PushBulletApiKey", + 125: "AirbrakeProjectKey", + 126: "AirbrakeUserKey", + 127: "PendoIntegrationKey", + 128: "SplunkOberservabilityToken", + 129: "LokaliseToken", + 130: "Calendarific", + 131: "Jumpcloud", + 133: "IpStack", + 134: "Notion", + 135: "DroneCI", + 136: "AdobeIO", + 137: "TwelveData", + 138: "D7Network", + 139: "ScrapingBee", + 140: "KeenIO", + 141: "Wakatime", + 142: "Buildkite", + 143: "Verimail", + 144: "Zerobounce", + 145: "Mailboxlayer", + 146: "Fastspring", + 147: "Paddle", + 148: "Sellfy", + 149: "FixerIO", + 150: "ButterCMS", + 151: "Taxjar", + 152: "Avalara", + 153: "Helpscout", + 154: "ElasticPath", + 155: "Zeplin", + 156: "Intercom", + 157: "Mailmodo", + 158: "CannyIo", + 159: "Pipedrive", + 160: "Vercel", + 161: "PosthogApp", + 162: "SinchMessage", + 163: "Ayrshare", + 164: "HelpCrunch", + 165: "LiveAgent", + 166: "Beamer", + 167: "WeChatAppKey", + 168: "LineMessaging", + 169: "UberServerToken", + 170: "AlgoliaAdminKey", + 171: "FullContact", + 172: "Mandrill", + 173: "Flutterwave", + 174: "MattermostPersonalToken", + 175: "Cloudant", + 176: "LineNotify", + 177: "LinearAPI", + 178: "Ubidots", + 179: "Anypoint", + 180: "Dwolla", + 181: "ArtifactoryAccessToken", + 182: "Surge", + 183: "Sparkpost", + 184: "GoCardless", + 185: "Codacy", + 186: "Kraken", + 187: "Checkout", + 188: "Kairos", + 189: "ClockworkSMS", + 190: "Atlassian", + 191: "LaunchDarkly", + 192: "Coveralls", + 193: "Linode", + 194: "WePay", + 195: "PlanetScale", + 196: "Doppler", + 197: "Agora", + 198: "Samsara", + 199: "FrameIO", + 200: "RubyGems", + 201: "OpenAI", + 202: "SurveySparrow", + 203: "Simvoly", + 204: "Survicate", + 205: "Omnisend", + 206: "Groovehq", + 207: "Newsapi", + 208: "Chatbot", + 209: "ClickSendsms", + 210: "Getgist", + 211: "CustomerIO", + 212: "ApiDeck", + 213: "Nftport", + 214: "Copper", + 215: "Close", + 216: "Myfreshworks", + 217: "Salesflare", + 218: "Webflow", + 219: "Duda", + 220: "Yext", + 221: "ContentStack", + 222: "StoryblokAccessToken", + 223: "GraphCMS", + 224: "Checkmarket", + 225: "Convertkit", + 226: "CustomerGuru", + 227: "Kaleyra", + 228: "Mailerlite", + 229: "Qualaroo", + 230: "SatismeterProjectkey", + 231: "SatismeterWritekey", + 232: "Simplesat", + 233: "SurveyAnyplace", + 234: "SurveyBot", + 235: "Webengage", + 236: "ZonkaFeedback", + 237: "Delighted", + 238: "Feedier", + 239: "Abyssale", + 240: "Magnetic", + 241: "Nytimes", + 242: "Polygon", + 243: "Powrbot", + 244: "ProspectIO", + 245: "Skrappio", + 246: "Monday", + 247: "Smartsheets", + 248: "Wrike", + 249: "Float", + 250: "Imagekit", + 251: "Integromat", + 252: "Salesblink", + 253: "Bored", + 254: "Campayn", + 255: "Clinchpad", + 256: "CompanyHub", + 257: "Debounce", + 258: "Dyspatch", + 259: "Guardianapi", + 260: "Harvest", + 261: "Moosend", + 262: "OpenWeather", + 263: "Siteleaf", + 264: "Squarespace", + 265: "FlowFlu", + 266: "Nimble", + 267: "LessAnnoyingCRM", + 268: "Nethunt", + 269: "Apptivo", + 270: "CapsuleCRM", + 271: "Insightly", + 272: "Kylas", + 273: "OnepageCRM", + 274: "User", + 275: "ProspectCRM", + 276: "ReallySimpleSystems", + 277: "Airship", + 278: "Artsy", + 279: "Yandex", + 280: "Clockify", + 281: "Dnscheck", + 282: "EasyInsight", + 283: "Ethplorer", + 284: "Everhour", + 285: "Fulcrum", + 286: "GeoIpifi", + 287: "Jotform", + 288: "Refiner", + 289: "Timezoneapi", + 290: "TogglTrack", + 291: "Vpnapi", + 292: "Workstack", + 293: "Apollo", + 294: "Eversign", + 295: "Juro", + 296: "KarmaCRM", + 297: "Metrilo", + 298: "Pandadoc", + 299: "RevampCRM", + 300: "Salescookie", + 301: "Alconost", + 302: "Blogger", + 303: "Accuweather", + 304: "Opengraphr", + 305: "Rawg", + 306: "Riotgames", + 307: "Clientary", + 308: "Stormglass", + 309: "Tomtom", + 310: "Twitch", + 311: "Documo", + 312: "Cloudways", + 313: "Veevavault", + 314: "KiteConnect", + 315: "ShopeeOpenPlatform", + 316: "TeamViewer", + 317: "Bulbul", + 318: "CentralStationCRM", + 319: "Teamgate", + 320: "Axonaut", + 321: "Tyntec", + 322: "Appcues", + 323: "Autoklose", + 324: "Cloudplan", + 325: "Dotdigital", + 326: "GetEmail", + 327: "GetEmails", + 328: "Kontent", + 329: "Leadfeeder", + 330: "Raven", + 331: "RocketReach", + 332: "Uplead", + 333: "Brandfetch", + 334: "Clearbit", + 335: "Crowdin", + 336: "Mapquest", + 337: "Noticeable", + 338: "Onbuka", + 339: "Todoist", + 340: "Storychief", + 341: "LinkedIn", + 342: "YouSign", + 343: "Docker", + 344: "Telesign", + 345: "Spoonacular", + 346: "Aerisweather", + 347: "Alphavantage", + 348: "Imgur", + 349: "Imagga", + 350: "SMSApi", + 351: "Distribusion", + 352: "Blablabus", + 353: "WordsApi", + 354: "Currencylayer", + 355: "Html2Pdf", + 356: "IPGeolocation", + 357: "Owlbot", + 358: "Cloudmersive", + 359: "Dynalist", + 360: "ExchangeRateAPI", + 361: "HolidayAPI", + 362: "Ipapi", + 363: "Marketstack", + 364: "Nutritionix", + 365: "Swell", + 366: "ClickupPersonalToken", + 367: "Nitro", + 368: "Rev", + 369: "RunRunIt", + 370: "Typeform", + 371: "Mixpanel", + 372: "Tradier", + 373: "Verifier", + 374: "Vouchery", + 375: "Alegra", + 376: "Audd", + 377: "Baremetrics", + 378: "Coinlib", + 379: "ExchangeRatesAPI", + 380: "CurrencyScoop", + 381: "FXMarket", + 382: "CurrencyCloud", + 383: "GetGeoAPI", + 384: "Abstract", + 385: "Billomat", + 386: "Dovico", + 387: "Bitbar", + 388: "Bugsnag", + 389: "AssemblyAI", + 390: "AdafruitIO", + 391: "Apify", + 392: "CoinGecko", + 393: "CryptoCompare", + 394: "Fullstory", + 395: "HelloSign", + 396: "Loyverse", + 397: "NetCore", + 398: "SauceLabs", + 399: "AlienVault", + 401: "Apiflash", + 402: "Coinlayer", + 403: "CurrentsAPI", + 404: "DataGov", + 405: "Enigma", + 406: "FinancialModelingPrep", + 407: "Geocodio", + 408: "HereAPI", + 409: "Macaddress", + 410: "OOPSpam", + 411: "ProtocolsIO", + 412: "ScraperAPI", + 413: "SecurityTrails", + 414: "TomorrowIO", + 415: "WorldCoinIndex", + 416: "FacePlusPlus", + 417: "Voicegain", + 418: "Deepgram", + 419: "VisualCrossing", + 420: "Finnhub", + 421: "Tiingo", + 422: "RingCentral", + 423: "Finage", + 424: "Edamam", + 425: "HypeAuditor", + 426: "Gengo", + 427: "Front", + 428: "Fleetbase", + 429: "Bubble", + 430: "Bannerbear", + 431: "Adzuna", + 432: "BitcoinAverage", + 433: "CommerceJS", + 434: "DetectLanguage", + 435: "FakeJSON", + 436: "Graphhopper", + 437: "Lexigram", + 438: "LinkPreview", + 439: "Numverify", + 440: "ProxyCrawl", + 441: "ZipCodeAPI", + 442: "Cometchat", + 443: "Keygen", + 444: "Mixcloud", + 445: "TatumIO", + 446: "Tmetric", + 447: "Lastfm", + 448: "Browshot", + 449: "JSONbin", + 450: "LocationIQ", + 451: "ScreenshotAPI", + 452: "WeatherStack", + 453: "Amadeus", + 454: "FourSquare", + 455: "Flickr", + 456: "ClickHelp", + 457: "Ambee", + 458: "Api2Cart", + 459: "Hypertrack", + 460: "KakaoTalk", + 461: "RiteKit", + 462: "Shutterstock", + 463: "Text2Data", + 464: "YouNeedABudget", + 465: "Cricket", + 466: "Filestack", + 467: "Gyazo", + 468: "Mavenlink", + 469: "Sheety", + 470: "Sportsmonk", + 471: "Stockdata", + 472: "Unsplash", + 473: "Allsports", + 474: "CalorieNinja", + 475: "WalkScore", + 476: "Strava", + 477: "Cicero", + 478: "IPQuality", + 479: "ParallelDots", + 480: "Roaring", + 481: "Mailsac", + 482: "Whoxy", + 483: "WorldWeather", + 484: "ApiFonica", + 485: "Aylien", + 486: "Geocode", + 487: "IconFinder", + 488: "Ipify", + 489: "LanguageLayer", + 490: "Lob", + 491: "OnWaterIO", + 492: "Pastebin", + 493: "PdfLayer", + 494: "Pixabay", + 495: "ReadMe", + 496: "VatLayer", + 497: "VirusTotal", + 498: "AirVisual", + 499: "Currencyfreaks", + 500: "Duffel", + 501: "FlatIO", + 502: "M3o", + 503: "Mesibo", + 504: "Openuv", + 505: "Snipcart", + 506: "Besttime", + 507: "Happyscribe", + 508: "Humanity", + 509: "Impala", + 510: "Loginradius", + 511: "AutoPilot", + 512: "Bitmex", + 513: "ClustDoc", + 514: "Messari", + 515: "PdfShift", + 516: "Poloniex", + 517: "RestpackHtmlToPdfAPI", + 518: "RestpackScreenshotAPI", + 519: "ShutterstockOAuth", + 520: "SkyBiometry", + 521: "AbuseIPDB", + 522: "AletheiaApi", + 523: "BlitApp", + 524: "Censys", + 525: "Cloverly", + 526: "CountryLayer", + 527: "FileIO", + 528: "FlightApi", + 529: "Geoapify", + 530: "IPinfoDB", + 531: "MediaStack", + 532: "NasdaqDataLink", + 533: "OpenCageData", + 534: "Paymongo", + 535: "PositionStack", + 536: "Rebrandly", + 537: "ScreenshotLayer", + 538: "Stytch", + 539: "Unplugg", + 540: "UPCDatabase", + 541: "UserStack", + 542: "Geocodify", + 543: "Newscatcher", + 544: "Nicereply", + 545: "Partnerstack", + 546: "Route4me", + 547: "Scrapeowl", + 548: "ScrapingDog", + 549: "Streak", + 550: "Veriphone", + 551: "Webscraping", + 552: "Zenscrape", + 553: "Zenserp", + 554: "CoinApi", + 555: "Gitter", + 556: "Host", + 557: "Iexcloud", + 558: "Restpack", + 559: "ScraperBox", + 560: "ScrapingAnt", + 561: "SerpStack", + 562: "SmartyStreets", + 563: "TicketMaster", + 564: "AviationStack", + 565: "BombBomb", + 566: "Commodities", + 567: "Dfuse", + 568: "EdenAI", + 569: "Glassnode", + 570: "Guru", + 571: "Hive", + 572: "Hiveage", + 573: "Kickbox", + 574: "Passbase", + 575: "PostageApp", + 576: "PureStake", + 577: "Qubole", + 578: "CarbonInterface", + 579: "Intrinio", + 580: "QuickMetrics", + 581: "ScrapeStack", + 582: "TechnicalAnalysisApi", + 583: "Urlscan", + 584: "BaseApiIO", + 585: "DailyCO", + 586: "TLy", + 587: "Shortcut", + 588: "Appfollow", + 589: "Thinkific", + 590: "Feedly", + 591: "Stitchdata", + 592: "Fetchrss", + 593: "Signupgenius", + 594: "Signaturit", + 595: "Optimizely", + 596: "OcrSpace", + 597: "WeatherBit", + 598: "BuddyNS", + 599: "ZipAPI", + 600: "ZipBooks", + 601: "Onedesk", + 602: "Bugherd", + 603: "Blazemeter", + 604: "Autodesk", + 605: "Tru", + 606: "UnifyID", + 607: "Trimble", + 608: "Smooch", + 609: "Semaphore", + 610: "Telnyx", + 611: "Signalwire", + 612: "Textmagic", + 613: "Serphouse", + 614: "Planyo", + 615: "Simplybook", + 616: "Vyte", + 617: "Nylas", + 618: "Squareup", + 619: "Dandelion", + 620: "DataFire", + 621: "DeepAI", + 622: "MeaningCloud", + 623: "NeutrinoApi", + 624: "Storecove", + 625: "Shipday", + 626: "Sentiment", + 627: "StreamChatMessaging", + 628: "TeamworkCRM", + 629: "TeamworkDesk", + 630: "TeamworkSpaces", + 631: "TheOddsApi", + 632: "Apacta", + 633: "GetSandbox", + 634: "Happi", + 635: "Oanda", + 636: "FastForex", + 637: "APIMatic", + 638: "VersionEye", + 639: "EagleEyeNetworks", + 640: "ThousandEyes", + 641: "SelectPDF", + 642: "Flightstats", + 643: "ChecIO", + 644: "Manifest", + 645: "ApiScience", + 646: "AppSynergy", + 647: "Caflou", + 648: "Caspio", + 649: "ChecklyHQ", + 650: "CloudElements", + 651: "DronaHQ", + 652: "Enablex", + 653: "Fmfw", + 654: "GoodDay", + 655: "Luno", + 656: "Meistertask", + 657: "Mindmeister", + 658: "PeopleDataLabs", + 659: "ScraperSite", + 660: "Scrapfly", + 661: "SimplyNoted", + 662: "TravelPayouts", + 663: "WebScraper", + 664: "Convier", + 665: "Courier", + 666: "Ditto", + 667: "Findl", + 668: "Lendflow", + 669: "Moderation", + 670: "Opendatasoft", + 671: "Podio", + 672: "Rockset", + 673: "Rownd", + 674: "Shotstack", + 675: "Swiftype", + 676: "Twitter", + 677: "Honey", + 678: "Freshdesk", + 679: "Upwave", + 680: "Fountain", + 681: "Freshbooks", + 682: "Mite", + 683: "Deputy", + 684: "Beebole", + 685: "Cashboard", + 686: "Kanban", + 687: "Worksnaps", + 688: "MyIntervals", + 689: "InvoiceOcean", + 690: "Sherpadesk", + 691: "Mrticktock", + 692: "Chatfule", + 693: "Aeroworkflow", + 694: "Emailoctopus", + 695: "Fusebill", + 696: "Geckoboard", + 697: "Gosquared", + 698: "Moonclerk", + 699: "Paymoapp", + 700: "Mixmax", + 701: "Processst", + 702: "Repairshopr", + 703: "Goshippo", + 704: "Sigopt", + 705: "Sugester", + 706: "Viewneo", + 707: "BoostNote", + 708: "CaptainData", + 709: "Checkvist", + 710: "Cliengo", + 711: "Cloze", + 712: "FormIO", + 713: "FormBucket", + 714: "GoCanvas", + 715: "MadKudu", + 716: "NozbeTeams", + 717: "Papyrs", + 718: "SuperNotesAPI", + 719: "Tallyfy", + 720: "ZenkitAPI", + 721: "CloudImage", + 722: "UploadCare", + 723: "Borgbase", + 724: "Pipedream", + 725: "Sirv", + 726: "Diffbot", + 727: "EightxEight", + 728: "Sendoso", + 729: "Printfection", + 730: "Authorize", + 731: "PandaScore", + 732: "Paymo", + 733: "AvazaPersonalAccessToken", + 734: "PlanviewLeanKit", + 735: "Livestorm", + 736: "KuCoin", + 737: "MetaAPI", + 738: "NiceHash", + 739: "CexIO", + 740: "Klipfolio", + 741: "Dynatrace", + 742: "MollieAPIKey", + 743: "MollieAccessToken", + 744: "BasisTheory", + 745: "Nordigen", + 746: "FlagsmithEnvironmentKey", + 747: "FlagsmithToken", + 748: "Mux", + 749: "Column", + 750: "Sendbird", + 751: "SendbirdOrganizationAPI", + 752: "Midise", + 753: "Mockaroo", + 754: "Image4", + 755: "Pinata", + 756: "BrowserStack", + 757: "CrossBrowserTesting", + 758: "Loadmill", + 759: "TestingBot", + 760: "KnapsackPro", + 761: "Qase", + 762: "Dareboost", + 763: "GTMetrix", + 764: "Holistic", + 765: "Parsers", + 766: "ScrutinizerCi", + 767: "SonarCloud", + 768: "APITemplate", + 769: "ConversionTools", + 770: "CraftMyPDF", + 771: "ExportSDK", + 772: "GlitterlyAPI", + 773: "Hybiscus", + 774: "Miro", + 775: "Statuspage", + 776: "Statuspal", + 777: "Teletype", + 778: "TimeCamp", + 779: "Userflow", + 780: "Wistia", + 781: "SportRadar", + 782: "UptimeRobot", + 783: "Codequiry", + 784: "ExtractorAPI", + 785: "Signable", + 786: "MagicBell", + 787: "Stormboard", + 788: "Apilayer", + 789: "Disqus", + 790: "Woopra", + 791: "Paperform", + 792: "Gumroad", + 793: "Paydirtapp", + 794: "Detectify", + 795: "Statuscake", + 796: "Jumpseller", + 797: "LunchMoney", + 798: "Rosette", + 799: "Yelp", + 800: "Atera", + 801: "EcoStruxureIT", + 802: "Aha", + 803: "Parsehub", + 804: "PackageCloud", + 805: "Cloudsmith", + 806: "Flowdash", + 807: "Flowdock", + 808: "Fibery", + 809: "Typetalk", + 810: "VoodooSMS", + 811: "ZulipChat", + 812: "Formcraft", + 813: "Iexapis", + 814: "Reachmail", + 815: "Chartmogul", + 816: "Appointedd", + 817: "Wit", + 818: "RechargePayments", + 819: "Diggernaut", + 820: "MonkeyLearn", + 821: "Duply", + 822: "Postbacks", + 823: "Collect2", + 824: "ZenRows", + 825: "Zipcodebase", + 826: "Tefter", + 827: "Twist", + 828: "BraintreePayments", + 829: "CloudConvert", + 830: "Grafana", + 831: "ConvertApi", + 832: "Transferwise", + 833: "Bulksms", + 834: "Databox", + 835: "Onesignal", + 836: "Rentman", + 837: "Parseur", + 838: "Docparser", + 839: "Formsite", + 840: "Tickettailor", + 841: "Lemlist", + 842: "Prodpad", + 843: "Formstack", + 844: "Codeclimate", + 845: "Codemagic", + 846: "Vbout", + 847: "Nightfall", + 848: "FlightLabs", + 849: "SpeechTextAI", + 850: "PollsAPI", + 851: "SimFin", + 852: "Scalr", + 853: "Kanbantool", + 854: "Brightlocal", + 855: "Hotwire", + 856: "Instabot", + 857: "Timekit", + 858: "Interseller", + 859: "Mojohelpdesk", + 860: "Createsend", + 861: "Getresponse", + 862: "Dynadot", + 863: "Demio", + 864: "Tokeet", + 865: "Myexperiment", + 866: "Copyscape", + 867: "Besnappy", + 868: "Salesmate", + 869: "Heatmapapi", + 870: "Websitepulse", + 871: "Uclassify", + 872: "Convert", + 873: "PDFmyURL", + 874: "Api2Convert", + 875: "Opsgenie", + 876: "Gemini", + 877: "Honeycomb", + 878: "KalturaAppToken", + 879: "KalturaSession", + 880: "BitGo", + 881: "Optidash", + 882: "Imgix", + 883: "ImageToText", + 884: "Page2Images", + 885: "Quickbase", + 886: "Redbooth", + 887: "Nubela", + 888: "Infobip", + 889: "Uproc", + 890: "Supportbee", + 891: "Aftership", + 892: "Edusign", + 893: "Teamup", + 894: "Workday", + 895: "MongoDB", + 896: "NGC", + 897: "DigitalOceanV2", + 898: "SQLServer", + 899: "FTP", + 900: "Redis", + 901: "LDAP", + 902: "Shopify", + 903: "RabbitMQ", + 904: "CustomRegex", + 905: "Etherscan", + 906: "Infura", + 907: "Alchemy", + 908: "BlockNative", + 909: "Moralis", + 910: "BscScan", + 911: "CoinMarketCap", + 912: "Percy", + 913: "TinesWebhook", + 914: "Pulumi", + 915: "SupabaseToken", + 916: "NuGetApiKey", + 917: "Aiven", + 918: "Prefect", + 919: "Docusign", + 920: "Couchbase", + 921: "Dockerhub", + 922: "TrufflehogEnterprise", + 923: "EnvoyApiKey", + 924: "GitHubOauth2", + 925: "Salesforce", + 926: "HuggingFace", + 927: "Snowflake", + 928: "Sourcegraph", + 929: "Tailscale", + 930: "Web3Storage", + 931: "AzureStorage", + 932: "PlanetScaleDb", + 933: "Anthropic", + 934: "Ramp", + 935: "Klaviyo", + 936: "SourcegraphCody", + 937: "Voiceflow", + 938: "Privacy", + 939: "IPInfo", + 940: "Ip2location", + 941: "Instamojo", + 942: "Portainer", + 943: "PortainerToken", + 944: "Loggly", + 945: "OpenVpn", + 946: "VagrantCloudPersonalToken", + 947: "BetterStack", + 948: "ZeroTier", + 949: "AppOptics", + 950: "Metabase", + 951: "CoinbaseWaaS", + 952: "LemonSqueezy", + 953: "Budibase", + 954: "DenoDeploy", + 955: "Stripo", + 956: "ReplyIO", + 957: "AzureBatch", + 958: "AzureContainerRegistry", + 959: "AWSSessionKey", + 960: "Coda", + 961: "LogzIO", + 962: "Eventbrite", + 963: "GrafanaServiceAccount", + 964: "RequestFinance", + 965: "Overloop", + 966: "Ngrok", + 967: "Replicate", + 968: "Postgres", + 969: "AzureActiveDirectoryApplicationSecret", + 970: "AzureCacheForRedisAccessKey", + 971: "AzureCosmosDBKeyIdentifiable", + 972: "AzureDevopsPersonalAccessToken", + 973: "AzureFunctionKey", + 974: "AzureMLWebServiceClassicIdentifiableKey", + 975: "AzureSasToken", + 976: "AzureSearchAdminKey", + 977: "AzureSearchQueryKey", + 978: "AzureManagementCertificate", + 979: "AzureSQL", + 980: "FlyIO", + 981: "BuiltWith", + 982: "JupiterOne", + 983: "GCPApplicationDefaultCredentials", + 984: "Wiz", + 985: "Pagarme", + 986: "Onfleet", + 987: "Intra42", + 988: "Groq", + 989: "TwitterConsumerkey", + 990: "Eraser", + 991: "LarkSuite", + 992: "LarkSuiteApiKey", + 993: "EndorLabs", + 994: "ElevenLabs", + 995: "Netsuite", + 996: "RobinhoodCrypto", + 997: "NVAPI", + 998: "PyPI", + 999: "RailwayApp", + 1000: "Meraki", + 1001: "SaladCloudApiKey", + 1002: "Box", + 1003: "BoxOauth", + 1004: "ApiMetrics", + 1005: "WeightsAndBiases", + 1006: "ZohoCRM", + 1007: "AzureOpenAI", + 1008: "GoDaddy", + 1009: "Flexport", + 1010: "TwitchAccessToken", + 1011: "TwilioApiKey", + 1012: "Sanity", + 1013: "AzureRefreshToken", + 1014: "AirtableOAuth", + 1015: "AirtablePersonalAccessToken", + 1016: "StoryblokPersonalAccessToken", + 1017: "SentryOrgToken", + 1018: "AzureApiManagementRepositoryKey", + 1019: "AzureAPIManagementSubscriptionKey", + 1020: "Harness", + 1021: "Langfuse", + 1022: "BingSubscriptionKey", + 1023: "XAI", + 1024: "AzureDirectManagementKey", + 1025: "AzureAppConfigConnectionString", + 1026: "DeepSeek", + 1027: "StripePaymentIntent", + 1028: "LangSmith", + 1029: "BitbucketAppPassword", + 1030: "Hasura", + 1031: "SalesforceRefreshToken", + 1032: "AnypointOAuth2", + 1033: "WebexBot", + 1034: "TableauPersonalAccessToken", + 1035: "Rootly", + 1036: "HashiCorpVaultAuth", + 1037: "PhraseAccessToken", + 1038: "Photoroom", + 1039: "JWT", + 1040: "OpenAIAdmin", + 1041: "GoogleGeminiAPIKey", + 1042: "ArtifactoryReferenceToken", + 1043: "DatadogApikey", + } + DetectorType_value = map[string]int32{ + "Alibaba": 0, + "AMQP": 1, + "AWS": 2, + "Azure": 3, + "Circle": 4, + "Coinbase": 5, + "GCP": 6, + "Generic": 7, + "Github": 8, + "Gitlab": 9, + "JDBC": 10, + "RazorPay": 11, + "SendGrid": 12, + "Slack": 13, + "Square": 14, + "PrivateKey": 15, + "Stripe": 16, + "URI": 17, + "Dropbox": 18, + "Heroku": 19, + "Mailchimp": 20, + "Okta": 21, + "OneLogin": 22, + "PivotalTracker": 23, + "SquareApp": 25, + "Twilio": 26, + "Test": 27, + "TravisCI": 29, + "SlackWebhook": 30, + "PaypalOauth": 31, + "PagerDutyApiKey": 32, + "Firebase": 33, + "Mailgun": 34, + "HubSpot": 35, + "GitHubApp": 36, + "CircleCI": 37, + "WpEngine": 38, + "DatadogToken": 39, + "FacebookOAuth": 40, + "AsanaPersonalAccessToken": 41, + "AmplitudeApiKey": 42, + "BitLyAccessToken": 43, + "CalendlyApiKey": 44, + "ZapierWebhook": 45, + "YoutubeApiKey": 46, + "SalesforceOauth2": 47, + "TwitterApiSecret": 48, + "NpmToken": 49, + "NewRelicPersonalApiKey": 50, + "AirtableApiKey": 51, + "AkamaiToken": 52, + "AmazonMWS": 53, + "KubeConfig": 54, + "Auth0oauth": 55, + "Bitfinex": 56, + "Clarifai": 57, + "CloudflareGlobalApiKey": 58, + "CloudflareCaKey": 59, + "Confluent": 60, + "ContentfulDelivery": 61, + "DatabricksToken": 62, + "DigitalOceanSpaces": 63, + "DigitalOceanToken": 64, + "DiscordBotToken": 65, + "DiscordWebhook": 66, + "EtsyApiKey": 67, + "FastlyPersonalToken": 68, + "GoogleOauth2": 69, + "ReCAPTCHA": 70, + "GoogleApiKey": 71, + "Hunter": 72, + "IbmCloudUserKey": 73, + "Netlify": 74, + "Vonage": 75, + "EquinixOauth": 76, + "Paystack": 77, + "PlaidToken": 78, + "PlaidKey": 79, + "Plivo": 80, + "Postmark": 81, + "PubNubPublishKey": 82, + "PubNubSubscriptionKey": 83, + "PusherChannelKey": 84, + "ScalewayKey": 85, + "SendinBlueV2": 86, + "SentryToken": 87, + "ShodanKey": 88, + "SnykKey": 89, + "SpotifyKey": 90, + "TelegramBotToken": 91, + "TencentCloudKey": 92, + "TerraformCloudPersonalToken": 93, + "TrelloApiKey": 94, + "ZendeskApi": 95, + "MaxMindLicense": 96, + "AirtableMetadataApiKey": 97, + "AsanaOauth": 98, + "RapidApi": 99, + "CloudflareApiToken": 100, + "Webex": 101, + "FirebaseCloudMessaging": 102, + "ContentfulPersonalAccessToken": 103, + "MapBox": 104, + "MailJetBasicAuth": 105, + "MailJetSMS": 106, + "HubSpotApiKey": 107, + "HubSpotOauth": 108, + "SslMate": 109, + "Auth0ManagementApiToken": 110, + "MessageBird": 111, + "ElasticEmail": 112, + "FigmaPersonalAccessToken": 113, + "MicrosoftTeamsWebhook": 114, + "GitHubOld": 115, + "VultrApiKey": 116, + "Pepipost": 117, + "Postman": 118, + "CloudsightKey": 119, + "JiraToken": 120, + "NexmoApiKey": 121, + "SegmentApiKey": 122, + "SumoLogicKey": 123, + "PushBulletApiKey": 124, + "AirbrakeProjectKey": 125, + "AirbrakeUserKey": 126, + "PendoIntegrationKey": 127, + "SplunkOberservabilityToken": 128, + "LokaliseToken": 129, + "Calendarific": 130, + "Jumpcloud": 131, + "IpStack": 133, + "Notion": 134, + "DroneCI": 135, + "AdobeIO": 136, + "TwelveData": 137, + "D7Network": 138, + "ScrapingBee": 139, + "KeenIO": 140, + "Wakatime": 141, + "Buildkite": 142, + "Verimail": 143, + "Zerobounce": 144, + "Mailboxlayer": 145, + "Fastspring": 146, + "Paddle": 147, + "Sellfy": 148, + "FixerIO": 149, + "ButterCMS": 150, + "Taxjar": 151, + "Avalara": 152, + "Helpscout": 153, + "ElasticPath": 154, + "Zeplin": 155, + "Intercom": 156, + "Mailmodo": 157, + "CannyIo": 158, + "Pipedrive": 159, + "Vercel": 160, + "PosthogApp": 161, + "SinchMessage": 162, + "Ayrshare": 163, + "HelpCrunch": 164, + "LiveAgent": 165, + "Beamer": 166, + "WeChatAppKey": 167, + "LineMessaging": 168, + "UberServerToken": 169, + "AlgoliaAdminKey": 170, + "FullContact": 171, + "Mandrill": 172, + "Flutterwave": 173, + "MattermostPersonalToken": 174, + "Cloudant": 175, + "LineNotify": 176, + "LinearAPI": 177, + "Ubidots": 178, + "Anypoint": 179, + "Dwolla": 180, + "ArtifactoryAccessToken": 181, + "Surge": 182, + "Sparkpost": 183, + "GoCardless": 184, + "Codacy": 185, + "Kraken": 186, + "Checkout": 187, + "Kairos": 188, + "ClockworkSMS": 189, + "Atlassian": 190, + "LaunchDarkly": 191, + "Coveralls": 192, + "Linode": 193, + "WePay": 194, + "PlanetScale": 195, + "Doppler": 196, + "Agora": 197, + "Samsara": 198, + "FrameIO": 199, + "RubyGems": 200, + "OpenAI": 201, + "SurveySparrow": 202, + "Simvoly": 203, + "Survicate": 204, + "Omnisend": 205, + "Groovehq": 206, + "Newsapi": 207, + "Chatbot": 208, + "ClickSendsms": 209, + "Getgist": 210, + "CustomerIO": 211, + "ApiDeck": 212, + "Nftport": 213, + "Copper": 214, + "Close": 215, + "Myfreshworks": 216, + "Salesflare": 217, + "Webflow": 218, + "Duda": 219, + "Yext": 220, + "ContentStack": 221, + "StoryblokAccessToken": 222, + "GraphCMS": 223, + "Checkmarket": 224, + "Convertkit": 225, + "CustomerGuru": 226, + "Kaleyra": 227, + "Mailerlite": 228, + "Qualaroo": 229, + "SatismeterProjectkey": 230, + "SatismeterWritekey": 231, + "Simplesat": 232, + "SurveyAnyplace": 233, + "SurveyBot": 234, + "Webengage": 235, + "ZonkaFeedback": 236, + "Delighted": 237, + "Feedier": 238, + "Abyssale": 239, + "Magnetic": 240, + "Nytimes": 241, + "Polygon": 242, + "Powrbot": 243, + "ProspectIO": 244, + "Skrappio": 245, + "Monday": 246, + "Smartsheets": 247, + "Wrike": 248, + "Float": 249, + "Imagekit": 250, + "Integromat": 251, + "Salesblink": 252, + "Bored": 253, + "Campayn": 254, + "Clinchpad": 255, + "CompanyHub": 256, + "Debounce": 257, + "Dyspatch": 258, + "Guardianapi": 259, + "Harvest": 260, + "Moosend": 261, + "OpenWeather": 262, + "Siteleaf": 263, + "Squarespace": 264, + "FlowFlu": 265, + "Nimble": 266, + "LessAnnoyingCRM": 267, + "Nethunt": 268, + "Apptivo": 269, + "CapsuleCRM": 270, + "Insightly": 271, + "Kylas": 272, + "OnepageCRM": 273, + "User": 274, + "ProspectCRM": 275, + "ReallySimpleSystems": 276, + "Airship": 277, + "Artsy": 278, + "Yandex": 279, + "Clockify": 280, + "Dnscheck": 281, + "EasyInsight": 282, + "Ethplorer": 283, + "Everhour": 284, + "Fulcrum": 285, + "GeoIpifi": 286, + "Jotform": 287, + "Refiner": 288, + "Timezoneapi": 289, + "TogglTrack": 290, + "Vpnapi": 291, + "Workstack": 292, + "Apollo": 293, + "Eversign": 294, + "Juro": 295, + "KarmaCRM": 296, + "Metrilo": 297, + "Pandadoc": 298, + "RevampCRM": 299, + "Salescookie": 300, + "Alconost": 301, + "Blogger": 302, + "Accuweather": 303, + "Opengraphr": 304, + "Rawg": 305, + "Riotgames": 306, + "Clientary": 307, + "Stormglass": 308, + "Tomtom": 309, + "Twitch": 310, + "Documo": 311, + "Cloudways": 312, + "Veevavault": 313, + "KiteConnect": 314, + "ShopeeOpenPlatform": 315, + "TeamViewer": 316, + "Bulbul": 317, + "CentralStationCRM": 318, + "Teamgate": 319, + "Axonaut": 320, + "Tyntec": 321, + "Appcues": 322, + "Autoklose": 323, + "Cloudplan": 324, + "Dotdigital": 325, + "GetEmail": 326, + "GetEmails": 327, + "Kontent": 328, + "Leadfeeder": 329, + "Raven": 330, + "RocketReach": 331, + "Uplead": 332, + "Brandfetch": 333, + "Clearbit": 334, + "Crowdin": 335, + "Mapquest": 336, + "Noticeable": 337, + "Onbuka": 338, + "Todoist": 339, + "Storychief": 340, + "LinkedIn": 341, + "YouSign": 342, + "Docker": 343, + "Telesign": 344, + "Spoonacular": 345, + "Aerisweather": 346, + "Alphavantage": 347, + "Imgur": 348, + "Imagga": 349, + "SMSApi": 350, + "Distribusion": 351, + "Blablabus": 352, + "WordsApi": 353, + "Currencylayer": 354, + "Html2Pdf": 355, + "IPGeolocation": 356, + "Owlbot": 357, + "Cloudmersive": 358, + "Dynalist": 359, + "ExchangeRateAPI": 360, + "HolidayAPI": 361, + "Ipapi": 362, + "Marketstack": 363, + "Nutritionix": 364, + "Swell": 365, + "ClickupPersonalToken": 366, + "Nitro": 367, + "Rev": 368, + "RunRunIt": 369, + "Typeform": 370, + "Mixpanel": 371, + "Tradier": 372, + "Verifier": 373, + "Vouchery": 374, + "Alegra": 375, + "Audd": 376, + "Baremetrics": 377, + "Coinlib": 378, + "ExchangeRatesAPI": 379, + "CurrencyScoop": 380, + "FXMarket": 381, + "CurrencyCloud": 382, + "GetGeoAPI": 383, + "Abstract": 384, + "Billomat": 385, + "Dovico": 386, + "Bitbar": 387, + "Bugsnag": 388, + "AssemblyAI": 389, + "AdafruitIO": 390, + "Apify": 391, + "CoinGecko": 392, + "CryptoCompare": 393, + "Fullstory": 394, + "HelloSign": 395, + "Loyverse": 396, + "NetCore": 397, + "SauceLabs": 398, + "AlienVault": 399, + "Apiflash": 401, + "Coinlayer": 402, + "CurrentsAPI": 403, + "DataGov": 404, + "Enigma": 405, + "FinancialModelingPrep": 406, + "Geocodio": 407, + "HereAPI": 408, + "Macaddress": 409, + "OOPSpam": 410, + "ProtocolsIO": 411, + "ScraperAPI": 412, + "SecurityTrails": 413, + "TomorrowIO": 414, + "WorldCoinIndex": 415, + "FacePlusPlus": 416, + "Voicegain": 417, + "Deepgram": 418, + "VisualCrossing": 419, + "Finnhub": 420, + "Tiingo": 421, + "RingCentral": 422, + "Finage": 423, + "Edamam": 424, + "HypeAuditor": 425, + "Gengo": 426, + "Front": 427, + "Fleetbase": 428, + "Bubble": 429, + "Bannerbear": 430, + "Adzuna": 431, + "BitcoinAverage": 432, + "CommerceJS": 433, + "DetectLanguage": 434, + "FakeJSON": 435, + "Graphhopper": 436, + "Lexigram": 437, + "LinkPreview": 438, + "Numverify": 439, + "ProxyCrawl": 440, + "ZipCodeAPI": 441, + "Cometchat": 442, + "Keygen": 443, + "Mixcloud": 444, + "TatumIO": 445, + "Tmetric": 446, + "Lastfm": 447, + "Browshot": 448, + "JSONbin": 449, + "LocationIQ": 450, + "ScreenshotAPI": 451, + "WeatherStack": 452, + "Amadeus": 453, + "FourSquare": 454, + "Flickr": 455, + "ClickHelp": 456, + "Ambee": 457, + "Api2Cart": 458, + "Hypertrack": 459, + "KakaoTalk": 460, + "RiteKit": 461, + "Shutterstock": 462, + "Text2Data": 463, + "YouNeedABudget": 464, + "Cricket": 465, + "Filestack": 466, + "Gyazo": 467, + "Mavenlink": 468, + "Sheety": 469, + "Sportsmonk": 470, + "Stockdata": 471, + "Unsplash": 472, + "Allsports": 473, + "CalorieNinja": 474, + "WalkScore": 475, + "Strava": 476, + "Cicero": 477, + "IPQuality": 478, + "ParallelDots": 479, + "Roaring": 480, + "Mailsac": 481, + "Whoxy": 482, + "WorldWeather": 483, + "ApiFonica": 484, + "Aylien": 485, + "Geocode": 486, + "IconFinder": 487, + "Ipify": 488, + "LanguageLayer": 489, + "Lob": 490, + "OnWaterIO": 491, + "Pastebin": 492, + "PdfLayer": 493, + "Pixabay": 494, + "ReadMe": 495, + "VatLayer": 496, + "VirusTotal": 497, + "AirVisual": 498, + "Currencyfreaks": 499, + "Duffel": 500, + "FlatIO": 501, + "M3o": 502, + "Mesibo": 503, + "Openuv": 504, + "Snipcart": 505, + "Besttime": 506, + "Happyscribe": 507, + "Humanity": 508, + "Impala": 509, + "Loginradius": 510, + "AutoPilot": 511, + "Bitmex": 512, + "ClustDoc": 513, + "Messari": 514, + "PdfShift": 515, + "Poloniex": 516, + "RestpackHtmlToPdfAPI": 517, + "RestpackScreenshotAPI": 518, + "ShutterstockOAuth": 519, + "SkyBiometry": 520, + "AbuseIPDB": 521, + "AletheiaApi": 522, + "BlitApp": 523, + "Censys": 524, + "Cloverly": 525, + "CountryLayer": 526, + "FileIO": 527, + "FlightApi": 528, + "Geoapify": 529, + "IPinfoDB": 530, + "MediaStack": 531, + "NasdaqDataLink": 532, + "OpenCageData": 533, + "Paymongo": 534, + "PositionStack": 535, + "Rebrandly": 536, + "ScreenshotLayer": 537, + "Stytch": 538, + "Unplugg": 539, + "UPCDatabase": 540, + "UserStack": 541, + "Geocodify": 542, + "Newscatcher": 543, + "Nicereply": 544, + "Partnerstack": 545, + "Route4me": 546, + "Scrapeowl": 547, + "ScrapingDog": 548, + "Streak": 549, + "Veriphone": 550, + "Webscraping": 551, + "Zenscrape": 552, + "Zenserp": 553, + "CoinApi": 554, + "Gitter": 555, + "Host": 556, + "Iexcloud": 557, + "Restpack": 558, + "ScraperBox": 559, + "ScrapingAnt": 560, + "SerpStack": 561, + "SmartyStreets": 562, + "TicketMaster": 563, + "AviationStack": 564, + "BombBomb": 565, + "Commodities": 566, + "Dfuse": 567, + "EdenAI": 568, + "Glassnode": 569, + "Guru": 570, + "Hive": 571, + "Hiveage": 572, + "Kickbox": 573, + "Passbase": 574, + "PostageApp": 575, + "PureStake": 576, + "Qubole": 577, + "CarbonInterface": 578, + "Intrinio": 579, + "QuickMetrics": 580, + "ScrapeStack": 581, + "TechnicalAnalysisApi": 582, + "Urlscan": 583, + "BaseApiIO": 584, + "DailyCO": 585, + "TLy": 586, + "Shortcut": 587, + "Appfollow": 588, + "Thinkific": 589, + "Feedly": 590, + "Stitchdata": 591, + "Fetchrss": 592, + "Signupgenius": 593, + "Signaturit": 594, + "Optimizely": 595, + "OcrSpace": 596, + "WeatherBit": 597, + "BuddyNS": 598, + "ZipAPI": 599, + "ZipBooks": 600, + "Onedesk": 601, + "Bugherd": 602, + "Blazemeter": 603, + "Autodesk": 604, + "Tru": 605, + "UnifyID": 606, + "Trimble": 607, + "Smooch": 608, + "Semaphore": 609, + "Telnyx": 610, + "Signalwire": 611, + "Textmagic": 612, + "Serphouse": 613, + "Planyo": 614, + "Simplybook": 615, + "Vyte": 616, + "Nylas": 617, + "Squareup": 618, + "Dandelion": 619, + "DataFire": 620, + "DeepAI": 621, + "MeaningCloud": 622, + "NeutrinoApi": 623, + "Storecove": 624, + "Shipday": 625, + "Sentiment": 626, + "StreamChatMessaging": 627, + "TeamworkCRM": 628, + "TeamworkDesk": 629, + "TeamworkSpaces": 630, + "TheOddsApi": 631, + "Apacta": 632, + "GetSandbox": 633, + "Happi": 634, + "Oanda": 635, + "FastForex": 636, + "APIMatic": 637, + "VersionEye": 638, + "EagleEyeNetworks": 639, + "ThousandEyes": 640, + "SelectPDF": 641, + "Flightstats": 642, + "ChecIO": 643, + "Manifest": 644, + "ApiScience": 645, + "AppSynergy": 646, + "Caflou": 647, + "Caspio": 648, + "ChecklyHQ": 649, + "CloudElements": 650, + "DronaHQ": 651, + "Enablex": 652, + "Fmfw": 653, + "GoodDay": 654, + "Luno": 655, + "Meistertask": 656, + "Mindmeister": 657, + "PeopleDataLabs": 658, + "ScraperSite": 659, + "Scrapfly": 660, + "SimplyNoted": 661, + "TravelPayouts": 662, + "WebScraper": 663, + "Convier": 664, + "Courier": 665, + "Ditto": 666, + "Findl": 667, + "Lendflow": 668, + "Moderation": 669, + "Opendatasoft": 670, + "Podio": 671, + "Rockset": 672, + "Rownd": 673, + "Shotstack": 674, + "Swiftype": 675, + "Twitter": 676, + "Honey": 677, + "Freshdesk": 678, + "Upwave": 679, + "Fountain": 680, + "Freshbooks": 681, + "Mite": 682, + "Deputy": 683, + "Beebole": 684, + "Cashboard": 685, + "Kanban": 686, + "Worksnaps": 687, + "MyIntervals": 688, + "InvoiceOcean": 689, + "Sherpadesk": 690, + "Mrticktock": 691, + "Chatfule": 692, + "Aeroworkflow": 693, + "Emailoctopus": 694, + "Fusebill": 695, + "Geckoboard": 696, + "Gosquared": 697, + "Moonclerk": 698, + "Paymoapp": 699, + "Mixmax": 700, + "Processst": 701, + "Repairshopr": 702, + "Goshippo": 703, + "Sigopt": 704, + "Sugester": 705, + "Viewneo": 706, + "BoostNote": 707, + "CaptainData": 708, + "Checkvist": 709, + "Cliengo": 710, + "Cloze": 711, + "FormIO": 712, + "FormBucket": 713, + "GoCanvas": 714, + "MadKudu": 715, + "NozbeTeams": 716, + "Papyrs": 717, + "SuperNotesAPI": 718, + "Tallyfy": 719, + "ZenkitAPI": 720, + "CloudImage": 721, + "UploadCare": 722, + "Borgbase": 723, + "Pipedream": 724, + "Sirv": 725, + "Diffbot": 726, + "EightxEight": 727, + "Sendoso": 728, + "Printfection": 729, + "Authorize": 730, + "PandaScore": 731, + "Paymo": 732, + "AvazaPersonalAccessToken": 733, + "PlanviewLeanKit": 734, + "Livestorm": 735, + "KuCoin": 736, + "MetaAPI": 737, + "NiceHash": 738, + "CexIO": 739, + "Klipfolio": 740, + "Dynatrace": 741, + "MollieAPIKey": 742, + "MollieAccessToken": 743, + "BasisTheory": 744, + "Nordigen": 745, + "FlagsmithEnvironmentKey": 746, + "FlagsmithToken": 747, + "Mux": 748, + "Column": 749, + "Sendbird": 750, + "SendbirdOrganizationAPI": 751, + "Midise": 752, + "Mockaroo": 753, + "Image4": 754, + "Pinata": 755, + "BrowserStack": 756, + "CrossBrowserTesting": 757, + "Loadmill": 758, + "TestingBot": 759, + "KnapsackPro": 760, + "Qase": 761, + "Dareboost": 762, + "GTMetrix": 763, + "Holistic": 764, + "Parsers": 765, + "ScrutinizerCi": 766, + "SonarCloud": 767, + "APITemplate": 768, + "ConversionTools": 769, + "CraftMyPDF": 770, + "ExportSDK": 771, + "GlitterlyAPI": 772, + "Hybiscus": 773, + "Miro": 774, + "Statuspage": 775, + "Statuspal": 776, + "Teletype": 777, + "TimeCamp": 778, + "Userflow": 779, + "Wistia": 780, + "SportRadar": 781, + "UptimeRobot": 782, + "Codequiry": 783, + "ExtractorAPI": 784, + "Signable": 785, + "MagicBell": 786, + "Stormboard": 787, + "Apilayer": 788, + "Disqus": 789, + "Woopra": 790, + "Paperform": 791, + "Gumroad": 792, + "Paydirtapp": 793, + "Detectify": 794, + "Statuscake": 795, + "Jumpseller": 796, + "LunchMoney": 797, + "Rosette": 798, + "Yelp": 799, + "Atera": 800, + "EcoStruxureIT": 801, + "Aha": 802, + "Parsehub": 803, + "PackageCloud": 804, + "Cloudsmith": 805, + "Flowdash": 806, + "Flowdock": 807, + "Fibery": 808, + "Typetalk": 809, + "VoodooSMS": 810, + "ZulipChat": 811, + "Formcraft": 812, + "Iexapis": 813, + "Reachmail": 814, + "Chartmogul": 815, + "Appointedd": 816, + "Wit": 817, + "RechargePayments": 818, + "Diggernaut": 819, + "MonkeyLearn": 820, + "Duply": 821, + "Postbacks": 822, + "Collect2": 823, + "ZenRows": 824, + "Zipcodebase": 825, + "Tefter": 826, + "Twist": 827, + "BraintreePayments": 828, + "CloudConvert": 829, + "Grafana": 830, + "ConvertApi": 831, + "Transferwise": 832, + "Bulksms": 833, + "Databox": 834, + "Onesignal": 835, + "Rentman": 836, + "Parseur": 837, + "Docparser": 838, + "Formsite": 839, + "Tickettailor": 840, + "Lemlist": 841, + "Prodpad": 842, + "Formstack": 843, + "Codeclimate": 844, + "Codemagic": 845, + "Vbout": 846, + "Nightfall": 847, + "FlightLabs": 848, + "SpeechTextAI": 849, + "PollsAPI": 850, + "SimFin": 851, + "Scalr": 852, + "Kanbantool": 853, + "Brightlocal": 854, + "Hotwire": 855, + "Instabot": 856, + "Timekit": 857, + "Interseller": 858, + "Mojohelpdesk": 859, + "Createsend": 860, + "Getresponse": 861, + "Dynadot": 862, + "Demio": 863, + "Tokeet": 864, + "Myexperiment": 865, + "Copyscape": 866, + "Besnappy": 867, + "Salesmate": 868, + "Heatmapapi": 869, + "Websitepulse": 870, + "Uclassify": 871, + "Convert": 872, + "PDFmyURL": 873, + "Api2Convert": 874, + "Opsgenie": 875, + "Gemini": 876, + "Honeycomb": 877, + "KalturaAppToken": 878, + "KalturaSession": 879, + "BitGo": 880, + "Optidash": 881, + "Imgix": 882, + "ImageToText": 883, + "Page2Images": 884, + "Quickbase": 885, + "Redbooth": 886, + "Nubela": 887, + "Infobip": 888, + "Uproc": 889, + "Supportbee": 890, + "Aftership": 891, + "Edusign": 892, + "Teamup": 893, + "Workday": 894, + "MongoDB": 895, + "NGC": 896, + "DigitalOceanV2": 897, + "SQLServer": 898, + "FTP": 899, + "Redis": 900, + "LDAP": 901, + "Shopify": 902, + "RabbitMQ": 903, + "CustomRegex": 904, + "Etherscan": 905, + "Infura": 906, + "Alchemy": 907, + "BlockNative": 908, + "Moralis": 909, + "BscScan": 910, + "CoinMarketCap": 911, + "Percy": 912, + "TinesWebhook": 913, + "Pulumi": 914, + "SupabaseToken": 915, + "NuGetApiKey": 916, + "Aiven": 917, + "Prefect": 918, + "Docusign": 919, + "Couchbase": 920, + "Dockerhub": 921, + "TrufflehogEnterprise": 922, + "EnvoyApiKey": 923, + "GitHubOauth2": 924, + "Salesforce": 925, + "HuggingFace": 926, + "Snowflake": 927, + "Sourcegraph": 928, + "Tailscale": 929, + "Web3Storage": 930, + "AzureStorage": 931, + "PlanetScaleDb": 932, + "Anthropic": 933, + "Ramp": 934, + "Klaviyo": 935, + "SourcegraphCody": 936, + "Voiceflow": 937, + "Privacy": 938, + "IPInfo": 939, + "Ip2location": 940, + "Instamojo": 941, + "Portainer": 942, + "PortainerToken": 943, + "Loggly": 944, + "OpenVpn": 945, + "VagrantCloudPersonalToken": 946, + "BetterStack": 947, + "ZeroTier": 948, + "AppOptics": 949, + "Metabase": 950, + "CoinbaseWaaS": 951, + "LemonSqueezy": 952, + "Budibase": 953, + "DenoDeploy": 954, + "Stripo": 955, + "ReplyIO": 956, + "AzureBatch": 957, + "AzureContainerRegistry": 958, + "AWSSessionKey": 959, + "Coda": 960, + "LogzIO": 961, + "Eventbrite": 962, + "GrafanaServiceAccount": 963, + "RequestFinance": 964, + "Overloop": 965, + "Ngrok": 966, + "Replicate": 967, + "Postgres": 968, + "AzureActiveDirectoryApplicationSecret": 969, + "AzureCacheForRedisAccessKey": 970, + "AzureCosmosDBKeyIdentifiable": 971, + "AzureDevopsPersonalAccessToken": 972, + "AzureFunctionKey": 973, + "AzureMLWebServiceClassicIdentifiableKey": 974, + "AzureSasToken": 975, + "AzureSearchAdminKey": 976, + "AzureSearchQueryKey": 977, + "AzureManagementCertificate": 978, + "AzureSQL": 979, + "FlyIO": 980, + "BuiltWith": 981, + "JupiterOne": 982, + "GCPApplicationDefaultCredentials": 983, + "Wiz": 984, + "Pagarme": 985, + "Onfleet": 986, + "Intra42": 987, + "Groq": 988, + "TwitterConsumerkey": 989, + "Eraser": 990, + "LarkSuite": 991, + "LarkSuiteApiKey": 992, + "EndorLabs": 993, + "ElevenLabs": 994, + "Netsuite": 995, + "RobinhoodCrypto": 996, + "NVAPI": 997, + "PyPI": 998, + "RailwayApp": 999, + "Meraki": 1000, + "SaladCloudApiKey": 1001, + "Box": 1002, + "BoxOauth": 1003, + "ApiMetrics": 1004, + "WeightsAndBiases": 1005, + "ZohoCRM": 1006, + "AzureOpenAI": 1007, + "GoDaddy": 1008, + "Flexport": 1009, + "TwitchAccessToken": 1010, + "TwilioApiKey": 1011, + "Sanity": 1012, + "AzureRefreshToken": 1013, + "AirtableOAuth": 1014, + "AirtablePersonalAccessToken": 1015, + "StoryblokPersonalAccessToken": 1016, + "SentryOrgToken": 1017, + "AzureApiManagementRepositoryKey": 1018, + "AzureAPIManagementSubscriptionKey": 1019, + "Harness": 1020, + "Langfuse": 1021, + "BingSubscriptionKey": 1022, + "XAI": 1023, + "AzureDirectManagementKey": 1024, + "AzureAppConfigConnectionString": 1025, + "DeepSeek": 1026, + "StripePaymentIntent": 1027, + "LangSmith": 1028, + "BitbucketAppPassword": 1029, + "Hasura": 1030, + "SalesforceRefreshToken": 1031, + "AnypointOAuth2": 1032, + "WebexBot": 1033, + "TableauPersonalAccessToken": 1034, + "Rootly": 1035, + "HashiCorpVaultAuth": 1036, + "PhraseAccessToken": 1037, + "Photoroom": 1038, + "JWT": 1039, + "OpenAIAdmin": 1040, + "GoogleGeminiAPIKey": 1041, + "ArtifactoryReferenceToken": 1042, + "DatadogApikey": 1043, + } +) + +func (x DetectorType) Enum() *DetectorType { + p := new(DetectorType) + *p = x + return p +} + +func (x DetectorType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (DetectorType) Descriptor() protoreflect.EnumDescriptor { + return file_detector_type_proto_enumTypes[0].Descriptor() +} + +func (DetectorType) Type() protoreflect.EnumType { + return &file_detector_type_proto_enumTypes[0] +} + +func (x DetectorType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use DetectorType.Descriptor instead. +func (DetectorType) EnumDescriptor() ([]byte, []int) { + return file_detector_type_proto_rawDescGZIP(), []int{0} +} + +var File_detector_type_proto protoreflect.FileDescriptor + +var file_detector_type_proto_rawDesc = []byte{ + 0x0a, 0x13, 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x5f, + 0x74, 0x79, 0x70, 0x65, 0x2a, 0xa4, 0x87, 0x01, 0x0a, 0x0c, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, + 0x6f, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x41, 0x6c, 0x69, 0x62, 0x61, 0x62, + 0x61, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x41, 0x4d, 0x51, 0x50, 0x10, 0x01, 0x12, 0x07, 0x0a, + 0x03, 0x41, 0x57, 0x53, 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x41, 0x7a, 0x75, 0x72, 0x65, 0x10, + 0x03, 0x12, 0x0a, 0x0a, 0x06, 0x43, 0x69, 0x72, 0x63, 0x6c, 0x65, 0x10, 0x04, 0x12, 0x0c, 0x0a, + 0x08, 0x43, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x10, 0x05, 0x12, 0x07, 0x0a, 0x03, 0x47, + 0x43, 0x50, 0x10, 0x06, 0x12, 0x0b, 0x0a, 0x07, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x10, + 0x07, 0x12, 0x0a, 0x0a, 0x06, 0x47, 0x69, 0x74, 0x68, 0x75, 0x62, 0x10, 0x08, 0x12, 0x0a, 0x0a, + 0x06, 0x47, 0x69, 0x74, 0x6c, 0x61, 0x62, 0x10, 0x09, 0x12, 0x08, 0x0a, 0x04, 0x4a, 0x44, 0x42, + 0x43, 0x10, 0x0a, 0x12, 0x0c, 0x0a, 0x08, 0x52, 0x61, 0x7a, 0x6f, 0x72, 0x50, 0x61, 0x79, 0x10, + 0x0b, 0x12, 0x0c, 0x0a, 0x08, 0x53, 0x65, 0x6e, 0x64, 0x47, 0x72, 0x69, 0x64, 0x10, 0x0c, 0x12, + 0x09, 0x0a, 0x05, 0x53, 0x6c, 0x61, 0x63, 0x6b, 0x10, 0x0d, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x71, + 0x75, 0x61, 0x72, 0x65, 0x10, 0x0e, 0x12, 0x0e, 0x0a, 0x0a, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, + 0x65, 0x4b, 0x65, 0x79, 0x10, 0x0f, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x74, 0x72, 0x69, 0x70, 0x65, + 0x10, 0x10, 0x12, 0x07, 0x0a, 0x03, 0x55, 0x52, 0x49, 0x10, 0x11, 0x12, 0x0b, 0x0a, 0x07, 0x44, + 0x72, 0x6f, 0x70, 0x62, 0x6f, 0x78, 0x10, 0x12, 0x12, 0x0a, 0x0a, 0x06, 0x48, 0x65, 0x72, 0x6f, + 0x6b, 0x75, 0x10, 0x13, 0x12, 0x0d, 0x0a, 0x09, 0x4d, 0x61, 0x69, 0x6c, 0x63, 0x68, 0x69, 0x6d, + 0x70, 0x10, 0x14, 0x12, 0x08, 0x0a, 0x04, 0x4f, 0x6b, 0x74, 0x61, 0x10, 0x15, 0x12, 0x0c, 0x0a, + 0x08, 0x4f, 0x6e, 0x65, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x10, 0x16, 0x12, 0x12, 0x0a, 0x0e, 0x50, + 0x69, 0x76, 0x6f, 0x74, 0x61, 0x6c, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x65, 0x72, 0x10, 0x17, 0x12, + 0x0d, 0x0a, 0x09, 0x53, 0x71, 0x75, 0x61, 0x72, 0x65, 0x41, 0x70, 0x70, 0x10, 0x19, 0x12, 0x0a, + 0x0a, 0x06, 0x54, 0x77, 0x69, 0x6c, 0x69, 0x6f, 0x10, 0x1a, 0x12, 0x08, 0x0a, 0x04, 0x54, 0x65, + 0x73, 0x74, 0x10, 0x1b, 0x12, 0x0c, 0x0a, 0x08, 0x54, 0x72, 0x61, 0x76, 0x69, 0x73, 0x43, 0x49, + 0x10, 0x1d, 0x12, 0x10, 0x0a, 0x0c, 0x53, 0x6c, 0x61, 0x63, 0x6b, 0x57, 0x65, 0x62, 0x68, 0x6f, + 0x6f, 0x6b, 0x10, 0x1e, 0x12, 0x0f, 0x0a, 0x0b, 0x50, 0x61, 0x79, 0x70, 0x61, 0x6c, 0x4f, 0x61, + 0x75, 0x74, 0x68, 0x10, 0x1f, 0x12, 0x13, 0x0a, 0x0f, 0x50, 0x61, 0x67, 0x65, 0x72, 0x44, 0x75, + 0x74, 0x79, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x10, 0x20, 0x12, 0x0c, 0x0a, 0x08, 0x46, 0x69, + 0x72, 0x65, 0x62, 0x61, 0x73, 0x65, 0x10, 0x21, 0x12, 0x0b, 0x0a, 0x07, 0x4d, 0x61, 0x69, 0x6c, + 0x67, 0x75, 0x6e, 0x10, 0x22, 0x12, 0x0b, 0x0a, 0x07, 0x48, 0x75, 0x62, 0x53, 0x70, 0x6f, 0x74, + 0x10, 0x23, 0x12, 0x0d, 0x0a, 0x09, 0x47, 0x69, 0x74, 0x48, 0x75, 0x62, 0x41, 0x70, 0x70, 0x10, + 0x24, 0x12, 0x0c, 0x0a, 0x08, 0x43, 0x69, 0x72, 0x63, 0x6c, 0x65, 0x43, 0x49, 0x10, 0x25, 0x12, + 0x0c, 0x0a, 0x08, 0x57, 0x70, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x10, 0x26, 0x12, 0x10, 0x0a, + 0x0c, 0x44, 0x61, 0x74, 0x61, 0x64, 0x6f, 0x67, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x10, 0x27, 0x12, + 0x11, 0x0a, 0x0d, 0x46, 0x61, 0x63, 0x65, 0x62, 0x6f, 0x6f, 0x6b, 0x4f, 0x41, 0x75, 0x74, 0x68, + 0x10, 0x28, 0x12, 0x1c, 0x0a, 0x18, 0x41, 0x73, 0x61, 0x6e, 0x61, 0x50, 0x65, 0x72, 0x73, 0x6f, + 0x6e, 0x61, 0x6c, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x10, 0x29, + 0x12, 0x13, 0x0a, 0x0f, 0x41, 0x6d, 0x70, 0x6c, 0x69, 0x74, 0x75, 0x64, 0x65, 0x41, 0x70, 0x69, + 0x4b, 0x65, 0x79, 0x10, 0x2a, 0x12, 0x14, 0x0a, 0x10, 0x42, 0x69, 0x74, 0x4c, 0x79, 0x41, 0x63, + 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x10, 0x2b, 0x12, 0x12, 0x0a, 0x0e, 0x43, + 0x61, 0x6c, 0x65, 0x6e, 0x64, 0x6c, 0x79, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x10, 0x2c, 0x12, + 0x11, 0x0a, 0x0d, 0x5a, 0x61, 0x70, 0x69, 0x65, 0x72, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, + 0x10, 0x2d, 0x12, 0x11, 0x0a, 0x0d, 0x59, 0x6f, 0x75, 0x74, 0x75, 0x62, 0x65, 0x41, 0x70, 0x69, + 0x4b, 0x65, 0x79, 0x10, 0x2e, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x61, 0x6c, 0x65, 0x73, 0x66, 0x6f, + 0x72, 0x63, 0x65, 0x4f, 0x61, 0x75, 0x74, 0x68, 0x32, 0x10, 0x2f, 0x12, 0x14, 0x0a, 0x10, 0x54, + 0x77, 0x69, 0x74, 0x74, 0x65, 0x72, 0x41, 0x70, 0x69, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x10, + 0x30, 0x12, 0x0c, 0x0a, 0x08, 0x4e, 0x70, 0x6d, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x10, 0x31, 0x12, + 0x1a, 0x0a, 0x16, 0x4e, 0x65, 0x77, 0x52, 0x65, 0x6c, 0x69, 0x63, 0x50, 0x65, 0x72, 0x73, 0x6f, + 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x10, 0x32, 0x12, 0x16, 0x0a, 0x0e, 0x41, + 0x69, 0x72, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x10, 0x33, 0x1a, + 0x02, 0x08, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x41, 0x6b, 0x61, 0x6d, 0x61, 0x69, 0x54, 0x6f, 0x6b, + 0x65, 0x6e, 0x10, 0x34, 0x12, 0x0d, 0x0a, 0x09, 0x41, 0x6d, 0x61, 0x7a, 0x6f, 0x6e, 0x4d, 0x57, + 0x53, 0x10, 0x35, 0x12, 0x0e, 0x0a, 0x0a, 0x4b, 0x75, 0x62, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x10, 0x36, 0x12, 0x0e, 0x0a, 0x0a, 0x41, 0x75, 0x74, 0x68, 0x30, 0x6f, 0x61, 0x75, 0x74, + 0x68, 0x10, 0x37, 0x12, 0x0c, 0x0a, 0x08, 0x42, 0x69, 0x74, 0x66, 0x69, 0x6e, 0x65, 0x78, 0x10, + 0x38, 0x12, 0x0c, 0x0a, 0x08, 0x43, 0x6c, 0x61, 0x72, 0x69, 0x66, 0x61, 0x69, 0x10, 0x39, 0x12, + 0x1a, 0x0a, 0x16, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x66, 0x6c, 0x61, 0x72, 0x65, 0x47, 0x6c, 0x6f, + 0x62, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x10, 0x3a, 0x12, 0x13, 0x0a, 0x0f, 0x43, + 0x6c, 0x6f, 0x75, 0x64, 0x66, 0x6c, 0x61, 0x72, 0x65, 0x43, 0x61, 0x4b, 0x65, 0x79, 0x10, 0x3b, + 0x12, 0x0d, 0x0a, 0x09, 0x43, 0x6f, 0x6e, 0x66, 0x6c, 0x75, 0x65, 0x6e, 0x74, 0x10, 0x3c, 0x12, + 0x16, 0x0a, 0x12, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x66, 0x75, 0x6c, 0x44, 0x65, 0x6c, + 0x69, 0x76, 0x65, 0x72, 0x79, 0x10, 0x3d, 0x12, 0x13, 0x0a, 0x0f, 0x44, 0x61, 0x74, 0x61, 0x62, + 0x72, 0x69, 0x63, 0x6b, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x10, 0x3e, 0x12, 0x16, 0x0a, 0x12, + 0x44, 0x69, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x4f, 0x63, 0x65, 0x61, 0x6e, 0x53, 0x70, 0x61, 0x63, + 0x65, 0x73, 0x10, 0x3f, 0x12, 0x15, 0x0a, 0x11, 0x44, 0x69, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x4f, + 0x63, 0x65, 0x61, 0x6e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x10, 0x40, 0x12, 0x13, 0x0a, 0x0f, 0x44, + 0x69, 0x73, 0x63, 0x6f, 0x72, 0x64, 0x42, 0x6f, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x10, 0x41, + 0x12, 0x12, 0x0a, 0x0e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x72, 0x64, 0x57, 0x65, 0x62, 0x68, 0x6f, + 0x6f, 0x6b, 0x10, 0x42, 0x12, 0x12, 0x0a, 0x0a, 0x45, 0x74, 0x73, 0x79, 0x41, 0x70, 0x69, 0x4b, + 0x65, 0x79, 0x10, 0x43, 0x1a, 0x02, 0x08, 0x01, 0x12, 0x17, 0x0a, 0x13, 0x46, 0x61, 0x73, 0x74, + 0x6c, 0x79, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x61, 0x6c, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x10, + 0x44, 0x12, 0x10, 0x0a, 0x0c, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x4f, 0x61, 0x75, 0x74, 0x68, + 0x32, 0x10, 0x45, 0x12, 0x0d, 0x0a, 0x09, 0x52, 0x65, 0x43, 0x41, 0x50, 0x54, 0x43, 0x48, 0x41, + 0x10, 0x46, 0x12, 0x10, 0x0a, 0x0c, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x41, 0x70, 0x69, 0x4b, + 0x65, 0x79, 0x10, 0x47, 0x12, 0x0a, 0x0a, 0x06, 0x48, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x10, 0x48, + 0x12, 0x13, 0x0a, 0x0f, 0x49, 0x62, 0x6d, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x55, 0x73, 0x65, 0x72, + 0x4b, 0x65, 0x79, 0x10, 0x49, 0x12, 0x0b, 0x0a, 0x07, 0x4e, 0x65, 0x74, 0x6c, 0x69, 0x66, 0x79, + 0x10, 0x4a, 0x12, 0x0a, 0x0a, 0x06, 0x56, 0x6f, 0x6e, 0x61, 0x67, 0x65, 0x10, 0x4b, 0x12, 0x10, + 0x0a, 0x0c, 0x45, 0x71, 0x75, 0x69, 0x6e, 0x69, 0x78, 0x4f, 0x61, 0x75, 0x74, 0x68, 0x10, 0x4c, + 0x12, 0x0c, 0x0a, 0x08, 0x50, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x10, 0x4d, 0x12, 0x0e, + 0x0a, 0x0a, 0x50, 0x6c, 0x61, 0x69, 0x64, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x10, 0x4e, 0x12, 0x0c, + 0x0a, 0x08, 0x50, 0x6c, 0x61, 0x69, 0x64, 0x4b, 0x65, 0x79, 0x10, 0x4f, 0x12, 0x09, 0x0a, 0x05, + 0x50, 0x6c, 0x69, 0x76, 0x6f, 0x10, 0x50, 0x12, 0x0c, 0x0a, 0x08, 0x50, 0x6f, 0x73, 0x74, 0x6d, + 0x61, 0x72, 0x6b, 0x10, 0x51, 0x12, 0x14, 0x0a, 0x10, 0x50, 0x75, 0x62, 0x4e, 0x75, 0x62, 0x50, + 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x4b, 0x65, 0x79, 0x10, 0x52, 0x12, 0x19, 0x0a, 0x15, 0x50, + 0x75, 0x62, 0x4e, 0x75, 0x62, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x4b, 0x65, 0x79, 0x10, 0x53, 0x12, 0x14, 0x0a, 0x10, 0x50, 0x75, 0x73, 0x68, 0x65, 0x72, + 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x4b, 0x65, 0x79, 0x10, 0x54, 0x12, 0x0f, 0x0a, 0x0b, + 0x53, 0x63, 0x61, 0x6c, 0x65, 0x77, 0x61, 0x79, 0x4b, 0x65, 0x79, 0x10, 0x55, 0x12, 0x10, 0x0a, + 0x0c, 0x53, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x42, 0x6c, 0x75, 0x65, 0x56, 0x32, 0x10, 0x56, 0x12, + 0x0f, 0x0a, 0x0b, 0x53, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x10, 0x57, + 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x68, 0x6f, 0x64, 0x61, 0x6e, 0x4b, 0x65, 0x79, 0x10, 0x58, 0x12, + 0x0b, 0x0a, 0x07, 0x53, 0x6e, 0x79, 0x6b, 0x4b, 0x65, 0x79, 0x10, 0x59, 0x12, 0x0e, 0x0a, 0x0a, + 0x53, 0x70, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x4b, 0x65, 0x79, 0x10, 0x5a, 0x12, 0x14, 0x0a, 0x10, + 0x54, 0x65, 0x6c, 0x65, 0x67, 0x72, 0x61, 0x6d, 0x42, 0x6f, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, + 0x10, 0x5b, 0x12, 0x13, 0x0a, 0x0f, 0x54, 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x74, 0x43, 0x6c, 0x6f, + 0x75, 0x64, 0x4b, 0x65, 0x79, 0x10, 0x5c, 0x12, 0x1f, 0x0a, 0x1b, 0x54, 0x65, 0x72, 0x72, 0x61, + 0x66, 0x6f, 0x72, 0x6d, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x61, + 0x6c, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x10, 0x5d, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x72, 0x65, 0x6c, + 0x6c, 0x6f, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x10, 0x5e, 0x12, 0x0e, 0x0a, 0x0a, 0x5a, 0x65, + 0x6e, 0x64, 0x65, 0x73, 0x6b, 0x41, 0x70, 0x69, 0x10, 0x5f, 0x12, 0x12, 0x0a, 0x0e, 0x4d, 0x61, + 0x78, 0x4d, 0x69, 0x6e, 0x64, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x10, 0x60, 0x12, 0x1a, + 0x0a, 0x16, 0x41, 0x69, 0x72, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x10, 0x61, 0x12, 0x0e, 0x0a, 0x0a, 0x41, 0x73, + 0x61, 0x6e, 0x61, 0x4f, 0x61, 0x75, 0x74, 0x68, 0x10, 0x62, 0x12, 0x0c, 0x0a, 0x08, 0x52, 0x61, + 0x70, 0x69, 0x64, 0x41, 0x70, 0x69, 0x10, 0x63, 0x12, 0x16, 0x0a, 0x12, 0x43, 0x6c, 0x6f, 0x75, + 0x64, 0x66, 0x6c, 0x61, 0x72, 0x65, 0x41, 0x70, 0x69, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x10, 0x64, + 0x12, 0x09, 0x0a, 0x05, 0x57, 0x65, 0x62, 0x65, 0x78, 0x10, 0x65, 0x12, 0x1a, 0x0a, 0x16, 0x46, + 0x69, 0x72, 0x65, 0x62, 0x61, 0x73, 0x65, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x4d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x69, 0x6e, 0x67, 0x10, 0x66, 0x12, 0x21, 0x0a, 0x1d, 0x43, 0x6f, 0x6e, 0x74, 0x65, + 0x6e, 0x74, 0x66, 0x75, 0x6c, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x61, 0x6c, 0x41, 0x63, 0x63, + 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x10, 0x67, 0x12, 0x0a, 0x0a, 0x06, 0x4d, 0x61, + 0x70, 0x42, 0x6f, 0x78, 0x10, 0x68, 0x12, 0x14, 0x0a, 0x10, 0x4d, 0x61, 0x69, 0x6c, 0x4a, 0x65, + 0x74, 0x42, 0x61, 0x73, 0x69, 0x63, 0x41, 0x75, 0x74, 0x68, 0x10, 0x69, 0x12, 0x0e, 0x0a, 0x0a, + 0x4d, 0x61, 0x69, 0x6c, 0x4a, 0x65, 0x74, 0x53, 0x4d, 0x53, 0x10, 0x6a, 0x12, 0x11, 0x0a, 0x0d, + 0x48, 0x75, 0x62, 0x53, 0x70, 0x6f, 0x74, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x10, 0x6b, 0x12, + 0x10, 0x0a, 0x0c, 0x48, 0x75, 0x62, 0x53, 0x70, 0x6f, 0x74, 0x4f, 0x61, 0x75, 0x74, 0x68, 0x10, + 0x6c, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x73, 0x6c, 0x4d, 0x61, 0x74, 0x65, 0x10, 0x6d, 0x12, 0x1b, + 0x0a, 0x17, 0x41, 0x75, 0x74, 0x68, 0x30, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x41, 0x70, 0x69, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x10, 0x6e, 0x12, 0x0f, 0x0a, 0x0b, 0x4d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x42, 0x69, 0x72, 0x64, 0x10, 0x6f, 0x12, 0x10, 0x0a, 0x0c, + 0x45, 0x6c, 0x61, 0x73, 0x74, 0x69, 0x63, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x10, 0x70, 0x12, 0x1c, + 0x0a, 0x18, 0x46, 0x69, 0x67, 0x6d, 0x61, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x61, 0x6c, 0x41, + 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x10, 0x71, 0x12, 0x19, 0x0a, 0x15, + 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x73, 0x57, 0x65, + 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x10, 0x72, 0x12, 0x0d, 0x0a, 0x09, 0x47, 0x69, 0x74, 0x48, 0x75, + 0x62, 0x4f, 0x6c, 0x64, 0x10, 0x73, 0x12, 0x0f, 0x0a, 0x0b, 0x56, 0x75, 0x6c, 0x74, 0x72, 0x41, + 0x70, 0x69, 0x4b, 0x65, 0x79, 0x10, 0x74, 0x12, 0x0c, 0x0a, 0x08, 0x50, 0x65, 0x70, 0x69, 0x70, + 0x6f, 0x73, 0x74, 0x10, 0x75, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x6f, 0x73, 0x74, 0x6d, 0x61, 0x6e, + 0x10, 0x76, 0x12, 0x11, 0x0a, 0x0d, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x73, 0x69, 0x67, 0x68, 0x74, + 0x4b, 0x65, 0x79, 0x10, 0x77, 0x12, 0x0d, 0x0a, 0x09, 0x4a, 0x69, 0x72, 0x61, 0x54, 0x6f, 0x6b, + 0x65, 0x6e, 0x10, 0x78, 0x12, 0x0f, 0x0a, 0x0b, 0x4e, 0x65, 0x78, 0x6d, 0x6f, 0x41, 0x70, 0x69, + 0x4b, 0x65, 0x79, 0x10, 0x79, 0x12, 0x11, 0x0a, 0x0d, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, + 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x10, 0x7a, 0x12, 0x10, 0x0a, 0x0c, 0x53, 0x75, 0x6d, 0x6f, + 0x4c, 0x6f, 0x67, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x10, 0x7b, 0x12, 0x14, 0x0a, 0x10, 0x50, 0x75, + 0x73, 0x68, 0x42, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x10, 0x7c, + 0x12, 0x16, 0x0a, 0x12, 0x41, 0x69, 0x72, 0x62, 0x72, 0x61, 0x6b, 0x65, 0x50, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x4b, 0x65, 0x79, 0x10, 0x7d, 0x12, 0x13, 0x0a, 0x0f, 0x41, 0x69, 0x72, 0x62, + 0x72, 0x61, 0x6b, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x10, 0x7e, 0x12, 0x17, 0x0a, + 0x13, 0x50, 0x65, 0x6e, 0x64, 0x6f, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x4b, 0x65, 0x79, 0x10, 0x7f, 0x12, 0x1f, 0x0a, 0x1a, 0x53, 0x70, 0x6c, 0x75, 0x6e, 0x6b, + 0x4f, 0x62, 0x65, 0x72, 0x73, 0x65, 0x72, 0x76, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x54, + 0x6f, 0x6b, 0x65, 0x6e, 0x10, 0x80, 0x01, 0x12, 0x12, 0x0a, 0x0d, 0x4c, 0x6f, 0x6b, 0x61, 0x6c, + 0x69, 0x73, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x10, 0x81, 0x01, 0x12, 0x11, 0x0a, 0x0c, 0x43, + 0x61, 0x6c, 0x65, 0x6e, 0x64, 0x61, 0x72, 0x69, 0x66, 0x69, 0x63, 0x10, 0x82, 0x01, 0x12, 0x0e, + 0x0a, 0x09, 0x4a, 0x75, 0x6d, 0x70, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x10, 0x83, 0x01, 0x12, 0x0c, + 0x0a, 0x07, 0x49, 0x70, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x10, 0x85, 0x01, 0x12, 0x0b, 0x0a, 0x06, + 0x4e, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x10, 0x86, 0x01, 0x12, 0x0c, 0x0a, 0x07, 0x44, 0x72, 0x6f, + 0x6e, 0x65, 0x43, 0x49, 0x10, 0x87, 0x01, 0x12, 0x0c, 0x0a, 0x07, 0x41, 0x64, 0x6f, 0x62, 0x65, + 0x49, 0x4f, 0x10, 0x88, 0x01, 0x12, 0x0f, 0x0a, 0x0a, 0x54, 0x77, 0x65, 0x6c, 0x76, 0x65, 0x44, + 0x61, 0x74, 0x61, 0x10, 0x89, 0x01, 0x12, 0x0e, 0x0a, 0x09, 0x44, 0x37, 0x4e, 0x65, 0x74, 0x77, + 0x6f, 0x72, 0x6b, 0x10, 0x8a, 0x01, 0x12, 0x10, 0x0a, 0x0b, 0x53, 0x63, 0x72, 0x61, 0x70, 0x69, + 0x6e, 0x67, 0x42, 0x65, 0x65, 0x10, 0x8b, 0x01, 0x12, 0x0b, 0x0a, 0x06, 0x4b, 0x65, 0x65, 0x6e, + 0x49, 0x4f, 0x10, 0x8c, 0x01, 0x12, 0x0d, 0x0a, 0x08, 0x57, 0x61, 0x6b, 0x61, 0x74, 0x69, 0x6d, + 0x65, 0x10, 0x8d, 0x01, 0x12, 0x0e, 0x0a, 0x09, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x6b, 0x69, 0x74, + 0x65, 0x10, 0x8e, 0x01, 0x12, 0x0d, 0x0a, 0x08, 0x56, 0x65, 0x72, 0x69, 0x6d, 0x61, 0x69, 0x6c, + 0x10, 0x8f, 0x01, 0x12, 0x0f, 0x0a, 0x0a, 0x5a, 0x65, 0x72, 0x6f, 0x62, 0x6f, 0x75, 0x6e, 0x63, + 0x65, 0x10, 0x90, 0x01, 0x12, 0x11, 0x0a, 0x0c, 0x4d, 0x61, 0x69, 0x6c, 0x62, 0x6f, 0x78, 0x6c, + 0x61, 0x79, 0x65, 0x72, 0x10, 0x91, 0x01, 0x12, 0x0f, 0x0a, 0x0a, 0x46, 0x61, 0x73, 0x74, 0x73, + 0x70, 0x72, 0x69, 0x6e, 0x67, 0x10, 0x92, 0x01, 0x12, 0x0b, 0x0a, 0x06, 0x50, 0x61, 0x64, 0x64, + 0x6c, 0x65, 0x10, 0x93, 0x01, 0x12, 0x0b, 0x0a, 0x06, 0x53, 0x65, 0x6c, 0x6c, 0x66, 0x79, 0x10, + 0x94, 0x01, 0x12, 0x0c, 0x0a, 0x07, 0x46, 0x69, 0x78, 0x65, 0x72, 0x49, 0x4f, 0x10, 0x95, 0x01, + 0x12, 0x0e, 0x0a, 0x09, 0x42, 0x75, 0x74, 0x74, 0x65, 0x72, 0x43, 0x4d, 0x53, 0x10, 0x96, 0x01, + 0x12, 0x0b, 0x0a, 0x06, 0x54, 0x61, 0x78, 0x6a, 0x61, 0x72, 0x10, 0x97, 0x01, 0x12, 0x0c, 0x0a, + 0x07, 0x41, 0x76, 0x61, 0x6c, 0x61, 0x72, 0x61, 0x10, 0x98, 0x01, 0x12, 0x0e, 0x0a, 0x09, 0x48, + 0x65, 0x6c, 0x70, 0x73, 0x63, 0x6f, 0x75, 0x74, 0x10, 0x99, 0x01, 0x12, 0x10, 0x0a, 0x0b, 0x45, + 0x6c, 0x61, 0x73, 0x74, 0x69, 0x63, 0x50, 0x61, 0x74, 0x68, 0x10, 0x9a, 0x01, 0x12, 0x0b, 0x0a, + 0x06, 0x5a, 0x65, 0x70, 0x6c, 0x69, 0x6e, 0x10, 0x9b, 0x01, 0x12, 0x0d, 0x0a, 0x08, 0x49, 0x6e, + 0x74, 0x65, 0x72, 0x63, 0x6f, 0x6d, 0x10, 0x9c, 0x01, 0x12, 0x0d, 0x0a, 0x08, 0x4d, 0x61, 0x69, + 0x6c, 0x6d, 0x6f, 0x64, 0x6f, 0x10, 0x9d, 0x01, 0x12, 0x0c, 0x0a, 0x07, 0x43, 0x61, 0x6e, 0x6e, + 0x79, 0x49, 0x6f, 0x10, 0x9e, 0x01, 0x12, 0x0e, 0x0a, 0x09, 0x50, 0x69, 0x70, 0x65, 0x64, 0x72, + 0x69, 0x76, 0x65, 0x10, 0x9f, 0x01, 0x12, 0x0b, 0x0a, 0x06, 0x56, 0x65, 0x72, 0x63, 0x65, 0x6c, + 0x10, 0xa0, 0x01, 0x12, 0x0f, 0x0a, 0x0a, 0x50, 0x6f, 0x73, 0x74, 0x68, 0x6f, 0x67, 0x41, 0x70, + 0x70, 0x10, 0xa1, 0x01, 0x12, 0x11, 0x0a, 0x0c, 0x53, 0x69, 0x6e, 0x63, 0x68, 0x4d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x10, 0xa2, 0x01, 0x12, 0x0d, 0x0a, 0x08, 0x41, 0x79, 0x72, 0x73, 0x68, + 0x61, 0x72, 0x65, 0x10, 0xa3, 0x01, 0x12, 0x0f, 0x0a, 0x0a, 0x48, 0x65, 0x6c, 0x70, 0x43, 0x72, + 0x75, 0x6e, 0x63, 0x68, 0x10, 0xa4, 0x01, 0x12, 0x0e, 0x0a, 0x09, 0x4c, 0x69, 0x76, 0x65, 0x41, + 0x67, 0x65, 0x6e, 0x74, 0x10, 0xa5, 0x01, 0x12, 0x0b, 0x0a, 0x06, 0x42, 0x65, 0x61, 0x6d, 0x65, + 0x72, 0x10, 0xa6, 0x01, 0x12, 0x11, 0x0a, 0x0c, 0x57, 0x65, 0x43, 0x68, 0x61, 0x74, 0x41, 0x70, + 0x70, 0x4b, 0x65, 0x79, 0x10, 0xa7, 0x01, 0x12, 0x12, 0x0a, 0x0d, 0x4c, 0x69, 0x6e, 0x65, 0x4d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x69, 0x6e, 0x67, 0x10, 0xa8, 0x01, 0x12, 0x14, 0x0a, 0x0f, 0x55, + 0x62, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x10, 0xa9, + 0x01, 0x12, 0x14, 0x0a, 0x0f, 0x41, 0x6c, 0x67, 0x6f, 0x6c, 0x69, 0x61, 0x41, 0x64, 0x6d, 0x69, + 0x6e, 0x4b, 0x65, 0x79, 0x10, 0xaa, 0x01, 0x12, 0x10, 0x0a, 0x0b, 0x46, 0x75, 0x6c, 0x6c, 0x43, + 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x10, 0xab, 0x01, 0x12, 0x0d, 0x0a, 0x08, 0x4d, 0x61, 0x6e, + 0x64, 0x72, 0x69, 0x6c, 0x6c, 0x10, 0xac, 0x01, 0x12, 0x10, 0x0a, 0x0b, 0x46, 0x6c, 0x75, 0x74, + 0x74, 0x65, 0x72, 0x77, 0x61, 0x76, 0x65, 0x10, 0xad, 0x01, 0x12, 0x1c, 0x0a, 0x17, 0x4d, 0x61, + 0x74, 0x74, 0x65, 0x72, 0x6d, 0x6f, 0x73, 0x74, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x61, 0x6c, + 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x10, 0xae, 0x01, 0x12, 0x0d, 0x0a, 0x08, 0x43, 0x6c, 0x6f, 0x75, + 0x64, 0x61, 0x6e, 0x74, 0x10, 0xaf, 0x01, 0x12, 0x0f, 0x0a, 0x0a, 0x4c, 0x69, 0x6e, 0x65, 0x4e, + 0x6f, 0x74, 0x69, 0x66, 0x79, 0x10, 0xb0, 0x01, 0x12, 0x0e, 0x0a, 0x09, 0x4c, 0x69, 0x6e, 0x65, + 0x61, 0x72, 0x41, 0x50, 0x49, 0x10, 0xb1, 0x01, 0x12, 0x0c, 0x0a, 0x07, 0x55, 0x62, 0x69, 0x64, + 0x6f, 0x74, 0x73, 0x10, 0xb2, 0x01, 0x12, 0x0d, 0x0a, 0x08, 0x41, 0x6e, 0x79, 0x70, 0x6f, 0x69, + 0x6e, 0x74, 0x10, 0xb3, 0x01, 0x12, 0x0b, 0x0a, 0x06, 0x44, 0x77, 0x6f, 0x6c, 0x6c, 0x61, 0x10, + 0xb4, 0x01, 0x12, 0x1b, 0x0a, 0x16, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, + 0x79, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x10, 0xb5, 0x01, 0x12, + 0x0a, 0x0a, 0x05, 0x53, 0x75, 0x72, 0x67, 0x65, 0x10, 0xb6, 0x01, 0x12, 0x0e, 0x0a, 0x09, 0x53, + 0x70, 0x61, 0x72, 0x6b, 0x70, 0x6f, 0x73, 0x74, 0x10, 0xb7, 0x01, 0x12, 0x0f, 0x0a, 0x0a, 0x47, + 0x6f, 0x43, 0x61, 0x72, 0x64, 0x6c, 0x65, 0x73, 0x73, 0x10, 0xb8, 0x01, 0x12, 0x0b, 0x0a, 0x06, + 0x43, 0x6f, 0x64, 0x61, 0x63, 0x79, 0x10, 0xb9, 0x01, 0x12, 0x0b, 0x0a, 0x06, 0x4b, 0x72, 0x61, + 0x6b, 0x65, 0x6e, 0x10, 0xba, 0x01, 0x12, 0x0d, 0x0a, 0x08, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x6f, + 0x75, 0x74, 0x10, 0xbb, 0x01, 0x12, 0x0b, 0x0a, 0x06, 0x4b, 0x61, 0x69, 0x72, 0x6f, 0x73, 0x10, + 0xbc, 0x01, 0x12, 0x11, 0x0a, 0x0c, 0x43, 0x6c, 0x6f, 0x63, 0x6b, 0x77, 0x6f, 0x72, 0x6b, 0x53, + 0x4d, 0x53, 0x10, 0xbd, 0x01, 0x12, 0x0e, 0x0a, 0x09, 0x41, 0x74, 0x6c, 0x61, 0x73, 0x73, 0x69, + 0x61, 0x6e, 0x10, 0xbe, 0x01, 0x12, 0x11, 0x0a, 0x0c, 0x4c, 0x61, 0x75, 0x6e, 0x63, 0x68, 0x44, + 0x61, 0x72, 0x6b, 0x6c, 0x79, 0x10, 0xbf, 0x01, 0x12, 0x0e, 0x0a, 0x09, 0x43, 0x6f, 0x76, 0x65, + 0x72, 0x61, 0x6c, 0x6c, 0x73, 0x10, 0xc0, 0x01, 0x12, 0x0b, 0x0a, 0x06, 0x4c, 0x69, 0x6e, 0x6f, + 0x64, 0x65, 0x10, 0xc1, 0x01, 0x12, 0x0a, 0x0a, 0x05, 0x57, 0x65, 0x50, 0x61, 0x79, 0x10, 0xc2, + 0x01, 0x12, 0x10, 0x0a, 0x0b, 0x50, 0x6c, 0x61, 0x6e, 0x65, 0x74, 0x53, 0x63, 0x61, 0x6c, 0x65, + 0x10, 0xc3, 0x01, 0x12, 0x0c, 0x0a, 0x07, 0x44, 0x6f, 0x70, 0x70, 0x6c, 0x65, 0x72, 0x10, 0xc4, + 0x01, 0x12, 0x0a, 0x0a, 0x05, 0x41, 0x67, 0x6f, 0x72, 0x61, 0x10, 0xc5, 0x01, 0x12, 0x0c, 0x0a, + 0x07, 0x53, 0x61, 0x6d, 0x73, 0x61, 0x72, 0x61, 0x10, 0xc6, 0x01, 0x12, 0x0c, 0x0a, 0x07, 0x46, + 0x72, 0x61, 0x6d, 0x65, 0x49, 0x4f, 0x10, 0xc7, 0x01, 0x12, 0x0d, 0x0a, 0x08, 0x52, 0x75, 0x62, + 0x79, 0x47, 0x65, 0x6d, 0x73, 0x10, 0xc8, 0x01, 0x12, 0x0b, 0x0a, 0x06, 0x4f, 0x70, 0x65, 0x6e, + 0x41, 0x49, 0x10, 0xc9, 0x01, 0x12, 0x12, 0x0a, 0x0d, 0x53, 0x75, 0x72, 0x76, 0x65, 0x79, 0x53, + 0x70, 0x61, 0x72, 0x72, 0x6f, 0x77, 0x10, 0xca, 0x01, 0x12, 0x0c, 0x0a, 0x07, 0x53, 0x69, 0x6d, + 0x76, 0x6f, 0x6c, 0x79, 0x10, 0xcb, 0x01, 0x12, 0x0e, 0x0a, 0x09, 0x53, 0x75, 0x72, 0x76, 0x69, + 0x63, 0x61, 0x74, 0x65, 0x10, 0xcc, 0x01, 0x12, 0x0d, 0x0a, 0x08, 0x4f, 0x6d, 0x6e, 0x69, 0x73, + 0x65, 0x6e, 0x64, 0x10, 0xcd, 0x01, 0x12, 0x0d, 0x0a, 0x08, 0x47, 0x72, 0x6f, 0x6f, 0x76, 0x65, + 0x68, 0x71, 0x10, 0xce, 0x01, 0x12, 0x0c, 0x0a, 0x07, 0x4e, 0x65, 0x77, 0x73, 0x61, 0x70, 0x69, + 0x10, 0xcf, 0x01, 0x12, 0x0c, 0x0a, 0x07, 0x43, 0x68, 0x61, 0x74, 0x62, 0x6f, 0x74, 0x10, 0xd0, + 0x01, 0x12, 0x11, 0x0a, 0x0c, 0x43, 0x6c, 0x69, 0x63, 0x6b, 0x53, 0x65, 0x6e, 0x64, 0x73, 0x6d, + 0x73, 0x10, 0xd1, 0x01, 0x12, 0x0c, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x67, 0x69, 0x73, 0x74, 0x10, + 0xd2, 0x01, 0x12, 0x0f, 0x0a, 0x0a, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x49, 0x4f, + 0x10, 0xd3, 0x01, 0x12, 0x0c, 0x0a, 0x07, 0x41, 0x70, 0x69, 0x44, 0x65, 0x63, 0x6b, 0x10, 0xd4, + 0x01, 0x12, 0x0c, 0x0a, 0x07, 0x4e, 0x66, 0x74, 0x70, 0x6f, 0x72, 0x74, 0x10, 0xd5, 0x01, 0x12, + 0x0b, 0x0a, 0x06, 0x43, 0x6f, 0x70, 0x70, 0x65, 0x72, 0x10, 0xd6, 0x01, 0x12, 0x0a, 0x0a, 0x05, + 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x10, 0xd7, 0x01, 0x12, 0x11, 0x0a, 0x0c, 0x4d, 0x79, 0x66, 0x72, + 0x65, 0x73, 0x68, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x10, 0xd8, 0x01, 0x12, 0x0f, 0x0a, 0x0a, 0x53, + 0x61, 0x6c, 0x65, 0x73, 0x66, 0x6c, 0x61, 0x72, 0x65, 0x10, 0xd9, 0x01, 0x12, 0x0c, 0x0a, 0x07, + 0x57, 0x65, 0x62, 0x66, 0x6c, 0x6f, 0x77, 0x10, 0xda, 0x01, 0x12, 0x09, 0x0a, 0x04, 0x44, 0x75, + 0x64, 0x61, 0x10, 0xdb, 0x01, 0x12, 0x09, 0x0a, 0x04, 0x59, 0x65, 0x78, 0x74, 0x10, 0xdc, 0x01, + 0x12, 0x11, 0x0a, 0x0c, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x63, 0x6b, + 0x10, 0xdd, 0x01, 0x12, 0x19, 0x0a, 0x14, 0x53, 0x74, 0x6f, 0x72, 0x79, 0x62, 0x6c, 0x6f, 0x6b, + 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x10, 0xde, 0x01, 0x12, 0x0d, + 0x0a, 0x08, 0x47, 0x72, 0x61, 0x70, 0x68, 0x43, 0x4d, 0x53, 0x10, 0xdf, 0x01, 0x12, 0x10, 0x0a, + 0x0b, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x10, 0xe0, 0x01, 0x12, + 0x0f, 0x0a, 0x0a, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x6b, 0x69, 0x74, 0x10, 0xe1, 0x01, + 0x12, 0x11, 0x0a, 0x0c, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x47, 0x75, 0x72, 0x75, + 0x10, 0xe2, 0x01, 0x12, 0x0c, 0x0a, 0x07, 0x4b, 0x61, 0x6c, 0x65, 0x79, 0x72, 0x61, 0x10, 0xe3, + 0x01, 0x12, 0x0f, 0x0a, 0x0a, 0x4d, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x6c, 0x69, 0x74, 0x65, 0x10, + 0xe4, 0x01, 0x12, 0x0d, 0x0a, 0x08, 0x51, 0x75, 0x61, 0x6c, 0x61, 0x72, 0x6f, 0x6f, 0x10, 0xe5, + 0x01, 0x12, 0x19, 0x0a, 0x14, 0x53, 0x61, 0x74, 0x69, 0x73, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x50, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x6b, 0x65, 0x79, 0x10, 0xe6, 0x01, 0x12, 0x17, 0x0a, 0x12, + 0x53, 0x61, 0x74, 0x69, 0x73, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x57, 0x72, 0x69, 0x74, 0x65, 0x6b, + 0x65, 0x79, 0x10, 0xe7, 0x01, 0x12, 0x0e, 0x0a, 0x09, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x73, + 0x61, 0x74, 0x10, 0xe8, 0x01, 0x12, 0x13, 0x0a, 0x0e, 0x53, 0x75, 0x72, 0x76, 0x65, 0x79, 0x41, + 0x6e, 0x79, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x10, 0xe9, 0x01, 0x12, 0x0e, 0x0a, 0x09, 0x53, 0x75, + 0x72, 0x76, 0x65, 0x79, 0x42, 0x6f, 0x74, 0x10, 0xea, 0x01, 0x12, 0x0e, 0x0a, 0x09, 0x57, 0x65, + 0x62, 0x65, 0x6e, 0x67, 0x61, 0x67, 0x65, 0x10, 0xeb, 0x01, 0x12, 0x12, 0x0a, 0x0d, 0x5a, 0x6f, + 0x6e, 0x6b, 0x61, 0x46, 0x65, 0x65, 0x64, 0x62, 0x61, 0x63, 0x6b, 0x10, 0xec, 0x01, 0x12, 0x0e, + 0x0a, 0x09, 0x44, 0x65, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x10, 0xed, 0x01, 0x12, 0x0c, + 0x0a, 0x07, 0x46, 0x65, 0x65, 0x64, 0x69, 0x65, 0x72, 0x10, 0xee, 0x01, 0x12, 0x0d, 0x0a, 0x08, + 0x41, 0x62, 0x79, 0x73, 0x73, 0x61, 0x6c, 0x65, 0x10, 0xef, 0x01, 0x12, 0x0d, 0x0a, 0x08, 0x4d, + 0x61, 0x67, 0x6e, 0x65, 0x74, 0x69, 0x63, 0x10, 0xf0, 0x01, 0x12, 0x10, 0x0a, 0x07, 0x4e, 0x79, + 0x74, 0x69, 0x6d, 0x65, 0x73, 0x10, 0xf1, 0x01, 0x1a, 0x02, 0x08, 0x01, 0x12, 0x0c, 0x0a, 0x07, + 0x50, 0x6f, 0x6c, 0x79, 0x67, 0x6f, 0x6e, 0x10, 0xf2, 0x01, 0x12, 0x0c, 0x0a, 0x07, 0x50, 0x6f, + 0x77, 0x72, 0x62, 0x6f, 0x74, 0x10, 0xf3, 0x01, 0x12, 0x13, 0x0a, 0x0a, 0x50, 0x72, 0x6f, 0x73, + 0x70, 0x65, 0x63, 0x74, 0x49, 0x4f, 0x10, 0xf4, 0x01, 0x1a, 0x02, 0x08, 0x01, 0x12, 0x0d, 0x0a, + 0x08, 0x53, 0x6b, 0x72, 0x61, 0x70, 0x70, 0x69, 0x6f, 0x10, 0xf5, 0x01, 0x12, 0x0b, 0x0a, 0x06, + 0x4d, 0x6f, 0x6e, 0x64, 0x61, 0x79, 0x10, 0xf6, 0x01, 0x12, 0x10, 0x0a, 0x0b, 0x53, 0x6d, 0x61, + 0x72, 0x74, 0x73, 0x68, 0x65, 0x65, 0x74, 0x73, 0x10, 0xf7, 0x01, 0x12, 0x0a, 0x0a, 0x05, 0x57, + 0x72, 0x69, 0x6b, 0x65, 0x10, 0xf8, 0x01, 0x12, 0x0a, 0x0a, 0x05, 0x46, 0x6c, 0x6f, 0x61, 0x74, + 0x10, 0xf9, 0x01, 0x12, 0x0d, 0x0a, 0x08, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x6b, 0x69, 0x74, 0x10, + 0xfa, 0x01, 0x12, 0x13, 0x0a, 0x0a, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x6f, 0x6d, 0x61, 0x74, + 0x10, 0xfb, 0x01, 0x1a, 0x02, 0x08, 0x01, 0x12, 0x0f, 0x0a, 0x0a, 0x53, 0x61, 0x6c, 0x65, 0x73, + 0x62, 0x6c, 0x69, 0x6e, 0x6b, 0x10, 0xfc, 0x01, 0x12, 0x0a, 0x0a, 0x05, 0x42, 0x6f, 0x72, 0x65, + 0x64, 0x10, 0xfd, 0x01, 0x12, 0x0c, 0x0a, 0x07, 0x43, 0x61, 0x6d, 0x70, 0x61, 0x79, 0x6e, 0x10, + 0xfe, 0x01, 0x12, 0x0e, 0x0a, 0x09, 0x43, 0x6c, 0x69, 0x6e, 0x63, 0x68, 0x70, 0x61, 0x64, 0x10, + 0xff, 0x01, 0x12, 0x0f, 0x0a, 0x0a, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x48, 0x75, 0x62, + 0x10, 0x80, 0x02, 0x12, 0x0d, 0x0a, 0x08, 0x44, 0x65, 0x62, 0x6f, 0x75, 0x6e, 0x63, 0x65, 0x10, + 0x81, 0x02, 0x12, 0x0d, 0x0a, 0x08, 0x44, 0x79, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x10, 0x82, + 0x02, 0x12, 0x10, 0x0a, 0x0b, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x61, 0x70, 0x69, + 0x10, 0x83, 0x02, 0x12, 0x0c, 0x0a, 0x07, 0x48, 0x61, 0x72, 0x76, 0x65, 0x73, 0x74, 0x10, 0x84, + 0x02, 0x12, 0x0c, 0x0a, 0x07, 0x4d, 0x6f, 0x6f, 0x73, 0x65, 0x6e, 0x64, 0x10, 0x85, 0x02, 0x12, + 0x10, 0x0a, 0x0b, 0x4f, 0x70, 0x65, 0x6e, 0x57, 0x65, 0x61, 0x74, 0x68, 0x65, 0x72, 0x10, 0x86, + 0x02, 0x12, 0x0d, 0x0a, 0x08, 0x53, 0x69, 0x74, 0x65, 0x6c, 0x65, 0x61, 0x66, 0x10, 0x87, 0x02, + 0x12, 0x10, 0x0a, 0x0b, 0x53, 0x71, 0x75, 0x61, 0x72, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x10, + 0x88, 0x02, 0x12, 0x0c, 0x0a, 0x07, 0x46, 0x6c, 0x6f, 0x77, 0x46, 0x6c, 0x75, 0x10, 0x89, 0x02, + 0x12, 0x0b, 0x0a, 0x06, 0x4e, 0x69, 0x6d, 0x62, 0x6c, 0x65, 0x10, 0x8a, 0x02, 0x12, 0x14, 0x0a, + 0x0f, 0x4c, 0x65, 0x73, 0x73, 0x41, 0x6e, 0x6e, 0x6f, 0x79, 0x69, 0x6e, 0x67, 0x43, 0x52, 0x4d, + 0x10, 0x8b, 0x02, 0x12, 0x0c, 0x0a, 0x07, 0x4e, 0x65, 0x74, 0x68, 0x75, 0x6e, 0x74, 0x10, 0x8c, + 0x02, 0x12, 0x0c, 0x0a, 0x07, 0x41, 0x70, 0x70, 0x74, 0x69, 0x76, 0x6f, 0x10, 0x8d, 0x02, 0x12, + 0x0f, 0x0a, 0x0a, 0x43, 0x61, 0x70, 0x73, 0x75, 0x6c, 0x65, 0x43, 0x52, 0x4d, 0x10, 0x8e, 0x02, + 0x12, 0x0e, 0x0a, 0x09, 0x49, 0x6e, 0x73, 0x69, 0x67, 0x68, 0x74, 0x6c, 0x79, 0x10, 0x8f, 0x02, + 0x12, 0x0a, 0x0a, 0x05, 0x4b, 0x79, 0x6c, 0x61, 0x73, 0x10, 0x90, 0x02, 0x12, 0x0f, 0x0a, 0x0a, + 0x4f, 0x6e, 0x65, 0x70, 0x61, 0x67, 0x65, 0x43, 0x52, 0x4d, 0x10, 0x91, 0x02, 0x12, 0x09, 0x0a, + 0x04, 0x55, 0x73, 0x65, 0x72, 0x10, 0x92, 0x02, 0x12, 0x10, 0x0a, 0x0b, 0x50, 0x72, 0x6f, 0x73, + 0x70, 0x65, 0x63, 0x74, 0x43, 0x52, 0x4d, 0x10, 0x93, 0x02, 0x12, 0x18, 0x0a, 0x13, 0x52, 0x65, + 0x61, 0x6c, 0x6c, 0x79, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, + 0x73, 0x10, 0x94, 0x02, 0x12, 0x0c, 0x0a, 0x07, 0x41, 0x69, 0x72, 0x73, 0x68, 0x69, 0x70, 0x10, + 0x95, 0x02, 0x12, 0x0a, 0x0a, 0x05, 0x41, 0x72, 0x74, 0x73, 0x79, 0x10, 0x96, 0x02, 0x12, 0x0b, + 0x0a, 0x06, 0x59, 0x61, 0x6e, 0x64, 0x65, 0x78, 0x10, 0x97, 0x02, 0x12, 0x0d, 0x0a, 0x08, 0x43, + 0x6c, 0x6f, 0x63, 0x6b, 0x69, 0x66, 0x79, 0x10, 0x98, 0x02, 0x12, 0x0d, 0x0a, 0x08, 0x44, 0x6e, + 0x73, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x10, 0x99, 0x02, 0x12, 0x10, 0x0a, 0x0b, 0x45, 0x61, 0x73, + 0x79, 0x49, 0x6e, 0x73, 0x69, 0x67, 0x68, 0x74, 0x10, 0x9a, 0x02, 0x12, 0x0e, 0x0a, 0x09, 0x45, + 0x74, 0x68, 0x70, 0x6c, 0x6f, 0x72, 0x65, 0x72, 0x10, 0x9b, 0x02, 0x12, 0x0d, 0x0a, 0x08, 0x45, + 0x76, 0x65, 0x72, 0x68, 0x6f, 0x75, 0x72, 0x10, 0x9c, 0x02, 0x12, 0x0c, 0x0a, 0x07, 0x46, 0x75, + 0x6c, 0x63, 0x72, 0x75, 0x6d, 0x10, 0x9d, 0x02, 0x12, 0x0d, 0x0a, 0x08, 0x47, 0x65, 0x6f, 0x49, + 0x70, 0x69, 0x66, 0x69, 0x10, 0x9e, 0x02, 0x12, 0x0c, 0x0a, 0x07, 0x4a, 0x6f, 0x74, 0x66, 0x6f, + 0x72, 0x6d, 0x10, 0x9f, 0x02, 0x12, 0x0c, 0x0a, 0x07, 0x52, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x72, + 0x10, 0xa0, 0x02, 0x12, 0x10, 0x0a, 0x0b, 0x54, 0x69, 0x6d, 0x65, 0x7a, 0x6f, 0x6e, 0x65, 0x61, + 0x70, 0x69, 0x10, 0xa1, 0x02, 0x12, 0x0f, 0x0a, 0x0a, 0x54, 0x6f, 0x67, 0x67, 0x6c, 0x54, 0x72, + 0x61, 0x63, 0x6b, 0x10, 0xa2, 0x02, 0x12, 0x0b, 0x0a, 0x06, 0x56, 0x70, 0x6e, 0x61, 0x70, 0x69, + 0x10, 0xa3, 0x02, 0x12, 0x0e, 0x0a, 0x09, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x74, 0x61, 0x63, 0x6b, + 0x10, 0xa4, 0x02, 0x12, 0x0b, 0x0a, 0x06, 0x41, 0x70, 0x6f, 0x6c, 0x6c, 0x6f, 0x10, 0xa5, 0x02, + 0x12, 0x0d, 0x0a, 0x08, 0x45, 0x76, 0x65, 0x72, 0x73, 0x69, 0x67, 0x6e, 0x10, 0xa6, 0x02, 0x12, + 0x09, 0x0a, 0x04, 0x4a, 0x75, 0x72, 0x6f, 0x10, 0xa7, 0x02, 0x12, 0x0d, 0x0a, 0x08, 0x4b, 0x61, + 0x72, 0x6d, 0x61, 0x43, 0x52, 0x4d, 0x10, 0xa8, 0x02, 0x12, 0x0c, 0x0a, 0x07, 0x4d, 0x65, 0x74, + 0x72, 0x69, 0x6c, 0x6f, 0x10, 0xa9, 0x02, 0x12, 0x0d, 0x0a, 0x08, 0x50, 0x61, 0x6e, 0x64, 0x61, + 0x64, 0x6f, 0x63, 0x10, 0xaa, 0x02, 0x12, 0x0e, 0x0a, 0x09, 0x52, 0x65, 0x76, 0x61, 0x6d, 0x70, + 0x43, 0x52, 0x4d, 0x10, 0xab, 0x02, 0x12, 0x10, 0x0a, 0x0b, 0x53, 0x61, 0x6c, 0x65, 0x73, 0x63, + 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x10, 0xac, 0x02, 0x12, 0x0d, 0x0a, 0x08, 0x41, 0x6c, 0x63, 0x6f, + 0x6e, 0x6f, 0x73, 0x74, 0x10, 0xad, 0x02, 0x12, 0x0c, 0x0a, 0x07, 0x42, 0x6c, 0x6f, 0x67, 0x67, + 0x65, 0x72, 0x10, 0xae, 0x02, 0x12, 0x10, 0x0a, 0x0b, 0x41, 0x63, 0x63, 0x75, 0x77, 0x65, 0x61, + 0x74, 0x68, 0x65, 0x72, 0x10, 0xaf, 0x02, 0x12, 0x13, 0x0a, 0x0a, 0x4f, 0x70, 0x65, 0x6e, 0x67, + 0x72, 0x61, 0x70, 0x68, 0x72, 0x10, 0xb0, 0x02, 0x1a, 0x02, 0x08, 0x01, 0x12, 0x09, 0x0a, 0x04, + 0x52, 0x61, 0x77, 0x67, 0x10, 0xb1, 0x02, 0x12, 0x0e, 0x0a, 0x09, 0x52, 0x69, 0x6f, 0x74, 0x67, + 0x61, 0x6d, 0x65, 0x73, 0x10, 0xb2, 0x02, 0x12, 0x0e, 0x0a, 0x09, 0x43, 0x6c, 0x69, 0x65, 0x6e, + 0x74, 0x61, 0x72, 0x79, 0x10, 0xb3, 0x02, 0x12, 0x0f, 0x0a, 0x0a, 0x53, 0x74, 0x6f, 0x72, 0x6d, + 0x67, 0x6c, 0x61, 0x73, 0x73, 0x10, 0xb4, 0x02, 0x12, 0x0b, 0x0a, 0x06, 0x54, 0x6f, 0x6d, 0x74, + 0x6f, 0x6d, 0x10, 0xb5, 0x02, 0x12, 0x0b, 0x0a, 0x06, 0x54, 0x77, 0x69, 0x74, 0x63, 0x68, 0x10, + 0xb6, 0x02, 0x12, 0x0b, 0x0a, 0x06, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x6f, 0x10, 0xb7, 0x02, 0x12, + 0x0e, 0x0a, 0x09, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x77, 0x61, 0x79, 0x73, 0x10, 0xb8, 0x02, 0x12, + 0x0f, 0x0a, 0x0a, 0x56, 0x65, 0x65, 0x76, 0x61, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x10, 0xb9, 0x02, + 0x12, 0x10, 0x0a, 0x0b, 0x4b, 0x69, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x10, + 0xba, 0x02, 0x12, 0x17, 0x0a, 0x12, 0x53, 0x68, 0x6f, 0x70, 0x65, 0x65, 0x4f, 0x70, 0x65, 0x6e, + 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x10, 0xbb, 0x02, 0x12, 0x0f, 0x0a, 0x0a, 0x54, + 0x65, 0x61, 0x6d, 0x56, 0x69, 0x65, 0x77, 0x65, 0x72, 0x10, 0xbc, 0x02, 0x12, 0x0b, 0x0a, 0x06, + 0x42, 0x75, 0x6c, 0x62, 0x75, 0x6c, 0x10, 0xbd, 0x02, 0x12, 0x16, 0x0a, 0x11, 0x43, 0x65, 0x6e, + 0x74, 0x72, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x52, 0x4d, 0x10, 0xbe, + 0x02, 0x12, 0x0d, 0x0a, 0x08, 0x54, 0x65, 0x61, 0x6d, 0x67, 0x61, 0x74, 0x65, 0x10, 0xbf, 0x02, + 0x12, 0x0c, 0x0a, 0x07, 0x41, 0x78, 0x6f, 0x6e, 0x61, 0x75, 0x74, 0x10, 0xc0, 0x02, 0x12, 0x0b, + 0x0a, 0x06, 0x54, 0x79, 0x6e, 0x74, 0x65, 0x63, 0x10, 0xc1, 0x02, 0x12, 0x0c, 0x0a, 0x07, 0x41, + 0x70, 0x70, 0x63, 0x75, 0x65, 0x73, 0x10, 0xc2, 0x02, 0x12, 0x0e, 0x0a, 0x09, 0x41, 0x75, 0x74, + 0x6f, 0x6b, 0x6c, 0x6f, 0x73, 0x65, 0x10, 0xc3, 0x02, 0x12, 0x0e, 0x0a, 0x09, 0x43, 0x6c, 0x6f, + 0x75, 0x64, 0x70, 0x6c, 0x61, 0x6e, 0x10, 0xc4, 0x02, 0x12, 0x0f, 0x0a, 0x0a, 0x44, 0x6f, 0x74, + 0x64, 0x69, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x10, 0xc5, 0x02, 0x12, 0x0d, 0x0a, 0x08, 0x47, 0x65, + 0x74, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x10, 0xc6, 0x02, 0x12, 0x0e, 0x0a, 0x09, 0x47, 0x65, 0x74, + 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x73, 0x10, 0xc7, 0x02, 0x12, 0x0c, 0x0a, 0x07, 0x4b, 0x6f, 0x6e, + 0x74, 0x65, 0x6e, 0x74, 0x10, 0xc8, 0x02, 0x12, 0x0f, 0x0a, 0x0a, 0x4c, 0x65, 0x61, 0x64, 0x66, + 0x65, 0x65, 0x64, 0x65, 0x72, 0x10, 0xc9, 0x02, 0x12, 0x0a, 0x0a, 0x05, 0x52, 0x61, 0x76, 0x65, + 0x6e, 0x10, 0xca, 0x02, 0x12, 0x10, 0x0a, 0x0b, 0x52, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, + 0x61, 0x63, 0x68, 0x10, 0xcb, 0x02, 0x12, 0x0b, 0x0a, 0x06, 0x55, 0x70, 0x6c, 0x65, 0x61, 0x64, + 0x10, 0xcc, 0x02, 0x12, 0x0f, 0x0a, 0x0a, 0x42, 0x72, 0x61, 0x6e, 0x64, 0x66, 0x65, 0x74, 0x63, + 0x68, 0x10, 0xcd, 0x02, 0x12, 0x0d, 0x0a, 0x08, 0x43, 0x6c, 0x65, 0x61, 0x72, 0x62, 0x69, 0x74, + 0x10, 0xce, 0x02, 0x12, 0x0c, 0x0a, 0x07, 0x43, 0x72, 0x6f, 0x77, 0x64, 0x69, 0x6e, 0x10, 0xcf, + 0x02, 0x12, 0x0d, 0x0a, 0x08, 0x4d, 0x61, 0x70, 0x71, 0x75, 0x65, 0x73, 0x74, 0x10, 0xd0, 0x02, + 0x12, 0x0f, 0x0a, 0x0a, 0x4e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x61, 0x62, 0x6c, 0x65, 0x10, 0xd1, + 0x02, 0x12, 0x0b, 0x0a, 0x06, 0x4f, 0x6e, 0x62, 0x75, 0x6b, 0x61, 0x10, 0xd2, 0x02, 0x12, 0x0c, + 0x0a, 0x07, 0x54, 0x6f, 0x64, 0x6f, 0x69, 0x73, 0x74, 0x10, 0xd3, 0x02, 0x12, 0x0f, 0x0a, 0x0a, + 0x53, 0x74, 0x6f, 0x72, 0x79, 0x63, 0x68, 0x69, 0x65, 0x66, 0x10, 0xd4, 0x02, 0x12, 0x0d, 0x0a, + 0x08, 0x4c, 0x69, 0x6e, 0x6b, 0x65, 0x64, 0x49, 0x6e, 0x10, 0xd5, 0x02, 0x12, 0x0c, 0x0a, 0x07, + 0x59, 0x6f, 0x75, 0x53, 0x69, 0x67, 0x6e, 0x10, 0xd6, 0x02, 0x12, 0x0b, 0x0a, 0x06, 0x44, 0x6f, + 0x63, 0x6b, 0x65, 0x72, 0x10, 0xd7, 0x02, 0x12, 0x0d, 0x0a, 0x08, 0x54, 0x65, 0x6c, 0x65, 0x73, + 0x69, 0x67, 0x6e, 0x10, 0xd8, 0x02, 0x12, 0x10, 0x0a, 0x0b, 0x53, 0x70, 0x6f, 0x6f, 0x6e, 0x61, + 0x63, 0x75, 0x6c, 0x61, 0x72, 0x10, 0xd9, 0x02, 0x12, 0x11, 0x0a, 0x0c, 0x41, 0x65, 0x72, 0x69, + 0x73, 0x77, 0x65, 0x61, 0x74, 0x68, 0x65, 0x72, 0x10, 0xda, 0x02, 0x12, 0x11, 0x0a, 0x0c, 0x41, + 0x6c, 0x70, 0x68, 0x61, 0x76, 0x61, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x10, 0xdb, 0x02, 0x12, 0x0a, + 0x0a, 0x05, 0x49, 0x6d, 0x67, 0x75, 0x72, 0x10, 0xdc, 0x02, 0x12, 0x0b, 0x0a, 0x06, 0x49, 0x6d, + 0x61, 0x67, 0x67, 0x61, 0x10, 0xdd, 0x02, 0x12, 0x0b, 0x0a, 0x06, 0x53, 0x4d, 0x53, 0x41, 0x70, + 0x69, 0x10, 0xde, 0x02, 0x12, 0x11, 0x0a, 0x0c, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, + 0x73, 0x69, 0x6f, 0x6e, 0x10, 0xdf, 0x02, 0x12, 0x12, 0x0a, 0x09, 0x42, 0x6c, 0x61, 0x62, 0x6c, + 0x61, 0x62, 0x75, 0x73, 0x10, 0xe0, 0x02, 0x1a, 0x02, 0x08, 0x01, 0x12, 0x0d, 0x0a, 0x08, 0x57, + 0x6f, 0x72, 0x64, 0x73, 0x41, 0x70, 0x69, 0x10, 0xe1, 0x02, 0x12, 0x12, 0x0a, 0x0d, 0x43, 0x75, + 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x10, 0xe2, 0x02, 0x12, 0x0d, + 0x0a, 0x08, 0x48, 0x74, 0x6d, 0x6c, 0x32, 0x50, 0x64, 0x66, 0x10, 0xe3, 0x02, 0x12, 0x12, 0x0a, + 0x0d, 0x49, 0x50, 0x47, 0x65, 0x6f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x10, 0xe4, + 0x02, 0x12, 0x0b, 0x0a, 0x06, 0x4f, 0x77, 0x6c, 0x62, 0x6f, 0x74, 0x10, 0xe5, 0x02, 0x12, 0x11, + 0x0a, 0x0c, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x6d, 0x65, 0x72, 0x73, 0x69, 0x76, 0x65, 0x10, 0xe6, + 0x02, 0x12, 0x0d, 0x0a, 0x08, 0x44, 0x79, 0x6e, 0x61, 0x6c, 0x69, 0x73, 0x74, 0x10, 0xe7, 0x02, + 0x12, 0x14, 0x0a, 0x0f, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x61, 0x74, 0x65, + 0x41, 0x50, 0x49, 0x10, 0xe8, 0x02, 0x12, 0x0f, 0x0a, 0x0a, 0x48, 0x6f, 0x6c, 0x69, 0x64, 0x61, + 0x79, 0x41, 0x50, 0x49, 0x10, 0xe9, 0x02, 0x12, 0x0a, 0x0a, 0x05, 0x49, 0x70, 0x61, 0x70, 0x69, + 0x10, 0xea, 0x02, 0x12, 0x10, 0x0a, 0x0b, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x74, 0x61, + 0x63, 0x6b, 0x10, 0xeb, 0x02, 0x12, 0x10, 0x0a, 0x0b, 0x4e, 0x75, 0x74, 0x72, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x69, 0x78, 0x10, 0xec, 0x02, 0x12, 0x0a, 0x0a, 0x05, 0x53, 0x77, 0x65, 0x6c, 0x6c, + 0x10, 0xed, 0x02, 0x12, 0x19, 0x0a, 0x14, 0x43, 0x6c, 0x69, 0x63, 0x6b, 0x75, 0x70, 0x50, 0x65, + 0x72, 0x73, 0x6f, 0x6e, 0x61, 0x6c, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x10, 0xee, 0x02, 0x12, 0x0e, + 0x0a, 0x05, 0x4e, 0x69, 0x74, 0x72, 0x6f, 0x10, 0xef, 0x02, 0x1a, 0x02, 0x08, 0x01, 0x12, 0x08, + 0x0a, 0x03, 0x52, 0x65, 0x76, 0x10, 0xf0, 0x02, 0x12, 0x0d, 0x0a, 0x08, 0x52, 0x75, 0x6e, 0x52, + 0x75, 0x6e, 0x49, 0x74, 0x10, 0xf1, 0x02, 0x12, 0x0d, 0x0a, 0x08, 0x54, 0x79, 0x70, 0x65, 0x66, + 0x6f, 0x72, 0x6d, 0x10, 0xf2, 0x02, 0x12, 0x0d, 0x0a, 0x08, 0x4d, 0x69, 0x78, 0x70, 0x61, 0x6e, + 0x65, 0x6c, 0x10, 0xf3, 0x02, 0x12, 0x0c, 0x0a, 0x07, 0x54, 0x72, 0x61, 0x64, 0x69, 0x65, 0x72, + 0x10, 0xf4, 0x02, 0x12, 0x0d, 0x0a, 0x08, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x72, 0x10, + 0xf5, 0x02, 0x12, 0x0d, 0x0a, 0x08, 0x56, 0x6f, 0x75, 0x63, 0x68, 0x65, 0x72, 0x79, 0x10, 0xf6, + 0x02, 0x12, 0x0b, 0x0a, 0x06, 0x41, 0x6c, 0x65, 0x67, 0x72, 0x61, 0x10, 0xf7, 0x02, 0x12, 0x09, + 0x0a, 0x04, 0x41, 0x75, 0x64, 0x64, 0x10, 0xf8, 0x02, 0x12, 0x10, 0x0a, 0x0b, 0x42, 0x61, 0x72, + 0x65, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x10, 0xf9, 0x02, 0x12, 0x0c, 0x0a, 0x07, 0x43, + 0x6f, 0x69, 0x6e, 0x6c, 0x69, 0x62, 0x10, 0xfa, 0x02, 0x12, 0x15, 0x0a, 0x10, 0x45, 0x78, 0x63, + 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x61, 0x74, 0x65, 0x73, 0x41, 0x50, 0x49, 0x10, 0xfb, 0x02, + 0x12, 0x12, 0x0a, 0x0d, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x53, 0x63, 0x6f, 0x6f, + 0x70, 0x10, 0xfc, 0x02, 0x12, 0x0d, 0x0a, 0x08, 0x46, 0x58, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, + 0x10, 0xfd, 0x02, 0x12, 0x12, 0x0a, 0x0d, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x43, + 0x6c, 0x6f, 0x75, 0x64, 0x10, 0xfe, 0x02, 0x12, 0x0e, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x47, 0x65, + 0x6f, 0x41, 0x50, 0x49, 0x10, 0xff, 0x02, 0x12, 0x0d, 0x0a, 0x08, 0x41, 0x62, 0x73, 0x74, 0x72, + 0x61, 0x63, 0x74, 0x10, 0x80, 0x03, 0x12, 0x0d, 0x0a, 0x08, 0x42, 0x69, 0x6c, 0x6c, 0x6f, 0x6d, + 0x61, 0x74, 0x10, 0x81, 0x03, 0x12, 0x0b, 0x0a, 0x06, 0x44, 0x6f, 0x76, 0x69, 0x63, 0x6f, 0x10, + 0x82, 0x03, 0x12, 0x0b, 0x0a, 0x06, 0x42, 0x69, 0x74, 0x62, 0x61, 0x72, 0x10, 0x83, 0x03, 0x12, + 0x0c, 0x0a, 0x07, 0x42, 0x75, 0x67, 0x73, 0x6e, 0x61, 0x67, 0x10, 0x84, 0x03, 0x12, 0x0f, 0x0a, + 0x0a, 0x41, 0x73, 0x73, 0x65, 0x6d, 0x62, 0x6c, 0x79, 0x41, 0x49, 0x10, 0x85, 0x03, 0x12, 0x0f, + 0x0a, 0x0a, 0x41, 0x64, 0x61, 0x66, 0x72, 0x75, 0x69, 0x74, 0x49, 0x4f, 0x10, 0x86, 0x03, 0x12, + 0x0a, 0x0a, 0x05, 0x41, 0x70, 0x69, 0x66, 0x79, 0x10, 0x87, 0x03, 0x12, 0x0e, 0x0a, 0x09, 0x43, + 0x6f, 0x69, 0x6e, 0x47, 0x65, 0x63, 0x6b, 0x6f, 0x10, 0x88, 0x03, 0x12, 0x12, 0x0a, 0x0d, 0x43, + 0x72, 0x79, 0x70, 0x74, 0x6f, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x72, 0x65, 0x10, 0x89, 0x03, 0x12, + 0x0e, 0x0a, 0x09, 0x46, 0x75, 0x6c, 0x6c, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x10, 0x8a, 0x03, 0x12, + 0x0e, 0x0a, 0x09, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x53, 0x69, 0x67, 0x6e, 0x10, 0x8b, 0x03, 0x12, + 0x0d, 0x0a, 0x08, 0x4c, 0x6f, 0x79, 0x76, 0x65, 0x72, 0x73, 0x65, 0x10, 0x8c, 0x03, 0x12, 0x0c, + 0x0a, 0x07, 0x4e, 0x65, 0x74, 0x43, 0x6f, 0x72, 0x65, 0x10, 0x8d, 0x03, 0x12, 0x0e, 0x0a, 0x09, + 0x53, 0x61, 0x75, 0x63, 0x65, 0x4c, 0x61, 0x62, 0x73, 0x10, 0x8e, 0x03, 0x12, 0x0f, 0x0a, 0x0a, + 0x41, 0x6c, 0x69, 0x65, 0x6e, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x10, 0x8f, 0x03, 0x12, 0x0d, 0x0a, + 0x08, 0x41, 0x70, 0x69, 0x66, 0x6c, 0x61, 0x73, 0x68, 0x10, 0x91, 0x03, 0x12, 0x0e, 0x0a, 0x09, + 0x43, 0x6f, 0x69, 0x6e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x10, 0x92, 0x03, 0x12, 0x10, 0x0a, 0x0b, + 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x73, 0x41, 0x50, 0x49, 0x10, 0x93, 0x03, 0x12, 0x0c, + 0x0a, 0x07, 0x44, 0x61, 0x74, 0x61, 0x47, 0x6f, 0x76, 0x10, 0x94, 0x03, 0x12, 0x0b, 0x0a, 0x06, + 0x45, 0x6e, 0x69, 0x67, 0x6d, 0x61, 0x10, 0x95, 0x03, 0x12, 0x1a, 0x0a, 0x15, 0x46, 0x69, 0x6e, + 0x61, 0x6e, 0x63, 0x69, 0x61, 0x6c, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x50, 0x72, + 0x65, 0x70, 0x10, 0x96, 0x03, 0x12, 0x0d, 0x0a, 0x08, 0x47, 0x65, 0x6f, 0x63, 0x6f, 0x64, 0x69, + 0x6f, 0x10, 0x97, 0x03, 0x12, 0x0c, 0x0a, 0x07, 0x48, 0x65, 0x72, 0x65, 0x41, 0x50, 0x49, 0x10, + 0x98, 0x03, 0x12, 0x13, 0x0a, 0x0a, 0x4d, 0x61, 0x63, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x10, 0x99, 0x03, 0x1a, 0x02, 0x08, 0x01, 0x12, 0x0c, 0x0a, 0x07, 0x4f, 0x4f, 0x50, 0x53, 0x70, + 0x61, 0x6d, 0x10, 0x9a, 0x03, 0x12, 0x10, 0x0a, 0x0b, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, + 0x6c, 0x73, 0x49, 0x4f, 0x10, 0x9b, 0x03, 0x12, 0x0f, 0x0a, 0x0a, 0x53, 0x63, 0x72, 0x61, 0x70, + 0x65, 0x72, 0x41, 0x50, 0x49, 0x10, 0x9c, 0x03, 0x12, 0x13, 0x0a, 0x0e, 0x53, 0x65, 0x63, 0x75, + 0x72, 0x69, 0x74, 0x79, 0x54, 0x72, 0x61, 0x69, 0x6c, 0x73, 0x10, 0x9d, 0x03, 0x12, 0x0f, 0x0a, + 0x0a, 0x54, 0x6f, 0x6d, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x49, 0x4f, 0x10, 0x9e, 0x03, 0x12, 0x13, + 0x0a, 0x0e, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x43, 0x6f, 0x69, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, + 0x10, 0x9f, 0x03, 0x12, 0x11, 0x0a, 0x0c, 0x46, 0x61, 0x63, 0x65, 0x50, 0x6c, 0x75, 0x73, 0x50, + 0x6c, 0x75, 0x73, 0x10, 0xa0, 0x03, 0x12, 0x0e, 0x0a, 0x09, 0x56, 0x6f, 0x69, 0x63, 0x65, 0x67, + 0x61, 0x69, 0x6e, 0x10, 0xa1, 0x03, 0x12, 0x0d, 0x0a, 0x08, 0x44, 0x65, 0x65, 0x70, 0x67, 0x72, + 0x61, 0x6d, 0x10, 0xa2, 0x03, 0x12, 0x13, 0x0a, 0x0e, 0x56, 0x69, 0x73, 0x75, 0x61, 0x6c, 0x43, + 0x72, 0x6f, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x10, 0xa3, 0x03, 0x12, 0x0c, 0x0a, 0x07, 0x46, 0x69, + 0x6e, 0x6e, 0x68, 0x75, 0x62, 0x10, 0xa4, 0x03, 0x12, 0x0b, 0x0a, 0x06, 0x54, 0x69, 0x69, 0x6e, + 0x67, 0x6f, 0x10, 0xa5, 0x03, 0x12, 0x10, 0x0a, 0x0b, 0x52, 0x69, 0x6e, 0x67, 0x43, 0x65, 0x6e, + 0x74, 0x72, 0x61, 0x6c, 0x10, 0xa6, 0x03, 0x12, 0x0b, 0x0a, 0x06, 0x46, 0x69, 0x6e, 0x61, 0x67, + 0x65, 0x10, 0xa7, 0x03, 0x12, 0x0b, 0x0a, 0x06, 0x45, 0x64, 0x61, 0x6d, 0x61, 0x6d, 0x10, 0xa8, + 0x03, 0x12, 0x10, 0x0a, 0x0b, 0x48, 0x79, 0x70, 0x65, 0x41, 0x75, 0x64, 0x69, 0x74, 0x6f, 0x72, + 0x10, 0xa9, 0x03, 0x12, 0x0a, 0x0a, 0x05, 0x47, 0x65, 0x6e, 0x67, 0x6f, 0x10, 0xaa, 0x03, 0x12, + 0x0a, 0x0a, 0x05, 0x46, 0x72, 0x6f, 0x6e, 0x74, 0x10, 0xab, 0x03, 0x12, 0x0e, 0x0a, 0x09, 0x46, + 0x6c, 0x65, 0x65, 0x74, 0x62, 0x61, 0x73, 0x65, 0x10, 0xac, 0x03, 0x12, 0x0b, 0x0a, 0x06, 0x42, + 0x75, 0x62, 0x62, 0x6c, 0x65, 0x10, 0xad, 0x03, 0x12, 0x0f, 0x0a, 0x0a, 0x42, 0x61, 0x6e, 0x6e, + 0x65, 0x72, 0x62, 0x65, 0x61, 0x72, 0x10, 0xae, 0x03, 0x12, 0x0b, 0x0a, 0x06, 0x41, 0x64, 0x7a, + 0x75, 0x6e, 0x61, 0x10, 0xaf, 0x03, 0x12, 0x13, 0x0a, 0x0e, 0x42, 0x69, 0x74, 0x63, 0x6f, 0x69, + 0x6e, 0x41, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x10, 0xb0, 0x03, 0x12, 0x0f, 0x0a, 0x0a, 0x43, + 0x6f, 0x6d, 0x6d, 0x65, 0x72, 0x63, 0x65, 0x4a, 0x53, 0x10, 0xb1, 0x03, 0x12, 0x13, 0x0a, 0x0e, + 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x4c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x10, 0xb2, + 0x03, 0x12, 0x11, 0x0a, 0x08, 0x46, 0x61, 0x6b, 0x65, 0x4a, 0x53, 0x4f, 0x4e, 0x10, 0xb3, 0x03, + 0x1a, 0x02, 0x08, 0x01, 0x12, 0x10, 0x0a, 0x0b, 0x47, 0x72, 0x61, 0x70, 0x68, 0x68, 0x6f, 0x70, + 0x70, 0x65, 0x72, 0x10, 0xb4, 0x03, 0x12, 0x0d, 0x0a, 0x08, 0x4c, 0x65, 0x78, 0x69, 0x67, 0x72, + 0x61, 0x6d, 0x10, 0xb5, 0x03, 0x12, 0x10, 0x0a, 0x0b, 0x4c, 0x69, 0x6e, 0x6b, 0x50, 0x72, 0x65, + 0x76, 0x69, 0x65, 0x77, 0x10, 0xb6, 0x03, 0x12, 0x0e, 0x0a, 0x09, 0x4e, 0x75, 0x6d, 0x76, 0x65, + 0x72, 0x69, 0x66, 0x79, 0x10, 0xb7, 0x03, 0x12, 0x0f, 0x0a, 0x0a, 0x50, 0x72, 0x6f, 0x78, 0x79, + 0x43, 0x72, 0x61, 0x77, 0x6c, 0x10, 0xb8, 0x03, 0x12, 0x0f, 0x0a, 0x0a, 0x5a, 0x69, 0x70, 0x43, + 0x6f, 0x64, 0x65, 0x41, 0x50, 0x49, 0x10, 0xb9, 0x03, 0x12, 0x0e, 0x0a, 0x09, 0x43, 0x6f, 0x6d, + 0x65, 0x74, 0x63, 0x68, 0x61, 0x74, 0x10, 0xba, 0x03, 0x12, 0x0b, 0x0a, 0x06, 0x4b, 0x65, 0x79, + 0x67, 0x65, 0x6e, 0x10, 0xbb, 0x03, 0x12, 0x0d, 0x0a, 0x08, 0x4d, 0x69, 0x78, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x10, 0xbc, 0x03, 0x12, 0x0c, 0x0a, 0x07, 0x54, 0x61, 0x74, 0x75, 0x6d, 0x49, 0x4f, + 0x10, 0xbd, 0x03, 0x12, 0x0c, 0x0a, 0x07, 0x54, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x10, 0xbe, + 0x03, 0x12, 0x0f, 0x0a, 0x06, 0x4c, 0x61, 0x73, 0x74, 0x66, 0x6d, 0x10, 0xbf, 0x03, 0x1a, 0x02, + 0x08, 0x01, 0x12, 0x0d, 0x0a, 0x08, 0x42, 0x72, 0x6f, 0x77, 0x73, 0x68, 0x6f, 0x74, 0x10, 0xc0, + 0x03, 0x12, 0x0c, 0x0a, 0x07, 0x4a, 0x53, 0x4f, 0x4e, 0x62, 0x69, 0x6e, 0x10, 0xc1, 0x03, 0x12, + 0x0f, 0x0a, 0x0a, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x51, 0x10, 0xc2, 0x03, + 0x12, 0x12, 0x0a, 0x0d, 0x53, 0x63, 0x72, 0x65, 0x65, 0x6e, 0x73, 0x68, 0x6f, 0x74, 0x41, 0x50, + 0x49, 0x10, 0xc3, 0x03, 0x12, 0x11, 0x0a, 0x0c, 0x57, 0x65, 0x61, 0x74, 0x68, 0x65, 0x72, 0x53, + 0x74, 0x61, 0x63, 0x6b, 0x10, 0xc4, 0x03, 0x12, 0x0c, 0x0a, 0x07, 0x41, 0x6d, 0x61, 0x64, 0x65, + 0x75, 0x73, 0x10, 0xc5, 0x03, 0x12, 0x0f, 0x0a, 0x0a, 0x46, 0x6f, 0x75, 0x72, 0x53, 0x71, 0x75, + 0x61, 0x72, 0x65, 0x10, 0xc6, 0x03, 0x12, 0x0b, 0x0a, 0x06, 0x46, 0x6c, 0x69, 0x63, 0x6b, 0x72, + 0x10, 0xc7, 0x03, 0x12, 0x0e, 0x0a, 0x09, 0x43, 0x6c, 0x69, 0x63, 0x6b, 0x48, 0x65, 0x6c, 0x70, + 0x10, 0xc8, 0x03, 0x12, 0x0a, 0x0a, 0x05, 0x41, 0x6d, 0x62, 0x65, 0x65, 0x10, 0xc9, 0x03, 0x12, + 0x0d, 0x0a, 0x08, 0x41, 0x70, 0x69, 0x32, 0x43, 0x61, 0x72, 0x74, 0x10, 0xca, 0x03, 0x12, 0x0f, + 0x0a, 0x0a, 0x48, 0x79, 0x70, 0x65, 0x72, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x10, 0xcb, 0x03, 0x12, + 0x0e, 0x0a, 0x09, 0x4b, 0x61, 0x6b, 0x61, 0x6f, 0x54, 0x61, 0x6c, 0x6b, 0x10, 0xcc, 0x03, 0x12, + 0x0c, 0x0a, 0x07, 0x52, 0x69, 0x74, 0x65, 0x4b, 0x69, 0x74, 0x10, 0xcd, 0x03, 0x12, 0x11, 0x0a, + 0x0c, 0x53, 0x68, 0x75, 0x74, 0x74, 0x65, 0x72, 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x10, 0xce, 0x03, + 0x12, 0x12, 0x0a, 0x09, 0x54, 0x65, 0x78, 0x74, 0x32, 0x44, 0x61, 0x74, 0x61, 0x10, 0xcf, 0x03, + 0x1a, 0x02, 0x08, 0x01, 0x12, 0x13, 0x0a, 0x0e, 0x59, 0x6f, 0x75, 0x4e, 0x65, 0x65, 0x64, 0x41, + 0x42, 0x75, 0x64, 0x67, 0x65, 0x74, 0x10, 0xd0, 0x03, 0x12, 0x0c, 0x0a, 0x07, 0x43, 0x72, 0x69, + 0x63, 0x6b, 0x65, 0x74, 0x10, 0xd1, 0x03, 0x12, 0x0e, 0x0a, 0x09, 0x46, 0x69, 0x6c, 0x65, 0x73, + 0x74, 0x61, 0x63, 0x6b, 0x10, 0xd2, 0x03, 0x12, 0x0a, 0x0a, 0x05, 0x47, 0x79, 0x61, 0x7a, 0x6f, + 0x10, 0xd3, 0x03, 0x12, 0x0e, 0x0a, 0x09, 0x4d, 0x61, 0x76, 0x65, 0x6e, 0x6c, 0x69, 0x6e, 0x6b, + 0x10, 0xd4, 0x03, 0x12, 0x0b, 0x0a, 0x06, 0x53, 0x68, 0x65, 0x65, 0x74, 0x79, 0x10, 0xd5, 0x03, + 0x12, 0x0f, 0x0a, 0x0a, 0x53, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x6d, 0x6f, 0x6e, 0x6b, 0x10, 0xd6, + 0x03, 0x12, 0x0e, 0x0a, 0x09, 0x53, 0x74, 0x6f, 0x63, 0x6b, 0x64, 0x61, 0x74, 0x61, 0x10, 0xd7, + 0x03, 0x12, 0x0d, 0x0a, 0x08, 0x55, 0x6e, 0x73, 0x70, 0x6c, 0x61, 0x73, 0x68, 0x10, 0xd8, 0x03, + 0x12, 0x0e, 0x0a, 0x09, 0x41, 0x6c, 0x6c, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x10, 0xd9, 0x03, + 0x12, 0x11, 0x0a, 0x0c, 0x43, 0x61, 0x6c, 0x6f, 0x72, 0x69, 0x65, 0x4e, 0x69, 0x6e, 0x6a, 0x61, + 0x10, 0xda, 0x03, 0x12, 0x0e, 0x0a, 0x09, 0x57, 0x61, 0x6c, 0x6b, 0x53, 0x63, 0x6f, 0x72, 0x65, + 0x10, 0xdb, 0x03, 0x12, 0x0b, 0x0a, 0x06, 0x53, 0x74, 0x72, 0x61, 0x76, 0x61, 0x10, 0xdc, 0x03, + 0x12, 0x0b, 0x0a, 0x06, 0x43, 0x69, 0x63, 0x65, 0x72, 0x6f, 0x10, 0xdd, 0x03, 0x12, 0x0e, 0x0a, + 0x09, 0x49, 0x50, 0x51, 0x75, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x10, 0xde, 0x03, 0x12, 0x11, 0x0a, + 0x0c, 0x50, 0x61, 0x72, 0x61, 0x6c, 0x6c, 0x65, 0x6c, 0x44, 0x6f, 0x74, 0x73, 0x10, 0xdf, 0x03, + 0x12, 0x0c, 0x0a, 0x07, 0x52, 0x6f, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x10, 0xe0, 0x03, 0x12, 0x0c, + 0x0a, 0x07, 0x4d, 0x61, 0x69, 0x6c, 0x73, 0x61, 0x63, 0x10, 0xe1, 0x03, 0x12, 0x0a, 0x0a, 0x05, + 0x57, 0x68, 0x6f, 0x78, 0x79, 0x10, 0xe2, 0x03, 0x12, 0x11, 0x0a, 0x0c, 0x57, 0x6f, 0x72, 0x6c, + 0x64, 0x57, 0x65, 0x61, 0x74, 0x68, 0x65, 0x72, 0x10, 0xe3, 0x03, 0x12, 0x0e, 0x0a, 0x09, 0x41, + 0x70, 0x69, 0x46, 0x6f, 0x6e, 0x69, 0x63, 0x61, 0x10, 0xe4, 0x03, 0x12, 0x0b, 0x0a, 0x06, 0x41, + 0x79, 0x6c, 0x69, 0x65, 0x6e, 0x10, 0xe5, 0x03, 0x12, 0x0c, 0x0a, 0x07, 0x47, 0x65, 0x6f, 0x63, + 0x6f, 0x64, 0x65, 0x10, 0xe6, 0x03, 0x12, 0x0f, 0x0a, 0x0a, 0x49, 0x63, 0x6f, 0x6e, 0x46, 0x69, + 0x6e, 0x64, 0x65, 0x72, 0x10, 0xe7, 0x03, 0x12, 0x0e, 0x0a, 0x05, 0x49, 0x70, 0x69, 0x66, 0x79, + 0x10, 0xe8, 0x03, 0x1a, 0x02, 0x08, 0x01, 0x12, 0x12, 0x0a, 0x0d, 0x4c, 0x61, 0x6e, 0x67, 0x75, + 0x61, 0x67, 0x65, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x10, 0xe9, 0x03, 0x12, 0x08, 0x0a, 0x03, 0x4c, + 0x6f, 0x62, 0x10, 0xea, 0x03, 0x12, 0x12, 0x0a, 0x09, 0x4f, 0x6e, 0x57, 0x61, 0x74, 0x65, 0x72, + 0x49, 0x4f, 0x10, 0xeb, 0x03, 0x1a, 0x02, 0x08, 0x01, 0x12, 0x0d, 0x0a, 0x08, 0x50, 0x61, 0x73, + 0x74, 0x65, 0x62, 0x69, 0x6e, 0x10, 0xec, 0x03, 0x12, 0x0d, 0x0a, 0x08, 0x50, 0x64, 0x66, 0x4c, + 0x61, 0x79, 0x65, 0x72, 0x10, 0xed, 0x03, 0x12, 0x0c, 0x0a, 0x07, 0x50, 0x69, 0x78, 0x61, 0x62, + 0x61, 0x79, 0x10, 0xee, 0x03, 0x12, 0x0b, 0x0a, 0x06, 0x52, 0x65, 0x61, 0x64, 0x4d, 0x65, 0x10, + 0xef, 0x03, 0x12, 0x0d, 0x0a, 0x08, 0x56, 0x61, 0x74, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x10, 0xf0, + 0x03, 0x12, 0x0f, 0x0a, 0x0a, 0x56, 0x69, 0x72, 0x75, 0x73, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x10, + 0xf1, 0x03, 0x12, 0x0e, 0x0a, 0x09, 0x41, 0x69, 0x72, 0x56, 0x69, 0x73, 0x75, 0x61, 0x6c, 0x10, + 0xf2, 0x03, 0x12, 0x13, 0x0a, 0x0e, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x66, 0x72, + 0x65, 0x61, 0x6b, 0x73, 0x10, 0xf3, 0x03, 0x12, 0x0b, 0x0a, 0x06, 0x44, 0x75, 0x66, 0x66, 0x65, + 0x6c, 0x10, 0xf4, 0x03, 0x12, 0x0b, 0x0a, 0x06, 0x46, 0x6c, 0x61, 0x74, 0x49, 0x4f, 0x10, 0xf5, + 0x03, 0x12, 0x08, 0x0a, 0x03, 0x4d, 0x33, 0x6f, 0x10, 0xf6, 0x03, 0x12, 0x0b, 0x0a, 0x06, 0x4d, + 0x65, 0x73, 0x69, 0x62, 0x6f, 0x10, 0xf7, 0x03, 0x12, 0x0b, 0x0a, 0x06, 0x4f, 0x70, 0x65, 0x6e, + 0x75, 0x76, 0x10, 0xf8, 0x03, 0x12, 0x0d, 0x0a, 0x08, 0x53, 0x6e, 0x69, 0x70, 0x63, 0x61, 0x72, + 0x74, 0x10, 0xf9, 0x03, 0x12, 0x0d, 0x0a, 0x08, 0x42, 0x65, 0x73, 0x74, 0x74, 0x69, 0x6d, 0x65, + 0x10, 0xfa, 0x03, 0x12, 0x10, 0x0a, 0x0b, 0x48, 0x61, 0x70, 0x70, 0x79, 0x73, 0x63, 0x72, 0x69, + 0x62, 0x65, 0x10, 0xfb, 0x03, 0x12, 0x0d, 0x0a, 0x08, 0x48, 0x75, 0x6d, 0x61, 0x6e, 0x69, 0x74, + 0x79, 0x10, 0xfc, 0x03, 0x12, 0x0b, 0x0a, 0x06, 0x49, 0x6d, 0x70, 0x61, 0x6c, 0x61, 0x10, 0xfd, + 0x03, 0x12, 0x10, 0x0a, 0x0b, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x72, 0x61, 0x64, 0x69, 0x75, 0x73, + 0x10, 0xfe, 0x03, 0x12, 0x0e, 0x0a, 0x09, 0x41, 0x75, 0x74, 0x6f, 0x50, 0x69, 0x6c, 0x6f, 0x74, + 0x10, 0xff, 0x03, 0x12, 0x0b, 0x0a, 0x06, 0x42, 0x69, 0x74, 0x6d, 0x65, 0x78, 0x10, 0x80, 0x04, + 0x12, 0x0d, 0x0a, 0x08, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x44, 0x6f, 0x63, 0x10, 0x81, 0x04, 0x12, + 0x0c, 0x0a, 0x07, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x72, 0x69, 0x10, 0x82, 0x04, 0x12, 0x0d, 0x0a, + 0x08, 0x50, 0x64, 0x66, 0x53, 0x68, 0x69, 0x66, 0x74, 0x10, 0x83, 0x04, 0x12, 0x0d, 0x0a, 0x08, + 0x50, 0x6f, 0x6c, 0x6f, 0x6e, 0x69, 0x65, 0x78, 0x10, 0x84, 0x04, 0x12, 0x19, 0x0a, 0x14, 0x52, + 0x65, 0x73, 0x74, 0x70, 0x61, 0x63, 0x6b, 0x48, 0x74, 0x6d, 0x6c, 0x54, 0x6f, 0x50, 0x64, 0x66, + 0x41, 0x50, 0x49, 0x10, 0x85, 0x04, 0x12, 0x1a, 0x0a, 0x15, 0x52, 0x65, 0x73, 0x74, 0x70, 0x61, + 0x63, 0x6b, 0x53, 0x63, 0x72, 0x65, 0x65, 0x6e, 0x73, 0x68, 0x6f, 0x74, 0x41, 0x50, 0x49, 0x10, + 0x86, 0x04, 0x12, 0x16, 0x0a, 0x11, 0x53, 0x68, 0x75, 0x74, 0x74, 0x65, 0x72, 0x73, 0x74, 0x6f, + 0x63, 0x6b, 0x4f, 0x41, 0x75, 0x74, 0x68, 0x10, 0x87, 0x04, 0x12, 0x10, 0x0a, 0x0b, 0x53, 0x6b, + 0x79, 0x42, 0x69, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x10, 0x88, 0x04, 0x12, 0x0e, 0x0a, 0x09, + 0x41, 0x62, 0x75, 0x73, 0x65, 0x49, 0x50, 0x44, 0x42, 0x10, 0x89, 0x04, 0x12, 0x10, 0x0a, 0x0b, + 0x41, 0x6c, 0x65, 0x74, 0x68, 0x65, 0x69, 0x61, 0x41, 0x70, 0x69, 0x10, 0x8a, 0x04, 0x12, 0x0c, + 0x0a, 0x07, 0x42, 0x6c, 0x69, 0x74, 0x41, 0x70, 0x70, 0x10, 0x8b, 0x04, 0x12, 0x0b, 0x0a, 0x06, + 0x43, 0x65, 0x6e, 0x73, 0x79, 0x73, 0x10, 0x8c, 0x04, 0x12, 0x0d, 0x0a, 0x08, 0x43, 0x6c, 0x6f, + 0x76, 0x65, 0x72, 0x6c, 0x79, 0x10, 0x8d, 0x04, 0x12, 0x11, 0x0a, 0x0c, 0x43, 0x6f, 0x75, 0x6e, + 0x74, 0x72, 0x79, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x10, 0x8e, 0x04, 0x12, 0x0b, 0x0a, 0x06, 0x46, + 0x69, 0x6c, 0x65, 0x49, 0x4f, 0x10, 0x8f, 0x04, 0x12, 0x0e, 0x0a, 0x09, 0x46, 0x6c, 0x69, 0x67, + 0x68, 0x74, 0x41, 0x70, 0x69, 0x10, 0x90, 0x04, 0x12, 0x0d, 0x0a, 0x08, 0x47, 0x65, 0x6f, 0x61, + 0x70, 0x69, 0x66, 0x79, 0x10, 0x91, 0x04, 0x12, 0x0d, 0x0a, 0x08, 0x49, 0x50, 0x69, 0x6e, 0x66, + 0x6f, 0x44, 0x42, 0x10, 0x92, 0x04, 0x12, 0x0f, 0x0a, 0x0a, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x53, + 0x74, 0x61, 0x63, 0x6b, 0x10, 0x93, 0x04, 0x12, 0x13, 0x0a, 0x0e, 0x4e, 0x61, 0x73, 0x64, 0x61, + 0x71, 0x44, 0x61, 0x74, 0x61, 0x4c, 0x69, 0x6e, 0x6b, 0x10, 0x94, 0x04, 0x12, 0x11, 0x0a, 0x0c, + 0x4f, 0x70, 0x65, 0x6e, 0x43, 0x61, 0x67, 0x65, 0x44, 0x61, 0x74, 0x61, 0x10, 0x95, 0x04, 0x12, + 0x0d, 0x0a, 0x08, 0x50, 0x61, 0x79, 0x6d, 0x6f, 0x6e, 0x67, 0x6f, 0x10, 0x96, 0x04, 0x12, 0x12, + 0x0a, 0x0d, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x10, + 0x97, 0x04, 0x12, 0x0e, 0x0a, 0x09, 0x52, 0x65, 0x62, 0x72, 0x61, 0x6e, 0x64, 0x6c, 0x79, 0x10, + 0x98, 0x04, 0x12, 0x14, 0x0a, 0x0f, 0x53, 0x63, 0x72, 0x65, 0x65, 0x6e, 0x73, 0x68, 0x6f, 0x74, + 0x4c, 0x61, 0x79, 0x65, 0x72, 0x10, 0x99, 0x04, 0x12, 0x0b, 0x0a, 0x06, 0x53, 0x74, 0x79, 0x74, + 0x63, 0x68, 0x10, 0x9a, 0x04, 0x12, 0x0c, 0x0a, 0x07, 0x55, 0x6e, 0x70, 0x6c, 0x75, 0x67, 0x67, + 0x10, 0x9b, 0x04, 0x12, 0x10, 0x0a, 0x0b, 0x55, 0x50, 0x43, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, + 0x73, 0x65, 0x10, 0x9c, 0x04, 0x12, 0x0e, 0x0a, 0x09, 0x55, 0x73, 0x65, 0x72, 0x53, 0x74, 0x61, + 0x63, 0x6b, 0x10, 0x9d, 0x04, 0x12, 0x0e, 0x0a, 0x09, 0x47, 0x65, 0x6f, 0x63, 0x6f, 0x64, 0x69, + 0x66, 0x79, 0x10, 0x9e, 0x04, 0x12, 0x10, 0x0a, 0x0b, 0x4e, 0x65, 0x77, 0x73, 0x63, 0x61, 0x74, + 0x63, 0x68, 0x65, 0x72, 0x10, 0x9f, 0x04, 0x12, 0x0e, 0x0a, 0x09, 0x4e, 0x69, 0x63, 0x65, 0x72, + 0x65, 0x70, 0x6c, 0x79, 0x10, 0xa0, 0x04, 0x12, 0x11, 0x0a, 0x0c, 0x50, 0x61, 0x72, 0x74, 0x6e, + 0x65, 0x72, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x10, 0xa1, 0x04, 0x12, 0x0d, 0x0a, 0x08, 0x52, 0x6f, + 0x75, 0x74, 0x65, 0x34, 0x6d, 0x65, 0x10, 0xa2, 0x04, 0x12, 0x0e, 0x0a, 0x09, 0x53, 0x63, 0x72, + 0x61, 0x70, 0x65, 0x6f, 0x77, 0x6c, 0x10, 0xa3, 0x04, 0x12, 0x10, 0x0a, 0x0b, 0x53, 0x63, 0x72, + 0x61, 0x70, 0x69, 0x6e, 0x67, 0x44, 0x6f, 0x67, 0x10, 0xa4, 0x04, 0x12, 0x0b, 0x0a, 0x06, 0x53, + 0x74, 0x72, 0x65, 0x61, 0x6b, 0x10, 0xa5, 0x04, 0x12, 0x0e, 0x0a, 0x09, 0x56, 0x65, 0x72, 0x69, + 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x10, 0xa6, 0x04, 0x12, 0x10, 0x0a, 0x0b, 0x57, 0x65, 0x62, 0x73, + 0x63, 0x72, 0x61, 0x70, 0x69, 0x6e, 0x67, 0x10, 0xa7, 0x04, 0x12, 0x0e, 0x0a, 0x09, 0x5a, 0x65, + 0x6e, 0x73, 0x63, 0x72, 0x61, 0x70, 0x65, 0x10, 0xa8, 0x04, 0x12, 0x0c, 0x0a, 0x07, 0x5a, 0x65, + 0x6e, 0x73, 0x65, 0x72, 0x70, 0x10, 0xa9, 0x04, 0x12, 0x0c, 0x0a, 0x07, 0x43, 0x6f, 0x69, 0x6e, + 0x41, 0x70, 0x69, 0x10, 0xaa, 0x04, 0x12, 0x0b, 0x0a, 0x06, 0x47, 0x69, 0x74, 0x74, 0x65, 0x72, + 0x10, 0xab, 0x04, 0x12, 0x09, 0x0a, 0x04, 0x48, 0x6f, 0x73, 0x74, 0x10, 0xac, 0x04, 0x12, 0x0d, + 0x0a, 0x08, 0x49, 0x65, 0x78, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x10, 0xad, 0x04, 0x12, 0x11, 0x0a, + 0x08, 0x52, 0x65, 0x73, 0x74, 0x70, 0x61, 0x63, 0x6b, 0x10, 0xae, 0x04, 0x1a, 0x02, 0x08, 0x01, + 0x12, 0x0f, 0x0a, 0x0a, 0x53, 0x63, 0x72, 0x61, 0x70, 0x65, 0x72, 0x42, 0x6f, 0x78, 0x10, 0xaf, + 0x04, 0x12, 0x10, 0x0a, 0x0b, 0x53, 0x63, 0x72, 0x61, 0x70, 0x69, 0x6e, 0x67, 0x41, 0x6e, 0x74, + 0x10, 0xb0, 0x04, 0x12, 0x0e, 0x0a, 0x09, 0x53, 0x65, 0x72, 0x70, 0x53, 0x74, 0x61, 0x63, 0x6b, + 0x10, 0xb1, 0x04, 0x12, 0x12, 0x0a, 0x0d, 0x53, 0x6d, 0x61, 0x72, 0x74, 0x79, 0x53, 0x74, 0x72, + 0x65, 0x65, 0x74, 0x73, 0x10, 0xb2, 0x04, 0x12, 0x11, 0x0a, 0x0c, 0x54, 0x69, 0x63, 0x6b, 0x65, + 0x74, 0x4d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x10, 0xb3, 0x04, 0x12, 0x12, 0x0a, 0x0d, 0x41, 0x76, + 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x10, 0xb4, 0x04, 0x12, 0x0d, + 0x0a, 0x08, 0x42, 0x6f, 0x6d, 0x62, 0x42, 0x6f, 0x6d, 0x62, 0x10, 0xb5, 0x04, 0x12, 0x10, 0x0a, + 0x0b, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x64, 0x69, 0x74, 0x69, 0x65, 0x73, 0x10, 0xb6, 0x04, 0x12, + 0x0a, 0x0a, 0x05, 0x44, 0x66, 0x75, 0x73, 0x65, 0x10, 0xb7, 0x04, 0x12, 0x0b, 0x0a, 0x06, 0x45, + 0x64, 0x65, 0x6e, 0x41, 0x49, 0x10, 0xb8, 0x04, 0x12, 0x0e, 0x0a, 0x09, 0x47, 0x6c, 0x61, 0x73, + 0x73, 0x6e, 0x6f, 0x64, 0x65, 0x10, 0xb9, 0x04, 0x12, 0x09, 0x0a, 0x04, 0x47, 0x75, 0x72, 0x75, + 0x10, 0xba, 0x04, 0x12, 0x09, 0x0a, 0x04, 0x48, 0x69, 0x76, 0x65, 0x10, 0xbb, 0x04, 0x12, 0x0c, + 0x0a, 0x07, 0x48, 0x69, 0x76, 0x65, 0x61, 0x67, 0x65, 0x10, 0xbc, 0x04, 0x12, 0x0c, 0x0a, 0x07, + 0x4b, 0x69, 0x63, 0x6b, 0x62, 0x6f, 0x78, 0x10, 0xbd, 0x04, 0x12, 0x11, 0x0a, 0x08, 0x50, 0x61, + 0x73, 0x73, 0x62, 0x61, 0x73, 0x65, 0x10, 0xbe, 0x04, 0x1a, 0x02, 0x08, 0x01, 0x12, 0x0f, 0x0a, + 0x0a, 0x50, 0x6f, 0x73, 0x74, 0x61, 0x67, 0x65, 0x41, 0x70, 0x70, 0x10, 0xbf, 0x04, 0x12, 0x0e, + 0x0a, 0x09, 0x50, 0x75, 0x72, 0x65, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x10, 0xc0, 0x04, 0x12, 0x0b, + 0x0a, 0x06, 0x51, 0x75, 0x62, 0x6f, 0x6c, 0x65, 0x10, 0xc1, 0x04, 0x12, 0x14, 0x0a, 0x0f, 0x43, + 0x61, 0x72, 0x62, 0x6f, 0x6e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x10, 0xc2, + 0x04, 0x12, 0x0d, 0x0a, 0x08, 0x49, 0x6e, 0x74, 0x72, 0x69, 0x6e, 0x69, 0x6f, 0x10, 0xc3, 0x04, + 0x12, 0x15, 0x0a, 0x0c, 0x51, 0x75, 0x69, 0x63, 0x6b, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, + 0x10, 0xc4, 0x04, 0x1a, 0x02, 0x08, 0x01, 0x12, 0x10, 0x0a, 0x0b, 0x53, 0x63, 0x72, 0x61, 0x70, + 0x65, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x10, 0xc5, 0x04, 0x12, 0x19, 0x0a, 0x14, 0x54, 0x65, 0x63, + 0x68, 0x6e, 0x69, 0x63, 0x61, 0x6c, 0x41, 0x6e, 0x61, 0x6c, 0x79, 0x73, 0x69, 0x73, 0x41, 0x70, + 0x69, 0x10, 0xc6, 0x04, 0x12, 0x0c, 0x0a, 0x07, 0x55, 0x72, 0x6c, 0x73, 0x63, 0x61, 0x6e, 0x10, + 0xc7, 0x04, 0x12, 0x0e, 0x0a, 0x09, 0x42, 0x61, 0x73, 0x65, 0x41, 0x70, 0x69, 0x49, 0x4f, 0x10, + 0xc8, 0x04, 0x12, 0x0c, 0x0a, 0x07, 0x44, 0x61, 0x69, 0x6c, 0x79, 0x43, 0x4f, 0x10, 0xc9, 0x04, + 0x12, 0x08, 0x0a, 0x03, 0x54, 0x4c, 0x79, 0x10, 0xca, 0x04, 0x12, 0x0d, 0x0a, 0x08, 0x53, 0x68, + 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x10, 0xcb, 0x04, 0x12, 0x0e, 0x0a, 0x09, 0x41, 0x70, 0x70, + 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x10, 0xcc, 0x04, 0x12, 0x0e, 0x0a, 0x09, 0x54, 0x68, 0x69, + 0x6e, 0x6b, 0x69, 0x66, 0x69, 0x63, 0x10, 0xcd, 0x04, 0x12, 0x0b, 0x0a, 0x06, 0x46, 0x65, 0x65, + 0x64, 0x6c, 0x79, 0x10, 0xce, 0x04, 0x12, 0x0f, 0x0a, 0x0a, 0x53, 0x74, 0x69, 0x74, 0x63, 0x68, + 0x64, 0x61, 0x74, 0x61, 0x10, 0xcf, 0x04, 0x12, 0x0d, 0x0a, 0x08, 0x46, 0x65, 0x74, 0x63, 0x68, + 0x72, 0x73, 0x73, 0x10, 0xd0, 0x04, 0x12, 0x11, 0x0a, 0x0c, 0x53, 0x69, 0x67, 0x6e, 0x75, 0x70, + 0x67, 0x65, 0x6e, 0x69, 0x75, 0x73, 0x10, 0xd1, 0x04, 0x12, 0x0f, 0x0a, 0x0a, 0x53, 0x69, 0x67, + 0x6e, 0x61, 0x74, 0x75, 0x72, 0x69, 0x74, 0x10, 0xd2, 0x04, 0x12, 0x0f, 0x0a, 0x0a, 0x4f, 0x70, + 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x65, 0x6c, 0x79, 0x10, 0xd3, 0x04, 0x12, 0x0d, 0x0a, 0x08, 0x4f, + 0x63, 0x72, 0x53, 0x70, 0x61, 0x63, 0x65, 0x10, 0xd4, 0x04, 0x12, 0x0f, 0x0a, 0x0a, 0x57, 0x65, + 0x61, 0x74, 0x68, 0x65, 0x72, 0x42, 0x69, 0x74, 0x10, 0xd5, 0x04, 0x12, 0x0c, 0x0a, 0x07, 0x42, + 0x75, 0x64, 0x64, 0x79, 0x4e, 0x53, 0x10, 0xd6, 0x04, 0x12, 0x0b, 0x0a, 0x06, 0x5a, 0x69, 0x70, + 0x41, 0x50, 0x49, 0x10, 0xd7, 0x04, 0x12, 0x0d, 0x0a, 0x08, 0x5a, 0x69, 0x70, 0x42, 0x6f, 0x6f, + 0x6b, 0x73, 0x10, 0xd8, 0x04, 0x12, 0x0c, 0x0a, 0x07, 0x4f, 0x6e, 0x65, 0x64, 0x65, 0x73, 0x6b, + 0x10, 0xd9, 0x04, 0x12, 0x0c, 0x0a, 0x07, 0x42, 0x75, 0x67, 0x68, 0x65, 0x72, 0x64, 0x10, 0xda, + 0x04, 0x12, 0x0f, 0x0a, 0x0a, 0x42, 0x6c, 0x61, 0x7a, 0x65, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x10, + 0xdb, 0x04, 0x12, 0x0d, 0x0a, 0x08, 0x41, 0x75, 0x74, 0x6f, 0x64, 0x65, 0x73, 0x6b, 0x10, 0xdc, + 0x04, 0x12, 0x08, 0x0a, 0x03, 0x54, 0x72, 0x75, 0x10, 0xdd, 0x04, 0x12, 0x0c, 0x0a, 0x07, 0x55, + 0x6e, 0x69, 0x66, 0x79, 0x49, 0x44, 0x10, 0xde, 0x04, 0x12, 0x0c, 0x0a, 0x07, 0x54, 0x72, 0x69, + 0x6d, 0x62, 0x6c, 0x65, 0x10, 0xdf, 0x04, 0x12, 0x0b, 0x0a, 0x06, 0x53, 0x6d, 0x6f, 0x6f, 0x63, + 0x68, 0x10, 0xe0, 0x04, 0x12, 0x0e, 0x0a, 0x09, 0x53, 0x65, 0x6d, 0x61, 0x70, 0x68, 0x6f, 0x72, + 0x65, 0x10, 0xe1, 0x04, 0x12, 0x0b, 0x0a, 0x06, 0x54, 0x65, 0x6c, 0x6e, 0x79, 0x78, 0x10, 0xe2, + 0x04, 0x12, 0x0f, 0x0a, 0x0a, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x77, 0x69, 0x72, 0x65, 0x10, + 0xe3, 0x04, 0x12, 0x0e, 0x0a, 0x09, 0x54, 0x65, 0x78, 0x74, 0x6d, 0x61, 0x67, 0x69, 0x63, 0x10, + 0xe4, 0x04, 0x12, 0x0e, 0x0a, 0x09, 0x53, 0x65, 0x72, 0x70, 0x68, 0x6f, 0x75, 0x73, 0x65, 0x10, + 0xe5, 0x04, 0x12, 0x0b, 0x0a, 0x06, 0x50, 0x6c, 0x61, 0x6e, 0x79, 0x6f, 0x10, 0xe6, 0x04, 0x12, + 0x0f, 0x0a, 0x0a, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x79, 0x62, 0x6f, 0x6f, 0x6b, 0x10, 0xe7, 0x04, + 0x12, 0x09, 0x0a, 0x04, 0x56, 0x79, 0x74, 0x65, 0x10, 0xe8, 0x04, 0x12, 0x0a, 0x0a, 0x05, 0x4e, + 0x79, 0x6c, 0x61, 0x73, 0x10, 0xe9, 0x04, 0x12, 0x0d, 0x0a, 0x08, 0x53, 0x71, 0x75, 0x61, 0x72, + 0x65, 0x75, 0x70, 0x10, 0xea, 0x04, 0x12, 0x0e, 0x0a, 0x09, 0x44, 0x61, 0x6e, 0x64, 0x65, 0x6c, + 0x69, 0x6f, 0x6e, 0x10, 0xeb, 0x04, 0x12, 0x11, 0x0a, 0x08, 0x44, 0x61, 0x74, 0x61, 0x46, 0x69, + 0x72, 0x65, 0x10, 0xec, 0x04, 0x1a, 0x02, 0x08, 0x01, 0x12, 0x0b, 0x0a, 0x06, 0x44, 0x65, 0x65, + 0x70, 0x41, 0x49, 0x10, 0xed, 0x04, 0x12, 0x11, 0x0a, 0x0c, 0x4d, 0x65, 0x61, 0x6e, 0x69, 0x6e, + 0x67, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x10, 0xee, 0x04, 0x12, 0x10, 0x0a, 0x0b, 0x4e, 0x65, 0x75, + 0x74, 0x72, 0x69, 0x6e, 0x6f, 0x41, 0x70, 0x69, 0x10, 0xef, 0x04, 0x12, 0x0e, 0x0a, 0x09, 0x53, + 0x74, 0x6f, 0x72, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x10, 0xf0, 0x04, 0x12, 0x0c, 0x0a, 0x07, 0x53, + 0x68, 0x69, 0x70, 0x64, 0x61, 0x79, 0x10, 0xf1, 0x04, 0x12, 0x12, 0x0a, 0x09, 0x53, 0x65, 0x6e, + 0x74, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0xf2, 0x04, 0x1a, 0x02, 0x08, 0x01, 0x12, 0x18, 0x0a, + 0x13, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x43, 0x68, 0x61, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x69, 0x6e, 0x67, 0x10, 0xf3, 0x04, 0x12, 0x10, 0x0a, 0x0b, 0x54, 0x65, 0x61, 0x6d, 0x77, + 0x6f, 0x72, 0x6b, 0x43, 0x52, 0x4d, 0x10, 0xf4, 0x04, 0x12, 0x11, 0x0a, 0x0c, 0x54, 0x65, 0x61, + 0x6d, 0x77, 0x6f, 0x72, 0x6b, 0x44, 0x65, 0x73, 0x6b, 0x10, 0xf5, 0x04, 0x12, 0x13, 0x0a, 0x0e, + 0x54, 0x65, 0x61, 0x6d, 0x77, 0x6f, 0x72, 0x6b, 0x53, 0x70, 0x61, 0x63, 0x65, 0x73, 0x10, 0xf6, + 0x04, 0x12, 0x0f, 0x0a, 0x0a, 0x54, 0x68, 0x65, 0x4f, 0x64, 0x64, 0x73, 0x41, 0x70, 0x69, 0x10, + 0xf7, 0x04, 0x12, 0x0b, 0x0a, 0x06, 0x41, 0x70, 0x61, 0x63, 0x74, 0x61, 0x10, 0xf8, 0x04, 0x12, + 0x0f, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x10, 0xf9, 0x04, + 0x12, 0x0e, 0x0a, 0x05, 0x48, 0x61, 0x70, 0x70, 0x69, 0x10, 0xfa, 0x04, 0x1a, 0x02, 0x08, 0x01, + 0x12, 0x0a, 0x0a, 0x05, 0x4f, 0x61, 0x6e, 0x64, 0x61, 0x10, 0xfb, 0x04, 0x12, 0x0e, 0x0a, 0x09, + 0x46, 0x61, 0x73, 0x74, 0x46, 0x6f, 0x72, 0x65, 0x78, 0x10, 0xfc, 0x04, 0x12, 0x0d, 0x0a, 0x08, + 0x41, 0x50, 0x49, 0x4d, 0x61, 0x74, 0x69, 0x63, 0x10, 0xfd, 0x04, 0x12, 0x0f, 0x0a, 0x0a, 0x56, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x45, 0x79, 0x65, 0x10, 0xfe, 0x04, 0x12, 0x15, 0x0a, 0x10, + 0x45, 0x61, 0x67, 0x6c, 0x65, 0x45, 0x79, 0x65, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x73, + 0x10, 0xff, 0x04, 0x12, 0x11, 0x0a, 0x0c, 0x54, 0x68, 0x6f, 0x75, 0x73, 0x61, 0x6e, 0x64, 0x45, + 0x79, 0x65, 0x73, 0x10, 0x80, 0x05, 0x12, 0x0e, 0x0a, 0x09, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, + 0x50, 0x44, 0x46, 0x10, 0x81, 0x05, 0x12, 0x10, 0x0a, 0x0b, 0x46, 0x6c, 0x69, 0x67, 0x68, 0x74, + 0x73, 0x74, 0x61, 0x74, 0x73, 0x10, 0x82, 0x05, 0x12, 0x0b, 0x0a, 0x06, 0x43, 0x68, 0x65, 0x63, + 0x49, 0x4f, 0x10, 0x83, 0x05, 0x12, 0x0d, 0x0a, 0x08, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, + 0x74, 0x10, 0x84, 0x05, 0x12, 0x13, 0x0a, 0x0a, 0x41, 0x70, 0x69, 0x53, 0x63, 0x69, 0x65, 0x6e, + 0x63, 0x65, 0x10, 0x85, 0x05, 0x1a, 0x02, 0x08, 0x01, 0x12, 0x0f, 0x0a, 0x0a, 0x41, 0x70, 0x70, + 0x53, 0x79, 0x6e, 0x65, 0x72, 0x67, 0x79, 0x10, 0x86, 0x05, 0x12, 0x0b, 0x0a, 0x06, 0x43, 0x61, + 0x66, 0x6c, 0x6f, 0x75, 0x10, 0x87, 0x05, 0x12, 0x0b, 0x0a, 0x06, 0x43, 0x61, 0x73, 0x70, 0x69, + 0x6f, 0x10, 0x88, 0x05, 0x12, 0x0e, 0x0a, 0x09, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x6c, 0x79, 0x48, + 0x51, 0x10, 0x89, 0x05, 0x12, 0x12, 0x0a, 0x0d, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x45, 0x6c, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x10, 0x8a, 0x05, 0x12, 0x0c, 0x0a, 0x07, 0x44, 0x72, 0x6f, 0x6e, + 0x61, 0x48, 0x51, 0x10, 0x8b, 0x05, 0x12, 0x0c, 0x0a, 0x07, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, + 0x78, 0x10, 0x8c, 0x05, 0x12, 0x09, 0x0a, 0x04, 0x46, 0x6d, 0x66, 0x77, 0x10, 0x8d, 0x05, 0x12, + 0x0c, 0x0a, 0x07, 0x47, 0x6f, 0x6f, 0x64, 0x44, 0x61, 0x79, 0x10, 0x8e, 0x05, 0x12, 0x09, 0x0a, + 0x04, 0x4c, 0x75, 0x6e, 0x6f, 0x10, 0x8f, 0x05, 0x12, 0x10, 0x0a, 0x0b, 0x4d, 0x65, 0x69, 0x73, + 0x74, 0x65, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x10, 0x90, 0x05, 0x12, 0x10, 0x0a, 0x0b, 0x4d, 0x69, + 0x6e, 0x64, 0x6d, 0x65, 0x69, 0x73, 0x74, 0x65, 0x72, 0x10, 0x91, 0x05, 0x12, 0x13, 0x0a, 0x0e, + 0x50, 0x65, 0x6f, 0x70, 0x6c, 0x65, 0x44, 0x61, 0x74, 0x61, 0x4c, 0x61, 0x62, 0x73, 0x10, 0x92, + 0x05, 0x12, 0x14, 0x0a, 0x0b, 0x53, 0x63, 0x72, 0x61, 0x70, 0x65, 0x72, 0x53, 0x69, 0x74, 0x65, + 0x10, 0x93, 0x05, 0x1a, 0x02, 0x08, 0x01, 0x12, 0x0d, 0x0a, 0x08, 0x53, 0x63, 0x72, 0x61, 0x70, + 0x66, 0x6c, 0x79, 0x10, 0x94, 0x05, 0x12, 0x10, 0x0a, 0x0b, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x79, + 0x4e, 0x6f, 0x74, 0x65, 0x64, 0x10, 0x95, 0x05, 0x12, 0x12, 0x0a, 0x0d, 0x54, 0x72, 0x61, 0x76, + 0x65, 0x6c, 0x50, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x73, 0x10, 0x96, 0x05, 0x12, 0x0f, 0x0a, 0x0a, + 0x57, 0x65, 0x62, 0x53, 0x63, 0x72, 0x61, 0x70, 0x65, 0x72, 0x10, 0x97, 0x05, 0x12, 0x0c, 0x0a, + 0x07, 0x43, 0x6f, 0x6e, 0x76, 0x69, 0x65, 0x72, 0x10, 0x98, 0x05, 0x12, 0x0c, 0x0a, 0x07, 0x43, + 0x6f, 0x75, 0x72, 0x69, 0x65, 0x72, 0x10, 0x99, 0x05, 0x12, 0x0a, 0x0a, 0x05, 0x44, 0x69, 0x74, + 0x74, 0x6f, 0x10, 0x9a, 0x05, 0x12, 0x0a, 0x0a, 0x05, 0x46, 0x69, 0x6e, 0x64, 0x6c, 0x10, 0x9b, + 0x05, 0x12, 0x0d, 0x0a, 0x08, 0x4c, 0x65, 0x6e, 0x64, 0x66, 0x6c, 0x6f, 0x77, 0x10, 0x9c, 0x05, + 0x12, 0x0f, 0x0a, 0x0a, 0x4d, 0x6f, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x10, 0x9d, + 0x05, 0x12, 0x11, 0x0a, 0x0c, 0x4f, 0x70, 0x65, 0x6e, 0x64, 0x61, 0x74, 0x61, 0x73, 0x6f, 0x66, + 0x74, 0x10, 0x9e, 0x05, 0x12, 0x0a, 0x0a, 0x05, 0x50, 0x6f, 0x64, 0x69, 0x6f, 0x10, 0x9f, 0x05, + 0x12, 0x10, 0x0a, 0x07, 0x52, 0x6f, 0x63, 0x6b, 0x73, 0x65, 0x74, 0x10, 0xa0, 0x05, 0x1a, 0x02, + 0x08, 0x01, 0x12, 0x0a, 0x0a, 0x05, 0x52, 0x6f, 0x77, 0x6e, 0x64, 0x10, 0xa1, 0x05, 0x12, 0x0e, + 0x0a, 0x09, 0x53, 0x68, 0x6f, 0x74, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x10, 0xa2, 0x05, 0x12, 0x0d, + 0x0a, 0x08, 0x53, 0x77, 0x69, 0x66, 0x74, 0x79, 0x70, 0x65, 0x10, 0xa3, 0x05, 0x12, 0x0c, 0x0a, + 0x07, 0x54, 0x77, 0x69, 0x74, 0x74, 0x65, 0x72, 0x10, 0xa4, 0x05, 0x12, 0x0a, 0x0a, 0x05, 0x48, + 0x6f, 0x6e, 0x65, 0x79, 0x10, 0xa5, 0x05, 0x12, 0x0e, 0x0a, 0x09, 0x46, 0x72, 0x65, 0x73, 0x68, + 0x64, 0x65, 0x73, 0x6b, 0x10, 0xa6, 0x05, 0x12, 0x0b, 0x0a, 0x06, 0x55, 0x70, 0x77, 0x61, 0x76, + 0x65, 0x10, 0xa7, 0x05, 0x12, 0x0d, 0x0a, 0x08, 0x46, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x69, 0x6e, + 0x10, 0xa8, 0x05, 0x12, 0x0f, 0x0a, 0x0a, 0x46, 0x72, 0x65, 0x73, 0x68, 0x62, 0x6f, 0x6f, 0x6b, + 0x73, 0x10, 0xa9, 0x05, 0x12, 0x09, 0x0a, 0x04, 0x4d, 0x69, 0x74, 0x65, 0x10, 0xaa, 0x05, 0x12, + 0x0b, 0x0a, 0x06, 0x44, 0x65, 0x70, 0x75, 0x74, 0x79, 0x10, 0xab, 0x05, 0x12, 0x0c, 0x0a, 0x07, + 0x42, 0x65, 0x65, 0x62, 0x6f, 0x6c, 0x65, 0x10, 0xac, 0x05, 0x12, 0x0e, 0x0a, 0x09, 0x43, 0x61, + 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x10, 0xad, 0x05, 0x12, 0x0b, 0x0a, 0x06, 0x4b, 0x61, + 0x6e, 0x62, 0x61, 0x6e, 0x10, 0xae, 0x05, 0x12, 0x0e, 0x0a, 0x09, 0x57, 0x6f, 0x72, 0x6b, 0x73, + 0x6e, 0x61, 0x70, 0x73, 0x10, 0xaf, 0x05, 0x12, 0x10, 0x0a, 0x0b, 0x4d, 0x79, 0x49, 0x6e, 0x74, + 0x65, 0x72, 0x76, 0x61, 0x6c, 0x73, 0x10, 0xb0, 0x05, 0x12, 0x11, 0x0a, 0x0c, 0x49, 0x6e, 0x76, + 0x6f, 0x69, 0x63, 0x65, 0x4f, 0x63, 0x65, 0x61, 0x6e, 0x10, 0xb1, 0x05, 0x12, 0x0f, 0x0a, 0x0a, + 0x53, 0x68, 0x65, 0x72, 0x70, 0x61, 0x64, 0x65, 0x73, 0x6b, 0x10, 0xb2, 0x05, 0x12, 0x0f, 0x0a, + 0x0a, 0x4d, 0x72, 0x74, 0x69, 0x63, 0x6b, 0x74, 0x6f, 0x63, 0x6b, 0x10, 0xb3, 0x05, 0x12, 0x0d, + 0x0a, 0x08, 0x43, 0x68, 0x61, 0x74, 0x66, 0x75, 0x6c, 0x65, 0x10, 0xb4, 0x05, 0x12, 0x11, 0x0a, + 0x0c, 0x41, 0x65, 0x72, 0x6f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x10, 0xb5, 0x05, + 0x12, 0x11, 0x0a, 0x0c, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x6f, 0x63, 0x74, 0x6f, 0x70, 0x75, 0x73, + 0x10, 0xb6, 0x05, 0x12, 0x11, 0x0a, 0x08, 0x46, 0x75, 0x73, 0x65, 0x62, 0x69, 0x6c, 0x6c, 0x10, + 0xb7, 0x05, 0x1a, 0x02, 0x08, 0x01, 0x12, 0x0f, 0x0a, 0x0a, 0x47, 0x65, 0x63, 0x6b, 0x6f, 0x62, + 0x6f, 0x61, 0x72, 0x64, 0x10, 0xb8, 0x05, 0x12, 0x0e, 0x0a, 0x09, 0x47, 0x6f, 0x73, 0x71, 0x75, + 0x61, 0x72, 0x65, 0x64, 0x10, 0xb9, 0x05, 0x12, 0x0e, 0x0a, 0x09, 0x4d, 0x6f, 0x6f, 0x6e, 0x63, + 0x6c, 0x65, 0x72, 0x6b, 0x10, 0xba, 0x05, 0x12, 0x0d, 0x0a, 0x08, 0x50, 0x61, 0x79, 0x6d, 0x6f, + 0x61, 0x70, 0x70, 0x10, 0xbb, 0x05, 0x12, 0x0b, 0x0a, 0x06, 0x4d, 0x69, 0x78, 0x6d, 0x61, 0x78, + 0x10, 0xbc, 0x05, 0x12, 0x0e, 0x0a, 0x09, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x73, 0x74, + 0x10, 0xbd, 0x05, 0x12, 0x10, 0x0a, 0x0b, 0x52, 0x65, 0x70, 0x61, 0x69, 0x72, 0x73, 0x68, 0x6f, + 0x70, 0x72, 0x10, 0xbe, 0x05, 0x12, 0x0d, 0x0a, 0x08, 0x47, 0x6f, 0x73, 0x68, 0x69, 0x70, 0x70, + 0x6f, 0x10, 0xbf, 0x05, 0x12, 0x0b, 0x0a, 0x06, 0x53, 0x69, 0x67, 0x6f, 0x70, 0x74, 0x10, 0xc0, + 0x05, 0x12, 0x0d, 0x0a, 0x08, 0x53, 0x75, 0x67, 0x65, 0x73, 0x74, 0x65, 0x72, 0x10, 0xc1, 0x05, + 0x12, 0x0c, 0x0a, 0x07, 0x56, 0x69, 0x65, 0x77, 0x6e, 0x65, 0x6f, 0x10, 0xc2, 0x05, 0x12, 0x0e, + 0x0a, 0x09, 0x42, 0x6f, 0x6f, 0x73, 0x74, 0x4e, 0x6f, 0x74, 0x65, 0x10, 0xc3, 0x05, 0x12, 0x10, + 0x0a, 0x0b, 0x43, 0x61, 0x70, 0x74, 0x61, 0x69, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x10, 0xc4, 0x05, + 0x12, 0x0e, 0x0a, 0x09, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x76, 0x69, 0x73, 0x74, 0x10, 0xc5, 0x05, + 0x12, 0x0c, 0x0a, 0x07, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x67, 0x6f, 0x10, 0xc6, 0x05, 0x12, 0x0a, + 0x0a, 0x05, 0x43, 0x6c, 0x6f, 0x7a, 0x65, 0x10, 0xc7, 0x05, 0x12, 0x0b, 0x0a, 0x06, 0x46, 0x6f, + 0x72, 0x6d, 0x49, 0x4f, 0x10, 0xc8, 0x05, 0x12, 0x0f, 0x0a, 0x0a, 0x46, 0x6f, 0x72, 0x6d, 0x42, + 0x75, 0x63, 0x6b, 0x65, 0x74, 0x10, 0xc9, 0x05, 0x12, 0x0d, 0x0a, 0x08, 0x47, 0x6f, 0x43, 0x61, + 0x6e, 0x76, 0x61, 0x73, 0x10, 0xca, 0x05, 0x12, 0x0c, 0x0a, 0x07, 0x4d, 0x61, 0x64, 0x4b, 0x75, + 0x64, 0x75, 0x10, 0xcb, 0x05, 0x12, 0x0f, 0x0a, 0x0a, 0x4e, 0x6f, 0x7a, 0x62, 0x65, 0x54, 0x65, + 0x61, 0x6d, 0x73, 0x10, 0xcc, 0x05, 0x12, 0x0b, 0x0a, 0x06, 0x50, 0x61, 0x70, 0x79, 0x72, 0x73, + 0x10, 0xcd, 0x05, 0x12, 0x12, 0x0a, 0x0d, 0x53, 0x75, 0x70, 0x65, 0x72, 0x4e, 0x6f, 0x74, 0x65, + 0x73, 0x41, 0x50, 0x49, 0x10, 0xce, 0x05, 0x12, 0x0c, 0x0a, 0x07, 0x54, 0x61, 0x6c, 0x6c, 0x79, + 0x66, 0x79, 0x10, 0xcf, 0x05, 0x12, 0x0e, 0x0a, 0x09, 0x5a, 0x65, 0x6e, 0x6b, 0x69, 0x74, 0x41, + 0x50, 0x49, 0x10, 0xd0, 0x05, 0x12, 0x0f, 0x0a, 0x0a, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x49, 0x6d, + 0x61, 0x67, 0x65, 0x10, 0xd1, 0x05, 0x12, 0x0f, 0x0a, 0x0a, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, + 0x43, 0x61, 0x72, 0x65, 0x10, 0xd2, 0x05, 0x12, 0x0d, 0x0a, 0x08, 0x42, 0x6f, 0x72, 0x67, 0x62, + 0x61, 0x73, 0x65, 0x10, 0xd3, 0x05, 0x12, 0x0e, 0x0a, 0x09, 0x50, 0x69, 0x70, 0x65, 0x64, 0x72, + 0x65, 0x61, 0x6d, 0x10, 0xd4, 0x05, 0x12, 0x09, 0x0a, 0x04, 0x53, 0x69, 0x72, 0x76, 0x10, 0xd5, + 0x05, 0x12, 0x0c, 0x0a, 0x07, 0x44, 0x69, 0x66, 0x66, 0x62, 0x6f, 0x74, 0x10, 0xd6, 0x05, 0x12, + 0x10, 0x0a, 0x0b, 0x45, 0x69, 0x67, 0x68, 0x74, 0x78, 0x45, 0x69, 0x67, 0x68, 0x74, 0x10, 0xd7, + 0x05, 0x12, 0x0c, 0x0a, 0x07, 0x53, 0x65, 0x6e, 0x64, 0x6f, 0x73, 0x6f, 0x10, 0xd8, 0x05, 0x12, + 0x11, 0x0a, 0x0c, 0x50, 0x72, 0x69, 0x6e, 0x74, 0x66, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x10, + 0xd9, 0x05, 0x12, 0x0e, 0x0a, 0x09, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x10, + 0xda, 0x05, 0x12, 0x0f, 0x0a, 0x0a, 0x50, 0x61, 0x6e, 0x64, 0x61, 0x53, 0x63, 0x6f, 0x72, 0x65, + 0x10, 0xdb, 0x05, 0x12, 0x0a, 0x0a, 0x05, 0x50, 0x61, 0x79, 0x6d, 0x6f, 0x10, 0xdc, 0x05, 0x12, + 0x1d, 0x0a, 0x18, 0x41, 0x76, 0x61, 0x7a, 0x61, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x61, 0x6c, + 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x10, 0xdd, 0x05, 0x12, 0x14, + 0x0a, 0x0f, 0x50, 0x6c, 0x61, 0x6e, 0x76, 0x69, 0x65, 0x77, 0x4c, 0x65, 0x61, 0x6e, 0x4b, 0x69, + 0x74, 0x10, 0xde, 0x05, 0x12, 0x0e, 0x0a, 0x09, 0x4c, 0x69, 0x76, 0x65, 0x73, 0x74, 0x6f, 0x72, + 0x6d, 0x10, 0xdf, 0x05, 0x12, 0x0b, 0x0a, 0x06, 0x4b, 0x75, 0x43, 0x6f, 0x69, 0x6e, 0x10, 0xe0, + 0x05, 0x12, 0x0c, 0x0a, 0x07, 0x4d, 0x65, 0x74, 0x61, 0x41, 0x50, 0x49, 0x10, 0xe1, 0x05, 0x12, + 0x0d, 0x0a, 0x08, 0x4e, 0x69, 0x63, 0x65, 0x48, 0x61, 0x73, 0x68, 0x10, 0xe2, 0x05, 0x12, 0x0a, + 0x0a, 0x05, 0x43, 0x65, 0x78, 0x49, 0x4f, 0x10, 0xe3, 0x05, 0x12, 0x0e, 0x0a, 0x09, 0x4b, 0x6c, + 0x69, 0x70, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x10, 0xe4, 0x05, 0x12, 0x0e, 0x0a, 0x09, 0x44, 0x79, + 0x6e, 0x61, 0x74, 0x72, 0x61, 0x63, 0x65, 0x10, 0xe5, 0x05, 0x12, 0x11, 0x0a, 0x0c, 0x4d, 0x6f, + 0x6c, 0x6c, 0x69, 0x65, 0x41, 0x50, 0x49, 0x4b, 0x65, 0x79, 0x10, 0xe6, 0x05, 0x12, 0x16, 0x0a, + 0x11, 0x4d, 0x6f, 0x6c, 0x6c, 0x69, 0x65, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, + 0x65, 0x6e, 0x10, 0xe7, 0x05, 0x12, 0x10, 0x0a, 0x0b, 0x42, 0x61, 0x73, 0x69, 0x73, 0x54, 0x68, + 0x65, 0x6f, 0x72, 0x79, 0x10, 0xe8, 0x05, 0x12, 0x0d, 0x0a, 0x08, 0x4e, 0x6f, 0x72, 0x64, 0x69, + 0x67, 0x65, 0x6e, 0x10, 0xe9, 0x05, 0x12, 0x1c, 0x0a, 0x17, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x6d, + 0x69, 0x74, 0x68, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x4b, 0x65, + 0x79, 0x10, 0xea, 0x05, 0x12, 0x13, 0x0a, 0x0e, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x6d, 0x69, 0x74, + 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x10, 0xeb, 0x05, 0x12, 0x08, 0x0a, 0x03, 0x4d, 0x75, 0x78, + 0x10, 0xec, 0x05, 0x12, 0x0b, 0x0a, 0x06, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x10, 0xed, 0x05, + 0x12, 0x0d, 0x0a, 0x08, 0x53, 0x65, 0x6e, 0x64, 0x62, 0x69, 0x72, 0x64, 0x10, 0xee, 0x05, 0x12, + 0x1c, 0x0a, 0x17, 0x53, 0x65, 0x6e, 0x64, 0x62, 0x69, 0x72, 0x64, 0x4f, 0x72, 0x67, 0x61, 0x6e, + 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x50, 0x49, 0x10, 0xef, 0x05, 0x12, 0x0b, 0x0a, + 0x06, 0x4d, 0x69, 0x64, 0x69, 0x73, 0x65, 0x10, 0xf0, 0x05, 0x12, 0x0d, 0x0a, 0x08, 0x4d, 0x6f, + 0x63, 0x6b, 0x61, 0x72, 0x6f, 0x6f, 0x10, 0xf1, 0x05, 0x12, 0x0b, 0x0a, 0x06, 0x49, 0x6d, 0x61, + 0x67, 0x65, 0x34, 0x10, 0xf2, 0x05, 0x12, 0x0b, 0x0a, 0x06, 0x50, 0x69, 0x6e, 0x61, 0x74, 0x61, + 0x10, 0xf3, 0x05, 0x12, 0x11, 0x0a, 0x0c, 0x42, 0x72, 0x6f, 0x77, 0x73, 0x65, 0x72, 0x53, 0x74, + 0x61, 0x63, 0x6b, 0x10, 0xf4, 0x05, 0x12, 0x1c, 0x0a, 0x13, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x42, + 0x72, 0x6f, 0x77, 0x73, 0x65, 0x72, 0x54, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x10, 0xf5, 0x05, + 0x1a, 0x02, 0x08, 0x01, 0x12, 0x0d, 0x0a, 0x08, 0x4c, 0x6f, 0x61, 0x64, 0x6d, 0x69, 0x6c, 0x6c, + 0x10, 0xf6, 0x05, 0x12, 0x0f, 0x0a, 0x0a, 0x54, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x42, 0x6f, + 0x74, 0x10, 0xf7, 0x05, 0x12, 0x10, 0x0a, 0x0b, 0x4b, 0x6e, 0x61, 0x70, 0x73, 0x61, 0x63, 0x6b, + 0x50, 0x72, 0x6f, 0x10, 0xf8, 0x05, 0x12, 0x09, 0x0a, 0x04, 0x51, 0x61, 0x73, 0x65, 0x10, 0xf9, + 0x05, 0x12, 0x0e, 0x0a, 0x09, 0x44, 0x61, 0x72, 0x65, 0x62, 0x6f, 0x6f, 0x73, 0x74, 0x10, 0xfa, + 0x05, 0x12, 0x0d, 0x0a, 0x08, 0x47, 0x54, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x78, 0x10, 0xfb, 0x05, + 0x12, 0x0d, 0x0a, 0x08, 0x48, 0x6f, 0x6c, 0x69, 0x73, 0x74, 0x69, 0x63, 0x10, 0xfc, 0x05, 0x12, + 0x0c, 0x0a, 0x07, 0x50, 0x61, 0x72, 0x73, 0x65, 0x72, 0x73, 0x10, 0xfd, 0x05, 0x12, 0x12, 0x0a, + 0x0d, 0x53, 0x63, 0x72, 0x75, 0x74, 0x69, 0x6e, 0x69, 0x7a, 0x65, 0x72, 0x43, 0x69, 0x10, 0xfe, + 0x05, 0x12, 0x0f, 0x0a, 0x0a, 0x53, 0x6f, 0x6e, 0x61, 0x72, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x10, + 0xff, 0x05, 0x12, 0x10, 0x0a, 0x0b, 0x41, 0x50, 0x49, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, + 0x65, 0x10, 0x80, 0x06, 0x12, 0x14, 0x0a, 0x0f, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x54, 0x6f, 0x6f, 0x6c, 0x73, 0x10, 0x81, 0x06, 0x12, 0x0f, 0x0a, 0x0a, 0x43, 0x72, + 0x61, 0x66, 0x74, 0x4d, 0x79, 0x50, 0x44, 0x46, 0x10, 0x82, 0x06, 0x12, 0x0e, 0x0a, 0x09, 0x45, + 0x78, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x44, 0x4b, 0x10, 0x83, 0x06, 0x12, 0x15, 0x0a, 0x0c, 0x47, + 0x6c, 0x69, 0x74, 0x74, 0x65, 0x72, 0x6c, 0x79, 0x41, 0x50, 0x49, 0x10, 0x84, 0x06, 0x1a, 0x02, + 0x08, 0x01, 0x12, 0x0d, 0x0a, 0x08, 0x48, 0x79, 0x62, 0x69, 0x73, 0x63, 0x75, 0x73, 0x10, 0x85, + 0x06, 0x12, 0x09, 0x0a, 0x04, 0x4d, 0x69, 0x72, 0x6f, 0x10, 0x86, 0x06, 0x12, 0x0f, 0x0a, 0x0a, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x70, 0x61, 0x67, 0x65, 0x10, 0x87, 0x06, 0x12, 0x0e, 0x0a, + 0x09, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x70, 0x61, 0x6c, 0x10, 0x88, 0x06, 0x12, 0x0d, 0x0a, + 0x08, 0x54, 0x65, 0x6c, 0x65, 0x74, 0x79, 0x70, 0x65, 0x10, 0x89, 0x06, 0x12, 0x0d, 0x0a, 0x08, + 0x54, 0x69, 0x6d, 0x65, 0x43, 0x61, 0x6d, 0x70, 0x10, 0x8a, 0x06, 0x12, 0x0d, 0x0a, 0x08, 0x55, + 0x73, 0x65, 0x72, 0x66, 0x6c, 0x6f, 0x77, 0x10, 0x8b, 0x06, 0x12, 0x0b, 0x0a, 0x06, 0x57, 0x69, + 0x73, 0x74, 0x69, 0x61, 0x10, 0x8c, 0x06, 0x12, 0x13, 0x0a, 0x0a, 0x53, 0x70, 0x6f, 0x72, 0x74, + 0x52, 0x61, 0x64, 0x61, 0x72, 0x10, 0x8d, 0x06, 0x1a, 0x02, 0x08, 0x01, 0x12, 0x10, 0x0a, 0x0b, + 0x55, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x52, 0x6f, 0x62, 0x6f, 0x74, 0x10, 0x8e, 0x06, 0x12, 0x0e, + 0x0a, 0x09, 0x43, 0x6f, 0x64, 0x65, 0x71, 0x75, 0x69, 0x72, 0x79, 0x10, 0x8f, 0x06, 0x12, 0x11, + 0x0a, 0x0c, 0x45, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x41, 0x50, 0x49, 0x10, 0x90, + 0x06, 0x12, 0x0d, 0x0a, 0x08, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x10, 0x91, 0x06, + 0x12, 0x0e, 0x0a, 0x09, 0x4d, 0x61, 0x67, 0x69, 0x63, 0x42, 0x65, 0x6c, 0x6c, 0x10, 0x92, 0x06, + 0x12, 0x0f, 0x0a, 0x0a, 0x53, 0x74, 0x6f, 0x72, 0x6d, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x10, 0x93, + 0x06, 0x12, 0x0d, 0x0a, 0x08, 0x41, 0x70, 0x69, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x10, 0x94, 0x06, + 0x12, 0x0b, 0x0a, 0x06, 0x44, 0x69, 0x73, 0x71, 0x75, 0x73, 0x10, 0x95, 0x06, 0x12, 0x0b, 0x0a, + 0x06, 0x57, 0x6f, 0x6f, 0x70, 0x72, 0x61, 0x10, 0x96, 0x06, 0x12, 0x0e, 0x0a, 0x09, 0x50, 0x61, + 0x70, 0x65, 0x72, 0x66, 0x6f, 0x72, 0x6d, 0x10, 0x97, 0x06, 0x12, 0x0c, 0x0a, 0x07, 0x47, 0x75, + 0x6d, 0x72, 0x6f, 0x61, 0x64, 0x10, 0x98, 0x06, 0x12, 0x0f, 0x0a, 0x0a, 0x50, 0x61, 0x79, 0x64, + 0x69, 0x72, 0x74, 0x61, 0x70, 0x70, 0x10, 0x99, 0x06, 0x12, 0x0e, 0x0a, 0x09, 0x44, 0x65, 0x74, + 0x65, 0x63, 0x74, 0x69, 0x66, 0x79, 0x10, 0x9a, 0x06, 0x12, 0x0f, 0x0a, 0x0a, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x63, 0x61, 0x6b, 0x65, 0x10, 0x9b, 0x06, 0x12, 0x0f, 0x0a, 0x0a, 0x4a, 0x75, + 0x6d, 0x70, 0x73, 0x65, 0x6c, 0x6c, 0x65, 0x72, 0x10, 0x9c, 0x06, 0x12, 0x0f, 0x0a, 0x0a, 0x4c, + 0x75, 0x6e, 0x63, 0x68, 0x4d, 0x6f, 0x6e, 0x65, 0x79, 0x10, 0x9d, 0x06, 0x12, 0x0c, 0x0a, 0x07, + 0x52, 0x6f, 0x73, 0x65, 0x74, 0x74, 0x65, 0x10, 0x9e, 0x06, 0x12, 0x09, 0x0a, 0x04, 0x59, 0x65, + 0x6c, 0x70, 0x10, 0x9f, 0x06, 0x12, 0x0a, 0x0a, 0x05, 0x41, 0x74, 0x65, 0x72, 0x61, 0x10, 0xa0, + 0x06, 0x12, 0x12, 0x0a, 0x0d, 0x45, 0x63, 0x6f, 0x53, 0x74, 0x72, 0x75, 0x78, 0x75, 0x72, 0x65, + 0x49, 0x54, 0x10, 0xa1, 0x06, 0x12, 0x08, 0x0a, 0x03, 0x41, 0x68, 0x61, 0x10, 0xa2, 0x06, 0x12, + 0x0d, 0x0a, 0x08, 0x50, 0x61, 0x72, 0x73, 0x65, 0x68, 0x75, 0x62, 0x10, 0xa3, 0x06, 0x12, 0x11, + 0x0a, 0x0c, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x10, 0xa4, + 0x06, 0x12, 0x0f, 0x0a, 0x0a, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x73, 0x6d, 0x69, 0x74, 0x68, 0x10, + 0xa5, 0x06, 0x12, 0x11, 0x0a, 0x08, 0x46, 0x6c, 0x6f, 0x77, 0x64, 0x61, 0x73, 0x68, 0x10, 0xa6, + 0x06, 0x1a, 0x02, 0x08, 0x01, 0x12, 0x11, 0x0a, 0x08, 0x46, 0x6c, 0x6f, 0x77, 0x64, 0x6f, 0x63, + 0x6b, 0x10, 0xa7, 0x06, 0x1a, 0x02, 0x08, 0x01, 0x12, 0x0b, 0x0a, 0x06, 0x46, 0x69, 0x62, 0x65, + 0x72, 0x79, 0x10, 0xa8, 0x06, 0x12, 0x0d, 0x0a, 0x08, 0x54, 0x79, 0x70, 0x65, 0x74, 0x61, 0x6c, + 0x6b, 0x10, 0xa9, 0x06, 0x12, 0x0e, 0x0a, 0x09, 0x56, 0x6f, 0x6f, 0x64, 0x6f, 0x6f, 0x53, 0x4d, + 0x53, 0x10, 0xaa, 0x06, 0x12, 0x0e, 0x0a, 0x09, 0x5a, 0x75, 0x6c, 0x69, 0x70, 0x43, 0x68, 0x61, + 0x74, 0x10, 0xab, 0x06, 0x12, 0x0e, 0x0a, 0x09, 0x46, 0x6f, 0x72, 0x6d, 0x63, 0x72, 0x61, 0x66, + 0x74, 0x10, 0xac, 0x06, 0x12, 0x0c, 0x0a, 0x07, 0x49, 0x65, 0x78, 0x61, 0x70, 0x69, 0x73, 0x10, + 0xad, 0x06, 0x12, 0x0e, 0x0a, 0x09, 0x52, 0x65, 0x61, 0x63, 0x68, 0x6d, 0x61, 0x69, 0x6c, 0x10, + 0xae, 0x06, 0x12, 0x0f, 0x0a, 0x0a, 0x43, 0x68, 0x61, 0x72, 0x74, 0x6d, 0x6f, 0x67, 0x75, 0x6c, + 0x10, 0xaf, 0x06, 0x12, 0x0f, 0x0a, 0x0a, 0x41, 0x70, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x65, 0x64, + 0x64, 0x10, 0xb0, 0x06, 0x12, 0x08, 0x0a, 0x03, 0x57, 0x69, 0x74, 0x10, 0xb1, 0x06, 0x12, 0x15, + 0x0a, 0x10, 0x52, 0x65, 0x63, 0x68, 0x61, 0x72, 0x67, 0x65, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, + 0x74, 0x73, 0x10, 0xb2, 0x06, 0x12, 0x0f, 0x0a, 0x0a, 0x44, 0x69, 0x67, 0x67, 0x65, 0x72, 0x6e, + 0x61, 0x75, 0x74, 0x10, 0xb3, 0x06, 0x12, 0x10, 0x0a, 0x0b, 0x4d, 0x6f, 0x6e, 0x6b, 0x65, 0x79, + 0x4c, 0x65, 0x61, 0x72, 0x6e, 0x10, 0xb4, 0x06, 0x12, 0x0a, 0x0a, 0x05, 0x44, 0x75, 0x70, 0x6c, + 0x79, 0x10, 0xb5, 0x06, 0x12, 0x0e, 0x0a, 0x09, 0x50, 0x6f, 0x73, 0x74, 0x62, 0x61, 0x63, 0x6b, + 0x73, 0x10, 0xb6, 0x06, 0x12, 0x0d, 0x0a, 0x08, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x32, + 0x10, 0xb7, 0x06, 0x12, 0x0c, 0x0a, 0x07, 0x5a, 0x65, 0x6e, 0x52, 0x6f, 0x77, 0x73, 0x10, 0xb8, + 0x06, 0x12, 0x10, 0x0a, 0x0b, 0x5a, 0x69, 0x70, 0x63, 0x6f, 0x64, 0x65, 0x62, 0x61, 0x73, 0x65, + 0x10, 0xb9, 0x06, 0x12, 0x0b, 0x0a, 0x06, 0x54, 0x65, 0x66, 0x74, 0x65, 0x72, 0x10, 0xba, 0x06, + 0x12, 0x0a, 0x0a, 0x05, 0x54, 0x77, 0x69, 0x73, 0x74, 0x10, 0xbb, 0x06, 0x12, 0x16, 0x0a, 0x11, + 0x42, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x72, 0x65, 0x65, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, + 0x73, 0x10, 0xbc, 0x06, 0x12, 0x11, 0x0a, 0x0c, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x43, 0x6f, 0x6e, + 0x76, 0x65, 0x72, 0x74, 0x10, 0xbd, 0x06, 0x12, 0x0c, 0x0a, 0x07, 0x47, 0x72, 0x61, 0x66, 0x61, + 0x6e, 0x61, 0x10, 0xbe, 0x06, 0x12, 0x0f, 0x0a, 0x0a, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, + 0x41, 0x70, 0x69, 0x10, 0xbf, 0x06, 0x12, 0x11, 0x0a, 0x0c, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, + 0x65, 0x72, 0x77, 0x69, 0x73, 0x65, 0x10, 0xc0, 0x06, 0x12, 0x0c, 0x0a, 0x07, 0x42, 0x75, 0x6c, + 0x6b, 0x73, 0x6d, 0x73, 0x10, 0xc1, 0x06, 0x12, 0x0c, 0x0a, 0x07, 0x44, 0x61, 0x74, 0x61, 0x62, + 0x6f, 0x78, 0x10, 0xc2, 0x06, 0x12, 0x0e, 0x0a, 0x09, 0x4f, 0x6e, 0x65, 0x73, 0x69, 0x67, 0x6e, + 0x61, 0x6c, 0x10, 0xc3, 0x06, 0x12, 0x0c, 0x0a, 0x07, 0x52, 0x65, 0x6e, 0x74, 0x6d, 0x61, 0x6e, + 0x10, 0xc4, 0x06, 0x12, 0x0c, 0x0a, 0x07, 0x50, 0x61, 0x72, 0x73, 0x65, 0x75, 0x72, 0x10, 0xc5, + 0x06, 0x12, 0x0e, 0x0a, 0x09, 0x44, 0x6f, 0x63, 0x70, 0x61, 0x72, 0x73, 0x65, 0x72, 0x10, 0xc6, + 0x06, 0x12, 0x0d, 0x0a, 0x08, 0x46, 0x6f, 0x72, 0x6d, 0x73, 0x69, 0x74, 0x65, 0x10, 0xc7, 0x06, + 0x12, 0x11, 0x0a, 0x0c, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x74, 0x61, 0x69, 0x6c, 0x6f, 0x72, + 0x10, 0xc8, 0x06, 0x12, 0x0c, 0x0a, 0x07, 0x4c, 0x65, 0x6d, 0x6c, 0x69, 0x73, 0x74, 0x10, 0xc9, + 0x06, 0x12, 0x0c, 0x0a, 0x07, 0x50, 0x72, 0x6f, 0x64, 0x70, 0x61, 0x64, 0x10, 0xca, 0x06, 0x12, + 0x0e, 0x0a, 0x09, 0x46, 0x6f, 0x72, 0x6d, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x10, 0xcb, 0x06, 0x12, + 0x10, 0x0a, 0x0b, 0x43, 0x6f, 0x64, 0x65, 0x63, 0x6c, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x10, 0xcc, + 0x06, 0x12, 0x0e, 0x0a, 0x09, 0x43, 0x6f, 0x64, 0x65, 0x6d, 0x61, 0x67, 0x69, 0x63, 0x10, 0xcd, + 0x06, 0x12, 0x0a, 0x0a, 0x05, 0x56, 0x62, 0x6f, 0x75, 0x74, 0x10, 0xce, 0x06, 0x12, 0x0e, 0x0a, + 0x09, 0x4e, 0x69, 0x67, 0x68, 0x74, 0x66, 0x61, 0x6c, 0x6c, 0x10, 0xcf, 0x06, 0x12, 0x0f, 0x0a, + 0x0a, 0x46, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x4c, 0x61, 0x62, 0x73, 0x10, 0xd0, 0x06, 0x12, 0x11, + 0x0a, 0x0c, 0x53, 0x70, 0x65, 0x65, 0x63, 0x68, 0x54, 0x65, 0x78, 0x74, 0x41, 0x49, 0x10, 0xd1, + 0x06, 0x12, 0x0d, 0x0a, 0x08, 0x50, 0x6f, 0x6c, 0x6c, 0x73, 0x41, 0x50, 0x49, 0x10, 0xd2, 0x06, + 0x12, 0x0b, 0x0a, 0x06, 0x53, 0x69, 0x6d, 0x46, 0x69, 0x6e, 0x10, 0xd3, 0x06, 0x12, 0x0a, 0x0a, + 0x05, 0x53, 0x63, 0x61, 0x6c, 0x72, 0x10, 0xd4, 0x06, 0x12, 0x0f, 0x0a, 0x0a, 0x4b, 0x61, 0x6e, + 0x62, 0x61, 0x6e, 0x74, 0x6f, 0x6f, 0x6c, 0x10, 0xd5, 0x06, 0x12, 0x10, 0x0a, 0x0b, 0x42, 0x72, + 0x69, 0x67, 0x68, 0x74, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x10, 0xd6, 0x06, 0x12, 0x0c, 0x0a, 0x07, + 0x48, 0x6f, 0x74, 0x77, 0x69, 0x72, 0x65, 0x10, 0xd7, 0x06, 0x12, 0x0d, 0x0a, 0x08, 0x49, 0x6e, + 0x73, 0x74, 0x61, 0x62, 0x6f, 0x74, 0x10, 0xd8, 0x06, 0x12, 0x0c, 0x0a, 0x07, 0x54, 0x69, 0x6d, + 0x65, 0x6b, 0x69, 0x74, 0x10, 0xd9, 0x06, 0x12, 0x10, 0x0a, 0x0b, 0x49, 0x6e, 0x74, 0x65, 0x72, + 0x73, 0x65, 0x6c, 0x6c, 0x65, 0x72, 0x10, 0xda, 0x06, 0x12, 0x11, 0x0a, 0x0c, 0x4d, 0x6f, 0x6a, + 0x6f, 0x68, 0x65, 0x6c, 0x70, 0x64, 0x65, 0x73, 0x6b, 0x10, 0xdb, 0x06, 0x12, 0x0f, 0x0a, 0x0a, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x73, 0x65, 0x6e, 0x64, 0x10, 0xdc, 0x06, 0x12, 0x10, 0x0a, + 0x0b, 0x47, 0x65, 0x74, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x10, 0xdd, 0x06, 0x12, + 0x0c, 0x0a, 0x07, 0x44, 0x79, 0x6e, 0x61, 0x64, 0x6f, 0x74, 0x10, 0xde, 0x06, 0x12, 0x0a, 0x0a, + 0x05, 0x44, 0x65, 0x6d, 0x69, 0x6f, 0x10, 0xdf, 0x06, 0x12, 0x0b, 0x0a, 0x06, 0x54, 0x6f, 0x6b, + 0x65, 0x65, 0x74, 0x10, 0xe0, 0x06, 0x12, 0x11, 0x0a, 0x0c, 0x4d, 0x79, 0x65, 0x78, 0x70, 0x65, + 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0xe1, 0x06, 0x12, 0x0e, 0x0a, 0x09, 0x43, 0x6f, 0x70, + 0x79, 0x73, 0x63, 0x61, 0x70, 0x65, 0x10, 0xe2, 0x06, 0x12, 0x0d, 0x0a, 0x08, 0x42, 0x65, 0x73, + 0x6e, 0x61, 0x70, 0x70, 0x79, 0x10, 0xe3, 0x06, 0x12, 0x0e, 0x0a, 0x09, 0x53, 0x61, 0x6c, 0x65, + 0x73, 0x6d, 0x61, 0x74, 0x65, 0x10, 0xe4, 0x06, 0x12, 0x13, 0x0a, 0x0a, 0x48, 0x65, 0x61, 0x74, + 0x6d, 0x61, 0x70, 0x61, 0x70, 0x69, 0x10, 0xe5, 0x06, 0x1a, 0x02, 0x08, 0x01, 0x12, 0x11, 0x0a, + 0x0c, 0x57, 0x65, 0x62, 0x73, 0x69, 0x74, 0x65, 0x70, 0x75, 0x6c, 0x73, 0x65, 0x10, 0xe6, 0x06, + 0x12, 0x0e, 0x0a, 0x09, 0x55, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x79, 0x10, 0xe7, 0x06, + 0x12, 0x0c, 0x0a, 0x07, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x10, 0xe8, 0x06, 0x12, 0x0d, + 0x0a, 0x08, 0x50, 0x44, 0x46, 0x6d, 0x79, 0x55, 0x52, 0x4c, 0x10, 0xe9, 0x06, 0x12, 0x10, 0x0a, + 0x0b, 0x41, 0x70, 0x69, 0x32, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x10, 0xea, 0x06, 0x12, + 0x0d, 0x0a, 0x08, 0x4f, 0x70, 0x73, 0x67, 0x65, 0x6e, 0x69, 0x65, 0x10, 0xeb, 0x06, 0x12, 0x0b, + 0x0a, 0x06, 0x47, 0x65, 0x6d, 0x69, 0x6e, 0x69, 0x10, 0xec, 0x06, 0x12, 0x0e, 0x0a, 0x09, 0x48, + 0x6f, 0x6e, 0x65, 0x79, 0x63, 0x6f, 0x6d, 0x62, 0x10, 0xed, 0x06, 0x12, 0x14, 0x0a, 0x0f, 0x4b, + 0x61, 0x6c, 0x74, 0x75, 0x72, 0x61, 0x41, 0x70, 0x70, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x10, 0xee, + 0x06, 0x12, 0x13, 0x0a, 0x0e, 0x4b, 0x61, 0x6c, 0x74, 0x75, 0x72, 0x61, 0x53, 0x65, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x10, 0xef, 0x06, 0x12, 0x0a, 0x0a, 0x05, 0x42, 0x69, 0x74, 0x47, 0x6f, 0x10, + 0xf0, 0x06, 0x12, 0x0d, 0x0a, 0x08, 0x4f, 0x70, 0x74, 0x69, 0x64, 0x61, 0x73, 0x68, 0x10, 0xf1, + 0x06, 0x12, 0x0a, 0x0a, 0x05, 0x49, 0x6d, 0x67, 0x69, 0x78, 0x10, 0xf2, 0x06, 0x12, 0x10, 0x0a, + 0x0b, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x54, 0x65, 0x78, 0x74, 0x10, 0xf3, 0x06, 0x12, + 0x10, 0x0a, 0x0b, 0x50, 0x61, 0x67, 0x65, 0x32, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x10, 0xf4, + 0x06, 0x12, 0x0e, 0x0a, 0x09, 0x51, 0x75, 0x69, 0x63, 0x6b, 0x62, 0x61, 0x73, 0x65, 0x10, 0xf5, + 0x06, 0x12, 0x0d, 0x0a, 0x08, 0x52, 0x65, 0x64, 0x62, 0x6f, 0x6f, 0x74, 0x68, 0x10, 0xf6, 0x06, + 0x12, 0x0b, 0x0a, 0x06, 0x4e, 0x75, 0x62, 0x65, 0x6c, 0x61, 0x10, 0xf7, 0x06, 0x12, 0x0c, 0x0a, + 0x07, 0x49, 0x6e, 0x66, 0x6f, 0x62, 0x69, 0x70, 0x10, 0xf8, 0x06, 0x12, 0x0a, 0x0a, 0x05, 0x55, + 0x70, 0x72, 0x6f, 0x63, 0x10, 0xf9, 0x06, 0x12, 0x0f, 0x0a, 0x0a, 0x53, 0x75, 0x70, 0x70, 0x6f, + 0x72, 0x74, 0x62, 0x65, 0x65, 0x10, 0xfa, 0x06, 0x12, 0x0e, 0x0a, 0x09, 0x41, 0x66, 0x74, 0x65, + 0x72, 0x73, 0x68, 0x69, 0x70, 0x10, 0xfb, 0x06, 0x12, 0x0c, 0x0a, 0x07, 0x45, 0x64, 0x75, 0x73, + 0x69, 0x67, 0x6e, 0x10, 0xfc, 0x06, 0x12, 0x0b, 0x0a, 0x06, 0x54, 0x65, 0x61, 0x6d, 0x75, 0x70, + 0x10, 0xfd, 0x06, 0x12, 0x0c, 0x0a, 0x07, 0x57, 0x6f, 0x72, 0x6b, 0x64, 0x61, 0x79, 0x10, 0xfe, + 0x06, 0x12, 0x0c, 0x0a, 0x07, 0x4d, 0x6f, 0x6e, 0x67, 0x6f, 0x44, 0x42, 0x10, 0xff, 0x06, 0x12, + 0x08, 0x0a, 0x03, 0x4e, 0x47, 0x43, 0x10, 0x80, 0x07, 0x12, 0x13, 0x0a, 0x0e, 0x44, 0x69, 0x67, + 0x69, 0x74, 0x61, 0x6c, 0x4f, 0x63, 0x65, 0x61, 0x6e, 0x56, 0x32, 0x10, 0x81, 0x07, 0x12, 0x0e, + 0x0a, 0x09, 0x53, 0x51, 0x4c, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x10, 0x82, 0x07, 0x12, 0x08, + 0x0a, 0x03, 0x46, 0x54, 0x50, 0x10, 0x83, 0x07, 0x12, 0x0a, 0x0a, 0x05, 0x52, 0x65, 0x64, 0x69, + 0x73, 0x10, 0x84, 0x07, 0x12, 0x09, 0x0a, 0x04, 0x4c, 0x44, 0x41, 0x50, 0x10, 0x85, 0x07, 0x12, + 0x0c, 0x0a, 0x07, 0x53, 0x68, 0x6f, 0x70, 0x69, 0x66, 0x79, 0x10, 0x86, 0x07, 0x12, 0x0d, 0x0a, + 0x08, 0x52, 0x61, 0x62, 0x62, 0x69, 0x74, 0x4d, 0x51, 0x10, 0x87, 0x07, 0x12, 0x10, 0x0a, 0x0b, + 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x52, 0x65, 0x67, 0x65, 0x78, 0x10, 0x88, 0x07, 0x12, 0x0e, + 0x0a, 0x09, 0x45, 0x74, 0x68, 0x65, 0x72, 0x73, 0x63, 0x61, 0x6e, 0x10, 0x89, 0x07, 0x12, 0x0b, + 0x0a, 0x06, 0x49, 0x6e, 0x66, 0x75, 0x72, 0x61, 0x10, 0x8a, 0x07, 0x12, 0x0c, 0x0a, 0x07, 0x41, + 0x6c, 0x63, 0x68, 0x65, 0x6d, 0x79, 0x10, 0x8b, 0x07, 0x12, 0x10, 0x0a, 0x0b, 0x42, 0x6c, 0x6f, + 0x63, 0x6b, 0x4e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x10, 0x8c, 0x07, 0x12, 0x0c, 0x0a, 0x07, 0x4d, + 0x6f, 0x72, 0x61, 0x6c, 0x69, 0x73, 0x10, 0x8d, 0x07, 0x12, 0x0c, 0x0a, 0x07, 0x42, 0x73, 0x63, + 0x53, 0x63, 0x61, 0x6e, 0x10, 0x8e, 0x07, 0x12, 0x16, 0x0a, 0x0d, 0x43, 0x6f, 0x69, 0x6e, 0x4d, + 0x61, 0x72, 0x6b, 0x65, 0x74, 0x43, 0x61, 0x70, 0x10, 0x8f, 0x07, 0x1a, 0x02, 0x08, 0x01, 0x12, + 0x0a, 0x0a, 0x05, 0x50, 0x65, 0x72, 0x63, 0x79, 0x10, 0x90, 0x07, 0x12, 0x11, 0x0a, 0x0c, 0x54, + 0x69, 0x6e, 0x65, 0x73, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x10, 0x91, 0x07, 0x12, 0x0b, + 0x0a, 0x06, 0x50, 0x75, 0x6c, 0x75, 0x6d, 0x69, 0x10, 0x92, 0x07, 0x12, 0x12, 0x0a, 0x0d, 0x53, + 0x75, 0x70, 0x61, 0x62, 0x61, 0x73, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x10, 0x93, 0x07, 0x12, + 0x10, 0x0a, 0x0b, 0x4e, 0x75, 0x47, 0x65, 0x74, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x10, 0x94, + 0x07, 0x12, 0x0a, 0x0a, 0x05, 0x41, 0x69, 0x76, 0x65, 0x6e, 0x10, 0x95, 0x07, 0x12, 0x0c, 0x0a, + 0x07, 0x50, 0x72, 0x65, 0x66, 0x65, 0x63, 0x74, 0x10, 0x96, 0x07, 0x12, 0x0d, 0x0a, 0x08, 0x44, + 0x6f, 0x63, 0x75, 0x73, 0x69, 0x67, 0x6e, 0x10, 0x97, 0x07, 0x12, 0x0e, 0x0a, 0x09, 0x43, 0x6f, + 0x75, 0x63, 0x68, 0x62, 0x61, 0x73, 0x65, 0x10, 0x98, 0x07, 0x12, 0x0e, 0x0a, 0x09, 0x44, 0x6f, + 0x63, 0x6b, 0x65, 0x72, 0x68, 0x75, 0x62, 0x10, 0x99, 0x07, 0x12, 0x19, 0x0a, 0x14, 0x54, 0x72, + 0x75, 0x66, 0x66, 0x6c, 0x65, 0x68, 0x6f, 0x67, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x69, + 0x73, 0x65, 0x10, 0x9a, 0x07, 0x12, 0x10, 0x0a, 0x0b, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x41, 0x70, + 0x69, 0x4b, 0x65, 0x79, 0x10, 0x9b, 0x07, 0x12, 0x11, 0x0a, 0x0c, 0x47, 0x69, 0x74, 0x48, 0x75, + 0x62, 0x4f, 0x61, 0x75, 0x74, 0x68, 0x32, 0x10, 0x9c, 0x07, 0x12, 0x0f, 0x0a, 0x0a, 0x53, 0x61, + 0x6c, 0x65, 0x73, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x10, 0x9d, 0x07, 0x12, 0x10, 0x0a, 0x0b, 0x48, + 0x75, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x46, 0x61, 0x63, 0x65, 0x10, 0x9e, 0x07, 0x12, 0x0e, 0x0a, + 0x09, 0x53, 0x6e, 0x6f, 0x77, 0x66, 0x6c, 0x61, 0x6b, 0x65, 0x10, 0x9f, 0x07, 0x12, 0x10, 0x0a, + 0x0b, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x67, 0x72, 0x61, 0x70, 0x68, 0x10, 0xa0, 0x07, 0x12, + 0x0e, 0x0a, 0x09, 0x54, 0x61, 0x69, 0x6c, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x10, 0xa1, 0x07, 0x12, + 0x10, 0x0a, 0x0b, 0x57, 0x65, 0x62, 0x33, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x10, 0xa2, + 0x07, 0x12, 0x11, 0x0a, 0x0c, 0x41, 0x7a, 0x75, 0x72, 0x65, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, + 0x65, 0x10, 0xa3, 0x07, 0x12, 0x12, 0x0a, 0x0d, 0x50, 0x6c, 0x61, 0x6e, 0x65, 0x74, 0x53, 0x63, + 0x61, 0x6c, 0x65, 0x44, 0x62, 0x10, 0xa4, 0x07, 0x12, 0x0e, 0x0a, 0x09, 0x41, 0x6e, 0x74, 0x68, + 0x72, 0x6f, 0x70, 0x69, 0x63, 0x10, 0xa5, 0x07, 0x12, 0x09, 0x0a, 0x04, 0x52, 0x61, 0x6d, 0x70, + 0x10, 0xa6, 0x07, 0x12, 0x0c, 0x0a, 0x07, 0x4b, 0x6c, 0x61, 0x76, 0x69, 0x79, 0x6f, 0x10, 0xa7, + 0x07, 0x12, 0x14, 0x0a, 0x0f, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x67, 0x72, 0x61, 0x70, 0x68, + 0x43, 0x6f, 0x64, 0x79, 0x10, 0xa8, 0x07, 0x12, 0x0e, 0x0a, 0x09, 0x56, 0x6f, 0x69, 0x63, 0x65, + 0x66, 0x6c, 0x6f, 0x77, 0x10, 0xa9, 0x07, 0x12, 0x0c, 0x0a, 0x07, 0x50, 0x72, 0x69, 0x76, 0x61, + 0x63, 0x79, 0x10, 0xaa, 0x07, 0x12, 0x0b, 0x0a, 0x06, 0x49, 0x50, 0x49, 0x6e, 0x66, 0x6f, 0x10, + 0xab, 0x07, 0x12, 0x10, 0x0a, 0x0b, 0x49, 0x70, 0x32, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x10, 0xac, 0x07, 0x12, 0x0e, 0x0a, 0x09, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6d, 0x6f, 0x6a, + 0x6f, 0x10, 0xad, 0x07, 0x12, 0x0e, 0x0a, 0x09, 0x50, 0x6f, 0x72, 0x74, 0x61, 0x69, 0x6e, 0x65, + 0x72, 0x10, 0xae, 0x07, 0x12, 0x13, 0x0a, 0x0e, 0x50, 0x6f, 0x72, 0x74, 0x61, 0x69, 0x6e, 0x65, + 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x10, 0xaf, 0x07, 0x12, 0x0b, 0x0a, 0x06, 0x4c, 0x6f, 0x67, + 0x67, 0x6c, 0x79, 0x10, 0xb0, 0x07, 0x12, 0x0c, 0x0a, 0x07, 0x4f, 0x70, 0x65, 0x6e, 0x56, 0x70, + 0x6e, 0x10, 0xb1, 0x07, 0x12, 0x1e, 0x0a, 0x19, 0x56, 0x61, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x43, + 0x6c, 0x6f, 0x75, 0x64, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x61, 0x6c, 0x54, 0x6f, 0x6b, 0x65, + 0x6e, 0x10, 0xb2, 0x07, 0x12, 0x10, 0x0a, 0x0b, 0x42, 0x65, 0x74, 0x74, 0x65, 0x72, 0x53, 0x74, + 0x61, 0x63, 0x6b, 0x10, 0xb3, 0x07, 0x12, 0x0d, 0x0a, 0x08, 0x5a, 0x65, 0x72, 0x6f, 0x54, 0x69, + 0x65, 0x72, 0x10, 0xb4, 0x07, 0x12, 0x0e, 0x0a, 0x09, 0x41, 0x70, 0x70, 0x4f, 0x70, 0x74, 0x69, + 0x63, 0x73, 0x10, 0xb5, 0x07, 0x12, 0x0d, 0x0a, 0x08, 0x4d, 0x65, 0x74, 0x61, 0x62, 0x61, 0x73, + 0x65, 0x10, 0xb6, 0x07, 0x12, 0x15, 0x0a, 0x0c, 0x43, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, + 0x57, 0x61, 0x61, 0x53, 0x10, 0xb7, 0x07, 0x1a, 0x02, 0x08, 0x01, 0x12, 0x11, 0x0a, 0x0c, 0x4c, + 0x65, 0x6d, 0x6f, 0x6e, 0x53, 0x71, 0x75, 0x65, 0x65, 0x7a, 0x79, 0x10, 0xb8, 0x07, 0x12, 0x0d, + 0x0a, 0x08, 0x42, 0x75, 0x64, 0x69, 0x62, 0x61, 0x73, 0x65, 0x10, 0xb9, 0x07, 0x12, 0x0f, 0x0a, + 0x0a, 0x44, 0x65, 0x6e, 0x6f, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x10, 0xba, 0x07, 0x12, 0x0b, + 0x0a, 0x06, 0x53, 0x74, 0x72, 0x69, 0x70, 0x6f, 0x10, 0xbb, 0x07, 0x12, 0x0c, 0x0a, 0x07, 0x52, + 0x65, 0x70, 0x6c, 0x79, 0x49, 0x4f, 0x10, 0xbc, 0x07, 0x12, 0x0f, 0x0a, 0x0a, 0x41, 0x7a, 0x75, + 0x72, 0x65, 0x42, 0x61, 0x74, 0x63, 0x68, 0x10, 0xbd, 0x07, 0x12, 0x1b, 0x0a, 0x16, 0x41, 0x7a, + 0x75, 0x72, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x52, 0x65, 0x67, 0x69, + 0x73, 0x74, 0x72, 0x79, 0x10, 0xbe, 0x07, 0x12, 0x12, 0x0a, 0x0d, 0x41, 0x57, 0x53, 0x53, 0x65, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x10, 0xbf, 0x07, 0x12, 0x09, 0x0a, 0x04, 0x43, + 0x6f, 0x64, 0x61, 0x10, 0xc0, 0x07, 0x12, 0x0b, 0x0a, 0x06, 0x4c, 0x6f, 0x67, 0x7a, 0x49, 0x4f, + 0x10, 0xc1, 0x07, 0x12, 0x0f, 0x0a, 0x0a, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x62, 0x72, 0x69, 0x74, + 0x65, 0x10, 0xc2, 0x07, 0x12, 0x1a, 0x0a, 0x15, 0x47, 0x72, 0x61, 0x66, 0x61, 0x6e, 0x61, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x10, 0xc3, 0x07, + 0x12, 0x13, 0x0a, 0x0e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x46, 0x69, 0x6e, 0x61, 0x6e, + 0x63, 0x65, 0x10, 0xc4, 0x07, 0x12, 0x0d, 0x0a, 0x08, 0x4f, 0x76, 0x65, 0x72, 0x6c, 0x6f, 0x6f, + 0x70, 0x10, 0xc5, 0x07, 0x12, 0x0a, 0x0a, 0x05, 0x4e, 0x67, 0x72, 0x6f, 0x6b, 0x10, 0xc6, 0x07, + 0x12, 0x0e, 0x0a, 0x09, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x65, 0x10, 0xc7, 0x07, + 0x12, 0x0d, 0x0a, 0x08, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x10, 0xc8, 0x07, 0x12, + 0x2a, 0x0a, 0x25, 0x41, 0x7a, 0x75, 0x72, 0x65, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x44, 0x69, + 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x10, 0xc9, 0x07, 0x12, 0x20, 0x0a, 0x1b, 0x41, + 0x7a, 0x75, 0x72, 0x65, 0x43, 0x61, 0x63, 0x68, 0x65, 0x46, 0x6f, 0x72, 0x52, 0x65, 0x64, 0x69, + 0x73, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x10, 0xca, 0x07, 0x12, 0x21, 0x0a, + 0x1c, 0x41, 0x7a, 0x75, 0x72, 0x65, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x44, 0x42, 0x4b, 0x65, + 0x79, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x10, 0xcb, 0x07, + 0x12, 0x23, 0x0a, 0x1e, 0x41, 0x7a, 0x75, 0x72, 0x65, 0x44, 0x65, 0x76, 0x6f, 0x70, 0x73, 0x50, + 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x61, 0x6c, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, + 0x65, 0x6e, 0x10, 0xcc, 0x07, 0x12, 0x15, 0x0a, 0x10, 0x41, 0x7a, 0x75, 0x72, 0x65, 0x46, 0x75, + 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x10, 0xcd, 0x07, 0x12, 0x2c, 0x0a, 0x27, + 0x41, 0x7a, 0x75, 0x72, 0x65, 0x4d, 0x4c, 0x57, 0x65, 0x62, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x63, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, + 0x61, 0x62, 0x6c, 0x65, 0x4b, 0x65, 0x79, 0x10, 0xce, 0x07, 0x12, 0x12, 0x0a, 0x0d, 0x41, 0x7a, + 0x75, 0x72, 0x65, 0x53, 0x61, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x10, 0xcf, 0x07, 0x12, 0x18, + 0x0a, 0x13, 0x41, 0x7a, 0x75, 0x72, 0x65, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x41, 0x64, 0x6d, + 0x69, 0x6e, 0x4b, 0x65, 0x79, 0x10, 0xd0, 0x07, 0x12, 0x18, 0x0a, 0x13, 0x41, 0x7a, 0x75, 0x72, + 0x65, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4b, 0x65, 0x79, 0x10, + 0xd1, 0x07, 0x12, 0x1f, 0x0a, 0x1a, 0x41, 0x7a, 0x75, 0x72, 0x65, 0x4d, 0x61, 0x6e, 0x61, 0x67, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, + 0x10, 0xd2, 0x07, 0x12, 0x0d, 0x0a, 0x08, 0x41, 0x7a, 0x75, 0x72, 0x65, 0x53, 0x51, 0x4c, 0x10, + 0xd3, 0x07, 0x12, 0x0a, 0x0a, 0x05, 0x46, 0x6c, 0x79, 0x49, 0x4f, 0x10, 0xd4, 0x07, 0x12, 0x0e, + 0x0a, 0x09, 0x42, 0x75, 0x69, 0x6c, 0x74, 0x57, 0x69, 0x74, 0x68, 0x10, 0xd5, 0x07, 0x12, 0x0f, + 0x0a, 0x0a, 0x4a, 0x75, 0x70, 0x69, 0x74, 0x65, 0x72, 0x4f, 0x6e, 0x65, 0x10, 0xd6, 0x07, 0x12, + 0x25, 0x0a, 0x20, 0x47, 0x43, 0x50, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, + 0x61, 0x6c, 0x73, 0x10, 0xd7, 0x07, 0x12, 0x08, 0x0a, 0x03, 0x57, 0x69, 0x7a, 0x10, 0xd8, 0x07, + 0x12, 0x0c, 0x0a, 0x07, 0x50, 0x61, 0x67, 0x61, 0x72, 0x6d, 0x65, 0x10, 0xd9, 0x07, 0x12, 0x0c, + 0x0a, 0x07, 0x4f, 0x6e, 0x66, 0x6c, 0x65, 0x65, 0x74, 0x10, 0xda, 0x07, 0x12, 0x0c, 0x0a, 0x07, + 0x49, 0x6e, 0x74, 0x72, 0x61, 0x34, 0x32, 0x10, 0xdb, 0x07, 0x12, 0x09, 0x0a, 0x04, 0x47, 0x72, + 0x6f, 0x71, 0x10, 0xdc, 0x07, 0x12, 0x17, 0x0a, 0x12, 0x54, 0x77, 0x69, 0x74, 0x74, 0x65, 0x72, + 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72, 0x6b, 0x65, 0x79, 0x10, 0xdd, 0x07, 0x12, 0x0b, + 0x0a, 0x06, 0x45, 0x72, 0x61, 0x73, 0x65, 0x72, 0x10, 0xde, 0x07, 0x12, 0x0e, 0x0a, 0x09, 0x4c, + 0x61, 0x72, 0x6b, 0x53, 0x75, 0x69, 0x74, 0x65, 0x10, 0xdf, 0x07, 0x12, 0x14, 0x0a, 0x0f, 0x4c, + 0x61, 0x72, 0x6b, 0x53, 0x75, 0x69, 0x74, 0x65, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x10, 0xe0, + 0x07, 0x12, 0x0e, 0x0a, 0x09, 0x45, 0x6e, 0x64, 0x6f, 0x72, 0x4c, 0x61, 0x62, 0x73, 0x10, 0xe1, + 0x07, 0x12, 0x0f, 0x0a, 0x0a, 0x45, 0x6c, 0x65, 0x76, 0x65, 0x6e, 0x4c, 0x61, 0x62, 0x73, 0x10, + 0xe2, 0x07, 0x12, 0x0d, 0x0a, 0x08, 0x4e, 0x65, 0x74, 0x73, 0x75, 0x69, 0x74, 0x65, 0x10, 0xe3, + 0x07, 0x12, 0x14, 0x0a, 0x0f, 0x52, 0x6f, 0x62, 0x69, 0x6e, 0x68, 0x6f, 0x6f, 0x64, 0x43, 0x72, + 0x79, 0x70, 0x74, 0x6f, 0x10, 0xe4, 0x07, 0x12, 0x0a, 0x0a, 0x05, 0x4e, 0x56, 0x41, 0x50, 0x49, + 0x10, 0xe5, 0x07, 0x12, 0x09, 0x0a, 0x04, 0x50, 0x79, 0x50, 0x49, 0x10, 0xe6, 0x07, 0x12, 0x0f, + 0x0a, 0x0a, 0x52, 0x61, 0x69, 0x6c, 0x77, 0x61, 0x79, 0x41, 0x70, 0x70, 0x10, 0xe7, 0x07, 0x12, + 0x0b, 0x0a, 0x06, 0x4d, 0x65, 0x72, 0x61, 0x6b, 0x69, 0x10, 0xe8, 0x07, 0x12, 0x15, 0x0a, 0x10, + 0x53, 0x61, 0x6c, 0x61, 0x64, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, + 0x10, 0xe9, 0x07, 0x12, 0x08, 0x0a, 0x03, 0x42, 0x6f, 0x78, 0x10, 0xea, 0x07, 0x12, 0x0d, 0x0a, + 0x08, 0x42, 0x6f, 0x78, 0x4f, 0x61, 0x75, 0x74, 0x68, 0x10, 0xeb, 0x07, 0x12, 0x0f, 0x0a, 0x0a, + 0x41, 0x70, 0x69, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x10, 0xec, 0x07, 0x12, 0x15, 0x0a, + 0x10, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x73, 0x41, 0x6e, 0x64, 0x42, 0x69, 0x61, 0x73, 0x65, + 0x73, 0x10, 0xed, 0x07, 0x12, 0x0c, 0x0a, 0x07, 0x5a, 0x6f, 0x68, 0x6f, 0x43, 0x52, 0x4d, 0x10, + 0xee, 0x07, 0x12, 0x10, 0x0a, 0x0b, 0x41, 0x7a, 0x75, 0x72, 0x65, 0x4f, 0x70, 0x65, 0x6e, 0x41, + 0x49, 0x10, 0xef, 0x07, 0x12, 0x0c, 0x0a, 0x07, 0x47, 0x6f, 0x44, 0x61, 0x64, 0x64, 0x79, 0x10, + 0xf0, 0x07, 0x12, 0x0d, 0x0a, 0x08, 0x46, 0x6c, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x10, 0xf1, + 0x07, 0x12, 0x16, 0x0a, 0x11, 0x54, 0x77, 0x69, 0x74, 0x63, 0x68, 0x41, 0x63, 0x63, 0x65, 0x73, + 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x10, 0xf2, 0x07, 0x12, 0x11, 0x0a, 0x0c, 0x54, 0x77, 0x69, + 0x6c, 0x69, 0x6f, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x10, 0xf3, 0x07, 0x12, 0x0b, 0x0a, 0x06, + 0x53, 0x61, 0x6e, 0x69, 0x74, 0x79, 0x10, 0xf4, 0x07, 0x12, 0x16, 0x0a, 0x11, 0x41, 0x7a, 0x75, + 0x72, 0x65, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x10, 0xf5, + 0x07, 0x12, 0x12, 0x0a, 0x0d, 0x41, 0x69, 0x72, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x4f, 0x41, 0x75, + 0x74, 0x68, 0x10, 0xf6, 0x07, 0x12, 0x20, 0x0a, 0x1b, 0x41, 0x69, 0x72, 0x74, 0x61, 0x62, 0x6c, + 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x61, 0x6c, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, + 0x6f, 0x6b, 0x65, 0x6e, 0x10, 0xf7, 0x07, 0x12, 0x21, 0x0a, 0x1c, 0x53, 0x74, 0x6f, 0x72, 0x79, + 0x62, 0x6c, 0x6f, 0x6b, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x61, 0x6c, 0x41, 0x63, 0x63, 0x65, + 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x10, 0xf8, 0x07, 0x12, 0x13, 0x0a, 0x0e, 0x53, 0x65, + 0x6e, 0x74, 0x72, 0x79, 0x4f, 0x72, 0x67, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x10, 0xf9, 0x07, 0x12, + 0x24, 0x0a, 0x1f, 0x41, 0x7a, 0x75, 0x72, 0x65, 0x41, 0x70, 0x69, 0x4d, 0x61, 0x6e, 0x61, 0x67, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x4b, + 0x65, 0x79, 0x10, 0xfa, 0x07, 0x12, 0x26, 0x0a, 0x21, 0x41, 0x7a, 0x75, 0x72, 0x65, 0x41, 0x50, + 0x49, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x75, 0x62, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x10, 0xfb, 0x07, 0x12, 0x0c, 0x0a, + 0x07, 0x48, 0x61, 0x72, 0x6e, 0x65, 0x73, 0x73, 0x10, 0xfc, 0x07, 0x12, 0x0d, 0x0a, 0x08, 0x4c, + 0x61, 0x6e, 0x67, 0x66, 0x75, 0x73, 0x65, 0x10, 0xfd, 0x07, 0x12, 0x18, 0x0a, 0x13, 0x42, 0x69, + 0x6e, 0x67, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, + 0x79, 0x10, 0xfe, 0x07, 0x12, 0x08, 0x0a, 0x03, 0x58, 0x41, 0x49, 0x10, 0xff, 0x07, 0x12, 0x1d, + 0x0a, 0x18, 0x41, 0x7a, 0x75, 0x72, 0x65, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x6e, + 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x4b, 0x65, 0x79, 0x10, 0x80, 0x08, 0x12, 0x23, 0x0a, + 0x1e, 0x41, 0x7a, 0x75, 0x72, 0x65, 0x41, 0x70, 0x70, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x43, + 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x10, + 0x81, 0x08, 0x12, 0x0d, 0x0a, 0x08, 0x44, 0x65, 0x65, 0x70, 0x53, 0x65, 0x65, 0x6b, 0x10, 0x82, + 0x08, 0x12, 0x18, 0x0a, 0x13, 0x53, 0x74, 0x72, 0x69, 0x70, 0x65, 0x50, 0x61, 0x79, 0x6d, 0x65, + 0x6e, 0x74, 0x49, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x10, 0x83, 0x08, 0x12, 0x0e, 0x0a, 0x09, 0x4c, + 0x61, 0x6e, 0x67, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x10, 0x84, 0x08, 0x12, 0x19, 0x0a, 0x14, 0x42, + 0x69, 0x74, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x41, 0x70, 0x70, 0x50, 0x61, 0x73, 0x73, 0x77, + 0x6f, 0x72, 0x64, 0x10, 0x85, 0x08, 0x12, 0x0b, 0x0a, 0x06, 0x48, 0x61, 0x73, 0x75, 0x72, 0x61, + 0x10, 0x86, 0x08, 0x12, 0x1b, 0x0a, 0x16, 0x53, 0x61, 0x6c, 0x65, 0x73, 0x66, 0x6f, 0x72, 0x63, + 0x65, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x10, 0x87, 0x08, + 0x12, 0x13, 0x0a, 0x0e, 0x41, 0x6e, 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x4f, 0x41, 0x75, 0x74, + 0x68, 0x32, 0x10, 0x88, 0x08, 0x12, 0x0d, 0x0a, 0x08, 0x57, 0x65, 0x62, 0x65, 0x78, 0x42, 0x6f, + 0x74, 0x10, 0x89, 0x08, 0x12, 0x1f, 0x0a, 0x1a, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x61, 0x75, 0x50, + 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x61, 0x6c, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, + 0x65, 0x6e, 0x10, 0x8a, 0x08, 0x12, 0x0b, 0x0a, 0x06, 0x52, 0x6f, 0x6f, 0x74, 0x6c, 0x79, 0x10, + 0x8b, 0x08, 0x12, 0x17, 0x0a, 0x12, 0x48, 0x61, 0x73, 0x68, 0x69, 0x43, 0x6f, 0x72, 0x70, 0x56, + 0x61, 0x75, 0x6c, 0x74, 0x41, 0x75, 0x74, 0x68, 0x10, 0x8c, 0x08, 0x12, 0x16, 0x0a, 0x11, 0x50, + 0x68, 0x72, 0x61, 0x73, 0x65, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, + 0x10, 0x8d, 0x08, 0x12, 0x0e, 0x0a, 0x09, 0x50, 0x68, 0x6f, 0x74, 0x6f, 0x72, 0x6f, 0x6f, 0x6d, + 0x10, 0x8e, 0x08, 0x12, 0x08, 0x0a, 0x03, 0x4a, 0x57, 0x54, 0x10, 0x8f, 0x08, 0x12, 0x10, 0x0a, + 0x0b, 0x4f, 0x70, 0x65, 0x6e, 0x41, 0x49, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x10, 0x90, 0x08, 0x12, + 0x17, 0x0a, 0x12, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x47, 0x65, 0x6d, 0x69, 0x6e, 0x69, 0x41, + 0x50, 0x49, 0x4b, 0x65, 0x79, 0x10, 0x91, 0x08, 0x12, 0x1e, 0x0a, 0x19, 0x41, 0x72, 0x74, 0x69, + 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, + 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x10, 0x92, 0x08, 0x12, 0x12, 0x0a, 0x0d, 0x44, 0x61, 0x74, 0x61, + 0x64, 0x6f, 0x67, 0x41, 0x70, 0x69, 0x6b, 0x65, 0x79, 0x10, 0x93, 0x08, 0x42, 0x41, 0x5a, 0x3f, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x74, 0x72, 0x75, 0x66, 0x66, + 0x6c, 0x65, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x2f, 0x74, 0x72, 0x75, 0x66, 0x66, + 0x6c, 0x65, 0x68, 0x6f, 0x67, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x62, 0x2f, + 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x70, 0x62, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_detector_type_proto_rawDescOnce sync.Once + file_detector_type_proto_rawDescData = file_detector_type_proto_rawDesc +) + +func file_detector_type_proto_rawDescGZIP() []byte { + file_detector_type_proto_rawDescOnce.Do(func() { + file_detector_type_proto_rawDescData = protoimpl.X.CompressGZIP(file_detector_type_proto_rawDescData) + }) + return file_detector_type_proto_rawDescData +} + +var file_detector_type_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_detector_type_proto_goTypes = []interface{}{ + (DetectorType)(0), // 0: detector_type.DetectorType +} +var file_detector_type_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_detector_type_proto_init() } +func file_detector_type_proto_init() { + if File_detector_type_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_detector_type_proto_rawDesc, + NumEnums: 1, + NumMessages: 0, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_detector_type_proto_goTypes, + DependencyIndexes: file_detector_type_proto_depIdxs, + EnumInfos: file_detector_type_proto_enumTypes, + }.Build() + File_detector_type_proto = out.File + file_detector_type_proto_rawDesc = nil + file_detector_type_proto_goTypes = nil + file_detector_type_proto_depIdxs = nil +} diff --git a/pkg/pb/detector_typepb/detector_type.pb.validate.go b/pkg/pb/detector_typepb/detector_type.pb.validate.go new file mode 100644 index 000000000000..3e5a2d27c880 --- /dev/null +++ b/pkg/pb/detector_typepb/detector_type.pb.validate.go @@ -0,0 +1,36 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: detector_type.proto + +package detector_typepb + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) diff --git a/proto/detector_type.proto b/proto/detector_type.proto new file mode 100644 index 000000000000..1269b2f10a56 --- /dev/null +++ b/proto/detector_type.proto @@ -0,0 +1,1048 @@ +syntax = "proto3"; + +package detector_type; + +option go_package = "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"; + +enum DetectorType { + Alibaba = 0; + AMQP = 1; // Not yet implemented + AWS = 2; + Azure = 3; + Circle = 4; + Coinbase = 5; + GCP = 6; + Generic = 7; + Github = 8; + Gitlab = 9; + JDBC = 10; + RazorPay = 11; + SendGrid = 12; + Slack = 13; + Square = 14; + PrivateKey = 15; + Stripe = 16; + URI = 17; + Dropbox = 18; + Heroku = 19; + Mailchimp = 20; + Okta = 21; + OneLogin = 22; + PivotalTracker = 23; + SquareApp = 25; + Twilio = 26; + Test = 27; + TravisCI = 29; + SlackWebhook = 30; + PaypalOauth = 31; + PagerDutyApiKey = 32; + Firebase = 33; // Not yet implemented + Mailgun = 34; + HubSpot = 35; + GitHubApp = 36; + CircleCI = 37; // Not yet implemented + WpEngine = 38; // Not yet implemented + DatadogToken = 39; + FacebookOAuth = 40; + AsanaPersonalAccessToken = 41; + AmplitudeApiKey = 42; + BitLyAccessToken = 43; + CalendlyApiKey = 44; + ZapierWebhook = 45; + YoutubeApiKey = 46; + SalesforceOauth2 = 47; // Not yet implemented + TwitterApiSecret = 48; // Not yet implemented + NpmToken = 49; + NewRelicPersonalApiKey = 50; + AirtableApiKey = 51 [deprecated = true]; + AkamaiToken = 52; // Not yet implemented + AmazonMWS = 53; // Not yet implemented + KubeConfig = 54; // Not yet implemented + Auth0oauth = 55; + Bitfinex = 56; + Clarifai = 57; + CloudflareGlobalApiKey = 58; + CloudflareCaKey = 59; + Confluent = 60; + ContentfulDelivery = 61; // Not yet implemented + DatabricksToken = 62; + DigitalOceanSpaces = 63; // Not yet implemented + DigitalOceanToken = 64; + DiscordBotToken = 65; + DiscordWebhook = 66; + EtsyApiKey = 67 [deprecated = true]; + FastlyPersonalToken = 68; + GoogleOauth2 = 69; // Not yet implemented + ReCAPTCHA = 70; // Not yet implemented + GoogleApiKey = 71; // Not yet implemented + Hunter = 72; + IbmCloudUserKey = 73; + Netlify = 74; + Vonage = 75; // Not yet implemented + EquinixOauth = 76; // Not yet implemented + Paystack = 77; + PlaidToken = 78; // Not yet implemented + PlaidKey = 79; + Plivo = 80; + Postmark = 81; + PubNubPublishKey = 82; + PubNubSubscriptionKey = 83; + PusherChannelKey = 84; + ScalewayKey = 85; + SendinBlueV2 = 86; + SentryToken = 87; + ShodanKey = 88; + SnykKey = 89; + SpotifyKey = 90; + TelegramBotToken = 91; + TencentCloudKey = 92; // Not yet implemented + TerraformCloudPersonalToken = 93; + TrelloApiKey = 94; + ZendeskApi = 95; + MaxMindLicense = 96; + AirtableMetadataApiKey = 97; // Not yet implemented + AsanaOauth = 98; + RapidApi = 99; + CloudflareApiToken = 100; + Webex = 101; + FirebaseCloudMessaging = 102; // Not yet implemented + ContentfulPersonalAccessToken = 103; + MapBox = 104; + MailJetBasicAuth = 105; + MailJetSMS = 106; + HubSpotApiKey = 107; + HubSpotOauth = 108; // Not yet implemented + SslMate = 109; + Auth0ManagementApiToken = 110; + MessageBird = 111; + ElasticEmail = 112; + FigmaPersonalAccessToken = 113; + MicrosoftTeamsWebhook = 114; + GitHubOld = 115; // Not yet implemented + VultrApiKey = 116; + Pepipost = 117; + Postman = 118; + CloudsightKey = 119; // Not yet implemented + JiraToken = 120; + NexmoApiKey = 121; + SegmentApiKey = 122; + SumoLogicKey = 123; + PushBulletApiKey = 124; + AirbrakeProjectKey = 125; + AirbrakeUserKey = 126; + PendoIntegrationKey = 127; // Not yet implemented + SplunkOberservabilityToken = 128; + LokaliseToken = 129; + Calendarific = 130; + Jumpcloud = 131; + IpStack = 133; + Notion = 134; + DroneCI = 135; + AdobeIO = 136; + TwelveData = 137; + D7Network = 138; + ScrapingBee = 139; + KeenIO = 140; + Wakatime = 141; // Not yet implemented + Buildkite = 142; + Verimail = 143; + Zerobounce = 144; + Mailboxlayer = 145; + Fastspring = 146; // Not yet implemented + Paddle = 147; // Not yet implemented + Sellfy = 148; // Not yet implemented + FixerIO = 149; + ButterCMS = 150; + Taxjar = 151; + Avalara = 152; // Not yet implemented + Helpscout = 153; + ElasticPath = 154; // Not yet implemented + Zeplin = 155; + Intercom = 156; + Mailmodo = 157; + CannyIo = 158; + Pipedrive = 159; + Vercel = 160; + PosthogApp = 161; + SinchMessage = 162; + Ayrshare = 163; + HelpCrunch = 164; + LiveAgent = 165; + Beamer = 166; + WeChatAppKey = 167; // Not yet implemented + LineMessaging = 168; + UberServerToken = 169; // Not yet implemented + AlgoliaAdminKey = 170; + FullContact = 171; // Not yet implemented + Mandrill = 172; + Flutterwave = 173; + MattermostPersonalToken = 174; + Cloudant = 175; // Not yet implemented + LineNotify = 176; + LinearAPI = 177; + Ubidots = 178; + Anypoint = 179; + Dwolla = 180; + ArtifactoryAccessToken = 181; + Surge = 182; // Not yet implemented + Sparkpost = 183; + GoCardless = 184; + Codacy = 185; + Kraken = 186; + Checkout = 187; + Kairos = 188; // Not yet implemented + ClockworkSMS = 189; + Atlassian = 190; // Not yet implemented + LaunchDarkly = 191; + Coveralls = 192; + Linode = 193; // Not yet implemented + WePay = 194; + PlanetScale = 195; + Doppler = 196; + Agora = 197; + Samsara = 198; // Not yet implemented + FrameIO = 199; + RubyGems = 200; + OpenAI = 201; + SurveySparrow = 202; + Simvoly = 203; + Survicate = 204; + Omnisend = 205; + Groovehq = 206; + Newsapi = 207; + Chatbot = 208; + ClickSendsms = 209; + Getgist = 210; + CustomerIO = 211; + ApiDeck = 212; + Nftport = 213; + Copper = 214; + Close = 215; + Myfreshworks = 216; + Salesflare = 217; + Webflow = 218; + Duda = 219; // Not yet implemented + Yext = 220; // Not yet implemented + ContentStack = 221; // Not yet implemented + StoryblokAccessToken = 222; + GraphCMS = 223; + Checkmarket = 224; // Not yet implemented + Convertkit = 225; + CustomerGuru = 226; + Kaleyra = 227; // Not yet implemented + Mailerlite = 228; + Qualaroo = 229; + SatismeterProjectkey = 230; + SatismeterWritekey = 231; + Simplesat = 232; + SurveyAnyplace = 233; + SurveyBot = 234; + Webengage = 235; // Not yet implemented + ZonkaFeedback = 236; + Delighted = 237; + Feedier = 238; + Abyssale = 239; + Magnetic = 240; + Nytimes = 241 [deprecated = true]; + Polygon = 242; + Powrbot = 243; + ProspectIO = 244 [deprecated = true]; + Skrappio = 245; + Monday = 246; + Smartsheets = 247; + Wrike = 248; + Float = 249; + Imagekit = 250; + Integromat = 251 [deprecated = true]; + Salesblink = 252; + Bored = 253; // Not yet implemented + Campayn = 254; + Clinchpad = 255; + CompanyHub = 256; + Debounce = 257; + Dyspatch = 258; + Guardianapi = 259; + Harvest = 260; + Moosend = 261; + OpenWeather = 262; + Siteleaf = 263; + Squarespace = 264; + FlowFlu = 265; + Nimble = 266; + LessAnnoyingCRM = 267; + Nethunt = 268; + Apptivo = 269; + CapsuleCRM = 270; + Insightly = 271; + Kylas = 272; + OnepageCRM = 273; + User = 274; + ProspectCRM = 275; + ReallySimpleSystems = 276; + Airship = 277; + Artsy = 278; + Yandex = 279; + Clockify = 280; + Dnscheck = 281; + EasyInsight = 282; + Ethplorer = 283; + Everhour = 284; + Fulcrum = 285; + GeoIpifi = 286; + Jotform = 287; + Refiner = 288; + Timezoneapi = 289; + TogglTrack = 290; + Vpnapi = 291; + Workstack = 292; + Apollo = 293; + Eversign = 294; // Not yet implemented + Juro = 295; + KarmaCRM = 296; + Metrilo = 297; + Pandadoc = 298; + RevampCRM = 299; + Salescookie = 300; + Alconost = 301; + Blogger = 302; + Accuweather = 303; + Opengraphr = 304 [deprecated = true]; + Rawg = 305; + Riotgames = 306; // Not yet implemented + Clientary = 307; + Stormglass = 308; + Tomtom = 309; + Twitch = 310; + Documo = 311; + Cloudways = 312; // Not yet implemented + Veevavault = 313; // Not yet implemented + KiteConnect = 314; // Not yet implemented + ShopeeOpenPlatform = 315; // Not yet implemented + TeamViewer = 316; // Not yet implemented + Bulbul = 317; + CentralStationCRM = 318; + Teamgate = 319; + Axonaut = 320; + Tyntec = 321; + Appcues = 322; + Autoklose = 323; + Cloudplan = 324; + Dotdigital = 325; + GetEmail = 326; + GetEmails = 327; + Kontent = 328; + Leadfeeder = 329; + Raven = 330; + RocketReach = 331; + Uplead = 332; + Brandfetch = 333; + Clearbit = 334; + Crowdin = 335; + Mapquest = 336; + Noticeable = 337; + Onbuka = 338; // Not yet implemented + Todoist = 339; + Storychief = 340; + LinkedIn = 341; // Not yet implemented + YouSign = 342; + Docker = 343; + Telesign = 344; // Not yet implemented + Spoonacular = 345; + Aerisweather = 346; // Not yet implemented + Alphavantage = 347; // Not yet implemented + Imgur = 348; // Not yet implemented + Imagga = 349; + SMSApi = 350; // Not yet implemented + Distribusion = 351; // Not yet implemented + Blablabus = 352 [deprecated = true]; + WordsApi = 353; // Not yet implemented + Currencylayer = 354; + Html2Pdf = 355; + IPGeolocation = 356; + Owlbot = 357; + Cloudmersive = 358; + Dynalist = 359; + ExchangeRateAPI = 360; + HolidayAPI = 361; + Ipapi = 362; + Marketstack = 363; + Nutritionix = 364; + Swell = 365; + ClickupPersonalToken = 366; + Nitro = 367 [deprecated = true]; + Rev = 368; + RunRunIt = 369; + Typeform = 370; + Mixpanel = 371; + Tradier = 372; + Verifier = 373; + Vouchery = 374; + Alegra = 375; + Audd = 376; + Baremetrics = 377; + Coinlib = 378; + ExchangeRatesAPI = 379; + CurrencyScoop = 380; + FXMarket = 381; + CurrencyCloud = 382; + GetGeoAPI = 383; + Abstract = 384; + Billomat = 385; + Dovico = 386; + Bitbar = 387; + Bugsnag = 388; + AssemblyAI = 389; + AdafruitIO = 390; + Apify = 391; + CoinGecko = 392; // Not yet implemented + CryptoCompare = 393; + Fullstory = 394; + HelloSign = 395; + Loyverse = 396; + NetCore = 397; // Not yet implemented + SauceLabs = 398; + AlienVault = 399; + Apiflash = 401; + Coinlayer = 402; + CurrentsAPI = 403; + DataGov = 404; + Enigma = 405; + FinancialModelingPrep = 406; + Geocodio = 407; + HereAPI = 408; + Macaddress = 409 [deprecated = true]; + OOPSpam = 410; + ProtocolsIO = 411; + ScraperAPI = 412; + SecurityTrails = 413; + TomorrowIO = 414; + WorldCoinIndex = 415; + FacePlusPlus = 416; + Voicegain = 417; + Deepgram = 418; + VisualCrossing = 419; + Finnhub = 420; + Tiingo = 421; + RingCentral = 422; + Finage = 423; + Edamam = 424; + HypeAuditor = 425; // Not yet implemented + Gengo = 426; + Front = 427; + Fleetbase = 428; + Bubble = 429; // Not yet implemented + Bannerbear = 430; + Adzuna = 431; + BitcoinAverage = 432; + CommerceJS = 433; + DetectLanguage = 434; + FakeJSON = 435 [deprecated = true]; + Graphhopper = 436; + Lexigram = 437; + LinkPreview = 438; + Numverify = 439; + ProxyCrawl = 440; + ZipCodeAPI = 441; + Cometchat = 442; // Not yet implemented + Keygen = 443; // Not yet implemented + Mixcloud = 444; // Not yet implemented + TatumIO = 445; + Tmetric = 446; + Lastfm = 447 [deprecated = true]; + Browshot = 448; + JSONbin = 449; // Not yet implemented + LocationIQ = 450; + ScreenshotAPI = 451; + WeatherStack = 452; + Amadeus = 453; + FourSquare = 454; + Flickr = 455; + ClickHelp = 456; + Ambee = 457; + Api2Cart = 458; + Hypertrack = 459; + KakaoTalk = 460; // Not yet implemented + RiteKit = 461; + Shutterstock = 462; + Text2Data = 463 [deprecated = true];; + YouNeedABudget = 464; + Cricket = 465; // Not yet implemented + Filestack = 466; // Not yet implemented + Gyazo = 467; + Mavenlink = 468; + Sheety = 469; + Sportsmonk = 470; + Stockdata = 471; + Unsplash = 472; + Allsports = 473; + CalorieNinja = 474; + WalkScore = 475; + Strava = 476; + Cicero = 477; + IPQuality = 478; + ParallelDots = 479; + Roaring = 480; + Mailsac = 481; + Whoxy = 482; + WorldWeather = 483; + ApiFonica = 484; + Aylien = 485; + Geocode = 486; + IconFinder = 487; + Ipify = 488 [deprecated = true]; + LanguageLayer = 489; + Lob = 490; + OnWaterIO = 491 [deprecated = true]; + Pastebin = 492; + PdfLayer = 493; + Pixabay = 494; + ReadMe = 495; + VatLayer = 496; + VirusTotal = 497; + AirVisual = 498; + Currencyfreaks = 499; + Duffel = 500; // Not yet implemented + FlatIO = 501; + M3o = 502; + Mesibo = 503; + Openuv = 504; + Snipcart = 505; + Besttime = 506; + Happyscribe = 507; + Humanity = 508; + Impala = 509; + Loginradius = 510; + AutoPilot = 511; + Bitmex = 512; + ClustDoc = 513; + Messari = 514; // Not yet implemented + PdfShift = 515; + Poloniex = 516; + RestpackHtmlToPdfAPI = 517; + RestpackScreenshotAPI = 518; + ShutterstockOAuth = 519; + SkyBiometry = 520; + AbuseIPDB = 521; + AletheiaApi = 522; + BlitApp = 523; + Censys = 524; + Cloverly = 525; + CountryLayer = 526; + FileIO = 527; + FlightApi = 528; + Geoapify = 529; + IPinfoDB = 530; + MediaStack = 531; + NasdaqDataLink = 532; + OpenCageData = 533; + Paymongo = 534; + PositionStack = 535; + Rebrandly = 536; + ScreenshotLayer = 537; + Stytch = 538; + Unplugg = 539; + UPCDatabase = 540; + UserStack = 541; + Geocodify = 542; + Newscatcher = 543; + Nicereply = 544; + Partnerstack = 545; + Route4me = 546; + Scrapeowl = 547; + ScrapingDog = 548; // Not yet implemented + Streak = 549; + Veriphone = 550; + Webscraping = 551; + Zenscrape = 552; + Zenserp = 553; + CoinApi = 554; + Gitter = 555; + Host = 556; + Iexcloud = 557; + Restpack = 558 [deprecated = true]; + ScraperBox = 559; + ScrapingAnt = 560; + SerpStack = 561; + SmartyStreets = 562; + TicketMaster = 563; + AviationStack = 564; + BombBomb = 565; + Commodities = 566; + Dfuse = 567; + EdenAI = 568; + Glassnode = 569; + Guru = 570; + Hive = 571; + Hiveage = 572; + Kickbox = 573; + Passbase = 574 [deprecated = true]; + PostageApp = 575; + PureStake = 576; + Qubole = 577; + CarbonInterface = 578; + Intrinio = 579; + QuickMetrics = 580 [deprecated = true]; + ScrapeStack = 581; + TechnicalAnalysisApi = 582; + Urlscan = 583; + BaseApiIO = 584; // Not yet implemented + DailyCO = 585; + TLy = 586; + Shortcut = 587; + Appfollow = 588; + Thinkific = 589; + Feedly = 590; // Not yet implemented + Stitchdata = 591; + Fetchrss = 592; + Signupgenius = 593; + Signaturit = 594; + Optimizely = 595; + OcrSpace = 596; // Not yet implemented + WeatherBit = 597; + BuddyNS = 598; + ZipAPI = 599; + ZipBooks = 600; + Onedesk = 601; + Bugherd = 602; + Blazemeter = 603; + Autodesk = 604; + Tru = 605; + UnifyID = 606; + Trimble = 607; // Not yet implemented + Smooch = 608; + Semaphore = 609; + Telnyx = 610; + Signalwire = 611; + Textmagic = 612; + Serphouse = 613; + Planyo = 614; + Simplybook = 615; // Not yet implemented + Vyte = 616; + Nylas = 617; + Squareup = 618; + Dandelion = 619; + DataFire = 620 [deprecated = true]; + DeepAI = 621; + MeaningCloud = 622; + NeutrinoApi = 623; + Storecove = 624; + Shipday = 625; + Sentiment = 626 [deprecated = true]; + StreamChatMessaging = 627; // Not yet implemented + TeamworkCRM = 628; + TeamworkDesk = 629; + TeamworkSpaces = 630; + TheOddsApi = 631; + Apacta = 632; + GetSandbox = 633; + Happi = 634 [deprecated = true]; + Oanda = 635; + FastForex = 636; + APIMatic = 637; + VersionEye = 638; + EagleEyeNetworks = 639; + ThousandEyes = 640; + SelectPDF = 641; + Flightstats = 642; + ChecIO = 643; + Manifest = 644; + ApiScience = 645 [deprecated = true]; + AppSynergy = 646; + Caflou = 647; + Caspio = 648; + ChecklyHQ = 649; + CloudElements = 650; + DronaHQ = 651; + Enablex = 652; + Fmfw = 653; + GoodDay = 654; + Luno = 655; + Meistertask = 656; + Mindmeister = 657; + PeopleDataLabs = 658; + ScraperSite = 659 [deprecated = true]; + Scrapfly = 660; + SimplyNoted = 661; + TravelPayouts = 662; + WebScraper = 663; + Convier = 664; + Courier = 665; + Ditto = 666; + Findl = 667; + Lendflow = 668; + Moderation = 669; + Opendatasoft = 670; // Not yet implemented + Podio = 671; + Rockset = 672 [deprecated = true]; + Rownd = 673; + Shotstack = 674; + Swiftype = 675; + Twitter = 676; + Honey = 677; + Freshdesk = 678; + Upwave = 679; + Fountain = 680; // Not yet implemented + Freshbooks = 681; + Mite = 682; + Deputy = 683; + Beebole = 684; + Cashboard = 685; + Kanban = 686; + Worksnaps = 687; + MyIntervals = 688; + InvoiceOcean = 689; + Sherpadesk = 690; + Mrticktock = 691; + Chatfule = 692; + Aeroworkflow = 693; + Emailoctopus = 694; // Not yet implemented + Fusebill = 695 [deprecated = true]; + Geckoboard = 696; + Gosquared = 697; // Not yet implemented + Moonclerk = 698; + Paymoapp = 699; + Mixmax = 700; + Processst = 701; // Not yet implemented + Repairshopr = 702; + Goshippo = 703; // Not yet implemented + Sigopt = 704; + Sugester = 705; + Viewneo = 706; + BoostNote = 707; + CaptainData = 708; + Checkvist = 709; + Cliengo = 710; + Cloze = 711; + FormIO = 712; + FormBucket = 713; + GoCanvas = 714; + MadKudu = 715; + NozbeTeams = 716; + Papyrs = 717; // Not yet implemented + SuperNotesAPI = 718; + Tallyfy = 719; + ZenkitAPI = 720; + CloudImage = 721; + UploadCare = 722; + Borgbase = 723; + Pipedream = 724; + Sirv = 725; + Diffbot = 726; + EightxEight = 727; + Sendoso = 728; // Not yet implemented + Printfection = 729; // Not yet implemented + Authorize = 730; // Not yet implemented + PandaScore = 731; + Paymo = 732; + AvazaPersonalAccessToken = 733; + PlanviewLeanKit = 734; + Livestorm = 735; + KuCoin = 736; + MetaAPI = 737; + NiceHash = 738; // Not yet implemented + CexIO = 739; + Klipfolio = 740; + Dynatrace = 741; // Not yet implemented + MollieAPIKey = 742; // Not yet implemented + MollieAccessToken = 743; // Not yet implemented + BasisTheory = 744; // Not yet implemented + Nordigen = 745; // Not yet implemented + FlagsmithEnvironmentKey = 746; // Not yet implemented + FlagsmithToken = 747; // Not yet implemented + Mux = 748; + Column = 749; + Sendbird = 750; + SendbirdOrganizationAPI = 751; + Midise = 752; // Not yet implemented + Mockaroo = 753; + Image4 = 754; // Not yet implemented + Pinata = 755; + BrowserStack = 756; + CrossBrowserTesting = 757 [deprecated = true]; + Loadmill = 758; + TestingBot = 759; + KnapsackPro = 760; + Qase = 761; + Dareboost = 762; + GTMetrix = 763; + Holistic = 764; + Parsers = 765; + ScrutinizerCi = 766; + SonarCloud = 767; + APITemplate = 768; + ConversionTools = 769; + CraftMyPDF = 770; + ExportSDK = 771; + GlitterlyAPI = 772 [deprecated = true]; + Hybiscus = 773; + Miro = 774; + Statuspage = 775; + Statuspal = 776; + Teletype = 777; + TimeCamp = 778; + Userflow = 779; + Wistia = 780; + SportRadar = 781 [deprecated = true];; + UptimeRobot = 782; + Codequiry = 783; + ExtractorAPI = 784; + Signable = 785; + MagicBell = 786; + Stormboard = 787; + Apilayer = 788; + Disqus = 789; + Woopra = 790; // Not yet implemented + Paperform = 791; + Gumroad = 792; + Paydirtapp = 793; + Detectify = 794; + Statuscake = 795; + Jumpseller = 796; // Not yet implemented + LunchMoney = 797; + Rosette = 798; // Not yet implemented + Yelp = 799; + Atera = 800; + EcoStruxureIT = 801; + Aha = 802; + Parsehub = 803; + PackageCloud = 804; + Cloudsmith = 805; + Flowdash = 806 [deprecated = true]; + Flowdock = 807 [deprecated = true]; + Fibery = 808; + Typetalk = 809; + VoodooSMS = 810; + ZulipChat = 811; + Formcraft = 812; + Iexapis = 813; + Reachmail = 814; + Chartmogul = 815; + Appointedd = 816; + Wit = 817; + RechargePayments = 818; + Diggernaut = 819; + MonkeyLearn = 820; + Duply = 821; + Postbacks = 822; + Collect2 = 823; + ZenRows = 824; + Zipcodebase = 825; + Tefter = 826; + Twist = 827; + BraintreePayments = 828; + CloudConvert = 829; + Grafana = 830; + ConvertApi = 831; + Transferwise = 832; + Bulksms = 833; + Databox = 834; + Onesignal = 835; + Rentman = 836; + Parseur = 837; + Docparser = 838; + Formsite = 839; + Tickettailor = 840; + Lemlist = 841; + Prodpad = 842; + Formstack = 843; // Not yet implemented + Codeclimate = 844; + Codemagic = 845; + Vbout = 846; + Nightfall = 847; + FlightLabs = 848; + SpeechTextAI = 849; + PollsAPI = 850; + SimFin = 851; + Scalr = 852; + Kanbantool = 853; + Brightlocal = 854; // Not yet implemented + Hotwire = 855; // Not yet implemented + Instabot = 856; + Timekit = 857; // Not yet implemented + Interseller = 858; + Mojohelpdesk = 859; // Not yet implemented + Createsend = 860; // Not yet implemented + Getresponse = 861; + Dynadot = 862; // Not yet implemented + Demio = 863; + Tokeet = 864; + Myexperiment = 865; // Not yet implemented + Copyscape = 866; // Not yet implemented + Besnappy = 867; + Salesmate = 868; + Heatmapapi = 869 [deprecated = true];; + Websitepulse = 870; + Uclassify = 871; + Convert = 872; + PDFmyURL = 873; // Not yet implemented + Api2Convert = 874; // Not yet implemented + Opsgenie = 875; + Gemini = 876; + Honeycomb = 877; + KalturaAppToken = 878; // Not yet implemented + KalturaSession = 879; // Not yet implemented + BitGo = 880; // Not yet implemented + Optidash = 881; // Not yet implemented + Imgix = 882; // Not yet implemented + ImageToText = 883; // Not yet implemented + Page2Images = 884; // Not yet implemented + Quickbase = 885; // Not yet implemented + Redbooth = 886; // Not yet implemented + Nubela = 887; // Not yet implemented + Infobip = 888; // Not yet implemented + Uproc = 889; // Not yet implemented + Supportbee = 890; // Not yet implemented + Aftership = 891; // Not yet implemented + Edusign = 892; // Not yet implemented + Teamup = 893; // Not yet implemented + Workday = 894; // Not yet implemented + MongoDB = 895; + NGC = 896; + DigitalOceanV2 = 897; + SQLServer = 898; + FTP = 899; + Redis = 900; + LDAP = 901; + Shopify = 902; + RabbitMQ = 903; + CustomRegex = 904; + Etherscan = 905; + Infura = 906; + Alchemy = 907; + BlockNative = 908; + Moralis = 909; + BscScan = 910; + CoinMarketCap = 911 [deprecated = true]; + Percy = 912; + TinesWebhook = 913; + Pulumi = 914; + SupabaseToken = 915; + NuGetApiKey = 916; + Aiven = 917; + Prefect = 918; + Docusign = 919; + Couchbase = 920; + Dockerhub = 921; + TrufflehogEnterprise = 922; + EnvoyApiKey = 923; + GitHubOauth2 = 924; + Salesforce = 925; + HuggingFace = 926; + Snowflake = 927; + Sourcegraph = 928; + Tailscale = 929; + Web3Storage = 930; + AzureStorage = 931; + PlanetScaleDb = 932; + Anthropic = 933; + Ramp = 934; + Klaviyo = 935; + SourcegraphCody = 936; + Voiceflow = 937; + Privacy = 938; + IPInfo = 939; + Ip2location = 940; + Instamojo = 941; + Portainer = 942; + PortainerToken = 943; + Loggly = 944; + OpenVpn = 945; + VagrantCloudPersonalToken = 946; + BetterStack = 947; + ZeroTier = 948; + AppOptics = 949; + Metabase = 950; + CoinbaseWaaS = 951 [deprecated = true]; + LemonSqueezy = 952; + Budibase = 953; + DenoDeploy = 954; + Stripo = 955; + ReplyIO = 956; + AzureBatch = 957; + AzureContainerRegistry = 958; + AWSSessionKey = 959; + Coda = 960; + LogzIO = 961; + Eventbrite = 962; + GrafanaServiceAccount = 963; + RequestFinance = 964; + Overloop = 965; + Ngrok = 966; + Replicate = 967; + Postgres = 968; + AzureActiveDirectoryApplicationSecret = 969; + AzureCacheForRedisAccessKey = 970; + AzureCosmosDBKeyIdentifiable = 971; + AzureDevopsPersonalAccessToken = 972; + AzureFunctionKey = 973; + AzureMLWebServiceClassicIdentifiableKey = 974; + AzureSasToken = 975; + AzureSearchAdminKey = 976; + AzureSearchQueryKey = 977; + AzureManagementCertificate = 978; + AzureSQL = 979; + FlyIO = 980; + BuiltWith = 981; + JupiterOne = 982; + GCPApplicationDefaultCredentials = 983; + Wiz = 984; + Pagarme = 985; + Onfleet = 986; + Intra42 = 987; + Groq = 988; + TwitterConsumerkey = 989; + Eraser = 990; + LarkSuite = 991; + LarkSuiteApiKey = 992; + EndorLabs = 993; + ElevenLabs = 994; + Netsuite = 995; + RobinhoodCrypto = 996; + NVAPI = 997; + PyPI = 998; + RailwayApp = 999; + Meraki = 1000; + SaladCloudApiKey = 1001; + Box = 1002; + BoxOauth = 1003; + ApiMetrics = 1004; + WeightsAndBiases = 1005; + ZohoCRM = 1006; + AzureOpenAI = 1007; + GoDaddy = 1008; + Flexport = 1009; + TwitchAccessToken = 1010; + TwilioApiKey = 1011; + Sanity = 1012; + AzureRefreshToken = 1013; + AirtableOAuth = 1014; + AirtablePersonalAccessToken = 1015; + StoryblokPersonalAccessToken = 1016; + SentryOrgToken = 1017; + AzureApiManagementRepositoryKey = 1018; + AzureAPIManagementSubscriptionKey = 1019; + Harness = 1020; + Langfuse = 1021; + BingSubscriptionKey = 1022; + XAI = 1023; + AzureDirectManagementKey = 1024; + AzureAppConfigConnectionString = 1025; + DeepSeek = 1026; + StripePaymentIntent = 1027; + LangSmith = 1028; + BitbucketAppPassword = 1029; + Hasura = 1030; + SalesforceRefreshToken = 1031; + AnypointOAuth2 = 1032; + WebexBot = 1033; + TableauPersonalAccessToken = 1034; + Rootly = 1035; + HashiCorpVaultAuth = 1036; + PhraseAccessToken = 1037; + Photoroom = 1038; + JWT = 1039; + OpenAIAdmin = 1040; + GoogleGeminiAPIKey = 1041; + ArtifactoryReferenceToken = 1042; + DatadogApikey = 1043; +} \ No newline at end of file