For AI agents: A markdown version of this page is available at https://docs.datadoghq.com/security/default_rules/def-000-g42.md. A documentation index is available at /llms.txt.

Ensure that All Entries in The Path of Root Are Directories

Description

For each element in root’s path, run:

# ls -ld DIR
         

and ensure that the entry is a directory.

Rationale

Locations in root’s path that are not directories could cause unexpected behavior, such as executing scripts from unintended locations. Ensuring that all locations in root’s path are directories helps maintain a secure environment for root.