|
355 | 355 | [[ ${ORT_CLI_SCANNER_EXIT_CODE} -eq 1 ]] && exit 1
|
356 | 356 | fi
|
357 | 357 |
|
358 |
| - # Run ORT's Evaluator to evaluate custom policy rules along with custom license classifications against the data gathered |
359 |
| - # in preceding ORT stages and returns a list of policy violations (e.g. flags license or vulnerability findings). |
360 |
| - - | |
361 |
| - if [[ ${ORT_RUN_COMMANDS} == *"evaluator"* ]]; then |
362 |
| - echo -e "\e[1;33m Running ORT Evaluator... " |
363 |
| -
|
364 |
| - ${ORT_CLI} \ |
365 |
| - --${ORT_LOG_LEVEL} \ |
366 |
| - ${ORT_CLI_ARGS} \ |
367 |
| - evaluate \ |
368 |
| - -i ${ORT_RESULTS_CURRENT_PATH} \ |
369 |
| - -o ${ORT_RESULTS_PATH} \ |
370 |
| - -f JSON \ |
371 |
| - ${ORT_CLI_EVALUATE_ARGS} \ |
372 |
| - || ORT_CLI_EVALUATE_EXIT_CODE=$? \ |
373 |
| - && export ORT_CLI_EVALUATE_EXIT_CODE="${ORT_CLI_EVALUATE_EXIT_CODE:-0}" \ |
374 |
| - && printenv >> vars.env |
375 |
| -
|
376 |
| - [[ -f ${ORT_RESULTS_EVALUATOR_PATH} ]] \ |
377 |
| - && ln -frs $ORT_RESULTS_EVALUATOR_PATH $ORT_RESULTS_CURRENT_PATH \ |
378 |
| - || echo -e "\e[1;31m File $ORT_RESULTS_EVALUATOR_PATH not found." |
379 |
| -
|
380 |
| - [[ ${ORT_CLI_EVALUATE_EXIT_CODE} -eq 1 ]] && exit 1 |
381 |
| - fi |
382 |
| -
|
383 | 358 | # Run ORT's Advisor to retrieve security advisories for used dependencies from configured vulnerability data services.
|
384 | 359 | - |
|
385 | 360 | if [[ ${ORT_RUN_COMMANDS} == *"advisor"* ]]; then
|
|
405 | 380 | [[ ${ORT_CLI_ADVISE_EXIT_CODE} -eq 1 ]] && exit 1
|
406 | 381 | fi
|
407 | 382 |
|
| 383 | + # Run ORT's Evaluator to evaluate custom policy rules along with custom license classifications against the data gathered |
| 384 | + # in preceding ORT stages and returns a list of policy violations (e.g. flags license or vulnerability findings). |
| 385 | + - | |
| 386 | + if [[ ${ORT_RUN_COMMANDS} == *"evaluator"* ]]; then |
| 387 | + echo -e "\e[1;33m Running ORT Evaluator... " |
| 388 | +
|
| 389 | + ${ORT_CLI} \ |
| 390 | + --${ORT_LOG_LEVEL} \ |
| 391 | + ${ORT_CLI_ARGS} \ |
| 392 | + evaluate \ |
| 393 | + -i ${ORT_RESULTS_CURRENT_PATH} \ |
| 394 | + -o ${ORT_RESULTS_PATH} \ |
| 395 | + -f JSON \ |
| 396 | + ${ORT_CLI_EVALUATE_ARGS} \ |
| 397 | + || ORT_CLI_EVALUATE_EXIT_CODE=$? \ |
| 398 | + && export ORT_CLI_EVALUATE_EXIT_CODE="${ORT_CLI_EVALUATE_EXIT_CODE:-0}" \ |
| 399 | + && printenv >> vars.env |
| 400 | +
|
| 401 | + [[ -f ${ORT_RESULTS_EVALUATOR_PATH} ]] \ |
| 402 | + && ln -frs $ORT_RESULTS_EVALUATOR_PATH $ORT_RESULTS_CURRENT_PATH \ |
| 403 | + || echo -e "\e[1;31m File $ORT_RESULTS_EVALUATOR_PATH not found." |
| 404 | +
|
| 405 | + [[ ${ORT_CLI_EVALUATE_EXIT_CODE} -eq 1 ]] && exit 1 |
| 406 | + fi |
| 407 | +
|
408 | 408 | # Run ORT's Reporter to present scan results in various formats such as visual reports,
|
409 | 409 | # Open Source notices or Software Bill-Of-Materials (SBOMs).
|
410 | 410 | - |
|
|
0 commit comments