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

Adding Xray Source Control Service #811

Closed
wants to merge 78 commits into from
Closed

Conversation

EyalDelarea
Copy link
Contributor

@EyalDelarea EyalDelarea commented Aug 17, 2023

  • All tests passed. If this feature is not already covered by the tests, I added new tests.
  • All static analysis checks passed.
  • This pull request is on the dev branch.
  • I used gofmt for formatting the code before submitting the pull request.

Adding new XSC service which built on top of Xray.
Any functionality that is not specifically implemented inside XSC will fallback to Xray.

Main changes:

  • Turnning Xray manger into an interface, which now can be splitted into Xray and XSC.
    Important note: I didn't change the Xray name as this is the product name for the entire JFrog Security services.
  • Implemented the new XSC graph scan function to support linking scan info into repositories.

.github/workflows/tests.yml Outdated Show resolved Hide resolved
@@ -12,6 +12,18 @@ type accessDetails struct {
auth.CommonConfigFields
}

func (rt *accessDetails) GetXscUrl() string {
Copy link
Contributor

Choose a reason for hiding this comment

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

why?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Every Xray manager have this function as this is how we check if you have XSC.
It's build on top of xray.
XrayManager.GetXscUrl -> send get request and then get yes or not.

tests/utils_test.go Outdated Show resolved Hide resolved
tests/utils_test.go Outdated Show resolved Hide resolved
xray/manager/manager.go Outdated Show resolved Hide resolved
xray/scan/xscScan.go Outdated Show resolved Hide resolved
xray/scan/xscScan.go Outdated Show resolved Hide resolved
xray/scan/xscScan.go Outdated Show resolved Hide resolved
xray/scan/xscScan.go Outdated Show resolved Hide resolved
@@ -0,0 +1,95 @@
package tests
Copy link
Contributor

Choose a reason for hiding this comment

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

if a get this right all this test are currently unit tests and they can sit near the xsc service code and no neet the XSC testing suite

Copy link
Contributor Author

Choose a reason for hiding this comment

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

in the client i've put just a simple unit test to make sure things don't break

@EyalDelarea EyalDelarea added the safe to test Approve running integration tests on a pull request label Sep 8, 2023
@github-actions github-actions bot removed the safe to test Approve running integration tests on a pull request label Sep 8, 2023
@EyalDelarea EyalDelarea added the safe to test Approve running integration tests on a pull request label Sep 8, 2023
@github-actions github-actions bot removed the safe to test Approve running integration tests on a pull request label Sep 8, 2023
xray/services/xsc.go Outdated Show resolved Hide resolved
@EyalDelarea EyalDelarea temporarily deployed to frogbot September 10, 2023 07:48 — with GitHub Actions Inactive
@github-actions
Copy link
Contributor

@EyalDelarea
Copy link
Contributor Author

open a new pull request
#823

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature Automatically generated release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants