GitHub repository security features need a one-time configuration after the initial foundation is merged.
In repository Settings, Security and analysis:
- Enable Dependency graph.
- Enable Dependabot alerts and security updates.
- Enable secret scanning and push protection when available.
- Enable private vulnerability reporting.
- Add repository variable
DEPENDENCY_REVIEW_ENABLED=true.
The dependency review workflow remains safely skipped until that variable is set. This avoids a false failing check on new repositories where the dependency graph API is not yet active.
After the first successful runs, protect main:
- require a pull request before merging
- require the CI
Quality gatejob - require CodeQL when available
- require dependency review after enabling it
- require conversation resolution
- block force pushes and branch deletion
- apply the rules to administrators unless an emergency procedure says otherwise
Do not require the deployment workflow for code pull requests. It intentionally runs only for manual dispatch or configured main-branch deployment.
Create an environment named production. Add the variables and secrets from Cloudflare deployment. Use required reviewers for this environment when available.
Keep deployment secrets at the environment level so pull requests and routine CI cannot access them.
If encrypted snapshots are enabled, add ZAATI_SNAPSHOT_KEY only to this protected environment. Do not add it as a repository-wide variable, workflow file, build artifact, or pull request secret.