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/reading dir as file #63

Merged
merged 5 commits into from
Mar 1, 2022
Merged

Fix/reading dir as file #63

merged 5 commits into from
Mar 1, 2022

Conversation

love-bhardwaj
Copy link
Contributor

@love-bhardwaj love-bhardwaj commented Feb 25, 2022

  • Ready for review
  • Follows CONTRIBUTING rules
  • Reviewed by Snyk internal team

What does this PR do?

Fixes issue reported in #61

Checks if a file or directory. If a directory formulates a new path. EOENT error when a file is not found and we are unable to load it is handled on the CLI side and ignored.

Updated the test for nested .snyk file where parent or grandparent in the path has .snyk in the name.

How should this be manually tested?

Steps to reproduce:

  1. create a directory for a project (can be empty) which contains .snyk mkdir -p ~/test/my.snykProject/project
  2. create an empty .snyk file in the project. touch ~/test/my.snykProject/project/.snyk
  3. change into project directory cd ~/test/my.snykProject/project
  4. run snyk test -d

Any background context you want to provide?

This prevents users from running Snyk in CI/CD pipelines. Read ZD ticket for more context.

What are the relevant tickets?

We have an open ZD Ticket for this.

@love-bhardwaj love-bhardwaj requested review from a team and gclapperton and removed request for a team February 25, 2022 19:49
@CLAassistant
Copy link

CLAassistant commented Feb 25, 2022

CLA assistant check
All committers have signed the CLA.

@love-bhardwaj love-bhardwaj merged commit 4d13b44 into master Mar 1, 2022
@love-bhardwaj love-bhardwaj deleted the fix/reading-dir-as-file branch March 1, 2022 16:56
@snyksec
Copy link

snyksec commented Mar 1, 2022

🎉 This PR is included in version 1.22.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants