Skip to content

Find, verify, and analyze leaked credentials

Added a rate limiter for getting the overall list of Postman workspaces (#4002)

Casey Tran3ef64bed2fc8
diff --git a/pkg/sources/postman/postman_client.go b/pkg/sources/postman/postman_client.go
index 45875fbfe..923b98d14 100644
--- a/pkg/sources/postman/postman_client.go
+++ b/pkg/sources/postman/postman_client.go
@@ -271,6 +271,9 @@ func (c *Client) EnumerateWorkspaces(ctx context.Context) ([]Workspace, error) {
Workspaces []Workspace `json:"workspaces"`
}{}
+ if err := c.WorkspaceAndCollectionRateLimiter.Wait(ctx); err != nil {
+ return nil, fmt.Errorf("could not wait for rate limiter during workspaces enumeration getting: %w", err)
+ }
r, err := c.getPostmanReq("https://api.getpostman.com/workspaces", nil)
if err != nil {
return nil, fmt.Errorf("could not get workspaces during enumeration: %w", err)