# Inclusion of Functionality from Untrusted Control Sphere (CWE-829) The product imports, requires, or includes executable functionality from a source that is outside of the intended control sphere. **Stack:** Kubernetes - Prevalence: उच्च बार-बार शोषित - Impact: उच्च 3 उच्च गंभीरता वाले नियम - Prevention: प्रलेखित 4 फिक्स उदाहरण **OWASP:** Vulnerable and Outdated Components (A06:2021-Vulnerable and Outdated Components) - #6 ## Description When software includes functionality from untrusted sources (such as third-party scripts, external modules, or code from untrusted URLs), attackers can inject malicious code that will be executed with the same privileges as the application. ## Prevention 1 Shoulder डिटेक्शन नियमों पर आधारित Inclusion of Untrusted Functionality के लिए रोकथाम रणनीतियाँ। ### Kubernetes Pin container images to specific version tags or SHA digests for reproducible deployments ## Warning Signs - [MEDIUM] Container image uses 'latest' tag or no tag. - [MEDIUM] container images using 'latest' tag or no tag ## Consequences - अनधिकृत कोड निष्पादित करना - एप्लिकेशन डेटा पढ़ना - एप्लिकेशन डेटा संशोधित करना ## Mitigations - केवल विश्वसनीय, सत्यापित स्रोतों से कोड शामिल करें - बाहरी स्क्रिप्ट्स के लिए Subresource Integrity (SRI) का उपयोग करें - निष्पादन योग्य कोड के स्रोतों को सीमित करने के लिए Content Security Policy (CSP) लागू करें ## Detection - Total rules: 4 - Languages: go, javascript, typescript, yaml, python ## Rules by Language ### Yaml (1 rules) - **Container Using Latest Tag** [MEDIUM]: Detects container images using 'latest' tag or no tag. - Remediation: Use specific image tags for production. ```yaml containers: - name: app image: nginx:1.21.6-alpine ``` Learn more: https://shoulder.dev/learn/kubernetes/cwe-829/image-latest-tag