Section 01 · Infrastructure & Setup

Git Repo Setup & Security

Repository configuration, branch strategy, CI/CD, and cleanliness standards

19 items 10 critical 9 recommended

This guide walks you through auditing a repository's Git setup, branch strategy, CI/CD configuration, and overall cleanliness.

The Goal: Clone-to-Running in Minutes

A new developer should be able to clone, install, and run the project without asking anyone for help. The repository should be self-documenting, secure by default, and impossible to accidentally break.

  • Runnable — clone to working app with zero manual intervention
  • Protected — branch rules enforce code review and prevent direct pushes
  • Tested — CI validates every PR with linting and tests
  • Secure — no secrets exposed in code or git history
  • Clean — proper .gitignore patterns, no stale files or cruft

Before You Start

  1. Read the project config from projects/<project-name>.yaml to get the repo field (e.g., acme-corp/acme-api)
  2. Clone the repo yourself — do NOT ask the user for evidence you can gather automatically:
    git clone [email protected]:<owner>/<repo>.git /tmp/audit-<project>-$(date +%s)
    
    If SSH fails, fall back to HTTPS:
    git clone https://github.com/<owner>/<repo>.git /tmp/audit-<project>-$(date +%s)
    
  3. Use the cloned directory as your working directory for all checks in this section
  4. Verify you have access to GitHub API (via gh CLI) for branch protection checks
  5. Clean up the clone when the section is complete