This directory contains the GitHub repository configuration files for the HalluciFix project, implementing comprehensive security settings, branch protection rules, and code ownership policies.
settings.yml- Repository settings configuration (for GitHub Settings app)CODEOWNERS- Code ownership and review requirementssecurity.md- Security policy and incident response procedures
repository-setup.md- Step-by-step setup guide for repository administratorsREADME.md- This file, providing overview and usage instructions
branch-protection-validation.js- Automated validation script for branch protection rules
- β Vulnerability alerts enabled
- β Security advisories enabled
- β Dependency graph enabled
- β Secret scanning with push protection
- β Dependabot security updates enabled
- Required Reviews: 2 approving reviews
- Code Owner Reviews: Required
- Status Checks: Unit Tests, Integration Tests, Security Scan, Coverage Check, Build, Lint
- Additional Protections: Force pushes disabled, deletions disabled, admin enforcement enabled
- Required Reviews: 1 approving review
- Status Checks: Unit Tests, Integration Tests, Build, Lint
- Additional Protections: Force pushes disabled, deletions disabled
The CODEOWNERS file defines review requirements for different parts of the codebase:
- Global:
@core-developersfor all changes - Frontend:
@frontend-teamfor UI components and hooks - Backend:
@backend-teamfor services and API - Security:
@security-teamfor authentication and security files - Database:
@database-teamfor migrations and schema changes - DevOps:
@devops-teamfor CI/CD and infrastructure - Documentation:
@documentation-teamfor docs and README files
- Review the setup guide: Read
.github/repository-setup.mdfor detailed configuration steps - Configure teams: Ensure all required GitHub teams are created and populated
- Apply settings: Use the
settings.ymlfile with GitHub Settings app or configure manually - Validate configuration: Run the validation script to ensure everything is properly configured
npm run github:validate-protection- Understand code ownership: Check
CODEOWNERSto see who reviews your changes - Follow security practices: Review
security.mdfor security guidelines - Ensure status checks pass: All required checks must pass before merging
Run the branch protection validation script:
# Validate current branch protection settings
npm run github:validate-protection
# Set required environment variables
export GITHUB_TOKEN="your_github_token"
export GITHUB_REPOSITORY_OWNER="your_org"
export GITHUB_REPOSITORY_NAME="your_repo"- Repository security features enabled
- Branch protection rules configured for
mainanddevelop - Required status checks configured and working
- Code owners file exists and is valid
- Teams have appropriate permissions
- Security notifications configured
Ensure these teams exist in your GitHub organization:
core-developers- Senior developers with admin accessdevelopers- Regular developers with write accessfrontend-team- Frontend specialistsbackend-team- Backend specialists
security-team- Security specialistsdatabase-team- Database administratorsdevops-team- DevOps engineersqa-team- Quality assurance teamdocumentation-team- Technical writers
- Never commit secrets to the repository
- Use GitHub Secrets for sensitive configuration
- Enable secret scanning push protection
- Rotate secrets regularly
- All changes require appropriate reviews
- Security-sensitive changes require security team review
- Database changes require database team review
- CI/CD changes require DevOps team review
- Follow procedures outlined in
security.md - Report security issues through private channels
- Coordinate disclosure with security team
- Security alerts are sent to designated teams
- Failed status checks trigger notifications
- Branch protection violations are logged and alerted
- Audit logs retained for 90+ days
- Regular access reviews conducted
- Security policies reviewed quarterly
Status checks not working
- Verify workflow names match exactly in branch protection settings
- Check that workflows run on the correct branches
- Ensure GitHub Actions are enabled
Code owner reviews not required
- Verify
CODEOWNERSfile syntax - Check team membership and repository access
- Ensure teams have appropriate permissions
Security scanning issues
- Verify GitHub Advanced Security is enabled
- Check organization security settings
- Ensure proper permissions for security features
- Repository Configuration: devops@hallucifix.com
- Security Issues: security@hallucifix.com
- Team Access: admin@hallucifix.com
- GitHub Branch Protection Documentation
- GitHub Security Features
- Code Owners Documentation
- GitHub Settings App
This configuration should be reviewed and updated:
- Monthly: Review team memberships and permissions
- Quarterly: Update security policies and procedures
- As needed: Adjust protection rules based on workflow changes
Last Updated: $(date)
Configuration Version: 1.0
Maintained by: DevOps Team