SoftwareSecurity/Yasca
Installation
For installing Yasca on a windows machine with a plugin, you will have to do the following:
- Extract the Yasca core module, available for download here: [1].
- Now you can run the Yasca core already by opening a command line session and executing the yasca.exe executable that you can find in the extracted package. As a parameter, you have to give the full path to the root of the project you want to analyze.
- When you want to install plugins, you need to create a static analyzers folder. for example c:\staticAnalysers\
- Next, there are three options.
1. Add the path to c:\staticAnalysers\ as a system variable in windows called SA_HOME (advanced system properties ==> environment variables).
2. Add the path to c:\staticAnalysers\ as a temporary system variable in windows by executing the command set SA_HOME=c:\staticAnalysers\. Check if these two options work by executing the command echo %SA_HOME% and see if the correct path is returned.
3. Executing the yasca.exe with the -sa_home=c:\staticAnalysers\ argument. You will have to do this on every run of the program.
- Now, download a plugin that you want to use with Yasca and extract the content of the downloaded package in the staticAnalysers folder.
You don't need a separate folder for every plugin. If you install more than one plugin, you can merge the folders if there already exist folders in the staticAnalysers folder.
Note: The execution of the PHPLint plugin takes a long while! Don't make the same mistake as we did and trying to fix something that ain't broken!
Difficulty installing PHPLint plugin
There was a small fix needed for the PHPLint plugin to work. The phplint.bat file in the C:\staticAnalysers\Resources\utility\ folder needed to be adapted to work properly (at least, in our situation):
- old line:@resources\utility\phplint\phplint.exe --modules-path .\resources\utility\phplint\modules "%~1"
- new line:@%SA_HOME%resources\utility\phplint\phplint.exe --modules-path .\resources\utility\phplint\modules "%~1"