Information
You should not use docker exec with the --privileged option.
Rationale:
Using the --privileged option in docker exec commands gives extended Linux capabilities to the command. This could potentially be an insecure practice, particularly when you are running containers with reduced capabilities or with enhanced restrictions.
Impact:
If you need enhanced capabilities within a container, then run it with all the permissions it requires. These should be specified individually.
Solution
You should not use the --privileged option in docker exec commands.
Default Value:
By default, the docker exec command runs without the --privileged option.