StructArmed Converter
Note
Available since version 1.19.0
Table Of Contents
Requirements
- StructArmed requires PHP version 8.2 or greater.
Installation
Usage
Warning
As StructArmed is not able to specify/boot custom renderer, we have no other alternative that using the Console Tool convert command.
Build the JSON output report
vendor/bin/structarmed init --preset=psr4
vendor/bin/structarmed analyse /path/to/source/code --basepath /path/to/source/code --report=json --summary > examples/structarmed/native-analysis.json
# or
vendor/bin/structarmed analyse /path/to/source/code --basepath /path/to/source/code --config /path/to/structarmed.php --report=json --summary > examples/structarmed/native-analysis.json
And finally, convert it to SARIF with the Console Tool
php report-converter convert structarmed --input-format=json --input-file=examples/structarmed/native-analysis.json -v
Tip
- Without verbose option (
-v) the Console Tool will print a compact SARIF version. --output-fileoption allows to write a copy of the report to a file. By default, the Console Tool will always print the specified report to the standard output.
Learn more
- See demo
examples/structarmed/directory into this repository.
Web SARIF viewer
With the React based component, you are able to explore a sarif report file previously generated.
For example:
