Skip to content

Commit

Permalink
Merge pull request #1117 from sirius94/add-owasp-dependency-checker
Browse files Browse the repository at this point in the history
Add OWASP dependency check issue parser
  • Loading branch information
uhafner committed Nov 19, 2021
2 parents 15e65c4 + 1d616f0 commit d90b48c
Show file tree
Hide file tree
Showing 3 changed files with 10,601 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
package io.jenkins.plugins.analysis.warnings;

import org.kohsuke.stapler.DataBoundConstructor;
import org.jenkinsci.Symbol;
import hudson.Extension;

import io.jenkins.plugins.analysis.core.model.AnalysisModelParser;

/**
* Provides parser for OWASP dependency check reports.
*/
public class OwaspDependencyCheck extends AnalysisModelParser {
private static final long serialVersionUID = -7721519880683487886L;

private static final String ID = "owasp-dependency-check";

/** Create instance. */
@DataBoundConstructor
public OwaspDependencyCheck() {
super();
// empty constructor required for stapler
}

/** Descriptor for this static analysis tool. */
@Symbol("owaspDependencyCheck")
@Extension
public static class Descriptor extends AnalysisModelParserDescriptor {

/** Create instance. **/
public Descriptor() {
super(ID);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -928,6 +928,12 @@ public void shouldFindAllOTDockerLintIssues() {
shouldFindIssuesOfTool(3, new OTDockerLint(), "ot-docker-linter.json");
}

/** Runs the OWASP dependency check parser on an output file that contains 2 issues. */
@Test
public void shouldFindOwaspDependencyCheckIssues() {
shouldFindIssuesOfTool(2, new OwaspDependencyCheck(), "dependency-check-report.json");
}

/** Runs the Brakeman parser on an output file that contains 32 issues. */
@Test
public void shouldFindAllBrakemanIssues() {
Expand Down
Loading

0 comments on commit d90b48c

Please sign in to comment.