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

SNOW-676736: get file results in change of file permissions does not inherit parent folder permission #1338

Conversation

sfc-gh-aling
Copy link
Collaborator

Please answer these questions before submitting your pull requests. Thanks!

  1. What GitHub issue is this PR addressing? Make sure that there is an accompanying issue to your PR.

    Fixes #SNOW-676736

  2. Fill out the following pre-review checklist:

    • I am adding a new automated test(s) to verify correctness of my new code
    • I am adding new logging messages
    • I am adding a new telemetry message
    • I am modifying authorization mechanisms
    • I am adding new credentials
    • I am modifying OCSP code
    • I am adding a new dependency
  3. Please describe how your code solves the related issue.

mkstemp creates a temporary file in the most secure manner possible -- which is only given permission to the current user, not to group or other which is not expected.

change to use open which will inherit the default file permission.

@codecov-commenter
Copy link

Codecov Report

Merging #1338 (84ca942) into main (d016d81) will decrease coverage by 0.13%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #1338      +/-   ##
==========================================
- Coverage   82.32%   82.19%   -0.14%     
==========================================
  Files          60       60              
  Lines        8421     8424       +3     
  Branches     1247     1248       +1     
==========================================
- Hits         6933     6924       -9     
- Misses       1179     1189      +10     
- Partials      309      311       +2     
Impacted Files Coverage Δ
src/snowflake/connector/encryption_util.py 99.10% <100.00%> (+0.02%) ⬆️
src/snowflake/connector/ocsp_snowflake.py 76.24% <0.00%> (-1.49%) ⬇️
src/snowflake/connector/errors.py 89.78% <0.00%> (-0.54%) ⬇️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Collaborator

@sfc-gh-mkeller sfc-gh-mkeller left a comment

Choose a reason for hiding this comment

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

🚢 🚢

@sfc-gh-aling sfc-gh-aling enabled auto-merge (squash) November 22, 2022 22:20
@sfc-gh-aling sfc-gh-aling merged commit 0cc95b3 into main Nov 22, 2022
@sfc-gh-aling sfc-gh-aling deleted the SNOW-676736-get-file-results-in-change-of-file-permissions-does-not-inherit-parent-folder-permission branch November 22, 2022 22:33
@github-actions github-actions bot locked and limited conversation to collaborators Nov 22, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants