diff options
author | Zmegolaz <zmegolaz@gmail.com> | 2018-06-08 11:06:08 +0200 |
---|---|---|
committer | Wild Kat <wk@users.noreply.github.com> | 2018-06-08 11:06:08 +0200 |
commit | 831cf3e4c42d53461ac1e27533ac4c2f456bd52f (patch) | |
tree | a5c2376baaed7cad49b6897e110afc066c5eb3ed | |
parent | 670c044b0db9c8f7536e057eb5f5f7525f446fff (diff) |
Remove more JunOS secrets (#1359)
* Remove more JunOS secrets
* Removed redundant junos secret replacements. Updated changelog.
* Moved this change to Master in the changelog.
-rw-r--r-- | CHANGELOG.md | 1 | ||||
-rw-r--r-- | lib/oxidized/model/junos.rb | 5 |
2 files changed, 2 insertions, 4 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index a43cff0..b4d975d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## Master * BUGFIX: model edgecos does not trigger falsepositives due to uptime and memory utilization +* BUGFIX: Use SECRET-DATA hints for hiding secrets in JunOS (@Zmegolaz) ## 0.22.0 diff --git a/lib/oxidized/model/junos.rb b/lib/oxidized/model/junos.rb index 737a000..e987930 100644 --- a/lib/oxidized/model/junos.rb +++ b/lib/oxidized/model/junos.rb @@ -12,11 +12,8 @@ class JunOS < Oxidized::Model end cmd :secret do |cfg| - cfg.gsub!(/encrypted-password (\S+).*/, 'encrypted-password <secret removed>') - cfg.gsub!(/pre-shared-key ascii-text (\S+).*/, 'pre-shared-key ascii-text <secret removed>') - cfg.gsub!(/pre-shared-key hexadecimal (\S+).*/, 'pre-shared-key hexadecimal <secret removed>') - cfg.gsub!(/authentication-key (\S+).*/, 'authentication-key <secret removed>') cfg.gsub!(/community (\S+) {/, 'community <hidden> {') + cfg.gsub!(/ "\$\d\$\S+; ## SECRET-DATA/, ' <secret removed>;') cfg end |