summaryrefslogtreecommitdiff
path: root/src/helpers/strip-private.py
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2023-11-07 19:40:08 +0100
committerGitHub <noreply@github.com>2023-11-07 19:40:08 +0100
commit269ad333bc749bb7da15f1a2641d6c5bae56d1fd (patch)
tree282370a456702f43b96edce1a80cfb5e69ab3208 /src/helpers/strip-private.py
parentcafc5c0fb00bd51b8c7263c7ff5d470f6d8a1c58 (diff)
parenta8645039c4f1a6a5455e4d91c95cde06b8a1b9b1 (diff)
downloadvyos-1x-269ad333bc749bb7da15f1a2641d6c5bae56d1fd.tar.gz
vyos-1x-269ad333bc749bb7da15f1a2641d6c5bae56d1fd.zip
Merge pull request #2455 from vyos/mergify/bp/sagitta/pr-2437
T5713: Strip string after "secret" in IPSEC configs (backport #2437)
Diffstat (limited to 'src/helpers/strip-private.py')
-rwxr-xr-xsrc/helpers/strip-private.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/helpers/strip-private.py b/src/helpers/strip-private.py
index eb584edaf..cb29069cf 100755
--- a/src/helpers/strip-private.py
+++ b/src/helpers/strip-private.py
@@ -1,6 +1,6 @@
#!/usr/bin/python3
-# Copyright 2021-2022 VyOS maintainers and contributors <maintainers@vyos.io>
+# Copyright 2021-2023 VyOS maintainers and contributors <maintainers@vyos.io>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -21,7 +21,6 @@ import sys
from netaddr import IPNetwork, AddrFormatError
-
parser = argparse.ArgumentParser(description='strip off private information from VyOS config')
strictness = parser.add_mutually_exclusive_group()
@@ -119,6 +118,7 @@ if __name__ == "__main__":
(True, re.compile(r'(shared-secret-key-file|ca-cert-file|cert-file|dh-file|key-file|client) (\S+)'), r'\1 xxxxxx'),
# Strip IPSEC secrets
(True, re.compile(r'pre-shared-secret \S+'), 'pre-shared-secret xxxxxx'),
+ (True, re.compile(r'secret \S+'), 'secret xxxxxx'),
# Strip OSPF md5-key
(True, re.compile(r'md5-key \S+'), 'md5-key xxxxxx'),
# Strip WireGuard private-key