Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add in ability to save output report to a file. #25

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

chappy84
Copy link

@chappy84 chappy84 commented Aug 10, 2020

Particularly useful with json output.

I've been running this with the a local audit-db, however there doesn't seem to be a flag to silence the progress of reading this local DB.
I was sending the output of the command as a whole to a file using >, however that meant the above mentioned progress was also sent to the file (obviously)
e.g.

   0/990 [>---------------------------]   0%
  99/990 [==>-------------------------]  10%
 198/990 [=====>----------------------]  20%
 297/990 [========>-------------------]  30%
 396/990 [===========>----------------]  40%
 495/990 [==============>-------------]  50%
 594/990 [================>-----------]  60%
 693/990 [===================>--------]  70%
 792/990 [======================>-----]  80%
 891/990 [=========================>--]  90%
 990/990 [============================] 100%
{
    "guzzlehttp\/guzzle": {
        "version": "5.3.4",
        "advisories": {
            "guzzlehttp\/guzzle\/CVE-2016-5385.yaml": {
                "title": "HTTP Proxy header vulnerability",
                "link": "https:\/\/github.com\/guzzle\/guzzle\/releases\/tag\/6.2.1",
                "cve": "CVE-2016-5385"
            }
        }
    }
}

The composer --quiet flag stops ALL output, including the json report, so I thought it might be an idea to allow the report to be output to a file. The code changes in this PR do this.

@chappy84 chappy84 force-pushed the master branch 7 times, most recently from 3682c8f to 03bd709 Compare August 11, 2020 10:13
@chappy84
Copy link
Author

@sbuzonas any chance you could have a look over this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant