From 6d817845727e15dea4a25eab9fe1b310096272be Mon Sep 17 00:00:00 2001 From: Sahil Silare Date: Thu, 17 Oct 2024 13:16:13 +0530 Subject: [PATCH 1/2] fix: added correct verification endpoint for axonaut --- pkg/detectors/axonaut/axonaut.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/detectors/axonaut/axonaut.go b/pkg/detectors/axonaut/axonaut.go index 7062d23faabd..60b642be23a5 100644 --- a/pkg/detectors/axonaut/axonaut.go +++ b/pkg/detectors/axonaut/axonaut.go @@ -2,10 +2,11 @@ package axonaut 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" @@ -47,7 +48,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } if verify { - req, err := http.NewRequestWithContext(ctx, "GET", "https://axonaut.com/api/v2/companies?type=all&sort=id", nil) + req, err := http.NewRequestWithContext(ctx, "GET", "https://axonaut.com/api/v2/me", nil) if err != nil { continue } From a04fe9efd7eb459a4bf80c7968df944da2424b06 Mon Sep 17 00:00:00 2001 From: Sahil Silare Date: Thu, 17 Oct 2024 13:16:48 +0530 Subject: [PATCH 2/2] chore: added reference for the doc --- pkg/detectors/axonaut/axonaut.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/detectors/axonaut/axonaut.go b/pkg/detectors/axonaut/axonaut.go index 60b642be23a5..fc81a4e6182c 100644 --- a/pkg/detectors/axonaut/axonaut.go +++ b/pkg/detectors/axonaut/axonaut.go @@ -48,6 +48,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } if verify { + // Reference : https://axonaut.com/api/v2/doc req, err := http.NewRequestWithContext(ctx, "GET", "https://axonaut.com/api/v2/me", nil) if err != nil { continue