| Version | Supported |
|---|---|
| 0.1.x | ✅ |
If you discover a security vulnerability in SaviTools, please report it responsibly:
- Do not open a public GitHub issue for security vulnerabilities.
- Email security concerns to: security@savitura.com
- Include a detailed description of the vulnerability.
- If possible, provide steps to reproduce or a proof-of-concept.
We aim to acknowledge reports within 48 hours and will work with you to understand and address the issue promptly.
SaviTools implements the following security measures:
- CORS: Restricted origins via
WEB_ORIGINenvironment variable - Rate Limiting & Rate-Limit Tiers: Configurable via
THROTTLE_LIMIT(default 100 req/window) andTHROTTLE_TTL(default 60,000ms window); auth routes (login, register, password reset) use a tighter 5 req/min per-IP override, with an additional per-email cap on forgot-password. Responses include standard rate-limit headers (X-RateLimit-Limit,X-RateLimit-Remaining,X-RateLimit-Reset) - Proxy trust & ThrottlerBehindProxyGuard: Set
TRUST_PROXY(hop count, boolean, single IP, CIDR list, or comma-separated IPs/CIDRs) so Fastify configures itstrustProxyoption correctly.ThrottlerBehindProxyGuardderives the client IP by inspecting Fastify's resolvedreq.ip(populated fromX-Forwarded-ForwhenTRUST_PROXYis active) rather than trusting socket addresses or collapsing proxies viareq.ips[0]. When deploying behind reverse proxies (Nginx, Cloudflare, Railway), ensure your proxy correctly appends/overwrites client IP headers (X-Forwarded-For) and thatTRUST_PROXYmatches your proxy hop count or trusted proxy CIDRs to prevent client IP spoofing or shared rate-limit buckets. - Security headers:
@fastify/helmeton API responses (X-Content-Type-Options,X-Frame-Options, CSP, HSTS in production). CSP is relaxed only for/api/docsin non-production - Schema safety: TypeORM
synchronizeis limited todevelopment/test; deployments apply migrations (RUN_MIGRATIONSormigration:run) - Input Validation: All API inputs are validated using class-validator
- Authenticated Signing: Testnet wallet and sandbox payment endpoints enforce JWT authentication and rate limiting for server-side secret key signing
- HMAC-SHA256 Signing: Outbound webhooks are signed using implementation in
webhook/signature.ts,contracts/events.service.ts, andmonitor/notification-worker.service.ts(using per-request secrets or configured keys; note thatWebhookServicedoes not readWEBHOOK_SIGNING_SECRETdirectly) - Timestamp Verification: The signature covers
<timestamp>.<body>, so a captured request cannot be replayed verbatim. Reject timestamps older than the replay window (default 300s) or more than 60s in the future - Signature Header:
X-Webhook-Signaturewith formatsha256=<hex>, paired withX-SaviTools-Timestamp(integer Unix seconds)
- JWT Tokens: Secure session management with refresh token rotation
- Password Hashing: Argon2 for password storage
- SSRF Protection: Guards on outbound requests from Playground, Webhook, and Network modules
- TLS: All external API calls use HTTPS
The following security headers are set on all responses:
| Header | Value | Purpose |
|---|---|---|
Content-Security-Policy |
default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; img-src 'self' data: blob:; font-src 'self' data:; connect-src 'self' https://horizon-testnet.stellar.org https://horizon.stellar.org https://friendbot.stellar.org https://api.fluxa.io https://api.crowdpay.io wss://*.stellar.org; frame-ancestors 'self'; form-action 'self'; base-uri 'self'; object-src 'none' |
Mitigates XSS, injection, and unauthorized framing |
X-Content-Type-Options |
nosniff |
Prevents MIME-type sniffing |
Referrer-Policy |
strict-origin-when-cross-origin |
Controls referrer information sent with requests |
Permissions-Policy |
accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=() |
Restricts browser features and APIs |
Strict-Transport-Security |
max-age=63072000; includeSubDomains; preload (production only) |
Enforces HTTPS |
X-DNS-Prefetch-Control |
on |
Enables DNS prefetching for performance |
X-Powered-By |
Removed | Hides Next.js version information |
- CodeQL Static Analysis (SAST): GitHub CodeQL scans all JavaScript and TypeScript source files (
apps/**,scripts/**) on every push and pull request tomain, and on a weekly schedule. Thesecurity-and-qualityquery suite covers CWE-mapped vulnerability classes including injection, XSS, SSRF, path traversal, and prototype pollution. Results are uploaded to the GitHub Security tab and saved as a SARIF workflow artifact. See CodeQL Documentation. - Dependency Review Enforcement: Automated pull request gating in GitHub Actions (
.github/workflows/dependency-review.yml) powered byactions/dependency-review-action@v4. Every PR targetingmainis scanned for newly introduced or upgraded vulnerable dependencies (blocking atmoderate,high, orcriticalseverity) and non-compliant or restrictive viral copyleft licenses (e.g. AGPL-3.0, GPL-3.0). See Dependency Review Documentation. - SBOM Generation: Automated CycloneDX Software Bill of Materials (SBOM) generation during builds.
- Local Review & Audit: Contributors can run
npm run review:depsandnpm auditto validate dependency review configuration and package compliance locally before opening pull requests.
| Variable | Description |
|---|---|
WEB_ORIGIN |
Allowed CORS origin |
THROTTLE_TTL |
Rate limit window (ms) |
THROTTLE_LIMIT |
Max requests per window |
TRUST_PROXY |
Fastify trustProxy (false/true/hops/CIDR) |
RUN_MIGRATIONS |
Apply TypeORM migrations on API startup |
WEBHOOK_SIGNING_SECRET |
HMAC key for webhook signatures |
JWT_SECRET |
Secret for JWT token signing |
We appreciate the security research community and will acknowledge researchers who report valid vulnerabilities (with permission) in our release notes.