# githubsecuritylab/gh-secure architecture

> Architecture diagram of the GitHub repository githubsecuritylab/gh-secure, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-03). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/githubsecuritylab/gh-secure
- Repository: https://github.com/githubsecuritylab/gh-secure

## Overview

gh-secure is a GitHub CLI extension that helps maintainers enable or inspect repository security settings. The documented flow starts in a terminal or an AI assistant, invokes the extension, selects features (all by default, or explicitly), and applies or checks settings on a target repository. The README documents five distinct protections and interactive, unattended, dry-run, and status modes. Source excerpts were not available, so the graph reflects documented relationships only; feature implementation details and internal call structure remain unverified.

Main entry points: [`gh-secure`](https://github.com/githubsecuritylab/gh-secure/blob/main/gh-secure) (gh-secure)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_cli["CLI workflow"]
  node_extension["gh-secure"]
  node_interactive_mode["Interactive mode"]
  node_unattended_mode["Unattended mode"]
  node_dry_run["Dry run"]
  node_status_check["Status check"]
end

subgraph group_repository_guardrails["Repository guardrails"]
  node_branch_protection["Branch protection"]
  node_secret_scanning["Secret scanning"]
end

subgraph group_vulnerability_defense["Vulnerability defense"]
  node_vulnerability_reporting["Private reporting"]
  node_dependabot["Dependabot"]
  node_code_scanning["Code scanning"]
end

subgraph group_github_platform["GitHub platform"]
  node_gh_cli["GitHub CLI"]
  node_github_repo[("GitHub repository")]
end

node_terminal_user(("Maintainer"))
node_ai_user(("AI assistant"))

node_terminal_user -->|"runs"| node_extension
node_ai_user -->|"invokes"| node_extension
node_extension -->|"extends"| node_gh_cli
node_extension -->|"offers"| node_interactive_mode
node_extension -->|"offers"| node_unattended_mode
node_extension -->|"offers"| node_dry_run
node_extension -->|"offers"| node_status_check
node_extension -->|"enables"| node_branch_protection
node_extension -->|"enables"| node_secret_scanning
node_extension -->|"enables"| node_vulnerability_reporting
node_extension -->|"enables"| node_dependabot
node_extension -->|"enables"| node_code_scanning
node_branch_protection -->|"protects branches"| node_github_repo
node_secret_scanning -->|"scans secrets"| node_github_repo
node_vulnerability_reporting -->|"enables reporting"| node_github_repo
node_dependabot -->|"checks dependencies"| node_github_repo
node_code_scanning -->|"scans code"| node_github_repo
node_status_check -->|"checks settings"| node_github_repo

click node_extension "https://github.com/githubsecuritylab/gh-secure/blob/main/gh-secure"
click node_interactive_mode "https://github.com/githubsecuritylab/gh-secure/blob/main/gh-secure"
click node_unattended_mode "https://github.com/githubsecuritylab/gh-secure/blob/main/gh-secure"
click node_dry_run "https://github.com/githubsecuritylab/gh-secure/blob/main/gh-secure"
click node_status_check "https://github.com/githubsecuritylab/gh-secure/blob/main/gh-secure"
click node_branch_protection "https://github.com/githubsecuritylab/gh-secure/blob/main/gh-secure"
click node_secret_scanning "https://github.com/githubsecuritylab/gh-secure/blob/main/gh-secure"
click node_vulnerability_reporting "https://github.com/githubsecuritylab/gh-secure/blob/main/gh-secure"
click node_dependabot "https://github.com/githubsecuritylab/gh-secure/blob/main/gh-secure"
click node_code_scanning "https://github.com/githubsecuritylab/gh-secure/blob/main/gh-secure"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_extension,node_interactive_mode,node_unattended_mode,node_dry_run,node_status_check toneBlue
class node_branch_protection,node_secret_scanning toneAmber
class node_vulnerability_reporting,node_dependabot,node_code_scanning toneMint
class node_gh_cli,node_github_repo toneRose
class node_terminal_user,node_ai_user toneIndigo
```

## Components

### CLI workflow

- [gh-secure](https://github.com/githubsecuritylab/gh-secure/blob/main/gh-secure): `gh-secure`
- [Interactive mode](https://github.com/githubsecuritylab/gh-secure/blob/main/gh-secure): `gh-secure`
- [Unattended mode](https://github.com/githubsecuritylab/gh-secure/blob/main/gh-secure): `gh-secure`
- [Dry run](https://github.com/githubsecuritylab/gh-secure/blob/main/gh-secure): `gh-secure`
- [Status check](https://github.com/githubsecuritylab/gh-secure/blob/main/gh-secure): `gh-secure`

### Repository guardrails

- [Branch protection](https://github.com/githubsecuritylab/gh-secure/blob/main/gh-secure): `gh-secure`
- [Secret scanning](https://github.com/githubsecuritylab/gh-secure/blob/main/gh-secure): `gh-secure`

### Vulnerability defense

- [Private reporting](https://github.com/githubsecuritylab/gh-secure/blob/main/gh-secure): `gh-secure`
- [Dependabot](https://github.com/githubsecuritylab/gh-secure/blob/main/gh-secure): `gh-secure`
- [Code scanning](https://github.com/githubsecuritylab/gh-secure/blob/main/gh-secure): `gh-secure`

### GitHub platform

- **GitHub CLI**
- **GitHub repository**

### Other components

- **Maintainer**
- **AI assistant**

## Connections

- Maintainer → gh-secure: runs (evidence: `README.md`)
- AI assistant → gh-secure: invokes (evidence: `README.md`)
- gh-secure → GitHub CLI: extends (evidence: `README.md`)
- gh-secure → Interactive mode: offers (evidence: `README.md`)
- gh-secure → Unattended mode: offers (evidence: `README.md`)
- gh-secure → Dry run: offers (evidence: `README.md`)
- gh-secure → Status check: offers (evidence: `README.md`)
- gh-secure → Branch protection: enables (evidence: `README.md`)
- gh-secure → Secret scanning: enables (evidence: `README.md`)
- gh-secure → Private reporting: enables (evidence: `README.md`)
- gh-secure → Dependabot: enables (evidence: `README.md`)
- gh-secure → Code scanning: enables (evidence: `README.md`)
- Branch protection → GitHub repository: protects branches (evidence: `README.md`)
- Secret scanning → GitHub repository: scans secrets (evidence: `README.md`)
- Private reporting → GitHub repository: enables reporting (evidence: `README.md`)
- Dependabot → GitHub repository: checks dependencies (evidence: `README.md`)
- Code scanning → GitHub repository: scans code (evidence: `README.md`)
- Status check → GitHub repository: checks settings (evidence: `README.md`)
