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

[BUG] Error generated when CLI iterates over an alias file when preparing ZIP #867

Open
maxfelius opened this issue Sep 13, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@maxfelius
Copy link

maxfelius commented Sep 13, 2024

Describe the bug

A clear and concise description of what the bug is.

I have a node_modules folder that I exclude when scanning the code. However, in the node_modeles there is a folder with alias files which have a relative path.

When I want to create scan, the cli iterates over all the files to include and exclude it to prepare the zip. However, the working directory is different than the alias files expected and thus the relative path is invalid.

This produces an error. e.g.
Error getting target info: stat ../jiti/bin/jiti.js: no such file or directory

The error is not blocking or breaking anything but it should be 'solved' for the users that are using it.

Expected behavior

A clear and concise description of what you expected to happen.

The expected behavior is to not show the error.

Actual behavior

A clear and concise description of where the behavior differed from the expected behavior

Currenty shows the error:
Error getting target info: stat ../jiti/bin/jiti.js: no such file or directory

when encountering this type of file.

Steps to reproduce

In the folder you would like to scan, create a symlink.

E.g.
ln -s ../images/link testalias

Then, use the cli to create a scan. The include/exclude mechanism will produce an error.

Environment

  • CLI version
    -> cli javascript wrapper 0.0.104
    -> cli version 2.1.6
  • Platform -> Linux

Additional comments

Add any other context about the problem here.

We are using the javascript cli wrapper to start the scans.

Logs

Paste the output from your CLI. Redact if needed.
Error getting target info: stat ../jiti/bin/jiti.js: no such file or directory

@maxfelius maxfelius added the bug Something isn't working label Sep 13, 2024
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

No branches or pull requests

1 participant