diff --git a/checkov/secrets/runner.py b/checkov/secrets/runner.py index 860bd970696..901a6df6c0d 100644 --- a/checkov/secrets/runner.py +++ b/checkov/secrets/runner.py @@ -286,7 +286,7 @@ def run( code_block=[(secret.line_number, line_text_censored)], file_path=relative_file_path, file_line_range=[secret.line_number, secret.line_number + 1], - resource=secret.secret_hash, + resource=f'{added_commit_hash}:{secret.secret_hash}' if added_commit_hash else secret.secret_hash, check_class="", evaluations=None, file_abs_path=os.path.abspath(secret.filename),