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(security): add url validation for help chat (#9956) #10417

Merged
merged 5 commits into from Feb 17, 2023

Conversation

saumeya
Copy link
Contributor

@saumeya saumeya commented Aug 21, 2022

closes #9956

Screenshot from 2022-08-21 19-19-31
Signed-off-by: saumeya saumeyakatyal@gmail.com

Note on DCO:

If the DCO action in the integration test fails, one or more of your commits are not signed off. Please click on the Details link next to the DCO action for instructions on how to resolve this.

Checklist:

  • Either (a) I've created an enhancement proposal and discussed it with the community, (b) this is a bug fix, or (c) this does not need to be in the release notes.
  • The title of the PR states what changed and the related issues number (used for the release note).
  • I've included "Closes [ISSUE #]" or "Fixes [ISSUE #]" in the description to automatically close the associated issue.
  • I've updated both the CLI and UI to expose my feature, or I plan to submit a second PR with them.
  • Does this PR require documentation updates?
  • I've updated documentation as required by this PR.
  • Optional. My organization is added to USERS.md.
  • I have signed off all my commits as required by DCO
  • I have written unit and/or e2e tests for my change. PRs without these are unlikely to be merged.
  • My build is green (troubleshooting builds).

@codecov
Copy link

codecov bot commented Aug 21, 2022

Codecov Report

Base: 47.46% // Head: 45.62% // Decreases project coverage by -1.84% ⚠️

Coverage data is based on head (eb2e57b) compared to base (4a06cb2).
Patch has no changes to coverable lines.

❗ Current head eb2e57b differs from pull request most recent head 071e9d2. Consider uploading reports for the commit 071e9d2 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #10417      +/-   ##
==========================================
- Coverage   47.46%   45.62%   -1.84%     
==========================================
  Files         246      236      -10     
  Lines       41885    28699   -13186     
==========================================
- Hits        19879    13093    -6786     
+ Misses      20008    13805    -6203     
+ Partials     1998     1801     -197     
Impacted Files Coverage Δ
cmpserver/plugin/plugin.go 49.28% <0.00%> (-29.23%) ⬇️
util/kube/kubectl.go 0.00% <0.00%> (-16.67%) ⬇️
util/grpc/errors.go 47.16% <0.00%> (-13.70%) ⬇️
util/git/creds.go 39.87% <0.00%> (-10.45%) ⬇️
applicationset/services/pull_request/github.go 14.00% <0.00%> (-9.95%) ⬇️
util/helm/cmd.go 24.57% <0.00%> (-7.83%) ⬇️
server/notification/notification.go 56.00% <0.00%> (-7.16%) ⬇️
applicationset/generators/pull_request.go 42.85% <0.00%> (-7.15%) ⬇️
util/io/paths.go 68.75% <0.00%> (-7.12%) ⬇️
server/application/terminal.go 12.75% <0.00%> (-6.73%) ⬇️
... and 236 more

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 at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@saumeya saumeya force-pushed the help-chat-url-validation branch 2 times, most recently from 5a7c8bb to d787a1b Compare September 26, 2022 13:03
Copy link
Collaborator

@crenshaw-dev crenshaw-dev left a comment

Choose a reason for hiding this comment

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

Thanks for the PR and for your patience on the review @saumeya!

ui/src/app/ui-banner/ui-banner.tsx Show resolved Hide resolved
ui/src/app/ui-banner/ui-banner.tsx Outdated Show resolved Hide resolved
@crenshaw-dev crenshaw-dev changed the title fix: add url validation for help chat fix: add url validation for help chat (#9956) Oct 9, 2022
@crenshaw-dev crenshaw-dev added cherry-pick/2.2 Candidate for cherry picking into the 2.2 release branch cherry-pick/2.3 Candidate for cherry picking into the 2.3 release branch cherry-pick/2.4 Candidate for cherry picking into the 2.4 release branch cherry-pick/2.5 labels Oct 9, 2022
Signed-off-by: saumeya <saumeyakatyal@gmail.com>
Signed-off-by: saumeya <saumeyakatyal@gmail.com>
Signed-off-by: saumeya <saumeyakatyal@gmail.com>
Signed-off-by: saumeya <saumeyakatyal@gmail.com>
@saumeya
Copy link
Contributor Author

saumeya commented Dec 10, 2022

@crenshaw-dev is some other change rquired or can this be merged? I can use a variable to validate it - in case magic string is bad practice.

@crenshaw-dev crenshaw-dev changed the title fix: add url validation for help chat (#9956) fix(security): add url validation for help chat (#9956) Feb 6, 2023
@crenshaw-dev crenshaw-dev added cherry-pick/2.6 and removed cherry-pick/2.3 Candidate for cherry picking into the 2.3 release branch cherry-pick/2.2 Candidate for cherry picking into the 2.2 release branch labels Feb 6, 2023
@crenshaw-dev crenshaw-dev merged commit 39cb524 into argoproj:master Feb 17, 2023
crenshaw-dev added a commit that referenced this pull request Feb 17, 2023
* fix: add url validation for help chat

Signed-off-by: saumeya <saumeyakatyal@gmail.com>

* lint check

Signed-off-by: saumeya <saumeyakatyal@gmail.com>

* lint fix

Signed-off-by: saumeya <saumeyakatyal@gmail.com>

* review comments

Signed-off-by: saumeya <saumeyakatyal@gmail.com>

---------

Signed-off-by: saumeya <saumeyakatyal@gmail.com>
Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
crenshaw-dev added a commit that referenced this pull request Feb 17, 2023
* fix: add url validation for help chat

Signed-off-by: saumeya <saumeyakatyal@gmail.com>

* lint check

Signed-off-by: saumeya <saumeyakatyal@gmail.com>

* lint fix

Signed-off-by: saumeya <saumeyakatyal@gmail.com>

* review comments

Signed-off-by: saumeya <saumeyakatyal@gmail.com>

---------

Signed-off-by: saumeya <saumeyakatyal@gmail.com>
Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
crenshaw-dev added a commit that referenced this pull request Feb 17, 2023
* fix: add url validation for help chat

Signed-off-by: saumeya <saumeyakatyal@gmail.com>

* lint check

Signed-off-by: saumeya <saumeyakatyal@gmail.com>

* lint fix

Signed-off-by: saumeya <saumeyakatyal@gmail.com>

* review comments

Signed-off-by: saumeya <saumeyakatyal@gmail.com>

---------

Signed-off-by: saumeya <saumeyakatyal@gmail.com>
Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
@crenshaw-dev
Copy link
Collaborator

Cherry-picked onto release-2.6 for 2.6.3, release-2.5 for 2.5.12, and release-2.4 for 2.4.24.

@woehrl01
Copy link
Contributor

@saumeya @crenshaw-dev This change now results in showing the chat button even though there is no url at all configured

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherry-pick/2.4 Candidate for cherry picking into the 2.4 release branch cherry-pick/2.5 cherry-pick/2.6
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ADA-ARGO-SA-01: help.chatUrl should be validated
3 participants