diff --git a/scripts/rl-wrapper.py b/scripts/rl-wrapper.py index d992a22be..7945e31d7 100644 --- a/scripts/rl-wrapper.py +++ b/scripts/rl-wrapper.py @@ -126,8 +126,13 @@ def process_and_export_violations(report_metadata, malware_violation_rule_ids, a print(f'[!] {violation["rule_id"]}: {violation["description"]} -> {report_metadata["components"][component_id]["path"]}', file=sys.stderr) report_malware_detection(violation['rule_id']) + + base_dir = os.getcwd() + + file_name = 'violations.txt' + file_path = os.path.join(base_dir, file_name) print('------------------RL Wrapper Scanner Save Violations------------------', file=sys.stderr) - with open('violations.txt', 'w') as file: + with open(file_path, 'w') as file: file.write('## 🚨 RL Wrapper Scanner Results: Malware Detected\n\n') file.write(f'**Artifact:** {artifact_name}\n') file.write(f'**Version:** {artifact_version}\n')