diff --git a/changelogs/fragments/snmp_facts.yml b/changelogs/fragments/snmp_facts.yml new file mode 100644 index 00000000000..09c5164b5e2 --- /dev/null +++ b/changelogs/fragments/snmp_facts.yml @@ -0,0 +1,2 @@ +security_fixes: +- 'snmp_facts - **CVE-2021-20178** - hide user sensitive information such as ``privkey`` and ``authkey`` from logging into the console (https://github.com/ansible-collections/community.general/pull/1621).' diff --git a/plugins/modules/net_tools/snmp_facts.py b/plugins/modules/net_tools/snmp_facts.py index 752f253195e..661db46060e 100644 --- a/plugins/modules/net_tools/snmp_facts.py +++ b/plugins/modules/net_tools/snmp_facts.py @@ -269,8 +269,8 @@ def main(): level=dict(type='str', choices=['authNoPriv', 'authPriv']), integrity=dict(type='str', choices=['md5', 'sha']), privacy=dict(type='str', choices=['aes', 'des']), - authkey=dict(type='str'), - privkey=dict(type='str'), + authkey=dict(type='str', no_log=True), + privkey=dict(type='str', no_log=True), ), required_together=( ['username', 'level', 'integrity', 'authkey'],