fix(gc): redact redis_url_reg from GC extra attrs#23134
Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #23134 +/- ##
=======================================
Coverage 66.01% 66.02%
=======================================
Files 1074 1074
Lines 116690 116697 +7
Branches 2941 2941
=======================================
+ Hits 77037 77049 +12
+ Misses 35383 35378 -5
Partials 4270 4270
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Signed-off-by: chlins <[email protected]>
chlins
force-pushed
the
fix/remove-redis-url-in-gc-history
branch
from
April 16, 2026 08:18
bf77adc to
db14013
Compare
stonezdj
approved these changes
Apr 17, 2026
chlins
added a commit
to chlins/harbor
that referenced
this pull request
Apr 17, 2026
Signed-off-by: chlins <[email protected]>
5 tasks
chlins
added a commit
that referenced
this pull request
Apr 20, 2026
…) (#23141) fix(gc): redact redis_url_reg from GC extra attrs (#23134) Signed-off-by: chlins <[email protected]>
This was referenced May 17, 2026
bupd
pushed a commit
to container-registry/harbor-next
that referenced
this pull request
May 19, 2026
Upstream-PR: goharbor/harbor#23134 Upstream-Author: @chlins Signed-off-by: Prasanth Baskar <[email protected]>
bupd
pushed a commit
to container-registry/harbor-next
that referenced
this pull request
May 19, 2026
Upstream-PR: goharbor/harbor#23134 Upstream-Author: @chlins Signed-off-by: Prasanth Baskar <[email protected]>
bupd
pushed a commit
to container-registry/harbor-next
that referenced
this pull request
May 19, 2026
Upstream-PR: goharbor/harbor#23134 Upstream-Author: @chlins Signed-off-by: Prasanth Baskar <[email protected]>
bupd
pushed a commit
to container-registry/harbor-next
that referenced
this pull request
Jun 9, 2026
Upstream-PR: goharbor/harbor#23134 Upstream-Author: @chlins Signed-off-by: Prasanth Baskar <[email protected]> (cherry picked from commit 2bb39fc) Signed-off-by: Prasanth Baskar <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Thank you for contributing to Harbor!
Comprehensive Summary of your change
This pull request introduces a security improvement to how extra attributes are handled in the GC (Garbage Collection) API. The main change is the addition of a
CleanExtraAttrsfunction, which removes sensitive information (specifically, theredis_url_regfield) from extra attributes before they are returned to the client. This ensures that sensitive data is not exposed through API responses.Security and Data Sanitization Improvements:
CleanExtraAttrsinmodel/gc.goto filter out sensitive fields (likeredis_url_reg) from extra attributes before returning them to the client.GetGCHistory,GetGC, andToSwagger) to useCleanExtraAttrs, ensuring sensitive data is consistently removed. [1] [2] [3]Issue being fixed
Fixes #(issue)
Please indicate you've done the following: