Allow specifying the output file name
See original GitHub issueDescribe the issue
Hello, I was looking for a way to change the output filename when using the -o
flag.
I can specify the path to save the file, but as per 2500 it appears that the path is only configurable and not the filename itself.
Additional context
The below output demonstrates the issue:
$ checkov -d . -o json --output-file-path ./checkov-keycloak-report.json
[-snip-]
2022-08-10 16:51:48,144 [MainThread ] [ERROR]
An error occurred while writing json results to file: ./checkov-keycloak-report.json/results_json.json
Traceback (most recent call last):
File "/usr/local/Cellar/checkov/2.1.60/libexec/lib/python3.10/site-packages/checkov/common/runners/runner_registry.py", line 102, in save_output_to_file
with open(file_name, 'w') as f:
FileNotFoundError: [Errno 2] No such file or directory: './checkov-keycloak-report.json/results_json.json'
However, If I change --output-file-path .
then it creates the file results_json.json. I want to change the filename locally from results_json.json
to checkov-keycloak-report.json
Issue Analytics
- State:
- Created a year ago
- Comments:10
Top Results From Across the Web
Allow specifying Output Filename in Run/Debug config ...
Envision I have a Content Sync Server with the commands download , import , export and upload . I would like to have...
Read more >Specifying the Output File Name - NASM Manual
If the output file already exists, NASM will overwrite it, unless it has the same name as the input file, in which case...
Read more >Allow specifying filename for jUnit XML · Issue #808 - GitHub
My use case is that I'm using Robo's ParallelExec command to run my Behat feature files in parallel, but because each output file...
Read more >Allow to define output file name in command line mode
It would be very nice to be able specify output file name and location, instead of creating files with hardcoded names in the...
Read more >How to let user choose output file name in writecsv
Try ?file.choose. That should bring up the window that lets you navigate to the folder you want, and enter the file name you...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hello,
I’m afraid the redirection does not export the report for the SARIF format
My apologies, I haven’t tested it yet, and was reviewing the code on my phone.
I’ll give this a try when I get some time and report back if I see any problems. Otherwise this can stay closed. Thanks!