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

Add new git "count-contributors" command. #91

Merged
merged 19 commits into from
Jun 30, 2024

Conversation

gailazar300
Copy link
Contributor

@gailazar300 gailazar300 commented Jun 23, 2024

  • 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.
  • All changes are detailed at the description. if not already covered at JFrog Documentation, new documentation have been added.

A new command that counts and aggregates information about the git provider contributors.

Depends on: jfrog/froggit-go#135

@gailazar300 gailazar300 added the safe to test Approve running integration tests on a pull request label Jun 23, 2024
@github-actions github-actions bot removed the safe to test Approve running integration tests on a pull request label Jun 23, 2024
@attiasas attiasas changed the base branch from main to dev June 24, 2024 11:43
@attiasas attiasas added new feature Automatically generated release notes safe to test Approve running integration tests on a pull request labels Jun 24, 2024
@github-actions github-actions bot removed the safe to test Approve running integration tests on a pull request label Jun 24, 2024
@attiasas attiasas requested a review from orz25 June 24, 2024 11:44
BitbucketServer = scmTypeName("bitbucket")
DefaultContContributorsMonths = 3
getCommitsRetryNumber = 5
GithubTokenEnvVar = "JFROG_CLI_GITHUB_TOKEN" // #nosec G101
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we can remove the comments at the end

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The static analysis recognizes it as a secret- so I added it so it will be ignored.

}

// Returns the Server details. The usage report is sent to this server.
func (cc *CountContributorsCommand) ServerDetails() (*config.ServerDetails, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

you can delete this func

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Have to implement it as part of the Command interface.

}

// The command name for the usage report.
func (cc *CountContributorsCommand) CommandName() string {
Copy link
Contributor

Choose a reason for hiding this comment

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

you can delete this func

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Have to implement it as part of the Command interface.

git_test.go Outdated Show resolved Hide resolved
@orz25
Copy link
Contributor

orz25 commented Jun 25, 2024

Some of the errors start with capital letter and some with lower one.
Let's decide on one of the options and stay consistent.

@gailazar300 gailazar300 added the safe to test Approve running integration tests on a pull request label Jun 26, 2024
@github-actions github-actions bot removed the safe to test Approve running integration tests on a pull request label Jun 26, 2024
@gailazar300 gailazar300 added the safe to test Approve running integration tests on a pull request label Jun 26, 2024
@github-actions github-actions bot removed the safe to test Approve running integration tests on a pull request label Jun 26, 2024
@gailazar300 gailazar300 added the safe to test Approve running integration tests on a pull request label Jun 30, 2024
@github-actions github-actions bot removed the safe to test Approve running integration tests on a pull request label Jun 30, 2024
@gailazar300 gailazar300 added the safe to test Approve running integration tests on a pull request label Jun 30, 2024
@github-actions github-actions bot removed the safe to test Approve running integration tests on a pull request label Jun 30, 2024
Copy link

🚨 Frogbot scanned this pull request and found the below:

📦 Vulnerable Dependencies

✍️ Summary

SEVERITY CONTEXTUAL ANALYSIS DIRECT DEPENDENCIES IMPACTED DEPENDENCY FIXED VERSIONS CVES

Medium
Not Covered github.com/hashicorp/go-retryablehttp:v0.7.2
github.com/jfrog/froggit-go:v1.15.0
github.com/xanzy/go-gitlab:v0.95.2
github.com/hashicorp/go-retryablehttp v0.7.2 [0.7.7] CVE-2024-6104

🔬 Research Details

Description:
go-retryablehttp prior to 0.7.7 did not sanitize urls when writing them to its log file. This could lead to go-retryablehttp writing sensitive HTTP basic auth credentials to its log file. This vulnerability, CVE-2024-6104, was fixed in go-retryablehttp 0.7.7.


@gailazar300 gailazar300 merged commit 17e4c19 into jfrog:dev Jun 30, 2024
8 of 9 checks passed
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.

3 participants