-
-
Notifications
You must be signed in to change notification settings - Fork 421
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #157 from SasanLabs/Fix1
Metadata about the scanner endpoint
- Loading branch information
Showing
2 changed files
with
60 additions
and
1 deletion.
There are no files selected for viewing
39 changes: 39 additions & 0 deletions
39
src/main/java/org/sasanlabs/beans/ScannerMetaResponseBean.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package org.sasanlabs.beans; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import java.util.List; | ||
import org.sasanlabs.internal.utility.annotations.RequestParameterLocation; | ||
import org.sasanlabs.vulnerability.types.VulnerabilitySubType; | ||
|
||
/** | ||
* This class represents the meta data about the data provided by scanner endpoint. This is useful | ||
* for scanners to map there vulnerability type names with VulnerableApp's vulnerability type names | ||
* and same goes with the request parameter locations etc. This is mainly used for mapping | ||
* conventions across different applications | ||
* | ||
* @author KSASAN [email protected] | ||
*/ | ||
public class ScannerMetaResponseBean { | ||
|
||
@JsonProperty("availableVulnerabilities") | ||
private List<VulnerabilitySubType> availableVulnerabilityTypes; | ||
|
||
@JsonProperty("availableLocations") | ||
private List<RequestParameterLocation> availableLocations; | ||
|
||
public ScannerMetaResponseBean( | ||
List<VulnerabilitySubType> availableVulnerabilityTypes, | ||
List<RequestParameterLocation> availableLocations) { | ||
super(); | ||
this.availableVulnerabilityTypes = availableVulnerabilityTypes; | ||
this.availableLocations = availableLocations; | ||
} | ||
|
||
public List<VulnerabilitySubType> getAvailableVulnerabilityTypes() { | ||
return availableVulnerabilityTypes; | ||
} | ||
|
||
public List<RequestParameterLocation> getAvailableLocations() { | ||
return availableLocations; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters