Repository Analysis

hashicorp/consul

Consul is a distributed, highly available, and data center aware solution to connect and configure applications across dynamic, distributed infrastructure.

1.0 Likely human-written View on GitHub
1.0
Adjusted Score
1.0
Raw Score
100%
Time Factor
2026-05-29
Last Push
29,900
Stars
Go
Language
885,857
Lines of Code
8387
Files
811
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 6HIGH 0MEDIUM 40LOW 765

Pattern Findings

811 matches across 8 categories. Click a row to expand file-level details.

Over-Commented Block763 hits · 732 pts
SeverityFileLineSnippet
LOWscan.hcl1# Copyright IBM Corp. 2024, 2026
LOW.pre-commit-config.yaml1# Copyright IBM Corp. 2024, 2026
LOWtlsutil/config.go81 // We don't support the raw 0xNNNN values from
LOWtlsutil/config.go101 // traffic as well as being added as a raft peer. This should be
LOWtlsutil/config.go161// protocolConfig contains the loaded state (e.g. x509 certificates) for a given
LOWtlsutil/config.go321 }
LOWui/packages/consul-ui/ember-cli-build.js221 }
LOWui/packages/consul-ui/blueprints/serializer/index.js21 // afterInstall(options) {
LOW…eprints/serializer/files/__root__/__path__/__name__.js21 // body
LOWui/packages/consul-ui/blueprints/adapter/index.js21 // afterInstall(options) {
LOW…kages/consul-ui/app/instance-initializers/container.js41 // find all the services and add their classes to the container so we can
LOWui/packages/consul-ui/app/utils/form/builder.js121 // is its a child form then use the child form
LOW…kages/consul-ui/app/styles/base/icons/icons/index.scss1/**
LOW…kages/consul-ui/app/styles/base/icons/icons/index.scss21@import './cancel-plain/index.scss';
LOW…kages/consul-ui/app/styles/base/icons/icons/index.scss41@import './deny-default/index.scss';
LOW…kages/consul-ui/app/styles/base/icons/icons/index.scss61// @import './git-branch/index.scss';
LOW…kages/consul-ui/app/styles/base/icons/icons/index.scss81// @import './logo-alicloud-color/index.scss';
LOW…kages/consul-ui/app/styles/base/icons/icons/index.scss101// @import './logo-slack-color/index.scss';
LOW…kages/consul-ui/app/styles/base/icons/icons/index.scss121// @import './play-outline/index.scss';
LOW…kages/consul-ui/app/styles/base/icons/icons/index.scss141// @import './source-file/index.scss';
LOW…kages/consul-ui/app/styles/base/icons/icons/index.scss161// @import './visibility-show/index.scss';
LOW…kages/consul-ui/app/styles/base/icons/icons/index.scss181// @import './arrow-down/index.scss';
LOW…kages/consul-ui/app/styles/base/icons/icons/index.scss201// @import './azure-devops-color/index.scss';
LOW…kages/consul-ui/app/styles/base/icons/icons/index.scss221// @import './boundary/index.scss';
LOW…kages/consul-ui/app/styles/base/icons/icons/index.scss241// @import './check-diamond-fill/index.scss';
LOW…kages/consul-ui/app/styles/base/icons/icons/index.scss261// @import './clock/index.scss';
LOW…kages/consul-ui/app/styles/base/icons/icons/index.scss281// @import './corner-left-up/index.scss';
LOW…kages/consul-ui/app/styles/base/icons/icons/index.scss301// @import './docs/index.scss';
LOW…kages/consul-ui/app/styles/base/icons/icons/index.scss321// @import './facebook-color/index.scss';
LOW…kages/consul-ui/app/styles/base/icons/icons/index.scss341// @import './folder-minus/index.scss';
LOW…kages/consul-ui/app/styles/base/icons/icons/index.scss361// @import './globe/index.scss';
LOW…kages/consul-ui/app/styles/base/icons/icons/index.scss381// @import './help/index.scss';
LOW…kages/consul-ui/app/styles/base/icons/icons/index.scss401// @import './learn/index.scss';
LOW…kages/consul-ui/app/styles/base/icons/icons/index.scss421// @import './meh/index.scss';
LOW…kages/consul-ui/app/styles/base/icons/icons/index.scss441// @import './module/index.scss';
LOW…kages/consul-ui/app/styles/base/icons/icons/index.scss461// @import './outline/index.scss';
LOW…kages/consul-ui/app/styles/base/icons/icons/index.scss481// @import './plus-circle/index.scss';
LOW…kages/consul-ui/app/styles/base/icons/icons/index.scss501// @import './scissors/index.scss';
LOW…kages/consul-ui/app/styles/base/icons/icons/index.scss521// @import './sign-out/index.scss';
LOW…kages/consul-ui/app/styles/base/icons/icons/index.scss541// @import './star-off/index.scss';
LOW…kages/consul-ui/app/styles/base/icons/icons/index.scss561// @import './toggle-right/index.scss';
LOW…kages/consul-ui/app/styles/base/icons/icons/index.scss581// @import './user/index.scss';
LOW…kages/consul-ui/app/styles/base/icons/icons/index.scss601// @import './wall/index.scss';
LOW…onsul-ui/app/components/consul/intention/form/index.js161 case 'DestinationPartition':
LOWui/packages/consul-ui/app/serializers/application.js141 })[primaryKey],
LOWui/packages/consul-ui/app/controllers/application.js41 // TODO: For the moment e isn't a real event
LOW…ges/consul-ui/app/services/repository/oidc-provider.js41 // the only places where Consul w/namespaces enabled doesn't return a
LOWui/packages/consul-ui/config/targets.js1/**
LOWui/packages/consul-ui/config/targets.js21///
LOWui/packages/consul-ui/config/environment.js61 //
LOWui/packages/consul-ui/lib/rehype-prism/index.js1// modified from https://github.com/mapbox/rehype-prism/blob/fb4174fce30a1cde8d784fa94e7c04d8a7fa6d28/index.js
LOWsnapshot/archive.go1// Copyright IBM Corp. 2024, 2026
LOWenvoyextensions/extensioncommon/runtime_config.go41 // IsSourcedFromUpstream, which refers to the Envoy extension source.
LOWenvoyextensions/extensioncommon/envoy_extender.go21
LOWenvoyextensions/extensioncommon/basic_envoy_extender.go41 PatchRoute(RoutePayload) (*envoy_route_v3.RouteConfiguration, bool, error)
LOWenvoyextensions/extensioncommon/basic_envoy_extender.go61 // Then PatchClusters is called for each individual cluster.
LOWenvoyextensions/extensioncommon/basic_envoy_extender.go81 // PatchFilter patches an Envoy filter to include the custom Envoy
LOWenvoyextensions/xdscommon/xdscommon.go21 OutboundListenerName = "outbound_listener"
LOWenvoyextensions/xdscommon/proxysupport.go61
LOWtypes/tls.go121// via Go, and may change as some older suites are removed in future
703 more matches not shown…
AI Slop Vocabulary21 hits · 63 pts
SeverityFileLineSnippet
MEDIUM.release/linux/package/etc/consul.d/consul.hcl65# This cannot be used in conjunction with the legacy -bootstrap flag. This flag requires
MEDIUMproto-public/buf.gen.yaml40 # Generate cloning clients that can be used in conjunction with github.com/fullstorydev/grpchan/inprocgrpc
MEDIUMinternal/go-sso/oidcauth/auth.go112 // Use CAP's OIDC provider to leverage its built-in support for
MEDIUMagent/dns.go889 // need to be very familiar with our TLS / SNI / mesh gateways to leverage it.
MEDIUMagent/leafcert/leafcert_test.go171 // done. TO be more robust against timing, we take the value as the
MEDIUMagent/cache/cache.go329 // once. But be robust against panics.
MEDIUMagent/proxycfg/snapshot.go785 // We leverage the test trust domain knowing
MEDIUMagent/consul/server_grpc.go139 // all the Safe variants will utilize the default cloning
MEDIUMagent/structs/connect_ca.go52 // seamless rotation between trust domains thanks to cross-signing.
MEDIUMagent/structs/prepared_query.go311 // struct to make it more robust if it becomes significant.
MEDIUMagent/structs/structs.go594 // utilize streaming RPCs.
MEDIUMagent/structs/structs.go817 // struct to make it more robust if it becomes significant.
MEDIUMagent/connect/ca/provider.go171 // cross-signing an external root to provide a seamless rotation. If the CA
MEDIUMagent/xds/listeners_ingress.go277 // cases shouldn't be possible as we validate them at input but be robust to
MEDIUMapi/config_entry_gateways_test.go179 // Set namespace and partition to blank so that CE and ent can utilize the same tests
MEDIUMapi/config_entry_gateways_test.go198 // Set namespace and partition to blank so that CE and ent can utilize the same tests
MEDIUMapi/config_entry_gateways_test.go324 // Set namespace to blank so that CE and ent can utilize the same tests
MEDIUMapi/config_entry_gateways_test.go334 // Set namespace to blank so that CE and ent can utilize the same tests
MEDIUMbuild-support/scripts/copywrite-exceptions.sh4# headers and deletes them, then runs the copywrite bot to utilize local subdir config
MEDIUMconnect/tls.go165 // PKI or Consul clusters). This allows for seamless migrations between trust
MEDIUMacl/policy_authorizer_test.go14// Note that many of the policy authorizer tests still live in acl_test.go. These utilize a default policy or layer
Hallucination Indicators6 hits · 60 pts
SeverityFileLineSnippet
CRITICALagent/agent_endpoint.go217 return s.agent.baseDeps.MetricsConfig.Handler.DisplayMetrics(resp, req)
CRITICALagent/agent_endpoint.go254 s.agent.baseDeps.MetricsConfig.Handler.Stream(req.Context(), enc)
CRITICALagent/consul/prepared_query_endpoint_test.go3517 conn, err := grpc.DialContext(ctx, es.peeringServer.server.config.RPCAddr.String(),
CRITICALagent/consul/prepared_query_endpoint_test.go3518 grpc.WithContextDialer(newServerDialer(es.peeringServer.server.config.RPCAddr.String())),
CRITICALagent/consul/prepared_query_endpoint_test.go3534 conn, err = grpc.DialContext(ctx, es.server.server.config.RPCAddr.String(),
CRITICALagent/consul/prepared_query_endpoint_test.go3535 grpc.WithContextDialer(newServerDialer(es.server.server.config.RPCAddr.String())),
Decorative Section Separators15 hits · 51 pts
SeverityFileLineSnippet
MEDIUM.pre-commit-config.yaml10# ====================================================================
MEDIUMtest/load/terraform/main.tf7# ---------------------------------------------------------------------------------------------------------------------
MEDIUMtest/load/terraform/main.tf9# ---------------------------------------------------------------------------------------------------------------------
MEDIUMtest/load/terraform/main.tf26# ---------------------------------------------------------------------------------------------------------------------
MEDIUMtest/load/terraform/main.tf28# ---------------------------------------------------------------------------------------------------------------------
MEDIUMtest/load/terraform/consul.tf25# ---------------------------------------------------------------------------------------------------------------------
MEDIUMtest/load/terraform/consul.tf27# ---------------------------------------------------------------------------------------------------------------------
MEDIUMtest/load/terraform/consul.tf70# ---------------------------------------------------------------------------------------------------------------------
MEDIUMtest/load/terraform/consul.tf72# ---------------------------------------------------------------------------------------------------------------------
MEDIUMtest/load/terraform/test-servers.tf25# ---------------------------------------------------------------------------------------------------------------------
MEDIUMtest/load/terraform/test-servers.tf27# ---------------------------------------------------------------------------------------------------------------------
MEDIUMtest/load/terraform/variables.tf4# ---------------------------------------------------------------------------------------------------------------------
MEDIUMtest/load/terraform/variables.tf7# ---------------------------------------------------------------------------------------------------------------------
MEDIUMtest/load/terraform/variables.tf13# ---------------------------------------------------------------------------------------------------------------------
MEDIUMtest/load/terraform/variables.tf16# ---------------------------------------------------------------------------------------------------------------------
Self-Referential Comments2 hits · 6 pts
SeverityFileLineSnippet
MEDIUMtest/load/packer/consul-ami/scripts/datadog.yaml10## Create a new API key here: https://app.datadoghq.com/account/settings
MEDIUM.github/workflows/ce-merge-trigger.yml116 # Create the JSON payload using jq for safe escaping
Slop Phrases2 hits · 6 pts
SeverityFileLineSnippet
MEDIUMagent/acl_endpoint.go1066 // 3. Along with #2 you can use the ACL.GetPolicy RPC endpoint which will return a rolled up
MEDIUMagent/consul/state/session.go219 // that here, but it's worth noting that we should never do this in the
Example Usage Blocks1 hit · 2 pts
SeverityFileLineSnippet
LOWconnect/certgen/certgen.go7// Example usage:
Hyper-Verbose Identifiers1 hit · 1 pts
SeverityFileLineSnippet
LOWui/packages/consul-ui/app/validations/sometimes.js12 function guardValidatorWithCondition(validator) {