feat: check for api key expiration date#3049
Conversation
| delete(i.Request.Headers, "x-auth-token") | ||
| 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") |
Check failure
Code scanning / CodeQL
Missing regular expression anchor
| 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") |
Check failure
Code scanning / CodeQL
Missing regular expression anchor
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3049 +/- ##
==========================================
+ Coverage 75.56% 75.75% +0.19%
==========================================
Files 166 168 +2
Lines 36476 36513 +37
==========================================
+ Hits 27563 27662 +99
+ Misses 7962 7891 -71
- Partials 951 960 +9 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| return err | ||
| } | ||
| if !*UpdateCassettes { | ||
| apiKey.AccessKey = "SCWXXXXXXXXXXXXXXXXX" |
There was a problem hiding this comment.
I know this is not the scope of this PR but just to add a note, this should be a constant as it's used a lot in the codebase. Same for 11111111-1111-1111-1111-111111111111 in place of project/organization id.
Closes #2648
Checks example: