Repository Analysis

harness/harness

Harness Open Source is an end-to-end developer platform with Source Control Management, CI/CD Pipelines, Hosted Developer Environments, and Artifact Registries.

4.7 Likely human-written View on GitHub
4.7
Adjusted Score
4.7
Raw Score
100%
Time Factor
2026-05-27
Last Push
36,241
Stars
Go
Language
652,609
Lines of Code
5704
Files
2994
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 0HIGH 0MEDIUM 27LOW 2967

Pattern Findings

2994 matches across 7 categories. Click a row to expand file-level details.

Over-Commented Block2734 hits · 2734 pts
SeverityFileLineSnippet
LOWcmd/gitness/wire.go1// Copyright 2023 Harness, Inc.
LOWcmd/gitness/driver_sqlite.go1// Copyright 2023 Harness, Inc.
LOWcmd/gitness/driver_pq.go1// Copyright 2023 Harness, Inc.
LOWcmd/gitness/main.go1// Copyright 2023 Harness, Inc.
LOWinfraprovider/infra_provider_factory.go1// Copyright 2023 Harness, Inc.
LOWinfraprovider/docker_client_factory.go1// Copyright 2023 Harness, Inc.
LOWinfraprovider/docker_client_factory_test.go1// Copyright 2023 Harness, Inc.
LOWinfraprovider/wire.go1// Copyright 2023 Harness, Inc.
LOWinfraprovider/infra_provider.go1// Copyright 2023 Harness, Inc.
LOWinfraprovider/docker_provider.go1// Copyright 2023 Harness, Inc.
LOWinfraprovider/docker_config.go1// Copyright 2023 Harness, Inc.
LOWcrypto/crypto.go1// Copyright 2023 Harness, Inc.
LOWcrypto/crypto_test.go1// Copyright 2023 Harness, Inc.
LOWtypes/webhook.go1// Copyright 2023 Harness, Inc.
LOWtypes/gitspace_settings.go1// Copyright 2023 Harness, Inc.
LOWtypes/usergroup.go1// Copyright 2023 Harness, Inc.
LOWtypes/pullreq_suggestion.go1// Copyright 2023 Harness, Inc.
LOWtypes/config.go1// Copyright 2023 Harness, Inc.
LOWtypes/config.go61 // have to satisfy at least one of the following two conditions:
LOWtypes/config.go81
LOWtypes/config.go161 // CI defines configuration related to build executions.
LOWtypes/check.go1// Copyright 2023 Harness, Inc.
LOWtypes/PackageTag.go1// Copyright 2023 Harness, Inc.
LOWtypes/ai_agent_auth.go1// Copyright 2023 Harness, Inc.
LOWtypes/execution.go1// Copyright 2023 Harness, Inc.
LOWtypes/token.go1// Copyright 2023 Harness, Inc.
LOWtypes/pullreq.go1// Copyright 2023 Harness, Inc.
LOWtypes/pullreq_activity_metadata.go1// Copyright 2023 Harness, Inc.
LOWtypes/git.go1// Copyright 2023 Harness, Inc.
LOWtypes/image_data.go1// Copyright 2023 Harness, Inc.
LOWtypes/multireader_closer.go1// Copyright 2023 Harness, Inc.
LOWtypes/service.go1// Copyright 2023 Harness, Inc.
LOWtypes/githook.go1// Copyright 2023 Harness, Inc.
LOWtypes/user.go1// Copyright 2023 Harness, Inc.
LOWtypes/codeowners.go1// Copyright 2023 Harness, Inc.
LOWtypes/principal.go1// Copyright 2023 Harness, Inc.
LOWtypes/platform_connector.go1// Copyright 2023 Harness, Inc.
LOWtypes/path_test.go1// Copyright 2023 Harness, Inc.
LOWtypes/rebase.go1// Copyright 2023 Harness, Inc.
LOWtypes/types_test.go1// Copyright 2023 Harness, Inc.
LOWtypes/stream.go1// Copyright 2023 Harness, Inc.
LOWtypes/gitspace_error.go1// Copyright 2023 Harness, Inc.
LOWtypes/lfs.go1// Copyright 2023 Harness, Inc.
LOWtypes/resolved_feature.go1// Copyright 2023 Harness, Inc.
LOWtypes/resolved_feature.go41
LOWtypes/branch.go1// Copyright 2023 Harness, Inc.
LOWtypes/repo_activity_payload.go1// Copyright 2023 Harness, Inc.
LOWtypes/commit.go1// Copyright 2023 Harness, Inc.
LOWtypes/fork.go1// Copyright 2023 Harness, Inc.
LOWtypes/repo_activity.go1// Copyright 2023 Harness, Inc.
LOWtypes/github_connector_data.go1// Copyright 2023 Harness, Inc.
LOWtypes/code_comment.go1// Copyright 2023 Harness, Inc.
LOWtypes/infrastructure.go1// Copyright 2023 Harness, Inc.
LOWtypes/jetbrains.go1// Copyright 2023 Harness, Inc.
LOWtypes/autolink.go1// Copyright 2023 Harness, Inc.
LOWtypes/service_account.go1// Copyright 2023 Harness, Inc.
LOWtypes/pullreq_reviewer_suggestion.go1// Copyright 2023 Harness, Inc.
LOWtypes/gitspace_event.go1// Copyright 2023 Harness, Inc.
LOWtypes/search.go1// Copyright 2023 Harness, Inc.
LOWtypes/ai_task.go1// Copyright 2023 Harness, Inc.
2674 more matches not shown…
Hyper-Verbose Identifiers189 hits · 190 pts
SeverityFileLineSnippet
LOWweb/cypress/utils/getRequestBodies.ts19export function getRandomCreateRegistryBody(name: string, packageType: PACKAGE_TYPE, type: REGISTRY_TYPE) {
LOW…nfra/MachineLocationContent/MachineLocationContent.tsx112 function CustomPersistentDiskColumn(row: Unknown) {
LOWweb/src/utils/Utils.ts686export function removeSpecificTextOptimized(
LOWweb/src/utils/Utils.ts1056export function combineAndNormalizePrincipalsAndGroups(
LOWweb/src/utils/FileUtils.ts50export function useFileContentViewerDecision({
LOWweb/src/utils/timePopoverLocal/TimePopoverWithLocal.tsx40export function DateTimeWithLocalContentInline({ time }: { time: number }): JSX.Element {
LOW…ponents/CommitModalButton/useCommitSuggestionModal.tsx52export function useCommitSuggestionsModal({
LOW…ponents/CommitModalButton/useCommitSuggestionModal.tsx141export function useCommitPullReqSuggestions() {
LOW…arkdownEditorWithPreview/MarkdownEditorWithPreview.tsx151export function MarkdownEditorWithPreview({
LOW…arkdownEditorWithPreview/MarkdownEditorWithPreview.tsx762function scrollToAndSetCursorToEnd(
LOWweb/src/components/SourceCodeEditor/EditorUtils.ts56export function generateDefaultStepInsertionPath(stageIndex = 0): string {
LOWweb/src/components/Changes/CommitRange.tsx69 function updatePageWhenCommitRangeIsChanged() {
LOWweb/src/components/Changes/CommitRange.tsx91 function updateCommitRangeForCaller() {
LOWweb/src/components/Changes/Changes.tsx166 function updateInternalRefsOnReadOnlyMode() {
LOWweb/src/components/Changes/Changes.tsx227 function updateCacheWhenDiffDataArrives() {
LOWweb/src/components/Changes/Changes.tsx332 function updatePageWhenCommitRangeIsChanged() {
LOWweb/src/components/Changes/Changes.tsx433 function jumpToSelectedPathFromURL() {
LOWweb/src/components/CommentBox/CommentBox.tsx465 function renderToggleCommentsButton() {
LOWweb/src/components/CommitsView/CommitsView.tsx287function renderPullRequestLinkFromCommitMessage(
LOWweb/src/components/CommitInfo/CommitInfo.tsx55 function renderPullRequestLinkFromCommitMessage(
LOWweb/src/components/DiffViewer/DiffViewer.tsx255 function alwaysExpandDiffIfChangedSinceLastView() {
LOWweb/src/components/DiffViewer/DiffViewer.tsx287 function renderDiffAndCommentsIfInViewportOrSchedule() {
LOWweb/src/components/DiffViewer/DiffViewer.tsx321 function serializeDeserializeContent() {
LOWweb/src/components/DiffViewer/DiffViewer.tsx417 function adjustScrollPositionWhenCollapsingFile() {
LOWweb/src/components/DiffViewer/usePullReqComments.tsx943 function bindClickEventToStartNewCommentThread() {
LOWweb/src/components/DiffViewer/DiffViewerUtils.tsx206export function createCommentOppositePlaceHolder(lineNumber: number, isNewCommentThread = false): HTMLTableRowElement {
LOWweb/src/components/DiffViewer/DiffViewerUtils.tsx236export function activitiesToDiffCommentItems(
LOWweb/src/hooks/useSetPageContainerWidthVar.tsx33export function useSetPageContainerWidthVar({ domRef }: { domRef: React.RefObject<HTMLElement> }) {
LOW…/src/ar/__mocks__/hooks/useGovernanceMetaDataModal.tsx33export function useGovernanceMetaDataModal(_props: UseGovernanceModalProps): UseConnectorGovernanceModalPayload {
LOW…loadRequestsProvider/AsyncDownloadRequestsProvider.tsx40function AsyncDownloadRequestsProvider({ children }: { children: React.ReactNode }) {
LOW…AsyncDownloadRequestsProvider/AsyncDownloadRequest.tsx35function AsyncDownloadRequestStatusIcon(props: AsyncDownloadRequestStatusIconProps) {
LOW…ents/IncludeExcludePatterns/IncludeExcludePatterns.tsx48function shouldShowIncludeExcludeList(values: FormData): boolean {
LOWweb/src/ar/components/CleanupPolicyList/utils.tsx21export function getFormattedFormDataForCleanupPolicy(values: RepositoryRequest): RepositoryRequest {
LOWweb/src/ar/components/CleanupPolicyList/utils.tsx29export function getFormattedIntialValuesForCleanupPolicy(values: RepositoryRequest): RepositoryRequest {
LOW…s/MetadataFilterSelector/useMetadataFilterFromQuery.ts29export default function useMetadatadataFilterFromQuery() {
LOW…/src/ar/components/Badge/RepositoryVisibilityBadge.tsx31export default function RepositoryVisibilityBadge(props: RepositoryVisibilityBadgeProps): JSX.Element {
LOWweb/src/ar/common/utils.ts34export function getIdentifierStringForBreadcrumb(label: string, value: string): string {
LOWweb/src/ar/common/utils.ts43export function getPackageTypesForApiQueryParams(packageTypes: RepositoryPackageType[]): string | undefined {
LOWweb/src/ar/hooks/useGetRepositoryListViewType.ts21export function useGetRepositoryListViewType() {
LOW…c/ar/frameworks/Version/ArtifactTreeNodeViewWidget.tsx32export default function ArtifactTreeNodeViewWidget(props: ArtifactTreeNodeViewWidgetProps): JSX.Element {
LOW…ar/frameworks/Version/VersionTreeNodeDetailsWidget.tsx32export default function VersionTreeNodeDetailsWidget(props: VersionTreeNodeDetailsWidgetProps): JSX.Element {
LOW…r/frameworks/Version/ArtifactTreeNodeDetailsWidget.tsx31export default function ArtifactTreeNodeDetailsWidget(props: ArtifactTreeNodeDetailsWidgetProps): JSX.Element {
LOW…rc/ar/frameworks/Version/VersionTreeNodeViewWidget.tsx32export default function VersionTreeNodeViewWidget(props: VersionTreeNodeViewWidgetProps): JSX.Element {
LOW…r/frameworks/Version/ArtifactRowSubComponentWidget.tsx32export default function ArtifactRowSubComponentWidget(props: ArtifactRowSubComponentWidgetProps): JSX.Element {
LOW…eworks/RepositoryStep/RepositoryTreeNodeViewWidget.tsx32export default function RepositoryTreeNodeViewWidget(props: RepositoryTreeNodeViewWidgetProps): JSX.Element {
LOW…meworks/RepositoryStep/RepositorySetupClientWidget.tsx34export default function RepositorySetupClientWidget(props: RepositorySetupClientWidgetProps): JSX.Element {
LOW…rks/RepositoryStep/RepositoryTreeNodeDetailsWidget.tsx31export default function RepositoryTreeNodeDetailsWidget(props: RepositoryTreeNodeDetailsWidgetProps): JSX.Element {
LOWweb/src/ar/pages/webhook-list/components/Forms/utils.ts30function convertSecretInputToFormFields(
LOWweb/src/ar/pages/webhook-list/components/Forms/utils.ts41export function transformFormValuesToSubmitValues(
LOWweb/src/ar/pages/webhook-list/components/Forms/utils.ts61function convertFormFieldsToSecreteInput(formData: Webhook, secretField: string, secretSpacePathField: string) {
LOWweb/src/ar/pages/webhook-list/components/Forms/utils.ts71export function transformWebhookDataToFormValues(data: Webhook, parent: Parent): WebhookRequestUI {
LOW…list/components/ExemptionForm/ExemptionFormContent.tsx34function CreateExemptionFormContent(props: CreateExemptionFormContentProps) {
LOW…onForm/ExemptionDetailsAndJustificationFormContent.tsx27export default function ExemptionDetailsAndJustificationFormContent(
LOW…mponents/ExemptionForm/BasicInformationFormContent.tsx33export default function BasicInformationFormContent(props: BasicInformationFormContentProps) {
LOW…ts/ViolationDetailsContent/ViolationFailureDetails.tsx48function SecurityPolicyFailureDetailsItem({
LOW…ts/ViolationDetailsContent/ViolationFailureDetails.tsx93function LicensePolicyFailureDetailItem({ data }: { data: LicensePolicyFailureDetailConfigV3 }) {
LOW…ts/ViolationDetailsContent/ViolationFailureDetails.tsx114function PackageAgeViolationPolicyFailureDetailItem({
LOW…ts/ViolationDetailsContent/ViolationFailureDetails.tsx139function OssRiskLevelViolationPolicyFailureDetailItem({ data }: { data: OssRiskLevelPolicyFailureDetailConfigV3 }) {
LOW…ts/ViolationDetailsContent/ViolationFailureDetails.tsx154function GenericPolicyFailureDetailItem({ data }: { data: KVO }) {
LOW…ts/ViolationDetailsContent/ViolationFailureDetails.tsx168function ViolationFailureDetailsItem(props: ViolationFailureDetailsItemProps) {
129 more matches not shown…
AI Slop Vocabulary18 hits · 53 pts
SeverityFileLineSnippet
MEDIUMtypes/check.go94// CheckPayloadInternal is for internal use for more seamless integration for
MEDIUMtypes/enum/pullreq.go88// Essentially, the Type determines the structure of the pull request activity's Payload structure.
MEDIUMapp/services/codeowners/service_test.go117\ \ \# user2@harness.io
MEDIUMapp/services/codeowners/service_test.go205a #user1@harness.io
MEDIUMapp/services/codeowners/service_test.go206b # user1@harness.io
MEDIUMapp/services/codeowners/service_test.go209e# user1@harness.io
MEDIUMapp/services/codeowners/service_test.go210f user1@harness.io#user2@harness.io
MEDIUMapp/services/codeowners/service_test.go211g user1@harness.io # user2@harness.io
MEDIUM…details/NpmVersion/pages/artifact-dertails/mockData.ts18 "[![Express Logo](https://i.cloudup.com/zfY6lL7eFa-3000x3000.png)](http://expressjs.com/)\n\n**Fast, unopinionated, mi
MEDIUM…details/NpmVersion/pages/artifact-dertails/mockData.ts18 "[![Express Logo](https://i.cloudup.com/zfY6lL7eFa-3000x3000.png)](http://expressjs.com/)\n\n**Fast, unopinionated, mi
MEDIUM…details/NpmVersion/pages/artifact-dertails/mockData.ts18 "[![Express Logo](https://i.cloudup.com/zfY6lL7eFa-3000x3000.png)](http://expressjs.com/)\n\n**Fast, unopinionated, mi
MEDIUM…ails/PythonVersion/pages/artifact-dertails/mockData.ts18 "[![Express Logo](https://i.cloudup.com/zfY6lL7eFa-3000x3000.png)](http://expressjs.com/)\n\n**Fast, unopinionated, mi
MEDIUM…ails/PythonVersion/pages/artifact-dertails/mockData.ts18 "[![Express Logo](https://i.cloudup.com/zfY6lL7eFa-3000x3000.png)](http://expressjs.com/)\n\n**Fast, unopinionated, mi
MEDIUM…ails/PythonVersion/pages/artifact-dertails/mockData.ts18 "[![Express Logo](https://i.cloudup.com/zfY6lL7eFa-3000x3000.png)](http://expressjs.com/)\n\n**Fast, unopinionated, mi
MEDIUMstream/redis_consumer.go204 // NOTE: for the first call ever we want to get the history of the consumer (to allow for seamless restarts)
MEDIUM.engops/pr_source_code_changes.sh9# The purpose of this script is to facilitate auto-tagging of
MEDIUM.engops/pr_source_code_changes.sh29# Called by https://harness0.harness.io/ng/account/l7B_kbSEQD2wjrM7PShm5w/all/orgs/Audit/projects/Engops_Audit/pipelines
MEDIUMregistry/types/digest.go247// These functions allow seamless conversion between types.Digest and digest.Digest.
Verbosity Indicators29 hits · 52 pts
SeverityFileLineSnippet
LOWapp/api/request/pullreq.go110 // TODO: Remove the "includeGitStats := true" line and uncomment the following code block.
LOW…or/container/embedded_docker_container_orchestrator.go119 // Step 1: Validate access key
LOW…or/container/embedded_docker_container_orchestrator.go125 // Step 2: Get Docker client
LOW…or/container/embedded_docker_container_orchestrator.go135 // Step 3: Check the current state of the container
LOW…or/container/embedded_docker_container_orchestrator.go141 // Step 4: Handle different container states
LOW…or/container/embedded_docker_container_orchestrator.go177 // Step 5: Retrieve container information and return response
LOW…or/container/embedded_docker_container_orchestrator.go287 // Step 1: Get Docker client
LOW…or/container/embedded_docker_container_orchestrator.go294 // Step 2: Check the current state of the container
LOW…or/container/embedded_docker_container_orchestrator.go300 // Step 3: Handle container states
LOW…or/container/embedded_docker_container_orchestrator.go345 // Step 4: Create log stream for stopping the container
LOW…or/container/embedded_docker_container_orchestrator.go352 // Step 5: Stop the container
LOW…or/container/embedded_docker_container_orchestrator.go378 // Step 1: Get Docker client
LOW…or/container/embedded_docker_container_orchestrator.go385 // Step 4: Create logger stream for stopping and removing the container
LOW…ore/database/migrate/migrate_0151_migrate_artifacts.go51 // Step 1: Get orphan manifest IDs (lightweight query).
LOW…ore/database/migrate/migrate_0151_migrate_artifacts.go63 // Step 2: Process in smaller sub-batches.
LOW…rc/cde-gitness/pages/GitspaceDetails/Logger/Logger.tsx12 // Step 1: Split by newline to get each JSON string
LOW…rc/cde-gitness/pages/GitspaceDetails/Logger/Logger.tsx15 // Step 2: Parse each line and clean up escaped strings inside 'out' key
LOWtests/load/usage_metrics_test.go163 // Step 1: Authenticate
LOWtests/load/usage_metrics_test.go173 // Step 2: Import repository from github.com/google/uuid
LOWtests/load/usage_metrics_test.go182 // Step 3: Wait for import to complete
LOWtests/load/usage_metrics_test.go189 // Step 4: Fetch a file from the repository (README.md)
LOWregistry/app/dist_temp/dcontext/http.go183 // We need to check if that's intentional (could be a bug).
LOWregistry/app/api/handler/cargo/upload.go66 // Step 1: Read first 4 bytes to get JSON length
LOWregistry/app/api/handler/cargo/upload.go72 // Step 2: Read the JSON metadata
LOWregistry/app/store/database/artifact.go894 // Step 1: Find the latest artifact ID
LOWregistry/app/store/database/artifact.go918 // Step 2: Fetch full metadata for this specific artifact.
LOWregistry/app/store/database/registry.go360 // Step 1: Fetch base registry data.
LOWgit/api/diff.go341// The purpose of this function is to get data based on which code comments could be repositioned.
LOWgit/api/diff.go393// The purpose of this function is to get diff data with which code comments could be generated.
Self-Referential Comments9 hits · 27 pts
SeverityFileLineSnippet
MEDIUM…itspace/orchestrator/utils/script_templates/set_env.sh18 # Create the export statement
MEDIUMregistry/tests/conformance_test.sh24 # Define the URL and request payload
MEDIUMregistry/tests/conformance_test.sh49 # Define the URL and request payload
MEDIUMregistry/tests/maven/generate_junit_report.sh15# Create a timestamp for the report
MEDIUMregistry/tests/scripts/generate_report.sh47 # Create a timestamp
MEDIUMregistry/tests/scripts/generate_report.sh50 # Create a JSON report
MEDIUMregistry/tests/scripts/maven_tests.sh6# Create a Maven registry with timestamp to ensure uniqueness
MEDIUMregistry/tests/scripts/npm_tests.sh12# Create an NPM registry with timestamp to ensure uniqueness
MEDIUMregistry/tests/scripts/oci_tests.sh19# Create a temporary directory to run tests outside of the module
Redundant / Tautological Comments13 hits · 20 pts
SeverityFileLineSnippet
LOW…or/utils/script_templates/install_tools_vs_code_web.sh7# Check if curl is installed
LOW…ace/orchestrator/utils/script_templates/manage_user.sh8# Check if the user's home directory exists
LOW…/orchestrator/utils/script_templates/run_vscode_web.sh33 # Check if the process is still running
LOW…pace/orchestrator/utils/script_templates/clone_code.sh57# Check if .devcontainer/devcontainer.json exists
LOW…itspace/orchestrator/utils/script_templates/set_env.sh21 # Check if the variable is already present in /etc/profile
LOW…ace/orchestrator/utils/script_templates/install_git.sh9 # Check if Git is installed
LOWregistry/tests/conformance_test.sh37 # Check if jq command succeeded
LOWregistry/tests/conformance_test.sh59 # Check if jq command succeeded
LOWregistry/tests/gopkg/scripts/setup_test.sh132 # Set namespace to just the space name to avoid duplicate registry in path
LOWregistry/tests/cargo/scripts/setup_test.sh132 # Set namespace to just the space name to avoid duplicate registry in path
LOWregistry/tests/maven/generate_junit_report.sh5# Check if the JSON report exists
LOWregistry/tests/maven/scripts/setup_test.sh114 # Set namespace to just the space name to avoid duplicate registry in path
LOWregistry/tests/npm/scripts/setup_test.sh114 # Set namespace to just the space name to avoid duplicate registry in path
Slop Phrases2 hits · 3 pts
SeverityFileLineSnippet
LOW…details/NpmVersion/pages/artifact-dertails/mockData.ts18 "[![Express Logo](https://i.cloudup.com/zfY6lL7eFa-3000x3000.png)](http://expressjs.com/)\n\n**Fast, unopinionated, mi
LOW…ails/PythonVersion/pages/artifact-dertails/mockData.ts18 "[![Express Logo](https://i.cloudup.com/zfY6lL7eFa-3000x3000.png)](http://expressjs.com/)\n\n**Fast, unopinionated, mi