Skip to content

Pass JF platform info to Xray Plugin#789

Open
attiasas wants to merge 4 commits into
jfrog:devfrom
attiasas:pass_xray_info_to_plugin
Open

Pass JF platform info to Xray Plugin#789
attiasas wants to merge 4 commits into
jfrog:devfrom
attiasas:pass_xray_info_to_plugin

Conversation

@attiasas

Copy link
Copy Markdown
Collaborator
  • The pull request is targeting the dev branch.
  • The code has been validated to compile successfully by running go vet ./....
  • The code has been formatted properly using go fmt ./....
  • All static analysis checks passed.
  • All tests have passed. If this feature is not already covered by the tests, new tests have been added.
  • Updated the Contributing page / ReadMe page / CI Workflow files if needed.
  • All changes are detailed at the description. if not already covered at JFrog Documentation, new documentation have been added.

Following the request of the plugin team to start passing JFROG platform info to the command:

@attiasas attiasas requested a review from a team June 29, 2026 06:42
@attiasas attiasas added ignore for release Automatically generated release notes safe to test Approve running integration tests on a pull request labels Jun 29, 2026
@github-actions github-actions Bot removed the safe to test Approve running integration tests on a pull request label Jun 29, 2026
@attiasas attiasas added the safe to test Approve running integration tests on a pull request label Jun 29, 2026
@github-actions github-actions Bot removed the safe to test Approve running integration tests on a pull request label Jun 29, 2026
@attiasas attiasas added the safe to test Approve running integration tests on a pull request label Jun 29, 2026
@github-actions github-actions Bot removed the safe to test Approve running integration tests on a pull request label Jun 29, 2026
@github-actions

Copy link
Copy Markdown

👍 Frogbot scanned this pull request and did not find any new security issues.


Comment thread utils/utils.go
func ToCommandEnvVars(envVarsMap map[string]string) (converted []string) {
converted = make([]string, 0, len(envVarsMap))
for key, value := range envVarsMap {
// func ToCommandEnvVars(envVarsMap map[string]string) (converted []string) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delete

func (sbg *XrayLibBomGenerator) getPluginEnvVars() utils.EnvironmentVariables {
envVars := utils.EnvironmentVariables{}
if sbg.ServerDetails != nil {
envVars[plugin.XrayUrlEnvVariable] = sbg.ServerDetails.XrayUrl

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are you sure we have sbg.ServerDetails.XrayUrl filled at this point? for local audit we have it as when configuring new JPD it is completed automatically, but what about frogbot that gets only JF_URL

Comment thread commands/audit/audit.go
bom.GenerateSbomForTarget(params.BomGenerator().WithOptions(
buildinfo.WithDescriptors(targetResult.GetDescriptors()),
xrayplugin.WithSnippetDetection(shouldIncludeSnippetDetection(params)),
xrayplugin.WithServerDetails(params.serverDetails),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use params.ServerDetails()

@eranturgeman eranturgeman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ignore for release Automatically generated release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants