# 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: Alta Frecuentemente explotada - Impact: Alto 3 reglas de severidad alta - Prevention: Documentada 4 ejemplos de corrección **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 Estrategias de prevención para Inclusion of Untrusted Functionality basadas en 1 reglas de detección de Shoulder. ### 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 - Ejecutar código no autorizado - Leer datos de la aplicación - Modificar datos de la aplicación ## Mitigations - Incluye solo código de fuentes confiables y verificadas - Usa Subresource Integrity (SRI) para los scripts externos - Implementa Content Security Policy (CSP) para restringir las fuentes de código ejecutable ## 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