Skip to content

Commit

Permalink
Updated python script
Browse files Browse the repository at this point in the history
  • Loading branch information
developerkunal committed Sep 9, 2024
1 parent 17b394b commit fad8607
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion scripts/rl-wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down

0 comments on commit fad8607

Please sign in to comment.