-
Notifications
You must be signed in to change notification settings - Fork 6.3k
feat(webhook): Fixed manifest-generate-paths annotation support for monorepos in BitBucket #21811
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
Conversation
❌ Preview Environment deleted from BunnyshellAvailable commands (reply to this comment):
|
Good iterations on the previous PR. I think we can only enable this feature if webook auth is enabled. Otherwise it's an easy SSRF |
Would mandating that the request from webhook handler would be made only if the repo creds are present in the system. If there is no secret present for the given URL, then we will not do the call to get the diffs. In that case, even for a public repository, users may need to add the repocreds. |
If there is no valid repo creds for a given URL, then no external call is made and the changeset remains empty. Would this check be sufficient to avoid SSRF.
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #21811 +/- ##
==========================================
+ Coverage 55.88% 55.91% +0.02%
==========================================
Files 343 343
Lines 57333 57437 +104
==========================================
+ Hits 32042 32117 +75
- Misses 22644 22671 +27
- Partials 2647 2649 +2 ☔ View full report in Codecov by Sentry. |
I don't think that's sufficient. Allowing a completely unauthenticated user to cause a credentialed API call would allow anyone with network access to use Argo to launch a DoS attack or to DoS Argo itself. |
5575227
to
10a6506
Compare
@crenshaw-dev Could you please check my recent change, where I am relying on |
e365aad
to
52378ce
Compare
17b5f17
to
93791bb
Compare
fc44260
to
5220bff
Compare
bcddb77
to
cbbbe00
Compare
07ce521
to
abd990f
Compare
@crenshaw-dev I have addressed your review comments and the PR is ready for review. Can it be considered for |
8bb575a
to
2525c69
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
0436f23
to
61a0ffb
Compare
Signed-off-by: anandf <anjoseph@redhat.com>
Signed-off-by: anandf <anjoseph@redhat.com>
61a0ffb
to
aae1b38
Compare
Signed-off-by: anandf <anjoseph@redhat.com>
…onorepos in BitBucket (argoproj#21811) Signed-off-by: anandf <anjoseph@redhat.com> Signed-off-by: Hapshanko <adamgaming391100@gmail.com>
Steps to verify this feature:
|
Unfortunately, this fix is only for Bitbucket Cloud, not for Bitbucket DataCentre (DC, Server). |
Fixes #18968
This PR addresses adds improvements for #20993
PR Summary:
This PR addresses an issue with the argocd.argoproj.io/manifest-generate-paths Manifest Paths Annotation in Argo CD when used with Bitbucket repositories.
Key Changes:
Prevents spurious refreshes in cases where multiple Applications are using the same Git monorepo stored in Bitbucket.
Ensures that the manifest-generate-paths annotation is handled correctly, refreshing the app only when the files changed match with the paths in manifest-generate-paths .
Steps to Verify this feature:
argocd-server
deployment to ensure that the log level configuration change is picked up by the application.Create a webhook for the private repository using the steps provided in https://support.atlassian.com/bitbucket-cloud/docs/manage-webhooks/
Create a Repository webhook token in BitBucket for the private repository and add the repository secret as follows
Detailed steps provided in this link : https://support.atlassian.com/bitbucket-cloud/docs/create-a-repository-access-token/
Checklist: