Skip to content

Conversation

@orto17
Copy link
Contributor

@orto17 orto17 commented Dec 10, 2025

  • All tests passed. If this feature is not already covered by the tests, I added new tests.
  • This pull request is on the dev branch.
  • I used gofmt for formatting the code before submitting the pull request.
  • Update documentation about new features / new supported technologies

}
scanDetails = utils.NewScanDetails(client, &repoConfig.Server, &repoConfig.Params.Git).
return utils.NewScanDetails(client, &repoConfig.Server, &repoConfig.Params.Git).
SetJfrogVersions(repoConfig.Params.XrayVersion, repoConfig.Params.XscVersion).
Copy link
Contributor

Choose a reason for hiding this comment

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

what if we also killed xsc version and told cli to kill it s well?

Comment on lines 24 to 49
func GetCompatiblePackageHandler(vulnDetails *utils.VulnerabilityDetails, details *utils.ScanDetails) (handler PackageHandler) {
switch vulnDetails.Technology {
case techutils.Go:
handler = &GoPackageHandler{}
case techutils.Poetry:
handler = &PythonPackageHandler{}
case techutils.Pipenv:
handler = &PythonPackageHandler{}
case techutils.Npm:
handler = &NpmPackageHandler{}
case techutils.Yarn:
handler = &YarnPackageHandler{}
case techutils.Pip:
handler = &PythonPackageHandler{pipRequirementsFile: details.PipRequirementsFile}
handler = &PythonPackageHandler{pipRequirementsFile: defaultRequirementFile}
case techutils.Maven:
handler = NewMavenPackageHandler(details)
case techutils.Nuget:
handler = &NugetPackageHandler{}
case techutils.Gradle:
handler = &GradlePackageHandler{}
case techutils.Pnpm:
handler = &PnpmPackageHandler{}
case techutils.Conan:
handler = &ConanPackageHandler{}
default:
handler = &UnsupportedPackageHandler{}
Copy link
Contributor

Choose a reason for hiding this comment

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

if you in the mood of refactoring make it a mapping object instead of this insane switch case
this isnt logic switching this is a pure factory

return
}
return

Copy link
Contributor

Choose a reason for hiding this comment

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

drop the line

type ScanPullRequestCmd struct{}

func (cmd *ScanPullRequestCmd) Run(repository utils.Repository, client vcsclient.VcsClient, frogbotRepoConnection *utils.UrlAccessChecker) (err error) {
func (cp *ScanPullRequestCmd) Run(repository utils.Repository, client vcsclient.VcsClient, frogbotRepoConnection *utils.UrlAccessChecker) (err error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

what is cp?

client vcsclient.VcsClient
fixableOnly bool
skipAutoInstall bool
minSeverityFilter severityutils.Severity
Copy link
Contributor

Choose a reason for hiding this comment

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

delete you said its dead

SetUseWrapper(*sc.UseWrapper).
SetMaxTreeDepth(sc.MaxPnpmTreeDepth).
SetDepsRepo(sc.DepsRepo).
SetIgnoreConfigFile(true).
Copy link
Contributor

Choose a reason for hiding this comment

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

i checked with assaf we dont even need to pass it it's some weird legacy no one uses

GitProvider = "JF_GIT_PROVIDER"
GitRepoOwnerEnv = "JF_GIT_OWNER"
GitRepoEnv = "JF_GIT_REPO"
GitProjectEnv = "JF_GIT_PROJECT"
Copy link
Contributor

Choose a reason for hiding this comment

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

@eranturgeman suggested to call it something like JF_AZURE_GIT_PROJECT
as its specific to azure and i agree


// The 'GITHUB_ACTIONS' environment variable exists when the CI is GitHub Actions
GitHubActionsEnv = "GITHUB_ACTIONS"
GitHubActionsEnv = "GITHUB_ACTIONS" // TODO WHAT IS THIS?
Copy link
Contributor

Choose a reason for hiding this comment

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

@eranturgeman you know what this is for?

scanDetails *utils.ScanDetails
// The base working directory
baseWd string
baseWd string //TODO
Copy link
Contributor

Choose a reason for hiding this comment

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

what does the todo mean? to do what?

@eyalk007 eyalk007 added the improvement Automatically generated release notes label Dec 11, 2025
ApiEndpoint string
PullRequestID string
CustomBranchName string
UseLocalRepo bool
Copy link
Contributor

Choose a reason for hiding this comment

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

dont you need to delete this as well?

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

Labels

improvement Automatically generated release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants