From 05e1d505f2cc30e87b1cdcf90db966690882f610 Mon Sep 17 00:00:00 2001 From: Adam Smith Date: Thu, 15 Mar 2018 02:18:38 -0700 Subject: add secrets to sanitize in JunOS --- lib/oxidized/model/junos.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/oxidized/model') diff --git a/lib/oxidized/model/junos.rb b/lib/oxidized/model/junos.rb index 2f59414..4652ab1 100644 --- a/lib/oxidized/model/junos.rb +++ b/lib/oxidized/model/junos.rb @@ -13,7 +13,9 @@ class JunOS < Oxidized::Model end cmd :secret do |cfg| - cfg.gsub!(/encrypted-password (\S+).*/, '') + cfg.gsub!(/encrypted-password (\S+).*/, 'encrypted-password ') + cfg.gsub!(/pre-shared-key ascii-text (\S+).*/, 'pre-shared-key ascii-text ') + cfg.gsub!(/authentication-key (\S+).*/, 'authentication-key ') cfg.gsub!(/community (\S+) {/, 'community {') cfg end -- cgit v1.2.1