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

[jsonschema] Avoid directory collusion when fetching updatecli comments #621

Merged
merged 2 commits into from
Apr 7, 2022

Conversation

olblak
Copy link
Member

@olblak olblak commented Apr 7, 2022

Signed-off-by: Olblak me@olblak.com

Avoid directory when fetching updatecli comments

For the command updatecli jsonschema to populate the field "description", we cloned the updatecli directory in a temporary location and then we delete the directory once we are done. For some stupid reason I was using "/tmp/updatecli" which is also used by default by the scm resource to manipulate git repository. So I ended up in a situation where I deleted /tmp/updatecli
before any git operation to happen.

Test

To test this pull request, I used this configuration https://github.com/updatecli/website/blob/master/updatecli/updatecli.d/jsonschema.yaml

Additional Information

Tradeoff

Potential improvement

In the future, we have a risk of collusion if at some point we have a git repository "github.com/_comments/"

Signed-off-by: Olblak <me@olblak.com>
@olblak olblak added the bug Something isn't working label Apr 7, 2022
@olblak olblak added this to the 0.23.1 milestone Apr 7, 2022
Signed-off-by: Olblak <me@olblak.com>
@olblak olblak merged commit b7ebe52 into updatecli:main Apr 7, 2022
@olblak olblak changed the title Avoid directory when fetching updatecli comments [jsonschema] Avoid directory collusion when fetching updatecli comments Apr 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants