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(controller): do not normalize urls when searching for image creds #3110

Merged
merged 1 commit into from
Dec 10, 2024

Conversation

krancour
Copy link
Member

@krancour krancour commented Dec 10, 2024

Fixes #2928

We formerly applied git repo URL and chart repo URL normalization to all repo URLs when searching for credentials because we believed it to be safe.

An edge case we'd not previously identified involved that fact that an image repo URL of the form host:port/name can be mistaken for an SCP-style Git URL and would thus be normalized as host:port/name 😬 and would prevent a successful match.

This PR causes us to selectively normalize based on the type of credential we're searching for.

@krancour krancour added this to the v1.2.0 milestone Dec 10, 2024
@krancour krancour self-assigned this Dec 10, 2024
@krancour krancour requested a review from a team as a code owner December 10, 2024 03:23
Copy link

netlify bot commented Dec 10, 2024

Deploy Preview for docs-kargo-io ready!

Name Link
🔨 Latest commit c152dfe
🔍 Latest deploy log https://app.netlify.com/sites/docs-kargo-io/deploys/6757b443ae74b10008e8682c
😎 Deploy Preview https://deploy-preview-3110.docs.kargo.io
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

codecov bot commented Dec 10, 2024

Codecov Report

Attention: Patch coverage is 66.66667% with 5 lines in your changes missing coverage. Please review.

Project coverage is 51.13%. Comparing base (3a1ee47) to head (c152dfe).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
internal/credentials/kubernetes/database.go 66.66% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3110      +/-   ##
==========================================
- Coverage   51.14%   51.13%   -0.01%     
==========================================
  Files         283      283              
  Lines       25469    25483      +14     
==========================================
+ Hits        13026    13032       +6     
- Misses      11750    11757       +7     
- Partials      693      694       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@krancour krancour added this pull request to the merge queue Dec 10, 2024
Merged via the queue into akuity:main with commit 193c579 Dec 10, 2024
29 checks passed
@krancour krancour deleted the krancour/creds-db-fix branch December 10, 2024 13:47
github-actions bot pushed a commit that referenced this pull request Dec 10, 2024
@akuitybot
Copy link

fykaa pushed a commit to fykaa/kargo that referenced this pull request Dec 20, 2024
fykaa pushed a commit to fykaa/kargo that referenced this pull request Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Credentials secret with regex incompatible with container registry on custom port
3 participants