{"description": "Ensure that all interactive user initialization files executable search\npath statements do not contain statements that will reference a working\ndirectory other than the users home directory.", "rationale": "The executable search path (typically the PATH environment variable) contains a\nlist of directories for the shell to search to find executables. If this path\nincludes the current working directory (other than the users home directory),\nexecutables in these directories may be executed instead of system commands.\nThis variable is formatted as a colon-separated list of directories. If there is\nan empty entry, such as a leading or trailing colon or two consecutive colons,\nthis is interpreted as the current working directory. If deviations from the\ndefault system search path for the local interactive user are required, they\nmust be documented with the Information System Security Officer (ISSO).", "severity": "medium", "references": {"srg": ["SRG-OS-000480-GPOS-00227"]}, "control_references": {}, "components": [], "identifiers": {}, "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:\n\n<pre>$ sudo grep -i path= /home/*/.*\n\n/home/[localinteractiveuser]/.bash_profile:PATH=$PATH:$HOME/.local/bin:$HOME/bin</pre>", "oval_external_content": null, "fixtext": "Edit the local interactive user initialization files to change any PATH variable statements that reference directories other than their home directory.\n\nIf a local interactive user requires path variables to reference a directory owned by the application, it must be documented with the ISSO.", "checktext": "", "vuldiscussion": "", "srg_requirement": "Executable search paths within the initialization files of all local interactive Ubuntu 22.04 users must only contain paths that resolve to the system default or the users home directory.", "warnings": [], "conflicts": [], "requires": [], "policy_specific_content": {"stig": {"srg_requirement": "Executable search paths within the initialization files of all local interactive Ubuntu 22.04 users must only contain paths that resolve to the system default or the users home directory.", "vuldiscussion": "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.\n\nThis 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).", "checktext": "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:\n\n$ sudo find /home -maxdepth 2 -type f -name \".[^.]*\" -exec grep -iH path= {} \\;\n\nPATH=\"$HOME/.local/bin:$HOME/bin:$PATH\"\n\nIf any local interactive user initialization files have executable search path statements that include directories outside of their home directory, and this is not documented with the ISSO as an operational requirement, this is a finding.", "fixtext": "Edit the local interactive user initialization files to change any PATH variable statements that reference directories other than their home directory.\n\nIf a local interactive user requires path variables to reference a directory owned by the application, it must be documented with the ISSO."}}, "platform": "system_with_kernel", "platforms": ["system_with_kernel"], "sce_metadata": {}, "inherited_platforms": [], "cpe_platform_names": ["system_with_kernel"], "inherited_cpe_platform_names": [], "bash_conditional": null, "fixes": {}, "title": "Ensure that Users Path Contains Only Local Directories", "definition_location": "/aptdata/openscap/scap-security-guide/linux_os/guide/system/accounts/accounts-session/accounts_user_home_paths_only/rule.yml", "template": null}