Understand the Apache Maven security model
masterApache Maven is a build-automation and dependency-management tool for JVM projects. Its security model is fundamentally a supply-chain and arbitrary-code-execution model.
Key Security Principles:
- No Sandboxing: By design, Maven does not sandbox the code it builds or the plugins it runs. Plugins and extensions are executed as arbitrary code in the build JVM.
- Trust Assumption: The Maven security model assumes you trust the
pom.xml, the code, the dependencies, and the repositories configured in your build. - Operator Responsibility: If you need to build untrusted code, you must provide your own isolation (e.g., containers, VMs) outside of Maven.