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

Failing to run JFrog Bot Scan #654

Open
Sof0-0 opened this issue Feb 29, 2024 · 3 comments
Open

Failing to run JFrog Bot Scan #654

Sof0-0 opened this issue Feb 29, 2024 · 3 comments
Labels
question Further information is requested

Comments

@Sof0-0
Copy link

Sof0-0 commented Feb 29, 2024

Hello, I have been trying to set up the JFrog Xray scanning for the repository in my organization and it keeps failing on something like this:
Screenshot 2024-02-29 at 17 57 18

I want to ask how exactly are the scans being conducted? Does the product has to be fully functional for scan to work or do I have to manually add dependencies and environment variables. Here is the configuration file:
Screenshot 2024-02-29 at 17 59 06

I would appreciate your help!

@Sof0-0 Sof0-0 added the question Further information is requested label Feb 29, 2024
@gailazar300
Copy link
Contributor

gailazar300 commented Mar 3, 2024

Hello @Sof0-0
Can you please share your "JF_REQUIREMENTS_FILE" environment variable content in the attached configuration file?
The error may occur if this variable is not set, as Frogbot will try to build the project without considering the requirements file.

You can try to add it manually to the configuration file:

        # Pip requirements.txt file path
        JF_REQUIREMENTS_FILE: ""

@sharvesh06
Copy link

I have similar issue,
22:22:44 [Info] Xray scan completed 22:22:53 [Error] the following errors occured while fixing vulnerabilities in '/tmp/jfrog.cli.temp.-1710281552-1494864668': an error occurred while attempting to read the requirements file: open setup.py: no such file or directory
We have a monorepo and JF_REQUIREMENTS_FILE is set to ""

@eranturgeman
Copy link
Contributor

Hello @Sof0-0 and @sharvesh06
Let me break it down for you:
It all depends on how you configured your CI workflow file. In general- Frogbot is searching for descriptor files in the project. After finding them it can decide which technology is being used in the project so it can perform the dependencies graphs constructions and the fixes correctly.
When using python, since this language enables providing descriptor files in many different names, we require the customer to provide the descriptor file name.
Now, if you didn't define a structure to your project in the CI file (meaning didn't define workingDirs [modules] manually) Frogbot will recursively scan the entire project and will search for the descriptor files (in your case - the file's name you provided in through pipRequirementsFile or JF_REQUIREMENTS_FILE). If you have defined working dirs, Frogbot will NOT perform a recursive scan and will search for the descriptor in the path you provided for the workingDir.

The error you are experiencing indicates that a descriptor is not found in the searched working dir. I assume this happens due to one of the following:

  1. you didn't provide the name of the python descriptor you use (unless you use setup.py)
  2. you defined workingDirs and you don't have the descriptor in the root path you defined for the working dir

If one of the scenarios above applied to you let me know and it will be easier to resolve. If not, I'd like to further investigate and I'd appreciate if you can provide the full workflow file and frogbot-config.yml you use (if you use this file)

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

No branches or pull requests

4 participants