Contributing
Thanks for your interest in contributing to Sensitive Canary!
Development Setup
bash
git clone https://github.com/coo-quack/sensitive-canary.git
cd sensitive-canary
npm installCommands
bash
npm test # Run tests
npm run test:watch # Run tests in watch mode
npm run typecheck # Type check with tsc
npm run lint # Check with Biome
npm run fix # Lint + auto-fix with Biome
npm run ci # typecheck + lint + tests (full CI check)Branching Strategy
main
├── develop ← integration branch
│ └── feature/* ← new features and non-urgent fixes
└── hotfix/* ← urgent production fixesNormal development
feature/your-feature → develop → main (release)- Branch from
develop:git checkout -b feature/your-feature develop - Open a PR targeting
develop - After review and approval, merge into
develop - When ready to release, open a PR from
develop→main
Hotfix
For urgent fixes that must go directly to production:
- Branch from
main:git checkout -b hotfix/fix-description main - Apply the fix and open a PR targeting
main - After review and approval, merge into
main - A backport PR to
developis created automatically by CI
If the backport PR has conflicts, resolve them manually before merging.
Adding a New Detection Rule
- Add the rule to
src/lib/rules.ts— defineid,description,regex,category, and optionallyentropyThreshold - Add tests to
src/lib/__tests__/rules.test.ts— cover true positives, false negatives, and entropy filtering - Update
README.md— add to the detection rules table - Update
docs/rules.md— add full reference entry - Update
CHANGELOG.md— note the new rule under the next version
Release Checklist
When bumping a version, open a PR from develop → main with:
- Update
versioninpackage.jsonand.claude-plugin/plugin.json - Update
CHANGELOG.mdwith a new## vX.Y.Z (YYYY-MM-DD)sectiondocs/changelog.mdis a symlink toCHANGELOG.md— do not edit it separately- This content is automatically used as the GitHub Release notes by
release.yml
- Review
docs/rules.md— add/update any changed rules - Review
README.md— update rule counts and tables if needed
After merging into main, release.yml automatically:
- Creates a git tag
vX.Y.Z - Creates a GitHub Release with notes extracted from
CHANGELOG.md
The documentation site is also redeployed automatically on merge to main.
Pull Requests
- Follow Conventional Commits (
feat:,fix:,docs:,hotfix:, etc.) - All tests must pass (
npm test) - Lint must pass (
npm run lint) - One approval required to merge
Code Style
Enforced by Biome. Run npm run fix before committing.