documentation_complete: true


title: 'Ensure that Users Path Contains Only Local Directories'

description: |-
    Ensure that all interactive user initialization files executable search
    path statements do not contain statements that will reference a working
    directory other than the users home directory.

rationale: |-
    The executable search path (typically the PATH environment variable) contains a
    list of directories for the shell to search to find executables. If this path
    includes the current working directory (other than the users home directory),
    executables in these directories may be executed instead of system commands.
    This variable is formatted as a colon-separated list of directories. If there is
    an empty entry, such as a leading or trailing colon or two consecutive colons,
    this is interpreted as the current working directory. If deviations from the
    default system search path for the local interactive user are required, they
    must be documented with the Information System Security Officer (ISSO).

severity: medium

identifiers:
    cce@rhel8: CCE-84040-5
    cce@rhel9: CCE-87487-5
    cce@rhel10: CCE-88926-1
    cce@sle12: CCE-83098-4
    cce@sle15: CCE-85631-0
    cce@slmicro5: CCE-93789-6
    cce@slmicro6: CCE-95060-0 

references:
    srg: SRG-OS-000480-GPOS-00227
    stigid@ol7: OL07-00-020720
    stigid@ol8: OL08-00-010690
    stigid@sle12: SLES-12-010770
    stigid@sle15: SLES-15-040120

ocil_clause: 'any local interactive user initialization files have executable search path statements that include directories outside of their home directory and is not documented with the ISSO as an operational requirement'

ocil: |-
    Verify that all local interactive user initialization file executable search path statements do not contain statements that will reference a working directory other than user home directories with the following commands:

    <pre>$ sudo grep -i path= /home/*/.*

    /home/[localinteractiveuser]/.bash_profile:PATH=$PATH:$HOME/.local/bin:$HOME/bin</pre>

fixtext: |-
    Edit the local interactive user initialization files to change any PATH variable statements that reference directories other than their home directory.

    If a local interactive user requires path variables to reference a directory owned by the application, it must be documented with the ISSO.

srg_requirement: 'Executable search paths within the initialization files of all local interactive {{{ full_name }}} users must only contain paths that resolve to the system default or the users home directory.'

platform: system_with_kernel
