Repository Analysis

cli/cli

GitHub’s official command line tool

1.2 Likely human-written View on GitHub
1.2
Adjusted Score
1.2
Raw Score
100%
Time Factor
2026-05-29
Last Push
44,642
Stars
Go
Language
254,867
Lines of Code
941
Files
155
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 0HIGH 1MEDIUM 53LOW 101

Pattern Findings

155 matches across 11 categories. Click a row to expand file-level details.

Self-Referential Comments43 hits · 160 pts
SeverityFileLineSnippet
MEDIUM…thub/workflows/scripts/spam-detection/eval-prompts.yml2928 # Create a repository with a file so it has a default branch
MEDIUM…thub/workflows/scripts/spam-detection/eval-prompts.yml2934 # Create a fork
MEDIUM…thub/workflows/scripts/spam-detection/eval-prompts.yml2950 # Create the PR inside the fork
MEDIUM…thub/workflows/scripts/spam-detection/eval-prompts.yml4381 # Create a repository to act as upstream with a file so it has a default branch
MEDIUM…thub/workflows/scripts/spam-detection/eval-prompts.yml4389 # Create a fork in the same org
MEDIUM…thub/workflows/scripts/spam-detection/eval-prompts.yml4407 # Create the PR spanning upstream and fork repositories, gh pr create does not support headRepositoryId needed for
MEDIUM…thub/workflows/scripts/spam-detection/eval-prompts.yml4597 # Create a repository with a file so it has a default branch
MEDIUM…thub/workflows/scripts/spam-detection/eval-prompts.yml4603 # Create a fork
MEDIUM…thub/workflows/scripts/spam-detection/eval-prompts.yml4619 # Create the PR inside the fork
MEDIUM…thub/workflows/scripts/spam-detection/eval-prompts.yml4849 input: "<TITLE>\nLocal extensions can override core commands\n</TITLE>\n\n<BODY>\n### Describe the bug\n\n1. Local e
MEDIUMpkg/cmd/extension/command.go586 # Create a script-based extension
MEDIUMpkg/cmd/extension/command.go589 # Create a Go extension
MEDIUMpkg/cmd/extension/command.go592 # Create a non-Go precompiled extension
MEDIUMpkg/cmd/agent-task/agent_task.go42 # Create a new agent task on the current repository
MEDIUMpkg/cmd/agent-task/create/create.go87 # Create a task from an inline description
MEDIUMpkg/cmd/agent-task/create/create.go90 # Create a task from an inline description and follow logs
MEDIUMpkg/cmd/agent-task/create/create.go93 # Create a task from a file
MEDIUMpkg/cmd/agent-task/create/create.go96 # Create a task with problem statement from stdin
MEDIUMpkg/cmd/agent-task/create/create.go99 # Create a task with an editor
MEDIUMpkg/cmd/agent-task/create/create.go102 # Create a task with an editor and a file as a template
MEDIUMpkg/cmd/agent-task/create/create.go108 # Create a task using the custom agent defined in '.github/agents/my-agent.md'
MEDIUMpkg/cmd/release/create/create.go151 # Create a release and start a discussion
MEDIUMpkg/cmd/release/create/create.go154 # Create a release only if there are new commits available since the last release
MEDIUMpkg/cmd/project/item-create/item_create.go43 # Create a draft issue in the current user's project "1"
MEDIUMpkg/cmd/project/field-create/field_create.go44 # Create a field in the current user's project "1"
MEDIUMpkg/cmd/project/field-create/field_create.go47 # Create a field with three options to select from for owner monalisa
MEDIUMpkg/cmd/project/create/create.go40 # Create a new project owned by login monalisa
MEDIUMpkg/cmd/issue/develop/develop.go63 # Create a branch for issue 123 based on the my-feature branch
MEDIUMpkg/cmd/issue/develop/develop.go66 # Create a branch for issue 123 and check it out
MEDIUMpkg/cmd/issue/develop/develop.go69 # Create a branch in repo monalisa/cli for issue 123 in repo cli/cli
MEDIUMpkg/cmd/gist/create/create.go65 # Create a gist with a description
MEDIUMpkg/cmd/gist/create/create.go68 # Create a gist containing several files
MEDIUMpkg/cmd/gist/create/create.go71 # Create a gist containing several files using patterns
MEDIUMpkg/cmd/gist/create/create.go77 # Create a gist from output piped from another command
MEDIUMpkg/cmd/repo/license/view/view.go57 # Create a LICENSE.md with the MIT license
MEDIUMpkg/cmd/repo/autolink/create/create.go58 # Create an alphanumeric autolink to example.com for the key prefix "TICKET-".
MEDIUMpkg/cmd/repo/autolink/create/create.go62 # Create a numeric autolink to example.com for the key prefix "STORY-".
MEDIUMpkg/cmd/repo/create/create.go106 # Create a repository interactively
MEDIUMpkg/cmd/repo/create/create.go109 # Create a new remote repository and clone it locally
MEDIUMpkg/cmd/repo/create/create.go112 # Create a new remote repository in a different organization
MEDIUMpkg/cmd/repo/create/create.go115 # Create a remote repository from the current directory
MEDIUMpkg/cmd/repo/gitignore/view/view.go49 # Create a new .gitignore file using the Go template
MEDIUMpkg/cmd/repo/gitignore/view/view.go52 # Create a new .gitignore file using the Python template
Over-Commented Block85 hits · 85 pts
SeverityFileLineSnippet
LOWinternal/prompter/accessible_prompter_test.go21 "golang.org/x/sys/unix"
LOWinternal/prompter/prompter.go21 Select(prompt string, defaultValue string, options []string) (int, error)
LOWinternal/prompter/huh_prompter_test.go41
LOWinternal/prompter/prompter_mock.go1// Code generated by moq; DO NOT EDIT.
LOWinternal/prompter/prompter_mock.go21// panic("mock out the AuthToken method")
LOWinternal/prompter/prompter_mock.go41// MultiSelectWithSearchFunc: func(prompt string, searchPrompt string, defaults []string, persistentOptions []string,
LOWinternal/ghcmd/cmd.go421
LOWinternal/ghcmd/update_enabled.go1//go:build updateable
LOWinternal/gh/gh.go81
LOWinternal/gh/gh.go121 //
LOWinternal/gh/mock/config.go21// // make and configure a mocked gh.Config
LOWinternal/gh/mock/config.go41// ColorLabelsFunc: func(hostname string) gh.ConfigEntry {
LOWinternal/gh/mock/config.go61// },
LOWinternal/gh/mock/config.go81// panic("mock out the Write method")
LOWinternal/gh/mock/migration.go21// mockedMigration := &MigrationMock{
LOWinternal/config/migration/multi_account.go41//
LOWinternal/config/migration/multi_account.go61// put that under the new user entry, otherwise there will be no value for the
LOWinternal/codespaces/api/api.go1package api
LOW…/rpc/codespace/codespace_host_service.v1.proto.mock.go21// NotifyCodespaceOfClientActivityFunc: func(contextMoqParam context.Context, notifyCodespaceOfClientActivityRequest *
LOW…paces/rpc/ssh/ssh_server_host_service.v1.proto.mock.go21// StartRemoteServerAsyncFunc: func(contextMoqParam context.Context, startRemoteServerRequest *StartRemoteServerReques
LOW…c/jupyter/jupyter_server_host_service.v1.proto.mock.go21// GetRunningServerFunc: func(contextMoqParam context.Context, getRunningServerRequest *GetRunningServerRequest) (*Get
LOWinternal/featuredetection/feature_detection.go21 ReleaseFeatures() (ReleaseFeatures, error)
LOWinternal/featuredetection/feature_detection.go41 //
LOWinternal/featuredetection/feature_detection.go341func (d *detector) SearchFeatures() (SearchFeatures, error) {
LOWinternal/featuredetection/feature_detection.go461 // TODO workflowDispatchRunDetailsCleanup
LOWinternal/telemetry/telemetry.go341 Type string `json:"type"`
LOWinternal/telemetry/detach_windows.go1//go:build windows
LOWinternal/barista/observability/telemetry.twirp.go521// that is everything in a Twirp route except for the <Method>. This can be used for routing,
LOWinternal/barista/observability/telemetry.twirp.go541}
LOWinternal/barista/observability/telemetry.twirp.go901
LOWdocs/release-process-deep-dive.md221security default-keychain -s "$keychain"
LOWscript/build.go1// Build tasks for the GitHub CLI project.
LOWacceptance/README.md121
LOW.github/workflows/scripts/bump-go.sh1#!/usr/bin/env bash
LOWapi/queries_issue.go101 logins := make([]string, len(a.Nodes))
LOWgit/client.go21)
LOWgit/client.go101// CredentialPattern is used to inform AuthenticatedCommand which patterns Git should match
LOWgit/client.go521//
LOWgit/client.go541// remote = foo/bar
LOWgit/client_test.go1161 {
LOWpkg/cmd/codespace/mock_prompter.go1// Code generated by moq; DO NOT EDIT.
LOWpkg/cmd/codespace/mock_api.go21// panic("mock out the CreateCodespace method")
LOWpkg/cmd/codespace/mock_api.go41// GetCodespaceRepositoryContentsFunc: func(ctx context.Context, codespace *codespacesAPI.Codespace, path string) ([]b
LOWpkg/cmd/codespace/mock_api.go61// },
LOWpkg/cmd/codespace/ssh.go661 // codespaceSSHConfig contains values needed to write an OpenSSH host
LOWpkg/cmd/codespace/select.go41// ## Examples
LOWpkg/cmd/extension/manager.go861//
LOWpkg/cmd/extension/ext_tmpls/script.sh1#!/usr/bin/env bash
LOWpkg/cmd/extension/ext_tmpls/script.sh21# repositories(first: 100, after: $endCursor) {
LOWpkg/cmd/auth/shared/git_credential.go41 result, err := flow.Prompter.Confirm("Authenticate Git with your GitHub credentials?", true)
LOWpkg/cmd/agent-task/capi/client_mock.go21// CreateJobFunc: func(ctx context.Context, owner string, repo string, problemStatement string, baseBranch string, cus
LOWpkg/cmd/agent-task/capi/client_mock.go41// },
LOWpkg/cmd/agent-task/shared/log_mock.go21// mockedLogRenderer := &LogRendererMock{
LOWpkg/cmd/release/list/http.go41func fetchReleases(httpClient *http.Client, repo ghrepo.Interface, limit int, excludeDrafts bool, excludePreReleases boo
LOWpkg/cmd/release/create/http.go181
LOWpkg/cmd/pr/diff/diff.go301 if err != nil {
LOWpkg/cmd/pr/shared/editable.go101 // curate the final list of assignees from the default list.
LOWpkg/cmd/pr/shared/editable.go501
LOWpkg/cmd/pr/shared/find_refs_resolution.go301//
LOWpkg/cmd/pr/create/create.go881 }
25 more matches not shown…
Fake / Example Data11 hits · 16 pts
SeverityFileLineSnippet
LOW…orkflows/scripts/spam-detection/generate-sys-prompt.sh64- Generic placeholder text like "Lorem ipsum" or "test test test".
LOWpkg/cmd/search/commits/commits.go61 # Search commits authored by users with name "Jane Doe"
LOWpkg/cmd/search/commits/commits.go62 $ gh search commits --author-name="Jane Doe"
LOWpkg/cmd/pr/comment/comment_test.go637 if body != "Lorem ipsum dolor sit amet, consectet lo..." {
LOWpkg/cmd/pr/comment/comment_test.go637 if body != "Lorem ipsum dolor sit amet, consectet lo..." {
LOWpkg/cmd/pr/comment/comment_test.go647 {ID: "id1", Author: api.CommentAuthor{Login: "octocat"}, URL: "https://github.com/OWNER/REPO/pull/123#issuecomment-1
LOWpkg/cmd/pr/comment/comment_test.go647 {ID: "id1", Author: api.CommentAuthor{Login: "octocat"}, URL: "https://github.com/OWNER/REPO/pull/123#issuecomment-1
LOWpkg/cmd/issue/comment/comment_test.go617 if body != "Lorem ipsum dolor sit amet, consectet lo..." {
LOWpkg/cmd/issue/comment/comment_test.go617 if body != "Lorem ipsum dolor sit amet, consectet lo..." {
LOWpkg/cmd/issue/comment/comment_test.go627 {ID: "id1", Author: api.CommentAuthor{Login: "octocat"}, URL: "https://github.com/OWNER/REPO/pull/123#issuecomment-1
LOWpkg/cmd/issue/comment/comment_test.go627 {ID: "id1", Author: api.CommentAuthor{Login: "octocat"}, URL: "https://github.com/OWNER/REPO/pull/123#issuecomment-1
AI Slop Vocabulary4 hits · 8 pts
SeverityFileLineSnippet
MEDIUM…thub/workflows/scripts/spam-detection/eval-prompts.yml3299 input: "<TITLE>\nAdd the ability to delete the \"last\" comment, similar to `--edit-last`\n</TITLE>\n\n<BODY>\n### D
MEDIUM…thub/workflows/scripts/spam-detection/eval-prompts.yml3299 input: "<TITLE>\nAdd the ability to delete the \"last\" comment, similar to `--edit-last`\n</TITLE>\n\n<BODY>\n### D
MEDIUM…thub/workflows/scripts/spam-detection/eval-prompts.yml4563 input: "<TITLE>\n`--allow-forking=false` not interpreted correctly if forking disabled at organization level\n</TITL
MEDIUM…thub/workflows/scripts/spam-detection/eval-prompts.yml4709 input: "<TITLE>\n`gh repo create` to work on bare repos\n</TITLE>\n\n<BODY>\n### Describe the feature or problem you
Excessive Try-Catch Wrapping4 hits · 7 pts
SeverityFileLineSnippet
LOWpkg/cmd/agent-task/shared/testdata/log-2-want.txt225 except Exception as e:
MEDIUMpkg/cmd/agent-task/shared/testdata/log-2-want.txt226 print(f'Error: {e}')
MEDIUMpkg/cmd/agent-task/shared/testdata/log-2-input.txt41data: {"choices":[{"delta":{"role":"assistant","content":"Let me try a different approach to verify the YAML:"},"finish_
MEDIUMpkg/cmd/agent-task/shared/testdata/log-2-input.txt43data: {"id":"msg_vrtx_01GbFRhuSh5bH1VPVEAMD8L9","created":1757597820,"model":"claude-sonnet-4","choices":[{"finish_reaso
Slop Phrases2 hits · 5 pts
SeverityFileLineSnippet
MEDIUM…thub/workflows/scripts/spam-detection/eval-prompts.yml4809 input: "<TITLE>\nCan't install forked extension\n</TITLE>\n\n<BODY>\n### Describe the bug\r\n\r\nI have forked an [e
MEDIUMpkg/cmd/preview/prompter/prompter.go177 // Here, we return a static set of options for demonstration purposes.
Synthetic Comment Markers1 hit · 5 pts
SeverityFileLineSnippet
HIGHpkg/cmd/agent-task/shared/testdata/log-1-input.txt61data: {"choices":[{"delta":{"role":"assistant","content":"Excellent! The security analysis shows no vulnerabilities. \n\
Decorative Section Separators1 hit · 3 pts
SeverityFileLineSnippet
MEDIUM.github/workflows/scripts/bump-go.sh14# -----------------------------------------------------------------------------
Verbosity Indicators2 hits · 3 pts
SeverityFileLineSnippet
LOWpkg/cmd/agent-task/view/view.go183 // so we need to check if the selector arg is a reference and fetch the PR
LOWpkg/cmd/issue/shared/lookup.go37 // if there is an issue repo returned, then we need to check if it is the same as the previous one
Example Usage Blocks1 hit · 2 pts
SeverityFileLineSnippet
LOW.github/workflows/scripts/bump-go.sh5# Usage:
Redundant / Tautological Comments1 hit · 2 pts
SeverityFileLineSnippet
LOW.github/workflows/scripts/spam-detection/check-issue.sh3# Check if an issue is spam or not and output "PASS" (not spam) or "FAIL" (spam).