From 8cbea7db3e6d8fe925f7d245a4fcbe332bbbc9a6 Mon Sep 17 00:00:00 2001 From: AlbertoPellitteri <66901396+AlbertoPellitteri@users.noreply.github.com> Date: Sun, 15 Sep 2024 00:18:49 +0200 Subject: [PATCH] Adding prereq (#2925) Co-authored-by: Carrie Roberts --- atomics/T1070.004/T1070.004.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/atomics/T1070.004/T1070.004.yaml b/atomics/T1070.004/T1070.004.yaml index b9f14b28..9f98b94b 100644 --- a/atomics/T1070.004/T1070.004.yaml +++ b/atomics/T1070.004/T1070.004.yaml @@ -66,6 +66,13 @@ atomic_tests: description: Path of file to shred type: path default: /tmp/victim-shred.txt + dependencies: + - description: | + Check if file already exists + prereq_command: | + if [ -f "#{file_to_shred}" ]; then echo "File already exists"; else echo "File does NOT exist yet"; exit 1; fi + get_prereq_command: | + touch #{file_to_shred} executor: command: | shred -u #{file_to_shred}