GitHub CLI (gh)
Provides a comprehensive reference for using GitHub CLI to manage repositories, issues, pull requests, and more from the command line.
Install this skill
Security score
The GitHub CLI (gh) skill was audited on May 13, 2026 and we found 22 security issues across 4 threat categories, including 4 high-severity. Review the findings below before installing.
Categories Tested
Security Issues
Curl to non-GitHub URL
| 34 | curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg |
Access to hidden dotfiles in home directory
| 669 | gh repo deploy-key add ~/.ssh/id_rsa.pub \ |
Access to hidden dotfiles in home directory
| 1743 | gh ssh-key add ~/.ssh/id_rsa.pub --title "My laptop" |
Access to hidden dotfiles in home directory
| 1746 | gh ssh-key add ~/.ssh/id_ed25519.pub --type "authentication" |
Access to hidden dotfiles in home directory
| 1762 | gh gpg-key add ~/.ssh/id_rsa.pub |
Access to hidden dotfiles in home directory
| 1945 | gh completion -s bash > ~/.gh-complete.bash |
Access to hidden dotfiles in home directory
| 1946 | gh completion -s zsh > ~/.gh-complete.zsh |
Access to hidden dotfiles in home directory
| 1947 | gh completion -s fish > ~/.gh-complete.fish |
Access to hidden dotfiles in home directory
| 1948 | gh completion -s powershell > ~/.gh-complete.ps1 |
Access to hidden dotfiles in home directory
| 2124 | # Add to ~/.bashrc or ~/.zshrc |
Access to SSH directory
| 669 | gh repo deploy-key add ~/.ssh/id_rsa.pub \ |
Access to SSH directory
| 1743 | gh ssh-key add ~/.ssh/id_rsa.pub --title "My laptop" |
Access to SSH directory
| 1746 | gh ssh-key add ~/.ssh/id_ed25519.pub --type "authentication" |
Access to SSH directory
| 1762 | gh gpg-key add ~/.ssh/id_rsa.pub |
Access to system keychain/keyring
| 34 | curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg |
Access to system keychain/keyring
| 35 | echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.lis |
External URL reference
| 34 | curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg |
External URL reference
| 35 | echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.lis |
External URL reference
| 482 | gh repo create my-repo --homepage https://example.com |
External URL reference
| 570 | gh repo edit --homepage https://example.com |
External URL reference
| 656 | --url-template https://jira.example.com/browse/<num> |
External URL reference
| 2197 | - Official Manual: https://cli.github.com/manual/ |