Skip to content
KitploitKITPLOIT
OutilsExploitsBlog
Log in
Soumettre
OutilsExploitsBlog
Soumettre

Outils de Hacking, PenTest et Cybersécurité pour votre Arsenal de Sécurité !

Kitploit est un répertoire d'outils de hacking, de cybersécurité et de pentesting. Découvrez les dernières mises à jour des projets pour trouver des vulnérabilités, analyser des systèmes, automatiser les tests et renforcer votre sécurité.

FluxContactConfidentialité© 2026 Kitploit

Répertoire d'outils

Catégories

Voir toutes les catégories
Loading categories
gh-safe-repo — Python CLI that creates GitHub repos with safe defaults — branch protection, Dependabot, secret scanning, and pre-flight security scanning — applied automatically. | Kitploit
Outils/GitHubGitHub/ariesq/gh-safe-repo
General Purpose UtilitiesVulnerability ScannersScripting & AutomationConfiguration AuditingCloud SecurityDevSecOpsSecret Detection
GitHubariesq/gh-safe-repo

gh-safe-repo

Python CLI that creates GitHub repos with safe defaults — branch protection, Dependabot, secret scanning, and pre-flight security scanning — applied automatically.

Voir le dépôt
38339il y a 7 joursVérifié par Kitploit
Partager
Contenu non disponible dans la langue demandée. Affichage de la version anglaise.

gh-safe-repo

CI

Create GitHub repositories with safe defaults applied, in one command.

gh-safe-repo new <owner/repo>

Branch protection, immutable tags, locked-down Actions, Dependabot, secret scanning with push protection, and private vulnerability reporting are all configured before you push your first commit. The same tool audits and fixes repos you already have, and scans local code for secrets before it leaves your machine.

Status: the core workflow is stable and verified end to end, but the CLI is still being polished. Expect occasional breaking changes before 1.0.

Contents

  • What you get
  • Install — and shell completion
  • Quick start
  • Commands
  • CLI reference
  • Output — plan table, JSON, verification, exit codes
  • Safe defaults
  • Pushing code — push and copy
  • Pre-flight scanner
  • Configuration
  • GitHub plan limitations
  • Using with an AI agent
  • How it works
  • Development

What you get

GitHub's defaults favour discoverability over safety: a new repo has no branch protection, no Dependabot, and Actions that can write to the repo and approve their own pull requests. gh-safe-repo changes that, and shows you the plan before it touches anything:

  • Private by default. Pass --public to make it public.
  • Branch protection. PR required, one approving review, stale reviews dismissed, conversations resolved, no force pushes, no branch deletion.
  • Immutable tags. Release tags cannot be rewritten or deleted.
  • Actions locked down. Read-only token, no self-approving PRs, SHA-pinned actions, GitHub-owned and verified publishers only.
  • Dependabot on. Vulnerability alerts plus automatic fix PRs.
  • Secret scanning with push protection. Commits containing supported secrets are blocked.
  • Private vulnerability reporting. Researchers can reach you privately.
  • Pre-flight secret scan. When pushing existing code, the working tree and git history are scanned locally first.
  • Opt-in extras. Wiki, projects and issues are left alone unless you manage them in config.

Every setting is configurable. See Safe defaults for the exact values and Configuration for how to change them.

Install

Requirements:

  • Python 3.10+
  • gh CLI logged in (gh auth login), or GITHUB_TOKEN set in the environment
  • uv to install from source
  • truffleHog v3 (optional) for the pre-flight scanner. It is found on PATH or run via podman/docker; without either, a regex scanner is used.

Pushing code with push or copy also needs your normal git credentials for GitHub. See Pushing code.

git clone https://github.com/AriESQ/gh-safe-repo
cd gh-safe-repo
uv tool install .
gh-safe-repo --help

To run without installing:

uv sync
./gh-safe-repo new <owner/repo>

Shell completion

Completion for bash, zsh and fish covers the commands, each command's options, files after --config and directories for push and scan. The scripts are generated from the CLI's own argument parser, so they list exactly the options your installed version accepts. Either load them from the installed command, which keeps them current across upgrades:

# bash: add to ~/.bashrc
source <(gh-safe-repo --completion bash)

# zsh: add to ~/.zshrc, after compinit
source <(gh-safe-repo --completion zsh)

# fish: add to ~/.config/fish/config.fish
gh-safe-repo --completion fish | source

or copy the pre-generated files in completions/ into each shell's standard directory (copy them again after upgrading):

# bash (needs the bash-completion package)
cp completions/gh-safe-repo.bash ~/.local/share/bash-completion/completions/gh-safe-repo

# zsh: any directory on $fpath, ahead of compinit
cp completions/_gh-safe-repo ~/.zsh/completions/_gh-safe-repo

# fish
cp completions/gh-safe-repo.fish ~/.config/fish/completions/gh-safe-repo.fish

Completion is registered for the gh-safe-repo command on PATH (as installed by uv tool install), not for ./gh-safe-repo. --completion is deliberately left out of --help and out of the completion itself.

For packagers: install the three files from completions/ (in Homebrew, bash_completion.install "completions/gh-safe-repo.bash" => "gh-safe-repo", zsh_completion.install "completions/_gh-safe-repo", fish_completion.install "completions/gh-safe-repo.fish"), or generate them at build time with generate_completions_from_executable(bin/"gh-safe-repo", shell_parameter_format: "--completion=").

Quick start

1. Preview. --dry-run makes no API calls and creates nothing.

$ gh-safe-repo new AriESQ/demo-repo --dry-run

Configuring AriESQ/demo-repo...

Planned Changes
Type    Category           Setting                                 Value / Note
------  -----------------  --------------------------------------  ----------------------------------------------------------------
ADD     repo               repository                              AriESQ/demo-repo
DELETE  file               readme                                  README.md
UPDATE  actions            allowed_actions                         'all' → 'selected'
UPDATE  actions            verified_allowed                        False → True
UPDATE  actions            sha_pinning_required                    False → True
UPDATE  actions            default_workflow_permissions            'write' → 'read'
UPDATE  actions            can_approve_pull_request_reviews        True → False
SKIP    branch_protection  branch_protection                       Branch protection requires a public repo or paid GitHub plan
SKIP    security           dependabot_alerts                       Requires a public repo or paid GitHub plan
SKIP    security           secret_scanning                         Requires a public repo or paid GitHub plan
SKIP    security           dependabot_security_updates             Requires a public repo or paid GitHub plan
SKIP    security           private_vulnerability_reporting         Requires a public repo or paid GitHub plan
SKIP    security           enable_dependency_graph                 Requires a public repo or paid GitHub plan
SKIP    security           enable_secret_scanning_push_protection  Requires a public repo or paid GitHub plan
SKIP    tag_protection     tag_protection                          Tag protection rulesets require a public repo or paid GitHub plan

7 change(s) to apply, 8 skipped

Dry run — no changes made.

The SKIP rows are what a private repo on a free plan looks like. Those features need a public repo or a paid plan, and the tool says so rather than failing silently. See GitHub plan limitations.

2. Apply. Drop --dry-run. You see the same plan, then a confirmation prompt (--yes skips it).

gh-safe-repo new AriESQ/demo-repo

3. Start working. On success you get a Verified section (every setting read back from GitHub) and a banner with ready-to-paste commands:

Télécharger l’outil

Populaires

Voir tout →

Découvrez les outils les plus utilisés par notre communauté.

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 La boîte à outils OSINT ultime : graphe d'enquête, notation de confiance, familles d'alias, carte, chronologie et rapports. 49 modules, plus de 400 sites, aucune clé API requise.

    546
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    # Application d'exécution en un clic GhostLock (CVE-2026-43499)

    477
  • 3

    ARTEX

    baarai/artex

    Plateforme autonome de tests d'intrusion multi-agents basée sur des LLM, avec agents planificateur/ouvrier, graphes d'actifs et d'exploration, enregistrement du trafic MITM et retest des vulnérabilités.

    377
  • 4

    redforge

    cybersecurity91/redforge

    Boîte à outils red team côté navigateur avec 102 outils hors ligne pour la reconnaissance, la génération de payloads, les attaques par identifiants, la cryptographie, l'encodage et le reporting d'engagement.

    324
  • 5

    estorides

    grisuno/estorides

    Agrège plus de 99 sources OSINT gratuites en parallèle, résout les entités dans un graphe de connaissances et exporte en STIX 2.1, MISP ou GraphML avec une analyse assistée par LLM.

    269
  • 6

    CyberStrikeAI

    ed1s0nz/cyberstrikeai

    Le système d'action pour la cybersécurité native IA—où l'intention devient une exécution gouvernée, les preuves deviennent une mémoire opérationnelle, et chaque opération améliore la suivante.

    252

Explorer tous les outils

Parcourez notre collection d'outils

Voir tous les outils →