From 0789afd342f7022b2b5f04267fdbd49739727f58 Mon Sep 17 00:00:00 2001 From: dgzlopes Date: Fri, 2 Aug 2019 16:42:41 +0200 Subject: [PATCH] Add (b)ack audit functionality when secret not found Added (b)ack option in audit mode prevent the 'point of no return' when a secret isn't found. Resolves: #204 Signed-off-by: dgzlopes --- detect_secrets/core/audit.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/detect_secrets/core/audit.py b/detect_secrets/core/audit.py index 917ede8f0..12b6828fb 100644 --- a/detect_secrets/core/audit.py +++ b/detect_secrets/core/audit.py @@ -84,7 +84,10 @@ def audit_baseline(baseline_filename): ) decision = _get_user_decision(can_step_back=secret_iterator.can_step_back()) except SecretNotFoundOnSpecifiedLineError: - decision = _get_user_decision(prompt_secret_decision=False) + decision = _get_user_decision( + prompt_secret_decision=False, + can_step_back=secret_iterator.can_step_back(), + ) if decision == 'q': print('Quitting...')