Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NR-340947 : Do not collect API Endpoints if Security Agent is disabled #358

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
NR-355142: Fix false API reported for jetty app
IshikaDawda committed Jan 17, 2025
commit 99c951687a30b4c0881e4ea0e033b0845d1f3e7f
Original file line number Diff line number Diff line change
@@ -22,7 +22,7 @@ public class URLMappingsHelper {

public static final String subResourceSegment = "/*";

private static Set<ApplicationURLMapping> mappings = ConcurrentHashMap.newKeySet();
private static final Set<ApplicationURLMapping> mappings = ConcurrentHashMap.newKeySet();

private static final Set<String> defaultHandlers = new HashSet<String>() {{
add("org.eclipse.jetty.jsp.JettyJspServlet");
@@ -47,15 +47,17 @@ public class URLMappingsHelper {
add("org.codehaus.groovy.grails.web.servlet.GrailsDispatcherServlet");
add("org.codehaus.groovy.grails.web.pages.GroovyPagesServlet");
add("org.codehaus.groovy.grails.web.servlet.ErrorHandlingServlet");
add("org.eclipse.jetty.ee9.servlet.NoJspServlet");
add("org.eclipse.jetty.ee9.servlet.DefaultServlet");
}};

public static Set<ApplicationURLMapping> getApplicationURLMappings() {
return mappings;
}

private static Set<Integer> handlers = ConcurrentHashMap.newKeySet();
private static final Set<Integer> handlers = ConcurrentHashMap.newKeySet();

private static Set<RouteSegments> routeSegments = new TreeSet<>(new RouteComparator());
private static final Set<RouteSegments> routeSegments = new TreeSet<>(new RouteComparator());

public static Set<Integer> getHandlersHash() {
return handlers;