Comprehensive security guidelines for developers, operators, and users of Fund-My-Cause.
This document provides security guidelines for all aspects of Fund-My-Cause, including:
- Development security practices
- Deployment and operations security
- User security guidance
- Incident response procedures
For detailed information on specific topics, see:
- Security Model & Threat Analysis
- Security Checklist
- Incident Response Procedures
- Security Best Practices
- Validate all user inputs for type, format, and length
- Use allowlists rather than blocklists
- Reject invalid input rather than trying to fix it
- Validate on both client and server side
- Do not expose sensitive information in error messages
- Log errors with sufficient context for debugging
- Do not log sensitive data (passwords, keys, tokens)
- Use generic error messages for users
- Use industry-standard libraries (libsodium, ring, etc.)
- Never implement custom cryptographic algorithms
- Use appropriate key sizes and algorithms
- Rotate keys regularly
- Implement role-based access control (RBAC)
- Check permissions before every sensitive operation
- Use principle of least privilege
- Audit all access to sensitive resources
All code changes must be reviewed by at least 2 team members before merging:
- Functional Review: Does the code do what it's supposed to do?
- Security Review: Are there any security vulnerabilities?
- Code Quality Review: Does the code follow best practices?
- Testing Review: Are there adequate tests?
- Use exact versions for dependencies (no floating versions)
- Review new dependencies for security and maintenance status
- Run
npm auditandcargo auditregularly - Update security vulnerabilities within 7 days
- Review changelogs for breaking changes
- Write unit tests for all functions
- Write integration tests for all flows
- Test edge cases and error conditions
- Include security tests (e.g., unauthorized access)
- Aim for >80% code coverage
-
Build Verification
- All tests pass
- No security warnings from audits
- Build is reproducible
- WASM hash is verified
-
Code Review
- At least 2 team members have reviewed
- Security review is complete
- No hardcoded secrets
-
Configuration
- Environment variables are set correctly
- Secrets are in GitHub Secrets
- Configuration is validated
-
Deploy to Testnet First
- Test all functionality
- Verify contract behavior
- Check for any issues
-
Deploy to Mainnet
- Follow deployment checklist
- Have rollback plan ready
- Monitor closely after deployment
-
Post-Deployment Verification
- Verify contract is deployed correctly
- Verify WASM hash matches
- Verify all systems are functioning
- Monitor for any issues
If a deployment introduces a critical issue:
- Immediately revert to previous version
- Notify users of the rollback
- Investigate root cause
- Fix the issue
- Re-test thoroughly
- Re-deploy with fix
- Only authorized team members have access
- Multi-factor authentication is required
- Access is logged and audited
- Access is revoked when team members leave
- Monitor system performance and health
- Alert on security-relevant events
- Review logs regularly
- Investigate anomalies
- Regular backups are taken
- Backups are tested regularly
- Recovery procedures are documented
- Recovery time objective (RTO) is defined
- Incident response procedures are documented
- Team is trained on procedures
- Drills are conducted regularly
- Post-mortems are conducted after incidents
- Use official wallet sources only
- Never share private keys or seed phrases
- Enable wallet security features (2FA, auto-lock)
- Review transactions before signing
- Use hardware wallets for large amounts
- Verify URLs before connecting wallet
- Check for HTTPS
- Be suspicious of urgency
- Verify contract addresses on Stellar Expert
- Never click wallet connection links from unsolicited messages
- Verify contract address on Stellar Expert
- Check WASM hash matches published hash
- Verify contract initialization parameters
- Trust the contract, not the UI
Report security vulnerabilities via:
- GitHub Security Advisories: https://github.com/Fund-My-Cause/Fund-My-Cause/security/advisories/new
- Email: security@fund-my-cause.org
Do not open public GitHub issues for security vulnerabilities.
| Milestone | Target |
|---|---|
| Acknowledgement | Within 48 hours |
| Initial assessment | Within 5 business days |
| Fix or mitigation | Within 30 days (critical: 7 days) |
| Public disclosure | After fix is deployed |
- Detection: Anomaly is detected
- Reporting: Issue is reported
- Assessment: Severity is classified
- Containment: Incident is contained
- Investigation: Root cause is determined
- Remediation: Fix is developed and deployed
- Communication: Users are notified
- Review: Post-mortem is conducted
All team members must complete:
- Security awareness training (annually)
- Secure coding practices (annually)
- Incident response procedures (annually)
- Role-specific security training (as needed)
- Secure coding practices
- Common vulnerabilities (OWASP Top 10)
- Cryptography basics
- Access control and authentication
- Incident response procedures
- Social engineering and phishing
- Data protection and privacy
- Minimum 12 characters
- Mix of uppercase, lowercase, numbers, and symbols
- No dictionary words
- Changed every 90 days
- Not reused for 5 previous passwords
- Principle of least privilege
- Role-based access control
- Multi-factor authentication for sensitive systems
- Access reviews quarterly
- Access revoked within 24 hours of departure
- Sensitive data is encrypted at rest and in transit
- Data is retained only as long as necessary
- Data is securely deleted when no longer needed
- Data access is logged and audited
- All security incidents are reported immediately
- Incident response procedures are followed
- Post-mortems are conducted
- Lessons learned are implemented
Fund-My-Cause follows security best practices from:
- OWASP (Open Web Application Security Project)
- NIST (National Institute of Standards and Technology)
- CWE (Common Weakness Enumeration)
- Stellar Security Guidelines
- Security audits are conducted annually
- Penetration testing is conducted annually
- Vulnerability scanning is continuous
- Code reviews are conducted for all changes
- Security vulnerabilities are reported responsibly
- Coordinated disclosure is followed
- Public disclosure occurs after fix is deployed
- Security researchers are credited
- Security Model & Threat Analysis
- Security Checklist
- Incident Response Procedures
- Security Best Practices
- SECURITY.md - Vulnerability reporting policy
cargo audit- Rust dependency vulnerability scannernpm audit- Node.js dependency vulnerability scanner- GitHub Dependabot - Automated dependency updates
- GitHub Security Advisories - Vulnerability reporting
- Stellar Expert - Contract verification
| Role | Phone | |
|---|---|---|
| Security Lead | security@fund-my-cause.org | [Phone] |
| Incident Commander | incident-commander@fund-my-cause.org | [Phone] |
| DevOps Lead | devops@fund-my-cause.org | [Phone] |
| Version | Date | Changes | Author |
|---|---|---|---|
| 1.0 | 2026-06-01 | Initial security guidelines | Security Team |
Last Updated: 2026-06-01
Next Review: 2026-09-01
Maintained By: Security Team
# Run security audits
cargo audit
npm audit
# Build contract
cargo build --release --target wasm32-unknown-unknown
# Run tests
cargo test --workspace
npm run test
# Deploy contract
./scripts/deploy.sh <CREATOR> <TOKEN> <GOAL> <DEADLINE> <MIN_CONTRIB> <TITLE> <DESC> <LINKS> <REGISTRY_ID>
# Verify contract
stellar contract invoke --id <CONTRACT_ID> --network testnet -- version- Report: Use GitHub Security Advisories or email security@fund-my-cause.org
- Assess: Classify severity (P1/P2/P3/P4)
- Contain: Take immediate action to prevent further damage
- Investigate: Determine root cause
- Remediate: Develop and deploy fix
- Communicate: Notify users
- Review: Conduct post-mortem
See Incident Response Procedures for detailed steps.