{"description": "The sudo <tt>use_pty</tt> tag, when specified, will only execute sudo\ncommands from users logged in to a real tty.\nThis should be enabled by making sure that the <tt>use_pty</tt> tag exists in\n<tt>/etc/sudoers</tt> configuration file or any sudo configuration snippets\nin <tt>/etc/sudoers.d/</tt>.", "rationale": "Requiring that sudo commands be run in a pseudo-terminal can prevent an attacker from retaining\naccess to the user's terminal after the main program has finished executing.", "severity": "medium", "references": {"pcidss": ["Req-10.2.5"], "anssi": ["R39"], "cis": ["5.2.2"], "pcidss4": ["2.2.6", "2.2"]}, "control_references": {"anssi": ["R39"], "cis": ["5.2.2"], "pcidss4": ["2.2.6", "2.2"]}, "components": [], "identifiers": {}, "ocil_clause": "use_pty is not enabled in sudo", "ocil": "To determine if <tt>use_pty</tt> has been configured for sudo, run the following command:\n<pre>$ sudo grep -ri \"^[\\s]*Defaults.*\\buse_pty\\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": "package[sudo]", "platforms": ["package[sudo]"], "sce_metadata": {}, "inherited_platforms": ["system_with_kernel"], "cpe_platform_names": ["package_sudo"], "inherited_cpe_platform_names": ["system_with_kernel"], "bash_conditional": null, "fixes": {}, "title": "Ensure Only Users Logged In To Real tty Can Execute Sudo - sudo use_pty", "definition_location": "/aptdata/openscap/scap-security-guide/linux_os/guide/system/software/sudo/sudo_add_use_pty/rule.yml", "template": {"name": "sudo_defaults_option", "vars": {"option": "use_pty"}, "backends": {}}}