Skip to content

Commit

Permalink
Fix azure panic when invalid URL is constructed (trufflesecurity#2137)
Browse files Browse the repository at this point in the history
  • Loading branch information
dustin-decker authored Nov 30, 2023
1 parent 8880c2e commit a367f9c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/detectors/azurestorage/azurestorage.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result

url := "https://" + accountName + ".blob.core.windows.net/?comp=list"
req, err := http.NewRequestWithContext(ctx, "GET", url, nil)
if err != nil {
continue
}
req.Header.Set("x-ms-date", now)
req.Header.Set("x-ms-version", "2019-12-12")
req.Header.Set("Authorization", "SharedKey "+accountName+":"+signature)
Expand Down

0 comments on commit a367f9c

Please sign in to comment.