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: checking chalk permissions on self-extract #104

Merged
merged 1 commit into from
Dec 7, 2023
Merged

Conversation

miki725
Copy link
Contributor

@miki725 miki725 commented Dec 5, 2023

Description

When chalk binary has only execute permission:

$ ls -la chalk
-rwx--x--x  1  root  sudo  10114504 Dec  5 00:27 chalk

Chalk binary can execute however during self-extract it will be unable to read itself therefore would be unable to load embedded config and chalk proceeds running with default configs which is incorrect. This adds a check during self-extract which ensures chalk has read permission on itself.

Testing

found this issue while using github action

@miki725 miki725 force-pushed the ms/presign branch 2 times, most recently from 45aff8a to f8254f9 Compare December 6, 2023 17:13
When chalk binary has only execute permission:

```
$ ls -la chalk
-rwx--x--x  1  root  sudo  10114504 Dec  5 00:27 chalk
```

Chalk binary can execute however during self-extract it will be unable
to read itself therefore would be unable to load embedded config
and chalk proceeds running with default configs which is incorrect.
This adds a check during self-extract which ensures chalk
has read permission on itself.
@miki725 miki725 changed the base branch from ms/presign to main December 6, 2023 17:21
@miki725 miki725 marked this pull request as ready for review December 6, 2023 17:21
@miki725 miki725 requested a review from viega as a code owner December 6, 2023 17:21
@viega viega merged commit a89e0cb into main Dec 7, 2023
4 checks passed
@viega viega deleted the ms/readpermission branch December 7, 2023 21:51
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.

2 participants