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

Try to fingerprint SB 3.2 #29

Merged
merged 1 commit into from
Feb 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 2 additions & 0 deletions src/main/java/com/redhat/insights/agent/AgentSubreport.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ public class AgentSubreport implements InsightsSubreport {
static {
activeGuesses.put("org.springframework.boot.SpringApplication", __ -> "Spring Boot");
activeGuesses.put("org.springframework.boot.loader.Launcher", __ -> "Spring Boot");
// Since SB 3.2
activeGuesses.put("org.springframework.boot.loader.launch.Launcher", __ -> "Spring Boot");
activeGuesses.put("org.jboss.modules.Module", AgentSubreport::fingerprintJBoss);
activeGuesses.put(
"io.quarkus.bootstrap.runner.QuarkusEntryPoint", AgentSubreport::fingerprintQuarkus);
Expand Down
4 changes: 3 additions & 1 deletion src/main/java/com/redhat/insights/agent/Attach.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

/** Dynamic attachment class for use on apps that are already running. */
public class Attach {
private static final int ATTACH_PARAM_SAFE_LIMIT = 250;

public static void main(String[] args) {
if (args.length < 2) {
System.err.println("Need args: pid, options");
Expand All @@ -21,7 +23,7 @@ public static void main(String[] args) {

String pid = args[0];
String options = args[1];
if (options.length() > 100) {
if (options.length() > ATTACH_PARAM_SAFE_LIMIT) {
System.err.println(
"WARNING: option string is long, attach may fail. Usual cause of this is a long token - consider using a token file instead");
}
Expand Down