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: add permission check to argocd-cli #9057

Merged

Conversation

ashutosh16
Copy link
Contributor

@ashutosh16 ashutosh16 commented Apr 10, 2022

Signed-off-by: Ashutosh

This is a fix for #5780

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).

Signed-off-by: asingh51 <Ashutosh_Singh@intuit.com>
@ashutosh16 ashutosh16 marked this pull request as draft April 10, 2022 04:31
@ashutosh16 ashutosh16 changed the title add permission check to argocd-cli chore: add permission check to argocd-cli Apr 10, 2022
@ashutosh16 ashutosh16 marked this pull request as ready for review April 10, 2022 04:38
@codecov
Copy link

codecov bot commented Apr 10, 2022

Codecov Report

Merging #9057 (b61a60f) into master (60eb2af) will decrease coverage by 0.04%.
The diff coverage is 50.00%.

@@            Coverage Diff             @@
##           master    #9057      +/-   ##
==========================================
- Coverage   45.21%   45.17%   -0.05%     
==========================================
  Files         214      214              
  Lines       25436    25444       +8     
==========================================
- Hits        11502    11495       -7     
- Misses      12313    12331      +18     
+ Partials     1621     1618       -3     
Impacted Files Coverage Δ
util/localconfig/localconfig.go 6.03% <50.00%> (+3.25%) ⬆️
applicationset/services/scm_provider/github.go 63.52% <0.00%> (-17.65%) ⬇️
util/settings/settings.go 48.10% <0.00%> (ø)
applicationset/services/scm_provider/utils.go 88.50% <0.00%> (+4.59%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 60eb2af...b61a60f. Read the comment docs.

@ashutosh16 ashutosh16 marked this pull request as draft April 10, 2022 04:44
Signed-off-by: asingh51 <Ashutosh_Singh@intuit.com>
@ashutosh16 ashutosh16 marked this pull request as ready for review April 10, 2022 06:51
@ashutosh16
Copy link
Contributor Author

tested in my local and here the output
./argocd login --insecure localhost:8080 --username admin WARNING: server is not configured with TLS. Proceed (y/n)? y FATA[0002] config file has incorrect permission flags:-rw----rw-.change the file permission either to 0400 or 0600.

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.

lgtm! Thanks @ashutosh16!

@crenshaw-dev crenshaw-dev merged commit 3c0854f into argoproj:master Apr 10, 2022
@ashutosh16 ashutosh16 deleted the chores-asingh-file-permission branch April 10, 2022 16:50
@ashutosh16 ashutosh16 changed the title chore: add permission check to argocd-cli fix: add permission check to argocd-cli Apr 22, 2022
wojtekidd pushed a commit to wojtekidd/argo-cd that referenced this pull request Apr 25, 2022
* add permission check to argocd-cli

Signed-off-by: asingh51 <Ashutosh_Singh@intuit.com>

* Retrigger CI pipeline

Signed-off-by: asingh51 <Ashutosh_Singh@intuit.com>

Co-authored-by: asingh51 <Ashutosh_Singh@intuit.com>
Signed-off-by: wojtekidd <wojtek.cichon@protonmail.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