Skip to content

Commit

Permalink
fix: add a missing regular expression anchor
Browse files Browse the repository at this point in the history
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
  • Loading branch information
remyleone and github-advanced-security[bot] authored Oct 31, 2024
1 parent e8adef0 commit c786bba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/testing_recorder.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ func cassetteRequestFilter(i *cassette.Interaction) error {
delete(i.Request.Headers, "X-Auth-Token")
i.Request.URL = regexp.MustCompile("organization_id=[0-9a-f-]{36}").ReplaceAllString(i.Request.URL, "organization_id=11111111-1111-1111-1111-111111111111")
i.Request.URL = regexp.MustCompile(`api\.scaleway\.com/account/v1/tokens/[0-9a-f-]{36}`).ReplaceAllString(i.Request.URL, "api.scaleway.com/account/v1/tokens/11111111-1111-1111-1111-111111111111")
i.Request.URL = regexp.MustCompile(`api\.scaleway\.com/iam/v1alpha1/api-keys/SCW[0-9A-Z]{17}`).ReplaceAllString(i.Request.URL, "api.scaleway.com/iam/v1alpha1/api-keys/SCWXXXXXXXXXXXXXXXXX")
i.Request.URL = regexp.MustCompile(`^api\.scaleway\.com/iam/v1alpha1/api-keys/SCW[0-9A-Z]{17}`).ReplaceAllString(i.Request.URL, "api.scaleway.com/iam/v1alpha1/api-keys/SCWXXXXXXXXXXXXXXXXX")

return nil
}
Expand Down

0 comments on commit c786bba

Please sign in to comment.