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 2 commits 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.

@tlefaix tlefaix force-pushed the fix/influx_whitesource branch from 1fa3287 to c9b8832 Compare October 8, 2024 08:22
@tlefaix tlefaix force-pushed the fix/influx_whitesource branch from c9b8832 to a0a9aac Compare October 15, 2024 11:17
Copy link

@tlefaix tlefaix force-pushed the fix/influx_whitesource branch 2 times, most recently from a26b45e to 13aa442 Compare November 20, 2024 14:49
@tlefaix tlefaix force-pushed the fix/influx_whitesource branch from 13aa442 to 073d90a Compare November 27, 2024 16:27
@tlefaix tlefaix force-pushed the fix/influx_whitesource branch from a0f7812 to b6d5c1f Compare December 9, 2024 16:57
@tlefaix tlefaix force-pushed the fix/influx_whitesource branch from b6d5c1f to f7a4afd Compare January 6, 2025 15:16
Copy link

sonarqubecloud bot commented Jan 6, 2025

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