Skip to content

Commit

Permalink
Add path to skipScanParameters
Browse files Browse the repository at this point in the history
  • Loading branch information
lovesh-ap committed Dec 18, 2024
1 parent fe0ce16 commit 13bf17c
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,11 @@ private void readIastRestrictedConfig() throws RestrictionModeException {
this.agentMode.getIastScan().getRestrictionCriteria().getMappingParameters().getHeader().setLocations(NewRelic.getAgent().getConfig().getValue(RESTRICTION_CRITERIA_MAPPING_PARAMETERS_HEADER_LOCATION, Collections.emptyList()).stream()
.map(Object::toString)
.collect(Collectors.toList()));
if(restrictionCriteria.getMappingParameters().getPath().isEnabled()) {
this.agentMode.getIastScan().getRestrictionCriteria().getMappingParameters().getPath().setLocations(restrictionCriteria.getAccountInfo().getAccountIds().stream()
.map(Object::toString)
.collect(Collectors.toList()));
}

//Strict Criteria
List<Map<String, String>> strictCriteria = NewRelic.getAgent().getConfig().getValue(RESTRICTION_CRITERIA_STRICT, Collections.emptyList());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ public class SkipScanParameters {

private List<String> body = new ArrayList<>();

private List<String> path = new ArrayList<>();

public SkipScanParameters() {
}

Expand All @@ -26,6 +28,14 @@ public List<String> getBody() {
return body;
}

public List<String> getPath() {
return path;
}

public void setPath(List<String> path) {
this.path = path;
}

public void setHeader(List<String> header) {
this.header = header;
}
Expand All @@ -42,6 +52,10 @@ public void addHeader(String header) {
this.header.add(header);
}

public void addPath(String path) {
this.path.add(path);
}

public void addQuery(String query) {
this.query.add(query);
}
Expand Down

0 comments on commit 13bf17c

Please sign in to comment.