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: better repo path sanitization #12974

Merged
merged 2 commits into from
Apr 24, 2023

Conversation

crenshaw-dev
Copy link
Collaborator

@crenshaw-dev crenshaw-dev commented Mar 23, 2023

This fixes two problems:

  1. We currently only sanitize sensitive paths from error messages if the path ends with a / - but they don't always end with a /, particularly in the case of errors related to Helm charts.
  2. Replacing with a . leads to confusing messages like ".values.yaml not found". The user thinks "wat the hek, I don't have a file called .values.yaml." So now we'll replace with the more meaningful "<path to cached source>".

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
@codecov
Copy link

codecov bot commented Mar 23, 2023

Codecov Report

Patch coverage: 87.50% and no project coverage change.

Comparison is base (100495d) 48.83% compared to head (124c010) 48.84%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #12974   +/-   ##
=======================================
  Coverage   48.83%   48.84%           
=======================================
  Files         246      246           
  Lines       42281    42288    +7     
=======================================
+ Hits        20649    20656    +7     
  Misses      19527    19527           
  Partials     2105     2105           
Impacted Files Coverage Δ
reposerver/repository/repository.go 60.65% <87.50%> (+0.15%) ⬆️

... and 1 file with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Collaborator

@leoluz leoluz left a comment

Choose a reason for hiding this comment

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

LGTM

@leoluz leoluz merged commit a3a86f1 into argoproj:master Apr 24, 2023
yyzxw pushed a commit to yyzxw/argo-cd that referenced this pull request Aug 9, 2023
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
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.

None yet

2 participants