Repository Analysis

portainer/portainer

Making Docker and Kubernetes management easy.

1.8 Likely human-written View on GitHub
1.8
Adjusted Score
1.8
Raw Score
100%
Time Factor
2026-05-29
Last Push
37,598
Stars
TypeScript
Language
424,656
Lines of Code
4890
Files
740
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 1HIGH 0MEDIUM 2LOW 737

Pattern Findings

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

Hyper-Verbose Identifiers522 hits · 538 pts
SeverityFileLineSnippet
LOW…nels/node-labels-table/node-labels-table-controller.js2 function NodeLabelsTableController() {
LOW…lability-select/node-availability-select-controller.js2 function NodeAvailabilitySelectController() {
LOW…e-details-panel/swarm-node-details-panel-controller.js6 function SwarmNodeDetailsPanelController(NodeService, LabelHelper, Notifications, $state) {
LOWapp/docker/components/log-viewer/logViewerController.js31 function handleLogsCollectionChange(enabled) {
LOWapp/docker/components/log-viewer/logViewerController.js39 function handleLogsWrapLinesChange(enabled) {
LOWapp/docker/components/log-viewer/logViewerController.js45 function handleDisplayTimestampsChange(enabled) {
LOW…er/views/swarm/visualizer/swarmVisualizerController.js19 $scope.handleChangeDisplayOnlyRunningTasks = function handleChangeDisplayOnlyRunningTasks(enabled) {
LOW…er/views/swarm/visualizer/swarmVisualizerController.js26 $scope.handleChangeDisplayNodeLabels = function handleChangeDisplayNodeLabels(enabled) {
LOW…host/host-browser-view/host-browser-view-controller.js4 function HostBrowserViewController(SystemService, Notifications) {
LOW…ews/nodes/node-details/node-details-view-controller.js9 function NodeDetailsViewController($q, $stateParams, NodeService, StateManager, AgentService, Authentication, Notifica
LOWapp/docker/views/networks/networksController.js35 function groupSwarmNetworksManagerNodesFirst(networks, agents) {
LOW…ocker/views/networks/create/createNetworkController.js126 function prepareAuxiliaryAddresses(ipamConfig, ipFormValues) {
LOW…ocker/views/networks/create/createNetworkController.js190 function modifyNetworkConfigurationForMacvlanConfigOnly(config) {
LOW…ocker/views/networks/create/createNetworkController.js197 function modifyNetworkConfigurationForMacvlanConfigFrom(config, selectedNetworkConfig) {
LOW…ker/views/containers/stats/containerStatsController.js75 function calculateCPUPercentWindows(stats) {
LOWapp/docker/views/volumes/edit/volumeController.js38 function getVolumeDataFromContainer(container, volumeId) {
LOWapp/docker/views/services/edit/serviceController.js273 $scope.removePlacementConstraint = function removePlacementConstraint(service, index) {
LOWapp/docker/views/services/edit/serviceController.js306 $scope.removePortPublishedBinding = function removePortPublishedBinding(service, index) {
LOW…ocker/views/services/create/createServiceController.js323 function createMountObjectFromVolume(volumeObject, target, readonly) {
LOW…ocker/views/services/create/createServiceController.js434 function prepareResourcesCpuConfig(config, input) {
LOW…ocker/views/services/create/createServiceController.js445 function prepareResourcesMemoryConfig(config, input) {
LOW…ocker/views/services/create/createServiceController.js575 function initSlidersMaxValuesBasedOnNodeData(nodes) {
LOWapp/docker/helpers/imageHelper.js20 function createImageConfigForContainer(imageModel) {
LOWapp/docker/helpers/imageHelper.js30 function removeDigestFromRepository(repository) {
LOWapp/docker/helpers/serviceHelper.js11 function associateTasksToServiceAJS(service, tasks) {
LOWapp/docker/helpers/taskHelper.js11 function associateContainerToTaskAJS(task, containers) {
LOWapp/docker/services/networkService.js52 async function connectContainerAngularJS(environmentId, networkId, containerId) {
LOWapp/docker/services/volumeService.js62 function createVolumeConfiguration(name, driver, driverOptions) {
LOWapp/docker/services/buildService.js29 async function buildImageFromUploadAngularJS(environmentId, names, file, path) {
LOWapp/docker/services/buildService.js40 async function buildImageFromURLAngularJS(environmentId, names, url, path) {
LOWapp/docker/services/buildService.js50 async function buildImageFromDockerfileContentAngularJS(environmentId, names, content) {
LOWapp/docker/services/buildService.js61 async function buildImageFromDockerfileContentAndFilesAngularJS(environmentId, names, content, files) {
LOWapp/docker/services/containerService.js80 async function updateRestartPolicyAngularJS(environmentId, id, restartPolicy, maximumRetryCounts) {
LOWapp/portainer/__module.js492function isTransitionRequiresAuthentication(transition) {
LOW…er/settings/authentication/ldap/ldap-settings.model.js50export function buildOpenLDAPSettingsModel() {
LOW…gs/authentication/ldap/ldap-settings-security/index.js42 function updateReactValuesFromSettings(settings) {
LOWapp/portainer/models/registry.js21export function RegistryManagementConfigurationDefaultModel(registry) {
LOWapp/portainer/models/registryRepository.js3export function RegistryRepositoryViewModel(item) {
LOWapp/portainer/models/registryRepository.js13export function RegistryRepositoryGitlabViewModel(data) {
LOWapp/portainer/models/group.js1export function EndpointGroupDefaultModel() {
LOWapp/portainer/models/group.js19export function EndpointGroupCreateRequest(model, endpoints) {
LOWapp/portainer/models/group.js26export function EndpointGroupUpdateRequest(model, endpoints) {
LOWapp/portainer/models/settings.js37export function InternalAuthSettingsViewModel(data) {
LOW…models/resourceControl/resourceControlCreatePayload.js7export function ResourceControlCreatePayload(resourceId, resourceType, data) {
LOW…/resourceControl/resourceControlOwnershipParameters.js9export function ResourceControlOwnershipParameters(adminOnly = false, publicOnly = false, users = [], teams = [], subRes
LOW…ts/accessControlForm/porAccessControlFormController.js43 function setAuthorizedUsersAndTeams(authorizedUsers, authorizedTeams) {
LOWapp/portainer/users/queries.ts25export function useIsCurrentUserTeamLeader() {
LOWapp/portainer/users/user.helpers.ts6export function filterNonAdministratorUsers(users: User[]) {
LOW…settings/edge-compute/settingsEdgeComputeController.js7export default function SettingsEdgeComputeController($q, $async, $state, Notifications, SettingsService, StateManager)
LOW…ngs/authentication/settingsAuthenticationController.js11function SettingsAuthenticationController($q, $scope, $state, Notifications, SettingsService, FileUploadService, TeamSer
LOW…ngs/authentication/settingsAuthenticationController.js60 $scope.authenticationMethodSelected = function authenticationMethodSelected(value) {
LOW…ngs/authentication/settingsAuthenticationController.js195 function isOAuthTeamMembershipFormValid() {
LOWapp/portainer/views/account/accountController.js104function confirmForceChangePassword() {
LOWapp/portainer/helpers/json.ts44export function jsonObjectsToArrayHandler(data: string): unknown[] {
LOWapp/portainer/helpers/stackHelper.js18 function getExternalStacksFromLabel(items, label, type) {
LOWapp/portainer/services/chartService.js265 function percentageBasedTooltipLabel(label, value) {
LOW…p/portainer/services/dockerMaxApiVersionInterceptor.ts22export async function dockerMaxAPIVersionInterceptor(
LOWapp/portainer/services/http-request.helper.ts9export function dispatchCacheRefreshEvent() {
LOWapp/portainer/services/http-request.helper.ts15export function dispatchCacheRefreshEventIfNeeded(req: AxiosRequestConfig) {
LOWapp/portainer/services/http-request.helper.ts42export function registryAuthenticationHeader() {
462 more matches not shown…
Over-Commented Block203 hits · 203 pts
SeverityFileLineSnippet
LOWCONTRIBUTING.md121
LOWapp/docker/models/network.ts1import { IPAM, Network, NetworkContainer } from 'docker-types';
LOWapp/portainer/services/fileUpload.js1import { PortainerEndpointCreationTypes } from '@/portainer/models/endpoint/models';
LOWapp/kubernetes/converters/application.js141 res.Volumes = data.spec.template.spec.volumes ? data.spec.template.spec.volumes : [];
LOWapp/kubernetes/models/history/models.js1export const KubernetesSystem_DefaultDeploymentUniqueLabelKey = 'pod-template-hash';
LOWapp/kubernetes/horizontal-pod-auto-scaler/payload.js41// kind: '',
LOWapp/kubernetes/horizontal-pod-auto-scaler/payload.js61// }
LOWapp/kubernetes/horizontal-pod-auto-scaler/payload.js81
LOWapp/kubernetes/helpers/application/index.js501 * @param {KubernetesApplication[]} applications Application list
LOWapp/react/hooks/useDebounce.ts1import { debounce } from 'lodash';
LOWapp/react/hooks/useDebounce.ts21// // This will always print the first value of the "value" prop + the updated value of "v"
LOWapi/portainer.go341 CreatedBy string `example:"admin"`
LOWapi/portainer.go1181 Type StackType `json:"Type" example:"2"`
LOWapi/portainer.go1201 // Path on disk to the repository hosting the Stack file
LOWapi/portainer.go1361 // A note that will be displayed in the UI. Supports HTML content
LOWapi/portainer.go2001 // PortainerAgentSignatureHeader represent the name of the header containing the digital signature
LOWapi/database/boltdb/db.go81
LOWapi/filesystem/filesystem.go41 // PrivateKeyFile represents the name on disk of the file containing the private key.
LOWapi/edge/edge.go21 DirEntries []filesystem.DirEntry
LOWapi/edge/edge.go41 // Used only for EE
LOWapi/edge/edge.go81 // Used for adding labels to Kubernetes manifests
LOWapi/http/handler/handler.go81// @title PortainerCE API
LOWapi/http/handler/handler.go101// @in header
LOWapi/http/handler/handler.go121// @tag.x-displayName Edge agent
LOWapi/http/handler/handler.go141// @tag.description Operate git repository
LOWapi/http/handler/handler.go161// @tag.name roles
LOWapi/http/handler/handler.go181// @tag.x-displayName Tags
LOWapi/http/handler/settings/settings_update.go101 return nil
LOWapi/http/handler/settings/settings_inspect.go1package settings
LOWapi/http/handler/websocket/pod.go21
LOWapi/http/handler/websocket/attach.go21// @description If the nodeName query parameter is not specified, the request will be upgraded to the websocket protocol
LOWapi/http/handler/websocket/exec.go21}
LOWapi/http/handler/ssl/ssl_update.go21 return errors.New("both certificate and key files should be provided")
LOWapi/http/handler/ssl/ssl_inspect.go1package ssl
LOW…/http/handler/customtemplates/customtemplate_update.go41 // Use authentication to clone the Git repository
LOW…/http/handler/customtemplates/customtemplate_update.go101 }
LOW…/http/handler/customtemplates/customtemplate_create.go81
LOW…/http/handler/customtemplates/customtemplate_create.go141// @summary Create a custom template
LOW…/http/handler/customtemplates/customtemplate_create.go181 return customTemplate, nil
LOW…/http/handler/customtemplates/customtemplate_create.go441// @security ApiKeyAuth
LOWapi/http/handler/customtemplates/customtemplate_list.go21// @description List available custom templates.
LOW…tp/handler/customtemplates/customtemplate_git_fetch.go21// @description **Access policy**: authenticated
LOWapi/http/handler/customtemplates/customtemplate_file.go21
LOW…http/handler/customtemplates/customtemplate_inspect.go21// @description **Access policy**: authenticated
LOWapi/http/handler/docker/images/images_list.go21 Created int64 `json:"created"`
LOW…tp/handler/docker/containers/container_gpus_inspect.go21// @id dockerContainerGpusInspect
LOWapi/http/handler/edgegroups/edgegroup_list.go21 shadowedEdgeGroup
LOWapi/http/handler/edgegroups/edgegroup_create.go61
LOWapi/http/handler/stacks/stack_inspect.go21// @tags stacks
LOWapi/http/handler/stacks/stack_update_git.go41
LOWapi/http/handler/stacks/stack_start.go21)
LOWapi/http/handler/stacks/create_compose_stack.go121}
LOWapi/http/handler/stacks/create_compose_stack.go341 payload.Env = env
LOWapi/http/handler/stacks/stack_file.go21}
LOWapi/http/handler/stacks/stack_migrate.go41// @security jwt
LOWapi/http/handler/stacks/stack_stop.go21// @summary Stops a stopped Stack
LOWapi/http/handler/stacks/create_kubernetes_stack.go121 Output string `json:"Output"`
LOWapi/http/handler/stacks/create_kubernetes_stack.go181
LOWapi/http/handler/stacks/stack_associate.go21// @security ApiKeyAuth
LOWapi/http/handler/stacks/stack_list.go21// @id StackList
143 more matches not shown…
Hallucination Indicators1 hit · 10 pts
SeverityFileLineSnippet
CRITICAL…ngs/authentication/settingsAuthenticationController.js201 const hasInvalidMapping = $scope.settings.OAuthSettings.TeamMemberships.OAuthClaimMappings.some((m) => !(m.ClaimVa
Fake / Example Data8 hits · 8 pts
SeverityFileLineSnippet
LOW…essManagement/AccessDatatable/AccessDatatable.test.tsx65 const mockAccess = createMockAccess({ Name: 'John Doe' });
LOW…essManagement/AccessDatatable/AccessDatatable.test.tsx71 expect(screen.getByText('John Doe')).toBeVisible();
LOW…ts/form-components/FormSection/FormSection.stories.tsx21 Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam egestas turpis magna,
LOW…ts/form-components/FormSection/FormSection.stories.tsx21 Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam egestas turpis magna,
LOWapp/react/components/datatables/TableHeaderRow.test.tsx341 { id: '1', name: 'John Doe', age: 30, status: 'active' },
LOWapp/react/components/datatables/Datatable.test.tsx21 { id: '1', name: 'John Doe', age: 30 },
LOWapp/react/components/datatables/Datatable.test.tsx69 expect(screen.getByText('John Doe')).toBeInTheDocument();
LOWapi/git/git_test.go239 sig := object.Signature{Name: "Test", Email: "test@test.com", When: time.Now()}
AI Slop Vocabulary2 hits · 6 pts
SeverityFileLineSnippet
MEDIUMapi/internal/registryutils/access/access.go41 // validate access for kubernetes namespaces (leverage registry.RegistryAccesses[endpointId].Namespaces)
MEDIUMapi/internal/registryutils/access/access.go70 // leverage registry.RegistryAccesses[endpointId].UserAccessPolicies (direct access)
Verbosity Indicators2 hits · 3 pts
SeverityFileLineSnippet
LOWapp/kubernetes/helpers/application/index.js506 // to identify the helm managed applications, we need to check if the applications pod labels include
LOWapi/pendingactions/pendingactions.go83 // For Kubernetes endpoints, we need to check if the endpoint is up by
Overly Generic Function Names2 hits · 2 pts
SeverityFileLineSnippet
LOW…react/components/SortableList/SortableList.stories.tsx132function getData(): Produce[] {
LOW.storybook/public/mockServiceWorker.js121async function handleRequest(event, requestId, requestInterceptedAt) {