com.h3xstream.retirejs
Class RetireJsScan
java.lang.Object
org.apache.maven.plugin.AbstractMojo
com.h3xstream.retirejs.RetireJsScan
- All Implemented Interfaces:
- org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
public class RetireJsScan
- extends org.apache.maven.plugin.AbstractMojo
Scan the JavaScript files of the selected project to identify vulnerable JavaScript libraries.
The original Retire.js project is open-source and maintained by Erlend Oftedal (Bekk Consulting).
For more information about the project visit: http://bekk.github.io/retire.js/.
|
Field Summary |
protected boolean |
breakOnFailure
This flag will make the build fail if at least one library is found vulnerable. |
protected org.apache.maven.project.MavenProject |
project
The Maven Project. |
protected File |
webAppDirectory
Directory containing web resources files (by default src/main/webapp) |
| Fields inherited from interface org.apache.maven.plugin.Mojo |
ROLE |
| Methods inherited from class org.apache.maven.plugin.AbstractMojo |
getLog, getPluginContext, setLog, setPluginContext |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
breakOnFailure
protected boolean breakOnFailure
- This flag will make the build fail if at least one library is found vulnerable.
It can be useful to create automate verification using a build server such as Jenkins.
project
protected org.apache.maven.project.MavenProject project
- The Maven Project. (Inject component)
- Since:
- 1.0-alpha-1
webAppDirectory
protected File webAppDirectory
- Directory containing web resources files (by default src/main/webapp)
RetireJsScan
public RetireJsScan()
execute
public void execute()
throws org.apache.maven.plugin.MojoExecutionException,
org.apache.maven.plugin.MojoFailureException
- Throws:
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
scanDirectory
protected void scanDirectory(File directory,
List<JsLibraryResult> results)
throws IOException
- Throws:
IOException
isJavaScriptFile
protected boolean isJavaScriptFile(File child)
scanJavaScriptFile
protected void scanJavaScriptFile(File javascriptFile,
List<JsLibraryResult> completeResults)
throws IOException
- Throws:
IOException
Copyright © 2015. All rights reserved.