{
    "api_version": "1",
    "kind": "dse_post",
    "self": "https://update.dsesecurity.com/api/v1/posts/resolve-kubectl-plugin-shadowing-before-invoking-an-extension/",
    "item": {
        "id": "https://update.dsesecurity.com/updates/resolve-kubectl-plugin-shadowing-before-invoking-an-extension/",
        "slug": "resolve-kubectl-plugin-shadowing-before-invoking-an-extension",
        "url": "https://update.dsesecurity.com/updates/resolve-kubectl-plugin-shadowing-before-invoking-an-extension/",
        "alternate_urls": {
            "markdown": "https://update.dsesecurity.com/updates/resolve-kubectl-plugin-shadowing-before-invoking-an-extension.md",
            "json": "https://update.dsesecurity.com/api/v1/posts/resolve-kubectl-plugin-shadowing-before-invoking-an-extension/"
        },
        "title": "Resolve kubectl plugin shadowing before invoking an extension",
        "summary": "Duplicate PATH entries and longer matching plugin names affect which executable kubectl selects. Review discovery warnings and the intended command path before running the extension.",
        "format": {
            "slug": "guide",
            "name": "Guide"
        },
        "priority": {
            "slug": "advisory",
            "name": "Advisory"
        },
        "featured": false,
        "image": {
            "theme": "cyber-defense",
            "label": "Cyber defense",
            "alt": "Layered glass and metal cyber-defense structure with controlled blue and gold signal paths.",
            "card_url": "https://update.dsesecurity.com/assets/editorial/cyber-defense-card.webp?v=1.8.20",
            "hero_url": "https://update.dsesecurity.com/assets/editorial/cyber-defense-hero.webp?v=1.8.20",
            "social_url": "https://update.dsesecurity.com/assets/editorial/cyber-defense-social-v2.jpg?v=1.8.20",
            "width": 2400,
            "height": 1350
        },
        "topics": [
            {
                "slug": "cybersecurity",
                "name": "Cybersecurity",
                "url": "https://update.dsesecurity.com/topic/cybersecurity/"
            },
            {
                "slug": "it",
                "name": "IT",
                "url": "https://update.dsesecurity.com/topic/it/"
            }
        ],
        "author": {
            "name": "DSE Security Editorial Team",
            "url": "https://update.dsesecurity.com/#editorial-team",
            "type": "Organization"
        },
        "publisher": {
            "name": "Detection Systems & Engineering",
            "url": "https://dsesecurity.com/"
        },
        "published_at": "2026-10-29T17:40:57+00:00",
        "modified_at": "2026-10-29T17:41:39+00:00",
        "reviewed_on": "2026-10-29",
        "reading_minutes": 3,
        "word_count": 517,
        "potentially_affected": "Review scope: the documented kubectl executable-plugin discovery and naming rules; plugin trust, installation and behavior require their own approval.",
        "dse_recommendation": "Reconcile the intended extension with plugin-list warnings, executable locations and command naming before an authorized invocation.",
        "primary_source": {
            "name": "Kubernetes — Extend kubectl with plugins",
            "url": "https://kubernetes.io/docs/tasks/extend-kubectl/kubectl-plugins/",
            "published_on": null,
            "authority": "kubernetes.io"
        },
        "publishing_principles": "https://update.dsesecurity.com/updates/dse-updates-editorial-methodology/",
        "usage_info": "https://update.dsesecurity.com/usage/",
        "copyright_notice": "Copyright © 2026 Detection Systems & Engineering. All rights reserved.",
        "content_html": "<p><strong>Bottom line:</strong> Identify the executable that should handle an extension command before relying on its output. Treat an unexpected plugin result as a command-discovery investigation first, with the intended executable and invocation written down together.</p>\n<h2>Source fact: documented behavior</h2>\n<p>The <a href=\"https://kubernetes.io/docs/tasks/extend-kubectl/kubectl-plugins/\" target=\"_blank\" rel=\"noopener noreferrer\">Extend kubectl with plugins</a> documentation is the primary reference.</p>\n<p>The documented <code>kubectl plugin list</code> command searches <code>PATH</code> and warns about nonexecutable files and overlapping plugin names. For duplicate plugin filenames, the executable found first in <code>PATH</code> is selected; for matching nested command names, the longest matching executable filename is preferred. Plugins cannot overwrite existing kubectl commands; the guide documents an exception allowing custom commands under <code>create</code>.</p>\n<h2>What the source does not establish</h2>\n<p>This article concerns executable selection, not acceptance of a third-party program or the correctness of its cluster operations. Resolve the extension&#8217;s provenance and permitted actions separately. A recognizable filename, discovery listing or absence of a warning is not the approval record for running it.</p>\n<h2>Applicability questions</h2>\n<ul>\n<li>Which exact executable is approved for this command?</li>\n<li>Are duplicate filenames present in different PATH locations?</li>\n<li>Does a longer matching plugin command exist?</li>\n<li>Does the chosen name collide with an existing built-in command?</li>\n</ul>\n<h2>DSE recommendation: make the executable choice reviewable</h2>\n<p>DSE recommends recording the approved extension location, file identity and intended invocation in the operating procedure. Obtain those details from the managed installation rather than from a name alone. Keep the discovery environment attributable to the same user or automation identity that will perform the work.</p>\n<p>Review plugin-list warnings before the operational invocation. For a duplicate filename, compare the competing locations and decide which installation should remain authoritative. Use the managed installation process to correct an unintended duplicate or path order. Avoid deleting a file merely because its name appears in a warning without first identifying its owner.</p>\n<p>Review nested command names as a small command tree. Write which executable should handle the intended command and which trailing words are meant to be arguments. Include longer installed names in that review. Do not troubleshoot application behavior against one binary while an operator is invoking another.</p>\n<p>Keep any path-order change bounded to its approved environment. Compare the interactive shell and scheduled task separately when both are used. Preserve the original discovery record and planned correction, then repeat discovery before the authorized extension run. Escalate a surprising built-in collision to the extension owner instead of trying progressively different operational commands.</p>\n<h2>Verification and evidence</h2>\n<p>Proposed verification, not performed: create an isolated test directory containing harmless approved fixture executables that print their own fixture identity. Exercise two duplicate filenames in separate test path locations, then two nested command names. Keep real cluster credentials outside the exercise.</p>\n<p>Predict the selected fixture for each path order and command before invoking it. Compare the result with discovery warnings and the documented selection rules. Test a built-in-name collision through discovery rather than substituting an unreviewed operational extension. Retain fixture identities, path order, invocation and actual result; use that evidence to review the real installation separately.</p>\n<h2>Official references</h2>\n<ul>\n<li><a href=\"https://kubernetes.io/docs/tasks/extend-kubectl/kubectl-plugins/\" target=\"_blank\" rel=\"noopener noreferrer\">Extend kubectl with plugins</a> — Kubernetes.</li>\n</ul>\n<p>Source review completed October 29, 2026. Recheck the official documentation and deployment-specific applicability before a production change.</p>\n",
        "content_text": "Bottom line: Identify the executable that should handle an extension command before relying on its output. Treat an unexpected plugin result as a command-discovery investigation first, with the intended executable and invocation written down together.\nSource fact: documented behavior\nThe Extend kubectl with plugins documentation is the primary reference.\nThe documented kubectl plugin list command searches PATH and warns about nonexecutable files and overlapping plugin names. For duplicate plugin filenames, the executable found first in PATH is selected; for matching nested command names, the longest matching executable filename is preferred. Plugins cannot overwrite existing kubectl commands; the guide documents an exception allowing custom commands under create.\nWhat the source does not establish\nThis article concerns executable selection, not acceptance of a third-party program or the correctness of its cluster operations. Resolve the extension’s provenance and permitted actions separately. A recognizable filename, discovery listing or absence of a warning is not the approval record for running it.\nApplicability questions\n\nWhich exact executable is approved for this command?\nAre duplicate filenames present in different PATH locations?\nDoes a longer matching plugin command exist?\nDoes the chosen name collide with an existing built-in command?\n\nDSE recommendation: make the executable choice reviewable\nDSE recommends recording the approved extension location, file identity and intended invocation in the operating procedure. Obtain those details from the managed installation rather than from a name alone. Keep the discovery environment attributable to the same user or automation identity that will perform the work.\nReview plugin-list warnings before the operational invocation. For a duplicate filename, compare the competing locations and decide which installation should remain authoritative. Use the managed installation process to correct an unintended duplicate or path order. Avoid deleting a file merely because its name appears in a warning without first identifying its owner.\nReview nested command names as a small command tree. Write which executable should handle the intended command and which trailing words are meant to be arguments. Include longer installed names in that review. Do not troubleshoot application behavior against one binary while an operator is invoking another.\nKeep any path-order change bounded to its approved environment. Compare the interactive shell and scheduled task separately when both are used. Preserve the original discovery record and planned correction, then repeat discovery before the authorized extension run. Escalate a surprising built-in collision to the extension owner instead of trying progressively different operational commands.\nVerification and evidence\nProposed verification, not performed: create an isolated test directory containing harmless approved fixture executables that print their own fixture identity. Exercise two duplicate filenames in separate test path locations, then two nested command names. Keep real cluster credentials outside the exercise.\nPredict the selected fixture for each path order and command before invoking it. Compare the result with discovery warnings and the documented selection rules. Test a built-in-name collision through discovery rather than substituting an unreviewed operational extension. Retain fixture identities, path order, invocation and actual result; use that evidence to review the real installation separately.\nOfficial references\n\nExtend kubectl with plugins — Kubernetes.\n\nSource review completed October 29, 2026. Recheck the official documentation and deployment-specific applicability before a production change.",
        "content_markdown": "Bottom line: Identify the executable that should handle an extension command before relying on its output. Treat an unexpected plugin result as a command-discovery investigation first, with the intended executable and invocation written down together.\n\n## Source fact: documented behavior\n\nThe [Extend kubectl with plugins](https://kubernetes.io/docs/tasks/extend-kubectl/kubectl-plugins/) documentation is the primary reference.\n\nThe documented kubectl plugin list command searches PATH and warns about nonexecutable files and overlapping plugin names. For duplicate plugin filenames, the executable found first in PATH is selected; for matching nested command names, the longest matching executable filename is preferred. Plugins cannot overwrite existing kubectl commands; the guide documents an exception allowing custom commands under create.\n\n## What the source does not establish\n\nThis article concerns executable selection, not acceptance of a third-party program or the correctness of its cluster operations. Resolve the extension’s provenance and permitted actions separately. A recognizable filename, discovery listing or absence of a warning is not the approval record for running it.\n\n## Applicability questions\n\n- Which exact executable is approved for this command?\n\n- Are duplicate filenames present in different PATH locations?\n\n- Does a longer matching plugin command exist?\n\n- Does the chosen name collide with an existing built-in command?\n\n## DSE recommendation: make the executable choice reviewable\n\nDSE recommends recording the approved extension location, file identity and intended invocation in the operating procedure. Obtain those details from the managed installation rather than from a name alone. Keep the discovery environment attributable to the same user or automation identity that will perform the work.\n\nReview plugin-list warnings before the operational invocation. For a duplicate filename, compare the competing locations and decide which installation should remain authoritative. Use the managed installation process to correct an unintended duplicate or path order. Avoid deleting a file merely because its name appears in a warning without first identifying its owner.\n\nReview nested command names as a small command tree. Write which executable should handle the intended command and which trailing words are meant to be arguments. Include longer installed names in that review. Do not troubleshoot application behavior against one binary while an operator is invoking another.\n\nKeep any path-order change bounded to its approved environment. Compare the interactive shell and scheduled task separately when both are used. Preserve the original discovery record and planned correction, then repeat discovery before the authorized extension run. Escalate a surprising built-in collision to the extension owner instead of trying progressively different operational commands.\n\n## Verification and evidence\n\nProposed verification, not performed: create an isolated test directory containing harmless approved fixture executables that print their own fixture identity. Exercise two duplicate filenames in separate test path locations, then two nested command names. Keep real cluster credentials outside the exercise.\n\nPredict the selected fixture for each path order and command before invoking it. Compare the result with discovery warnings and the documented selection rules. Test a built-in-name collision through discovery rather than substituting an unreviewed operational extension. Retain fixture identities, path order, invocation and actual result; use that evidence to review the real installation separately.\n\n## Official references\n\n- [Extend kubectl with plugins](https://kubernetes.io/docs/tasks/extend-kubectl/kubectl-plugins/) — Kubernetes.\n\nSource review completed October 29, 2026. Recheck the official documentation and deployment-specific applicability before a production change."
    },
    "json_ld": {
        "@context": "https://schema.org",
        "@graph": [
            {
                "@type": "Organization",
                "@id": "https://dsesecurity.com/#organization",
                "name": "Detection Systems & Engineering",
                "alternateName": "DSE Security",
                "url": "https://dsesecurity.com/",
                "logo": {
                    "@type": "ImageObject",
                    "url": "https://update.dsesecurity.com/assets/dse-logo-20260812.png?v=1.8.20"
                }
            },
            {
                "@type": "Organization",
                "@id": "https://update.dsesecurity.com/#editorial-team",
                "name": "DSE Security Editorial Team",
                "url": "https://update.dsesecurity.com/",
                "parentOrganization": {
                    "@id": "https://dsesecurity.com/#organization"
                }
            },
            {
                "@type": "WebSite",
                "@id": "https://update.dsesecurity.com/#website",
                "name": "DSE Updates",
                "alternateName": "DSE Security Knowledge Hub",
                "url": "https://update.dsesecurity.com/",
                "inLanguage": "en-US",
                "publisher": {
                    "@id": "https://dsesecurity.com/#organization"
                },
                "potentialAction": {
                    "@type": "SearchAction",
                    "target": {
                        "@type": "EntryPoint",
                        "urlTemplate": "https://update.dsesecurity.com/?q={search_term_string}"
                    },
                    "query-input": "required name=search_term_string"
                }
            },
            {
                "@type": "WebPage",
                "@id": "https://update.dsesecurity.com/updates/resolve-kubectl-plugin-shadowing-before-invoking-an-extension/",
                "url": "https://update.dsesecurity.com/updates/resolve-kubectl-plugin-shadowing-before-invoking-an-extension/",
                "isPartOf": {
                    "@id": "https://update.dsesecurity.com/#website"
                },
                "lastReviewed": "2026-10-29"
            },
            {
                "@type": "BreadcrumbList",
                "@id": "https://update.dsesecurity.com/updates/resolve-kubectl-plugin-shadowing-before-invoking-an-extension/#breadcrumbs",
                "itemListElement": [
                    {
                        "@type": "ListItem",
                        "position": 1,
                        "name": "DSE Updates",
                        "item": "https://update.dsesecurity.com/"
                    },
                    {
                        "@type": "ListItem",
                        "position": 2,
                        "name": "Cybersecurity",
                        "item": "https://update.dsesecurity.com/topic/cybersecurity/"
                    },
                    {
                        "@type": "ListItem",
                        "position": 3,
                        "name": "Resolve kubectl plugin shadowing before invoking an extension",
                        "item": "https://update.dsesecurity.com/updates/resolve-kubectl-plugin-shadowing-before-invoking-an-extension/"
                    }
                ]
            },
            {
                "@type": [
                    "Article",
                    "TechArticle"
                ],
                "@id": "https://update.dsesecurity.com/updates/resolve-kubectl-plugin-shadowing-before-invoking-an-extension/#article",
                "identifier": "https://update.dsesecurity.com/updates/resolve-kubectl-plugin-shadowing-before-invoking-an-extension/",
                "url": "https://update.dsesecurity.com/updates/resolve-kubectl-plugin-shadowing-before-invoking-an-extension/",
                "headline": "Resolve kubectl plugin shadowing before invoking an extension",
                "description": "Duplicate PATH entries and longer matching plugin names affect which executable kubectl selects.",
                "abstract": "Duplicate PATH entries and longer matching plugin names affect which executable kubectl selects. Review discovery warnings and the intended command path before running the extension.",
                "articleBody": "Bottom line: Identify the executable that should handle an extension command before relying on its output. Treat an unexpected plugin result as a command-discovery investigation first, with the intended executable and invocation written down together.\nSource fact: documented behavior\nThe Extend kubectl with plugins documentation is the primary reference.\nThe documented kubectl plugin list command searches PATH and warns about nonexecutable files and overlapping plugin names. For duplicate plugin filenames, the executable found first in PATH is selected; for matching nested command names, the longest matching executable filename is preferred. Plugins cannot overwrite existing kubectl commands; the guide documents an exception allowing custom commands under create.\nWhat the source does not establish\nThis article concerns executable selection, not acceptance of a third-party program or the correctness of its cluster operations. Resolve the extension’s provenance and permitted actions separately. A recognizable filename, discovery listing or absence of a warning is not the approval record for running it.\nApplicability questions\n\nWhich exact executable is approved for this command?\nAre duplicate filenames present in different PATH locations?\nDoes a longer matching plugin command exist?\nDoes the chosen name collide with an existing built-in command?\n\nDSE recommendation: make the executable choice reviewable\nDSE recommends recording the approved extension location, file identity and intended invocation in the operating procedure. Obtain those details from the managed installation rather than from a name alone. Keep the discovery environment attributable to the same user or automation identity that will perform the work.\nReview plugin-list warnings before the operational invocation. For a duplicate filename, compare the competing locations and decide which installation should remain authoritative. Use the managed installation process to correct an unintended duplicate or path order. Avoid deleting a file merely because its name appears in a warning without first identifying its owner.\nReview nested command names as a small command tree. Write which executable should handle the intended command and which trailing words are meant to be arguments. Include longer installed names in that review. Do not troubleshoot application behavior against one binary while an operator is invoking another.\nKeep any path-order change bounded to its approved environment. Compare the interactive shell and scheduled task separately when both are used. Preserve the original discovery record and planned correction, then repeat discovery before the authorized extension run. Escalate a surprising built-in collision to the extension owner instead of trying progressively different operational commands.\nVerification and evidence\nProposed verification, not performed: create an isolated test directory containing harmless approved fixture executables that print their own fixture identity. Exercise two duplicate filenames in separate test path locations, then two nested command names. Keep real cluster credentials outside the exercise.\nPredict the selected fixture for each path order and command before invoking it. Compare the result with discovery warnings and the documented selection rules. Test a built-in-name collision through discovery rather than substituting an unreviewed operational extension. Retain fixture identities, path order, invocation and actual result; use that evidence to review the real installation separately.\nOfficial references\n\nExtend kubectl with plugins — Kubernetes.\n\nSource review completed October 29, 2026. Recheck the official documentation and deployment-specific applicability before a production change.",
                "datePublished": "2026-10-29T17:40:57+00:00",
                "dateModified": "2026-10-29T17:41:39+00:00",
                "mainEntityOfPage": {
                    "@id": "https://update.dsesecurity.com/updates/resolve-kubectl-plugin-shadowing-before-invoking-an-extension/"
                },
                "inLanguage": "en-US",
                "isAccessibleForFree": true,
                "author": {
                    "@type": "Organization",
                    "name": "DSE Security Editorial Team",
                    "url": "https://update.dsesecurity.com/#editorial-team"
                },
                "publisher": {
                    "@id": "https://dsesecurity.com/#organization"
                },
                "image": {
                    "@type": "ImageObject",
                    "@id": "https://update.dsesecurity.com/updates/resolve-kubectl-plugin-shadowing-before-invoking-an-extension/#primaryimage",
                    "url": "https://update.dsesecurity.com/assets/editorial/cyber-defense-social-v2.jpg?v=1.8.20",
                    "contentUrl": "https://update.dsesecurity.com/assets/editorial/cyber-defense-social-v2.jpg?v=1.8.20",
                    "width": 1200,
                    "height": 630,
                    "caption": "Resolve kubectl plugin shadowing before invoking an extension"
                },
                "articleSection": [
                    "Cybersecurity",
                    "IT"
                ],
                "keywords": [
                    "Cybersecurity",
                    "IT",
                    "Guide",
                    "Advisory priority"
                ],
                "genre": "Guide",
                "about": [
                    {
                        "@type": "Thing",
                        "name": "Cybersecurity",
                        "url": "https://update.dsesecurity.com/topic/cybersecurity/"
                    },
                    {
                        "@type": "Thing",
                        "name": "IT",
                        "url": "https://update.dsesecurity.com/topic/it/"
                    }
                ],
                "wordCount": 517,
                "timeRequired": "PT3M",
                "publishingPrinciples": "https://update.dsesecurity.com/updates/dse-updates-editorial-methodology/",
                "usageInfo": "https://update.dsesecurity.com/usage/",
                "copyrightHolder": {
                    "@id": "https://dsesecurity.com/#organization"
                },
                "copyrightNotice": "Copyright © 2026 Detection Systems & Engineering. All rights reserved.",
                "citation": {
                    "@type": "CreativeWork",
                    "name": "Kubernetes — Extend kubectl with plugins",
                    "url": "https://kubernetes.io/docs/tasks/extend-kubectl/kubectl-plugins/"
                }
            }
        ]
    }
}