sapp icon indicating copy to clipboard operation
sapp copied to clipboard

Github actions fix: Have some output for errors

Open abishekvashok opened this issue 2 years ago • 0 comments

Pre-submission checklist

  • [x] I've ran the following linters locally and fixed lint errors related to the files I modified in this PR
    • [x] black .
    • [x] usort format .
    • [x] flake8
  • [x] I've installed dev dependencies pip install -r requirements-dev.txt and completed the following:
    • [x] I've ran tests with ./scripts/run-tests.sh and made sure all tests are passing

Summary

SARIF expects some information about tooling when there are no issues, SAPP currently doesn't print any information and exits silently in case there are no issues after applying filters.

Github Actions expects the output to conform to SARIF. Hence, return empty results list along with tooling information as expected by SARIF.

For reference, see: https://github.com/facebook/pysa-action/actions/runs/4534111680 is crashing.

Test Plan

Before https://github.com/facebook/pysa-action/actions/runs/4534111680

Screenshot 2023-03-28 at 4 33 51 PM

After

Screenshot 2023-03-28 at 4 34 05 PM Screenshot 2023-03-28 at 4 33 59 PM

Fixes possible errors from happening in Github workflows that make use of sapp-action or pysa-action

abishekvashok avatar Mar 28 '23 11:03 abishekvashok