Module: VeracodeApiMacros
- Includes:
- VeracodeApiResults, VeracodeApiScan
- Defined in:
- lib/veracodecli/api.rb
Instance Method Summary collapse
- #get_pdf_macro(app_name) ⇒ Object
- #get_report_macro(app_name) ⇒ Object
- #submit_scan_macro(app_name, business_criticality, business_unit, team) ⇒ Object
Methods included from VeracodeApiResults
#get_most_recent_build_id, #get_prescan_results, #get_scan_report, #get_scan_report_pdf
Methods included from VeracodeApiBase
#get_repo_archive, #veracode_api_request
Methods included from VeracodeApiScan
#create_app_profile, #get_app_id, #submit_prescan, #upload_file
Instance Method Details
#get_pdf_macro(app_name) ⇒ Object
106 107 108 109 110 111 112 113 114 115 |
# File 'lib/veracodecli/api.rb', line 106 def get_pdf_macro(app_name) app_id = get_app_id app_name build_id = get_most_recent_build_id app_id report = get_scan_report_pdf build_id file_path = "/tmp/#{build_id}_report.pdf" file = File.open file_path, 'w+' file.write report file.close return file_path end |
#get_report_macro(app_name) ⇒ Object
100 101 102 103 104 |
# File 'lib/veracodecli/api.rb', line 100 def get_report_macro(app_name) app_id = get_app_id app_name build_id = get_most_recent_build_id app_id p get_scan_report build_id end |
#submit_scan_macro(app_name, business_criticality, business_unit, team) ⇒ Object
90 91 92 93 94 95 96 97 98 |
# File 'lib/veracodecli/api.rb', line 90 def submit_scan_macro(app_name, business_criticality, business_unit, team) archive_path = "/tmp/sast_clone/sast_upload.tar" app_id = get_app_id(app_name) if app_id.nil? app_id = create_app_profile(app_name, business_criticality, business_unit, team) end upload_file app_id, archive_path submit_prescan app_id end |