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

Fix influx counter for whitesource #5133

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tlefaix
Copy link

@tlefaix tlefaix commented Oct 7, 2024

Changes

In case of several projects scanned (like with mta), collectVulnsAndLibsForProject (and therefore checkProjectSecurityViolations) will be called several times (see : https://github.com/SAP/jenkins-library/blob/master/cmd/whitesourceExecuteScan.go#L657)

Current issue is that in this case, the influx metrics will only contains the results for the latest scanned project.

Change is to accumulate values from each projects instead of replacing the values.

I also amended the existing tests to validate that influx metrics contains the correct value at the end.

  • Tests
  • Documentation

@tlefaix tlefaix requested a review from a team as a code owner October 7, 2024 12:04
Copy link

cla-assistant bot commented Oct 7, 2024

CLA assistant check
All committers have signed the CLA.

Copy link

sonarcloud bot commented Oct 15, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant