Open itmustbejj opened 1 year ago
Kudos, SonarCloud Quality Gate passed!
0 Bugs
0 Vulnerabilities
0 Security Hotspots
2 Code Smells
No Coverage information
0.0% Duplication
Attention: Patch coverage is 40.42553%
with 28 lines
in your changes are missing coverage. Please review.
Project coverage is 54.51%. Comparing base (
5fd9f44
) to head (8f851f1
).:exclamation: Current head 8f851f1 differs from pull request most recent head f6aaa0e. Consider uploading reports for the commit f6aaa0e to get more accurate results
Files | Patch % | Lines |
---|---|---|
pkg/diff/diff.go | 40.42% | 20 Missing and 8 partials :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Issues
1 New issue
0 Accepted issues
Measures
0 Security Hotspots
No data about Coverage
2.7% Duplication on New Code
…ecretData
Fixes: https://github.com/argoproj/argo-cd/issues/16193
Background: There are several edge cases where invalid Secrets passed to
diff.HideSecretData
are not sanitized becausediff.NormalizeSecret
will return prematurely when receiving an error fromruntime.DefaultUnstructuredConverter.FromUnstructured
. Upstream, this is impacting argo-cd which expects an error to be returned and not simply logged, which leads to them exposing the unsanitized secret in several locations in the logs and ui.In the current test suite, there are two tests that are failing silently because these errors from
runtime.DefaultUnstructuredConverter.FromUnstructured
are not being handled. After returning errors fromdiff.NormalizeSecret
, both of these tests started correctly failing, and my changes make them pass again. I've also included a new test that covers my original edge case.Before
After returning errors in diff.NormalizeSecret
With PR fixes