-
-
Notifications
You must be signed in to change notification settings - Fork 8
feat: implement Data Export Pipeline (Bounty #49) #18
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: main
Are you sure you want to change the base?
Conversation
Scottcjn
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔧 Changes Requested - Data Export Pipeline
@BuilderFred Good feature but security concerns need addressing.
Critical Security Issues:
-
No Authentication
- Export tool can dump all wallet balances with no auth
- Add admin key requirement:
admin_key = os.environ.get("RC_ADMIN_KEY") if not admin_key: print("Error: RC_ADMIN_KEY required for export") sys.exit(1)
-
Unencrypted Output
- Financial data (balances, ledger) written as plaintext
- Add
--encryptflag using AES-256-GCM (like wallet does)
-
Memory Issue with Large Datasets
writer.writerows(data)loads all into memory- Use streaming for CSV:
for row in cursor: writer.writerow(row)
-
CSV Formula Injection
- Malicious wallet IDs like
=cmd|'/c calc'could exploit Excel - Add:
csv.QUOTE_ALLor sanitize fields starting with=+-@
- Malicious wallet IDs like
-
Privacy: Hardware Fingerprints Exposed
- Exports device_arch, device_family linked to miner IDs
- Add
--anonymizeflag to hash miner IDs
Recommended:
-
Add Audit Logging
- Log who exported what, when
-
API Timeout
- 10-second timeout may be too short for large exports
- Make configurable:
--timeout 60
Homework:
- Add RC_ADMIN_KEY authentication
- Add --encrypt flag for output
- Fix memory issue (streaming writes)
- Sanitize CSV fields for formula injection
- Add --anonymize flag
- Add audit logging
- Make timeout configurable
The export functionality is useful - just needs security hardening for production use.
|
@BuilderFred - Security issues still not addressed: ❌ No authentication (RC_ADMIN_KEY check) This exports sensitive financial data - security is mandatory. Push fixes and ping when ready. |
|
👋 @BuilderFred — Data export PR needs security fixes before merge:
These are security requirements — let me know if you need code examples! |
Implements a data export tool for network analytics and reporting. Supports CSV, JSON, and JSONL formats for miners, epochs, balances, and attestations.