trezor-suite
trezor-suite copied to clipboard
feat(crypto-icons): download crypto icons from Coingecko
Description
- download crypto icons from Coingecko and upload it to aws s3
- icons resized into two sizes (24px, 48px), webp format
- naming:
[coingeckoId].webpor[platform]_[contract_address].webp
Related Issue
Resolve
Screenshots:
🚨 Potential security issues detected. Learn more about Socket for GitHub ↗︎
To accept the risk, merge this PR and you will not be notified again.
| Alert | Package | Note | Source | CI |
|---|---|---|---|---|
| Shell access | npm/[email protected] |
| 🚫 | |
| Unpopular package | npm/[email protected] |
| 🚫 |
Next steps
What is shell access?
This module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Packages should avoid accessing the shell which can reduce portability, and make it easier for malicious shell access to be introduced.
What are unpopular packages?
This package is not very popular.
Unpopular packages may have less maintenance and contain other problems.
Take a deeper look at the dependency
Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support [AT] socket [DOT] dev.
Remove the package
If you happen to install a dependency that Socket reports as Known Malware you should immediately remove it and select a different dependency. For other alert types, you may may wish to investigate alternative packages or consider if there are other ways to mitigate the specific risk posed by the dependency.
Mark a package as acceptable risk
To ignore an alert, reply with a comment starting with @SocketSecurity ignore followed by a space separated list of ecosystem/package-name@version specifiers. e.g. @SocketSecurity ignore npm/[email protected] or ignore all packages with @SocketSecurity ignore-all
@SocketSecurity ignore npm/[email protected]@SocketSecurity ignore npm/[email protected]
Please take a look.
How long will it run for? Will it be faster after the initial download and upload?
I implemented max time limit of 60 minutes for this script, which should run every day. We want to regularly update all icons and in order to check the coin image, request to coingecko needs to be made first, so it won't be faster next time.
Can we implement it so it does not download the image we already have for a certain time period? I feel like it's wasting API limits and CI resources if we download whatever number of images every day. Otherwise, it should be fine.
What are the limits suitable for you? I think I can lower the "limit per minute" from 60 to 30, so the whole cycle will complete in ~10 days.
I dont really care if its 60 or 30 i was just asking if we download the same images every single time we run the script and how long does it need to run for the images to be uploaded, if we run it every day do we need to download all of the imagease again or just any new ones?
i just dont want to download stuff if we already have it...
Icons of specific coins/tokens may change during time, so we need to download the existing ones again as well. About the upload, I'm not really sure how long it will take, it's about 8000 files (1 KB each) per github action run. If the upload is bottleneck, I could implement some file content comparison of existing icons, but it may increase CI resources too.
ok, cron trigger removed
Have all the relevant token icons downloaded already ? I can't find them, only the network/coin ones.