Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tell Koanf to treat AccountIds as a string #293

Merged
merged 1 commit into from
Feb 25, 2022
Merged

Conversation

synfinatic
Copy link
Owner

Koanf does not follow the YAML spec and treats all keys as a
string internally before converting to their final form. In the
case of AWS AccountIds, this can result in a crash when the account
has a leading zero which is common..

Fixes: #292

@synfinatic synfinatic force-pushed the leading-zero-accountids branch from f412318 to 2b22612 Compare February 25, 2022 03:43
@synfinatic synfinatic changed the title Treat tell Koanf to treat AccountIds as a string Tell Koanf to treat AccountIds as a string Feb 25, 2022
@codecov
Copy link

codecov bot commented Feb 25, 2022

Codecov Report

Merging #293 (b030718) into main (631c8d2) will decrease coverage by 0.16%.
The diff coverage is 30.50%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #293      +/-   ##
==========================================
- Coverage   56.97%   56.81%   -0.17%     
==========================================
  Files          12       12              
  Lines        1827     1857      +30     
==========================================
+ Hits         1041     1055      +14     
- Misses        702      714      +12     
- Partials       84       88       +4     
Impacted Files Coverage Δ
sso/cache.go 35.15% <0.00%> (-0.42%) ⬇️
sso/settings.go 61.53% <41.66%> (-1.19%) ⬇️
utils/utils.go 41.86% <68.42%> (+4.58%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 631c8d2...b030718. Read the comment docs.

@synfinatic synfinatic force-pushed the leading-zero-accountids branch 2 times, most recently from e0bbdfb to 4557747 Compare February 25, 2022 04:22
Koanf does not follow the YAML spec and treats all keys as a
string internally before converting to their final form.  In the
case of AWS AccountIds, this can result in a crash when the account
has a leading zero which is common..

Add Codecov banner.

Fixes: #292
@synfinatic synfinatic force-pushed the leading-zero-accountids branch from 4557747 to b030718 Compare February 25, 2022 04:27
@synfinatic synfinatic merged commit 3877698 into main Feb 25, 2022
@synfinatic synfinatic deleted the leading-zero-accountids branch February 25, 2022 04:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Account numbers with leading zeros cause config parsing failures
1 participant