This project follows security best practices for public repositories:
Never commit sensitive information to git:
- β
wrangler.jsonc- Contains database IDs (excluded from git) - β
.dev.vars- Contains development secrets (excluded from git) - β
.envfiles - Contains environment variables (excluded from git)
Safe to commit:
- β
wrangler.jsonc.example- Template with placeholders - β Source code without credentials
- β Database schema (no data)
- β Configuration templates
This repository provides example configuration files:
-
wrangler.jsonc.example - Template for Wrangler configuration
- Copy to
wrangler.jsonc - Replace placeholders with your values
- Never commit the actual
wrangler.jsonc
- Copy to
-
.dev.vars.example (if needed) - Template for development variables
- Copy to
.dev.vars - Add your API keys and secrets
- Never commit the actual
.dev.vars
- Copy to
Included in repository:
- Source code (
.tsfiles) - Tests (
*.test.tsfiles) - Documentation (
.mdfiles) - Configuration templates (
*.examplefiles) - Database migrations (schema only, no data)
- GitHub Actions workflows
Excluded from repository (.gitignore):
wrangler.jsonc- Contains database IDs.dev.vars- Contains secrets.env*- Contains environment variablesnode_modules/- Dependencies.wrangler/- Build artifactscoverage/- Test coverage reports
When contributing:
- Never commit credentials - Use environment variables or
.dev.vars - Use example files - Provide templates, not actual configs
- Review before push - Check
git difffor sensitive data - Use .gitignore - Ensure secrets are excluded
- Rotate exposed secrets - If accidentally committed, rotate immediately
- Database IDs are considered sensitive (included in
.gitignore) - Use Cloudflare's access controls for production databases
- Separate databases for development, staging, and production
- Regular backups of production data
This project uses:
- D1 Database - Serverless SQL database (database ID kept private)
- Workers AI - AI inference binding (no API keys needed)
- Durable Objects - Stateful coordination (configuration is public)
The Cloudflare Workers runtime provides:
- Automatic HTTPS
- DDoS protection
- Edge security
- Request validation
If you discover a security vulnerability:
- Do NOT open a public issue
- Email: security@semanticintent.dev (or repository owner)
- Include:
- Description of the vulnerability
- Steps to reproduce
- Potential impact
- Suggested fix (if any)
We will respond within 48 hours and work with you to address the issue.
This project implements:
- β TypeScript - Type safety prevents runtime errors
- β Input validation - Domain entities validate business rules
- β CORS headers - Controlled cross-origin access
- β Error handling - Graceful degradation without leaking info
- β
Dependency audits -
npm auditin CI/CD pipeline - β Automated testing - 70 tests prevent regressions
Before deploying to production:
-
wrangler.jsoncis in.gitignore - Database ID is not in git history
- No
.envor.dev.varsfiles committed - All tests passing (
npm test) - No
npm auditvulnerabilities - Secrets rotated if ever exposed
- Production database access restricted
- Monitoring and alerts configured
- Update dependencies monthly:
npm update - Run security audits:
npm audit - Review access logs periodically
- Rotate credentials every 90 days
- Keep Wrangler CLI updated:
npm install -g wrangler@latest
Last Updated: 2025-10-06 Security Contact: security@semanticintent.dev