This repository uses automated secret scanning to prevent accidental commits of sensitive information.
- GitHub Actions Workflow: Automatically runs on every push and pull request
- Gitleaks: Scans the entire codebase for common secret patterns
- Custom Pattern Matching: Additional checks for project-specific patterns
The CI checks for:
- API keys (various formats)
- Authentication tokens
- Passwords and credentials
- Webhook URLs with embedded tokens
- Slack tokens (
xoxb-,xoxa-,xoxp-, etc.) - AWS access keys (
AKIA...) - Database connection strings
- Private keys and certificates
- And many more patterns...
If you accidentally commit sensitive information:
- Immediately rotate/revoke the exposed credentials
- Remove the secret from the commit history using
git rebaseorgit filter-branch - Force push the cleaned history (
⚠️ coordinate with team first) - Consider using BFG Repo-Cleaner for large repositories
✅ DO:
- Use environment variables for sensitive data
- Use Dify's built-in environment variable management
- Store secrets in secure vaults (e.g., GitHub Secrets, HashiCorp Vault)
- Use placeholder values in example files (e.g.,
your-api-key-here)
❌ DON'T:
- Commit API keys or tokens directly in code
- Hardcode credentials in workflow files
- Share secrets in pull request descriptions
- Include
.envfiles in commits
.gitleaks.toml- Gitleaks configuration and allowlist.github/workflows/secret-scanning.yml- CI workflow definition.gitignore- Files and patterns to exclude from version control
If you discover a security vulnerability, please report it responsibly:
- Do NOT create a public issue
- Contact the repository maintainer directly
- Provide details about the vulnerability
- Allow time for the issue to be addressed before public disclosure
Remember: Security is everyone's responsibility. When in doubt, don't commit it!