[feat] - Replace regexp pkg w/ go-re2 in detectors (#2324)

* update detectors to use go-re regex library replacement

* update go mod and sum

* add tests with invalid utf-8

* revert
This commit is contained in:
ahrav 2024-01-23 13:16:22 -08:00 committed by GitHub
parent 80f2696ae0
commit e44802a31d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
821 changed files with 913 additions and 844 deletions

3
go.mod
View file

@ -204,6 +204,7 @@ require (
github.com/launchdarkly/go-semver v1.0.2 // indirect
github.com/launchdarkly/go-server-sdk-evaluation/v2 v2.0.2 // indirect
github.com/lucasb-eyer/go-colorful v1.2.0 // indirect
github.com/magefile/mage v1.14.0 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-localereader v0.0.1 // indirect
@ -235,9 +236,11 @@ require (
github.com/sahilm/fuzzy v0.1.0 // indirect
github.com/sirupsen/logrus v1.9.1 // indirect
github.com/skeema/knownhosts v1.2.1 // indirect
github.com/tetratelabs/wazero v1.5.0 // indirect
github.com/therootcompany/xz v1.0.1 // indirect
github.com/ulikunitz/xz v0.5.11 // indirect
github.com/vbatts/tar-split v0.11.3 // indirect
github.com/wasilibs/go-re2 v1.4.1 // indirect
github.com/xanzy/ssh-agent v0.3.3 // indirect
github.com/xdg-go/pbkdf2 v1.0.0 // indirect
github.com/xdg-go/scram v1.1.2 // indirect

6
go.sum
View file

@ -528,6 +528,8 @@ github.com/lrstanley/bubblezone v0.0.0-20230911164824-e3824f1adde9 h1:+7bxeCzFs4
github.com/lrstanley/bubblezone v0.0.0-20230911164824-e3824f1adde9/go.mod h1:v5lEwWaguF1o2MW/ucO0ZIA/IZymdBYJJ+2cMRLE7LU=
github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY=
github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0=
github.com/magefile/mage v1.14.0 h1:6QDX3g6z1YvJ4olPhT1wksUcSa/V0a1B+pJb73fBjyo=
github.com/magefile/mage v1.14.0/go.mod h1:z5UZb/iS3GoOSn0JgWuiw7dxlurVYTu+/jHXqQg881A=
github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0=
github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=
github.com/marusama/semaphore/v2 v2.5.0 h1:o/1QJD9DBYOWRnDhPwDVAXQn6mQYD0gZaS1Tpx6DJGM=
@ -682,6 +684,8 @@ github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcU
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/tailscale/depaware v0.0.0-20210622194025-720c4b409502 h1:34icjjmqJ2HPjrSuJYEkdZ+0ItmGQAQ75cRHIiftIyE=
github.com/tailscale/depaware v0.0.0-20210622194025-720c4b409502/go.mod h1:p9lPsd+cx33L3H9nNoecRRxPssFKUwwI50I3pZ0yT+8=
github.com/tetratelabs/wazero v1.5.0 h1:Yz3fZHivfDiZFUXnWMPUoiW7s8tC1sjdBtlJn08qYa0=
github.com/tetratelabs/wazero v1.5.0/go.mod h1:0U0G41+ochRKoPKCJlh0jMg1CHkyfK8kDqiirMmKY8A=
github.com/therootcompany/xz v1.0.1 h1:CmOtsn1CbtmyYiusbfmhmkpAAETj0wBIH6kCYaX+xzw=
github.com/therootcompany/xz v1.0.1/go.mod h1:3K3UH1yCKgBneZYhuQUvJ9HPD19UEXEI0BWbMn8qNMY=
github.com/trufflesecurity/disk-buffer-reader v0.2.1 h1:K9nNpX3xeWT2E6YRjlcc1X5c1NjgV9JS5T9aw2FjA8Q=
@ -694,6 +698,8 @@ github.com/ulikunitz/xz v0.5.11/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0o
github.com/urfave/cli v1.22.12/go.mod h1:sSBEIC79qR6OvcmsD4U3KABeOTxDqQtdDnaFuUN30b8=
github.com/vbatts/tar-split v0.11.3 h1:hLFqsOLQ1SsppQNTMpkpPXClLDfC2A3Zgy9OUU+RVck=
github.com/vbatts/tar-split v0.11.3/go.mod h1:9QlHN18E+fEH7RdG+QAJJcuya3rqT7eXSTY7wGrAokY=
github.com/wasilibs/go-re2 v1.4.1 h1:E5+9O1M8UoGeqLB2A9omeoaWImqpuYDs9cKwvTJq/Oo=
github.com/wasilibs/go-re2 v1.4.1/go.mod h1:ynB8eCwd9JsqUnsk8WlPDk6cEeme8BguZmnqOSURE4Y=
github.com/wsxiaoys/terminal v0.0.0-20160513160801-0940f3fc43a0 h1:3UeQBvD0TFrlVjOeLOBz+CPAI8dnbqNSVwUwRrkp7vQ=
github.com/wsxiaoys/terminal v0.0.0-20160513160801-0940f3fc43a0/go.mod h1:IXCdmsXIht47RaVFLEdVnh1t+pgYtTAhQGj73kz+2DM=
github.com/xanzy/go-gitlab v0.94.0 h1:GmBl2T5zqUHqyjkxFSvsT7CbelGdAH/dmBqUBqS+4BE=

View file

@ -2,8 +2,8 @@ package abbysale
import (
"context"
regexp "github.com/wasilibs/go-re2"
"net/http"
"regexp"
"strings"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"

View file

@ -3,8 +3,8 @@ package abstract
import (
"context"
"fmt"
regexp "github.com/wasilibs/go-re2"
"net/http"
"regexp"
"strings"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"

View file

@ -5,7 +5,7 @@ import (
"io"
"net/http"
// "log"
"regexp"
regexp "github.com/wasilibs/go-re2"
"strings"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"

View file

@ -2,8 +2,8 @@ package accuweather
import (
"context"
regexp "github.com/wasilibs/go-re2"
"net/http"
"regexp"
"strings"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"

View file

@ -2,8 +2,8 @@ package adafruitio
import (
"context"
regexp "github.com/wasilibs/go-re2"
"net/http"
"regexp"
"strings"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"

View file

@ -2,8 +2,8 @@ package adobeio
import (
"context"
regexp "github.com/wasilibs/go-re2"
"net/http"
"regexp"
"strings"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"

View file

@ -3,8 +3,8 @@ package adzuna
import (
"context"
"fmt"
regexp "github.com/wasilibs/go-re2"
"net/http"
"regexp"
"strings"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"

View file

@ -2,8 +2,8 @@ package aeroworkflow
import (
"context"
regexp "github.com/wasilibs/go-re2"
"net/http"
"regexp"
"strings"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"

View file

@ -2,8 +2,8 @@ package agora
import (
"context"
regexp "github.com/wasilibs/go-re2"
"net/http"
"regexp"
"strings"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"

View file

@ -3,8 +3,8 @@ package aha
import (
"context"
"fmt"
regexp "github.com/wasilibs/go-re2"
"net/http"
"regexp"
"strings"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"

View file

@ -2,8 +2,8 @@ package airbrakeprojectkey
import (
"context"
regexp "github.com/wasilibs/go-re2"
"net/http"
"regexp"
"strings"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"

View file

@ -2,8 +2,8 @@ package airbrakeuserkey
import (
"context"
regexp "github.com/wasilibs/go-re2"
"net/http"
"regexp"
"strings"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"

View file

@ -3,8 +3,8 @@ package airship
import (
"context"
"fmt"
regexp "github.com/wasilibs/go-re2"
"net/http"
"regexp"
"strings"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"

View file

@ -4,8 +4,8 @@ import (
"context"
"encoding/json"
"fmt"
regexp "github.com/wasilibs/go-re2"
"net/http"
"regexp"
"strings"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"

View file

@ -3,8 +3,8 @@ package airvisual
import (
"context"
"fmt"
regexp "github.com/wasilibs/go-re2"
"net/http"
"regexp"
"strings"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"

View file

@ -3,8 +3,8 @@ package aiven
import (
"context"
"fmt"
regexp "github.com/wasilibs/go-re2"
"net/http"
"regexp"
"strings"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"

View file

@ -3,8 +3,8 @@ package alchemy
import (
"context"
"fmt"
regexp "github.com/wasilibs/go-re2"
"net/http"
"regexp"
"strings"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"

View file

@ -4,8 +4,8 @@ import (
"context"
b64 "encoding/base64"
"fmt"
regexp "github.com/wasilibs/go-re2"
"net/http"
"regexp"
"strings"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"

View file

@ -2,8 +2,8 @@ package alegra
import (
"context"
regexp "github.com/wasilibs/go-re2"
"net/http"
"regexp"
"strings"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"

View file

@ -2,8 +2,8 @@ package aletheiaapi
import (
"context"
regexp "github.com/wasilibs/go-re2"
"net/http"
"regexp"
"strings"
"time"

View file

@ -2,8 +2,8 @@ package algoliaadminkey
import (
"context"
regexp "github.com/wasilibs/go-re2"
"net/http"
"regexp"
"strings"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"

View file

@ -6,9 +6,9 @@ import (
"crypto/rand"
"crypto/sha1"
"encoding/base64"
regexp "github.com/wasilibs/go-re2"
"net/http"
"net/url"
"regexp"
"strconv"
"strings"
"time"

View file

@ -2,8 +2,8 @@ package alienvault
import (
"context"
regexp "github.com/wasilibs/go-re2"
"net/http"
"regexp"
"strings"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"

View file

@ -5,7 +5,7 @@ import (
"io"
"net/http"
// "log"
"regexp"
regexp "github.com/wasilibs/go-re2"
"strings"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"

View file

@ -2,9 +2,9 @@ package amadeus
import (
"context"
regexp "github.com/wasilibs/go-re2"
"io"
"net/http"
"regexp"
"strings"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"

View file

@ -2,8 +2,8 @@ package ambee
import (
"context"
regexp "github.com/wasilibs/go-re2"
"net/http"
"regexp"
"strings"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"

View file

@ -2,8 +2,8 @@ package amplitudeapikey
import (
"context"
regexp "github.com/wasilibs/go-re2"
"net/http"
"regexp"
"strings"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"

View file

@ -5,8 +5,8 @@ import (
"context"
"encoding/json"
"fmt"
regexp "github.com/wasilibs/go-re2"
"net/http"
"regexp"
"strings"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"

View file

@ -3,8 +3,8 @@ package anypoint
import (
"context"
"fmt"
regexp "github.com/wasilibs/go-re2"
"net/http"
"regexp"
"strings"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"

View file

@ -3,8 +3,8 @@ package apacta
import (
"context"
"fmt"
regexp "github.com/wasilibs/go-re2"
"net/http"
"regexp"
"strings"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"

View file

@ -4,9 +4,9 @@ import (
"context"
"encoding/json"
"fmt"
regexp "github.com/wasilibs/go-re2"
"io"
"net/http"
"regexp"
"strings"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"

View file

@ -3,8 +3,8 @@ package apideck
import (
"context"
"fmt"
regexp "github.com/wasilibs/go-re2"
"net/http"
"regexp"
"strings"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"

View file

@ -3,8 +3,8 @@ package apiflash
import (
"context"
"fmt"
regexp "github.com/wasilibs/go-re2"
"net/http"
"regexp"
"strings"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"

View file

@ -4,8 +4,8 @@ import (
"context"
b64 "encoding/base64"
"fmt"
regexp "github.com/wasilibs/go-re2"
"net/http"
"regexp"
"strings"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"

View file

@ -2,8 +2,8 @@ package apify
import (
"context"
regexp "github.com/wasilibs/go-re2"
"net/http"
"regexp"
"strings"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"

View file

@ -2,8 +2,8 @@ package apilayer
import (
"context"
regexp "github.com/wasilibs/go-re2"
"net/http"
"regexp"
"strings"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"

View file

@ -2,8 +2,8 @@ package apimatic
import (
"context"
regexp "github.com/wasilibs/go-re2"
"net/http"
"regexp"
"strings"
"time"

View file

@ -3,8 +3,8 @@ package apiscience
import (
"context"
"fmt"
regexp "github.com/wasilibs/go-re2"
"net/http"
"regexp"
"strings"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"

View file

@ -2,8 +2,8 @@ package apitemplate
import (
"context"
regexp "github.com/wasilibs/go-re2"
"net/http"
"regexp"
"strings"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"

View file

@ -3,8 +3,8 @@ package apollo
import (
"context"
"fmt"
regexp "github.com/wasilibs/go-re2"
"net/http"
"regexp"
"strings"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"

View file

@ -3,8 +3,8 @@ package appcues
import (
"context"
"fmt"
regexp "github.com/wasilibs/go-re2"
"net/http"
"regexp"
"strings"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"

View file

@ -2,8 +2,8 @@ package appfollow
import (
"context"
regexp "github.com/wasilibs/go-re2"
"net/http"
"regexp"
"strings"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"

View file

@ -2,9 +2,9 @@ package appointedd
import (
"context"
regexp "github.com/wasilibs/go-re2"
"io"
"net/http"
"regexp"
"strings"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"

View file

@ -4,8 +4,8 @@ import (
"context"
b64 "encoding/base64"
"fmt"
regexp "github.com/wasilibs/go-re2"
"net/http"
"regexp"
"strings"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"

View file

@ -3,8 +3,8 @@ package appsynergy
import (
"context"
"fmt"
regexp "github.com/wasilibs/go-re2"
"net/http"
"regexp"
"strings"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"

View file

@ -3,9 +3,9 @@ package apptivo
import (
"context"
"fmt"
regexp "github.com/wasilibs/go-re2"
"io"
"net/http"
"regexp"
"strings"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"

View file

@ -2,8 +2,8 @@ package artifactory
import (
"context"
regexp "github.com/wasilibs/go-re2"
"net/http"
"regexp"
"strings"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"

View file

@ -2,8 +2,8 @@ package artsy
import (
"context"
regexp "github.com/wasilibs/go-re2"
"net/http"
"regexp"
"strings"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"

View file

@ -3,8 +3,8 @@ package asanaoauth
import (
"context"
"fmt"
regexp "github.com/wasilibs/go-re2"
"net/http"
"regexp"
"strings"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"

View file

@ -3,8 +3,8 @@ package asanapersonalaccesstoken
import (
"context"
"fmt"
regexp "github.com/wasilibs/go-re2"
"net/http"
"regexp"
"strings"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"

View file

@ -2,8 +2,8 @@ package assemblyai
import (
"context"
regexp "github.com/wasilibs/go-re2"
"net/http"
"regexp"
"strings"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"

View file

@ -2,8 +2,8 @@ package atera
import (
"context"
regexp "github.com/wasilibs/go-re2"
"net/http"
"regexp"
"strings"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"

View file

@ -3,9 +3,9 @@ package audd
import (
"context"
"fmt"
regexp "github.com/wasilibs/go-re2"
"io"
"net/http"
"regexp"
"strings"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"

View file

@ -3,8 +3,8 @@ package auth0managementapitoken
import (
"context"
"fmt"
regexp "github.com/wasilibs/go-re2"
"net/http"
"regexp"
"strings"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"

View file

@ -2,10 +2,10 @@ package auth0oauth
import (
"context"
regexp "github.com/wasilibs/go-re2"
"io"
"net/http"
"net/url"
"regexp"
"strings"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"

View file

@ -3,8 +3,8 @@ package autodesk
import (
"context"
"fmt"
regexp "github.com/wasilibs/go-re2"
"net/http"
"regexp"
"strings"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"

View file

@ -4,9 +4,9 @@ import (
"context"
"encoding/json"
"fmt"
regexp "github.com/wasilibs/go-re2"
"io"
"net/http"
"regexp"
"strings"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"

View file

@ -2,8 +2,8 @@ package autopilot
import (
"context"
regexp "github.com/wasilibs/go-re2"
"net/http"
"regexp"
"strings"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"

View file

@ -3,8 +3,8 @@ package avazapersonalaccesstoken
import (
"context"
"fmt"
regexp "github.com/wasilibs/go-re2"
"net/http"
"regexp"
"strings"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"

View file

@ -3,8 +3,8 @@ package aviationstack
import (
"context"
"fmt"
regexp "github.com/wasilibs/go-re2"
"net/http"
"regexp"
"strings"
"time"

View file

@ -8,10 +8,11 @@ import (
"encoding/json"
"fmt"
"net/http"
"regexp"
"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"

View file

@ -7,8 +7,8 @@ import (
"encoding/hex"
"encoding/json"
"fmt"
regexp "github.com/wasilibs/go-re2"
"net/http"
"regexp"
"strings"
"time"

View file

@ -2,8 +2,8 @@ package axonaut
import (
"context"
regexp "github.com/wasilibs/go-re2"
"net/http"
"regexp"
"strings"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"

View file

@ -2,8 +2,8 @@ package aylien
import (
"context"
regexp "github.com/wasilibs/go-re2"
"net/http"
"regexp"
"strings"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"

View file

@ -3,8 +3,8 @@ package ayrshare
import (
"context"
"fmt"
regexp "github.com/wasilibs/go-re2"
"net/http"
"regexp"
"strings"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"

View file

@ -3,7 +3,7 @@ package azure
import (
"context"
"fmt"
"regexp"
regexp "github.com/wasilibs/go-re2"
"strings"
"github.com/Azure/go-autorest/autorest/azure/auth"

View file

@ -6,8 +6,8 @@ import (
"crypto/sha256"
"encoding/base64"
"fmt"
regexp "github.com/wasilibs/go-re2"
"net/http"
"regexp"
"strings"
"time"

View file

@ -4,8 +4,8 @@ import (
"context"
"encoding/base64"
"fmt"
regexp "github.com/wasilibs/go-re2"
"net/http"
"regexp"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"

View file

@ -6,8 +6,8 @@ import (
"crypto/sha256"
"encoding/base64"
"fmt"
regexp "github.com/wasilibs/go-re2"
"net/http"
"regexp"
"strings"
"time"

View file

@ -6,7 +6,7 @@ package azurestorage
import (
"context"
"fmt"
"regexp"
regexp "github.com/wasilibs/go-re2"
"strings"
"testing"
"time"

View file

@ -3,8 +3,8 @@ package bannerbear
import (
"context"
"fmt"
regexp "github.com/wasilibs/go-re2"
"net/http"
"regexp"
"strings"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"

View file

@ -3,8 +3,8 @@ package baremetrics
import (
"context"
"fmt"
regexp "github.com/wasilibs/go-re2"
"net/http"
"regexp"
"strings"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"

View file

@ -2,8 +2,8 @@ package beamer
import (
"context"
regexp "github.com/wasilibs/go-re2"
"net/http"
"regexp"
"strings"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"

View file

@ -4,8 +4,8 @@ import (
"context"
b64 "encoding/base64"
"fmt"
regexp "github.com/wasilibs/go-re2"
"net/http"
"regexp"
"strings"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"

View file

@ -4,8 +4,8 @@ import (
"context"
b64 "encoding/base64"
"fmt"
regexp "github.com/wasilibs/go-re2"
"net/http"
"regexp"
"strings"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"

View file

@ -2,9 +2,9 @@ package besttime
import (
"context"
regexp "github.com/wasilibs/go-re2"
"io"
"net/http"
"regexp"
"strings"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"

View file

@ -3,8 +3,8 @@ package betterstack
import (
"context"
"fmt"
regexp "github.com/wasilibs/go-re2"
"net/http"
"regexp"
"strings"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"

View file

@ -3,8 +3,8 @@ package billomat
import (
"context"
"fmt"
regexp "github.com/wasilibs/go-re2"
"net/http"
"regexp"
"strings"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"

View file

@ -4,8 +4,8 @@ import (
"context"
b64 "encoding/base64"
"fmt"
regexp "github.com/wasilibs/go-re2"
"net/http"
"regexp"
"strings"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"

View file

@ -3,8 +3,8 @@ package bitcoinaverage
import (
"context"
"encoding/json"
regexp "github.com/wasilibs/go-re2"
"net/http"
"regexp"
"strings"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"

View file

@ -3,8 +3,8 @@ package bitfinex
import (
"context"
"flag"
regexp "github.com/wasilibs/go-re2"
"net/http"
"regexp"
"strings"
"github.com/bitfinexcom/bitfinex-api-go/v2/rest"

View file

@ -3,8 +3,8 @@ package bitlyaccesstoken
import (
"context"
"fmt"
regexp "github.com/wasilibs/go-re2"
"net/http"
"regexp"
"strings"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"

View file

@ -5,9 +5,9 @@ import (
"crypto/hmac"
"crypto/sha256"
"encoding/hex"
regexp "github.com/wasilibs/go-re2"
"net/http"
"net/url"
"regexp"
"strconv"
"strings"
"time"

View file

@ -3,8 +3,8 @@ package blazemeter
import (
"context"
"fmt"
regexp "github.com/wasilibs/go-re2"
"net/http"
"regexp"
"strings"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"

View file

@ -2,8 +2,8 @@ package blitapp
import (
"context"
regexp "github.com/wasilibs/go-re2"
"net/http"
"regexp"
"strings"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"

View file

@ -2,9 +2,9 @@ package blocknative
import (
"context"
regexp "github.com/wasilibs/go-re2"
"io"
"net/http"
"regexp"
"strings"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"

View file

@ -2,8 +2,8 @@ package blogger
import (
"context"
regexp "github.com/wasilibs/go-re2"
"net/http"
"regexp"
"strings"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"

View file

@ -2,8 +2,8 @@ package bombbomb
import (
"context"
regexp "github.com/wasilibs/go-re2"
"net/http"
"regexp"
"strings"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"

View file

@ -3,8 +3,8 @@ package boostnote
import (
"context"
"fmt"
regexp "github.com/wasilibs/go-re2"
"net/http"
"regexp"
"strings"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"

View file

@ -3,9 +3,9 @@ package borgbase
import (
"context"
"fmt"
regexp "github.com/wasilibs/go-re2"
"io"
"net/http"
"regexp"
"strings"
"time"

View file

@ -3,9 +3,9 @@ package braintreepayments
import (
"context"
"fmt"
regexp "github.com/wasilibs/go-re2"
"io"
"net/http"
"regexp"
"strings"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"

View file

@ -2,8 +2,8 @@ package brandfetch
import (
"context"
regexp "github.com/wasilibs/go-re2"
"net/http"
"regexp"
"strings"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"

View file

@ -3,10 +3,10 @@ package browserstack
import (
"context"
"fmt"
regexp "github.com/wasilibs/go-re2"
"io"
"net/http"
"net/http/cookiejar"
"regexp"
"strings"
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"

View file

@ -2,8 +2,8 @@ package browshot
import (
"context"
regexp "github.com/wasilibs/go-re2"
"net/http"
"regexp"
"strings"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"

View file

@ -2,9 +2,9 @@ package bscscan
import (
"context"
regexp "github.com/wasilibs/go-re2"
"io"
"net/http"
"regexp"
"strings"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
@ -55,22 +55,22 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
res, err := client.Do(req)
if err == nil {
defer res.Body.Close()
bodyBytes, err := io.ReadAll(res.Body)
if err != nil {
continue
}
body := string(bodyBytes)
bodyBytes, err := io.ReadAll(res.Body)
if err != nil {
continue
}
body := string(bodyBytes)
if !strings.Contains(body, "NOTOK") {
s1.Verified = true
} else {
// This function will check false positives for common test words, but also it will make sur>
if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
continue
}
}
}
}
if !strings.Contains(body, "NOTOK") {
s1.Verified = true
} else {
// This function will check false positives for common test words, but also it will make sur>
if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
continue
}
}
}
}
results = append(results, s1)
}

View file

@ -3,8 +3,8 @@ package buddyns
import (
"context"
"fmt"
regexp "github.com/wasilibs/go-re2"
"net/http"
"regexp"
"strings"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"

View file

@ -3,8 +3,8 @@ package budibase
import (
"context"
"fmt"
regexp "github.com/wasilibs/go-re2"
"net/http"
"regexp"
"strings"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"

View file

@ -4,8 +4,8 @@ import (
"context"
b64 "encoding/base64"
"fmt"
regexp "github.com/wasilibs/go-re2"
"net/http"
"regexp"
"strings"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"

Some files were not shown because too many files have changed in this diff Show more