{"description": "The sudo <tt>env_reset</tt> tag, when specified, will run the command in a minimal environment,\ncontaining the TERM, PATH, HOME, MAIL, SHELL, LOGNAME, USER and SUDO_* variables.\nThis should be enabled by making sure that the <tt>env_reset</tt> tag exists in\n<tt>/etc/sudoers</tt> configuration file or any sudo configuration snippets\nin <tt>/etc/sudoers.d/</tt>.", "rationale": "Forcing sudo to reset the environment ensures that environment variables are not passed on to the\ncommand accidentally, preventing leak of potentially sensitive information.", "severity": "medium", "references": {"anssi": ["R39"]}, "control_references": {"anssi": ["R39"]}, "components": [], "identifiers": {}, "ocil_clause": "env_reset is not enabled in sudo", "ocil": "To determine if <tt>env_reset</tt> has been configured for sudo, run the following command:\n<pre>$ sudo grep -ri \"^[\\s]*Defaults.*\\benv_reset\\b.*\" /etc/sudoers /etc/sudoers.d/</pre>\nThe command should return a matching output.", "oval_external_content": null, "fixtext": "", "checktext": "", "vuldiscussion": "", "srg_requirement": "", "warnings": [], "conflicts": [], "requires": [], "policy_specific_content": {}, "platform": null, "platforms": [], "sce_metadata": {}, "inherited_platforms": ["system_with_kernel"], "cpe_platform_names": [], "inherited_cpe_platform_names": ["system_with_kernel"], "bash_conditional": null, "fixes": {}, "title": "Ensure sudo Runs In A Minimal Environment - sudo env_reset", "definition_location": "/aptdata/openscap/scap-security-guide/linux_os/guide/system/software/sudo/sudo_add_env_reset/rule.yml", "template": {"name": "sudo_defaults_option", "vars": {"option": "env_reset"}, "backends": {}}}