-
Notifications
You must be signed in to change notification settings - Fork 17
Add support for all ERC20 for balances #1979
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
base: dev
Are you sure you want to change the base?
Conversation
|
Vercel Unique URL: https://sendapp-gm0lk9njj-0xsend.vercel.app |
- Created token-enrichment-worker (K8s) to replace Vercel cron - Created balance-reconciliation-worker (K8s) for drift detection - Removed all Vercel cronjobs from vercel.json - Deleted unused API endpoints (enrich-token-data, discover-tokens, bootstrap-balances) - Removed SQL functions: get_undiscovered_tokens, recalculate_erc20_balances - Removed drift thresholds - now reconciles ANY discrepancy - Updated documentation for K8s-first architecture 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
| coingeckoApiKey: process.env.COINGECKO_API_KEY, | ||
| } | ||
|
|
||
| logger.info({ config }, 'Starting token enrichment worker') |
Check failure
Code scanning / CodeQL
Clear-text logging of sensitive information High
an access to COINGECKO_API_KEY
This logs sensitive data returned by
an access to coingeckoApiKey
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI about 2 months ago
To fix the issue, we must prevent the sensitive value (COINGECKO_API_KEY) from being logged in clear text when outputting the config object with logger.info({ config }, ...).
The best fix is to output a sanitized version of the config object, omitting or redacting the sensitive value.
Therefore:
- Before line 40, create a new object from
configfor logging, with the value ofcoingeckoApiKeyomitted or replaced by a static string such as'<REDACTED>'. - Log the sanitized object in place of
config.
No extra dependencies are needed; this can be achieved with simple object spread/destructuring.
-
Copy modified lines R40-R41
| @@ -37,7 +37,8 @@ | ||
| coingeckoApiKey: process.env.COINGECKO_API_KEY, | ||
| } | ||
|
|
||
| logger.info({ config }, 'Starting token enrichment worker') | ||
| const redactedConfig = { ...config, coingeckoApiKey: config.coingeckoApiKey ? '<REDACTED>' : undefined } | ||
| logger.info({ config: redactedConfig }, 'Starting token enrichment worker') | ||
|
|
||
| // Initialize clients | ||
| const supabase = createClient( |
Simplified reconciliation system by removing snapshot table: - Removed erc20_balance_snapshots table and view from migration - Removed store_balance_snapshot function - Removed snapshot storage from reconciliation worker - Updated get_balances_to_reconcile to use last reconciliation time - Updated documentation to reflect simpler architecture Rationale: Reconciliation records already capture all necessary data (drift, RPC balance, timestamp). Snapshots for "no drift" cases add storage cost with minimal debugging value. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
No description provided.