Exclude the heapdump Actuator endpoint from wildcard web exposure
MSALWhen management.endpoints.web.exposure.include contains *, add management.endpoints.web.exposure.exclude=heapdump so that heap dumps, which can contain secrets held in memory, are not exposed over HTTP. All other endpoints stay exposed. As a profile-specific value replaces the base one, no change is made in a project where any Spring configuration file already sets management.endpoints.web.exposure.exclude or includes heapdump explicitly. Multi-document YAML files, environment variables and command-line arguments are not considered.
org. openrewrite. java. spring. boot2. ExcludeHeapdumpFromWildcardActuatorExposuremod run . --recipe= org. openrewrite. java. spring. boot2. ExcludeHeapdumpFromWildcardActuatorExposureInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.