cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
justinb
Level 3

Is there a way to generate project reports either from the REST API or by using scriptRunner?

I've been trying to generate a project report on the command line using scriptRunner, but I can't seem to supply the variables that are supplied via the GUI.

I'd like to be able to run some reports weekly and I couldn't find this in the documentation.

Thanks,

    Justin Bellomi

Labels (1)
(5) Replies
vdonga
Moderator Moderator
Moderator

Hello @justinb 

For generating any report we have separate utility called “ReportScript-coreServer-1.1.5.zip” (basically report is executed using scriptRunner).

Steps to apply ReportScript-coreServer-1.1.5 utility.

  1. Download the “ReportScript-coreServer-1.1.5.zip” addon (coreReportScript.zip attached)
  2. unzip the “ReportScript-coreServer-1.1.5.zip”.
  3. Place 'pal_core_report.groovy' and 'lib\' directory from 'coreReportScript.zip\ReportScript-coreServer-1.1.5.zip\config\core\scripts\' in '<palamida>\config\core\scripts\'
  4. Add coreReport.groovy' from 'coreReportScript.zip\ReportScript-coreServer-1.1.5.zip\scriptRunner\scripts\' to '<palamida>\scriptRunner\scripts\'
  5. Add 'groovy_classes\' directory from 'coreReportScript.zip\ReportScript-coreServer-1.1.5.zip\scriptRunner\lib\' to '<palamida>\scriptRunner\lib\'
  6. Download ant-launcher-1.8.3.jar
  7. place 'ant-launcher-1.8.3.jar' in '<palamida>\scriptRunner\lib\' and '<palamida>\tomcat\lib\' directories
  8. Edit '<palamida>\scriptRunner\conf\scriptRunner.properties' file replacing 'load ! {groovy.home}/lib/ant-launcher-1.7.0.jar' with 'load !{groovy.home} /lib/ant-launcher-1.8.3.jar'
  9. Navigate to '<palamida>\scriptRunner\bin\'
  10. ./scriptRunner.sh -u <USER NAME> -c http://<hostname>:<port>/palamida/ ../scripts/coreReport.groovy -r project_report -p 3 -o project_report.zip

Below reports can be generated:

  • palamida_report
  • project_report
  • audit_report_with_excel
  • component_usage_report
  • license_report
  • inventory_report
  • inventory_diff_report
  • scanned_files_review_progress_report
  • policy_report
  • license_obligations_report
  • third_party_notices_report_inventory
  • third_party_notices_report_requests_catalog
  • third_party_notices_report_requests_project
  • request_report_catalog
  • request_report_project
  • vulnerability_report
  • cve_report_with_requests
  • project_stage_status_report

Let me know if you have any questions.

0 Kudos

0 Kudos

I'm missing a file:

java.lang.Exception: Unable to read pal_core_report.groovy under /palamida/palamida_6.13.2/config/core/scripts

 

I checked in the CodeInsight_6.13.2.zip and it's not in there either.

0 Kudos

I'm sorry I found it... please disregard my last post.

0 Kudos

Hi I keep getting the following error no matter what I supply for the -u option:

Error running report: java.lang.IllegalArgumentException: User cannot be null.

 

Here's my command:

./scriptRunner.sh -u justinb -c "${PALAMIDA_URL}/" -n ../scripts/coreReport.groovy -r audit_report -p 23 -o project_report.zip

I've attached the stacktrace.

 

How do I supply the "User" value?

0 Kudos