Skip to content

Commit

Permalink
comment to clarify 403 on Aha
Browse files Browse the repository at this point in the history
  • Loading branch information
0x1 committed Jan 25, 2024
1 parent a4a737f commit 0c41ce5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/detectors/aha/aha.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ package aha
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"
Expand Down Expand Up @@ -104,6 +105,8 @@ func verifyAha(ctx context.Context, client *http.Client, resMatch, resURLMatch s
case http.StatusUnauthorized, http.StatusNotFound:
return false, nil
default:
// 403 is a known case where an account is inactive bc of a trial ending or payment issue
// this is still indeterminate as the key could be valid when the account is reactivated
return false, fmt.Errorf("unexpected HTTP response status %d", res.StatusCode)
}
}
Expand Down

0 comments on commit 0c41ce5

Please sign in to comment.