-
Notifications
You must be signed in to change notification settings - Fork 35
feat: Integrate fortify agentic analyzer tool in fcli #1113
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
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
38 changes: 38 additions & 0 deletions
38
.../fcli-tool/src/main/java/com/fortify/cli/tool/faa/cli/cmd/ToolFortifyAgenticAnalyzer.java
This file contains hidden or 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,38 @@ | ||
| /* | ||
| * Copyright 2021-2026 Open Text. | ||
| * | ||
| * The only warranties for products and services of Open Text | ||
| * and its affiliates and licensors ("Open Text") are as may | ||
| * be set forth in the express warranty statements accompanying | ||
| * such products and services. Nothing herein should be construed | ||
| * as constituting an additional warranty. Open Text shall not be | ||
| * liable for technical or editorial errors or omissions contained | ||
| * herein. The information contained herein is subject to change | ||
| * without notice. | ||
| */ | ||
| package com.fortify.cli.tool.faa.cli.cmd; | ||
|
|
||
| import com.fortify.cli.common.cli.cmd.AbstractContainerCommand; | ||
|
|
||
| import picocli.CommandLine.Command; | ||
|
|
||
| /** | ||
| * Container command for all 'fcli tool fortify-agentic-analyzer' subcommands. | ||
| * | ||
| * @author Sangamesh Vijaykumar | ||
| */ | ||
| @Command( | ||
| name = ToolFortifyAgenticAnalyzer.TOOL_NAME, | ||
| aliases = {"faa"}, | ||
| subcommands = { | ||
| ToolFortifyAgenticAnalyzerListCommand.class, | ||
| ToolFortifyAgenticAnalyzerGetCommand.class, | ||
| ToolFortifyAgenticAnalyzerRegisterCommand.class, | ||
| ToolFortifyAgenticAnalyzerRunCommand.class | ||
| } | ||
| ) | ||
| public class ToolFortifyAgenticAnalyzer extends AbstractContainerCommand { | ||
| static final String TOOL_NAME = "fortifyaa"; | ||
| static final String[] TOOL_ENV_VAR_PREFIXES = {"FORTIFYAA"}; | ||
|
|
||
| } |
35 changes: 35 additions & 0 deletions
35
.../src/main/java/com/fortify/cli/tool/faa/cli/cmd/ToolFortifyAgenticAnalyzerGetCommand.java
This file contains hidden or 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,35 @@ | ||
| /* | ||
| * Copyright 2021-2026 Open Text. | ||
| * | ||
| * The only warranties for products and services of Open Text | ||
| * and its affiliates and licensors ("Open Text") are as may | ||
| * be set forth in the express warranty statements accompanying | ||
| * such products and services. Nothing herein should be construed | ||
| * as constituting an additional warranty. Open Text shall not be | ||
| * liable for technical or editorial errors or omissions contained | ||
| * herein. The information contained herein is subject to change | ||
| * without notice. | ||
| */ | ||
| package com.fortify.cli.tool.faa.cli.cmd; | ||
|
|
||
| import com.fortify.cli.common.output.cli.mixin.OutputHelperMixins; | ||
| import com.fortify.cli.tool._common.cli.cmd.AbstractToolGetCommand; | ||
| import com.fortify.cli.tool._common.helper.Tool; | ||
|
|
||
| import lombok.Getter; | ||
| import picocli.CommandLine.Command; | ||
| import picocli.CommandLine.Mixin; | ||
|
|
||
| /** | ||
| * Get command for the Fortify Agentic Analyzer tool. | ||
| * @author Sangamesh Vijaykumar | ||
| */ | ||
| @Command(name = OutputHelperMixins.Get.CMD_NAME) | ||
| public class ToolFortifyAgenticAnalyzerGetCommand extends AbstractToolGetCommand{ | ||
| @Getter @Mixin private OutputHelperMixins.Get outputHelper; | ||
|
|
||
| @Override | ||
| protected final Tool getTool() { | ||
| return Tool.FORTIFY_AGENTIC_ANALYZER; | ||
| } | ||
| } |
37 changes: 37 additions & 0 deletions
37
...src/main/java/com/fortify/cli/tool/faa/cli/cmd/ToolFortifyAgenticAnalyzerListCommand.java
This file contains hidden or 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,37 @@ | ||
| /* | ||
| * Copyright 2021-2026 Open Text. | ||
| * | ||
| * The only warranties for products and services of Open Text | ||
| * and its affiliates and licensors ("Open Text") are as may | ||
| * be set forth in the express warranty statements accompanying | ||
| * such products and services. Nothing herein should be construed | ||
| * as constituting an additional warranty. Open Text shall not be | ||
| * liable for technical or editorial errors or omissions contained | ||
| * herein. The information contained herein is subject to change | ||
| * without notice. | ||
| */ | ||
| package com.fortify.cli.tool.faa.cli.cmd; | ||
|
|
||
| import com.fortify.cli.common.output.cli.mixin.OutputHelperMixins; | ||
| import com.fortify.cli.tool._common.cli.cmd.AbstractToolListCommand; | ||
| import com.fortify.cli.tool._common.helper.Tool; | ||
|
|
||
| import lombok.Getter; | ||
| import picocli.CommandLine.Command; | ||
| import picocli.CommandLine.Mixin; | ||
|
|
||
| /** | ||
| * List command for the Fortify Agentic Analyzer tool. | ||
| * | ||
| * @author Sangamesh Vijaykumar | ||
| */ | ||
| @Command(name = OutputHelperMixins.List.CMD_NAME) | ||
| public class ToolFortifyAgenticAnalyzerListCommand extends AbstractToolListCommand{ | ||
| @Getter @Mixin private OutputHelperMixins.List outputHelper; | ||
|
|
||
| @Override | ||
| protected Tool getTool() { | ||
| return Tool.FORTIFY_AGENTIC_ANALYZER; | ||
| } | ||
|
|
||
| } |
50 changes: 50 additions & 0 deletions
50
...main/java/com/fortify/cli/tool/faa/cli/cmd/ToolFortifyAgenticAnalyzerRegisterCommand.java
This file contains hidden or 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,50 @@ | ||
| /* | ||
| * Copyright 2021-2026 Open Text. | ||
| * | ||
| * The only warranties for products and services of Open Text | ||
| * and its affiliates and licensors ("Open Text") are as may | ||
| * be set forth in the express warranty statements accompanying | ||
| * such products and services. Nothing herein should be construed | ||
| * as constituting an additional warranty. Open Text shall not be | ||
| * liable for technical or editorial errors or omissions contained | ||
| * herein. The information contained herein is subject to change | ||
| * without notice. | ||
| */ | ||
| package com.fortify.cli.tool.faa.cli.cmd; | ||
|
|
||
| import java.io.File; | ||
|
|
||
| import com.fortify.cli.tool._common.cli.cmd.AbstractToolRegisterCommand; | ||
| import com.fortify.cli.tool._common.helper.Tool; | ||
| import com.fortify.cli.tool._common.helper.ToolVersionDetector; | ||
|
|
||
| import picocli.CommandLine.Command; | ||
|
|
||
| /** | ||
| * Register command for the Fortify Agentic Analyzer tool. | ||
| * | ||
| * @author Sangamesh Vijaykumar | ||
| */ | ||
| @Command(name = "register") | ||
| public class ToolFortifyAgenticAnalyzerRegisterCommand extends AbstractToolRegisterCommand{ | ||
|
|
||
| @Override | ||
| protected Tool getTool() { | ||
| return Tool.FORTIFY_AGENTIC_ANALYZER; | ||
| } | ||
|
|
||
| @Override | ||
| protected String detectVersion(File toolBinary, File installDir) { | ||
| // Execute fortifyaa to detect its version | ||
| String output = ToolVersionDetector.tryExecute(toolBinary, ""); | ||
| if (output != null) { | ||
| String version = ToolVersionDetector.extractVersionFromOutput(output); | ||
| if (version != null) { | ||
| return version; | ||
| } | ||
| } | ||
|
|
||
| return "unknown"; | ||
| } | ||
|
|
||
| } |
32 changes: 32 additions & 0 deletions
32
.../src/main/java/com/fortify/cli/tool/faa/cli/cmd/ToolFortifyAgenticAnalyzerRunCommand.java
This file contains hidden or 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,32 @@ | ||
| /* | ||
| * Copyright 2021-2026 Open Text. | ||
| * | ||
| * The only warranties for products and services of Open Text | ||
| * and its affiliates and licensors ("Open Text") are as may | ||
| * be set forth in the express warranty statements accompanying | ||
| * such products and services. Nothing herein should be construed | ||
| * as constituting an additional warranty. Open Text shall not be | ||
| * liable for technical or editorial errors or omissions contained | ||
| * herein. The information contained herein is subject to change | ||
| * without notice. | ||
| */ | ||
| package com.fortify.cli.tool.faa.cli.cmd; | ||
| import com.fortify.cli.tool._common.cli.cmd.AbstractToolRunCommand; | ||
| import com.fortify.cli.tool._common.helper.Tool; | ||
|
|
||
| import picocli.CommandLine.Command; | ||
|
|
||
| /** | ||
| * Run command for the Fortify Agentic Analyzer tool. | ||
| * | ||
| * @author Sangamesh Vijaykumar | ||
| */ | ||
| @Command(name = "run") | ||
| public class ToolFortifyAgenticAnalyzerRunCommand extends AbstractToolRunCommand { | ||
|
|
||
| @Override | ||
| protected Tool getTool() { | ||
| return Tool.FORTIFY_AGENTIC_ANALYZER; | ||
| } | ||
|
|
||
| } |
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.