Git Product home page Git Product logo

Comments (8)

nnobelis avatar nnobelis commented on June 20, 2024 1

@sschuberth Could you maybe assign the issue to me ?

from ort.

sschuberth avatar sschuberth commented on June 20, 2024

@nnobelis could you please look into this?

from ort.

sschuberth avatar sschuberth commented on June 20, 2024

@alexandruz any insights what might have changed in FOSSID'S data model?

from ort.

nnobelis avatar nnobelis commented on June 20, 2024

@realbigflo Unfortunately, we cannot log the requests to FossID as they contain credentials.

We are also running this version and we don't get the the error.
Looking at your stack trace it seems FossID returns now for service.createScan an array and not a map anymore, but ORT should be able to handle this case.

If you want, reach me internally and we can look at this problem together.

from ort.

realbigflo avatar realbigflo commented on June 20, 2024

While debugging with @nnobelis we figured out, the problem is caused by an access problem of Fossid for the specific git repository. I thought initially, that the ssh key was added correctly to the bitbucket instance but unfortunately this wasn't the case.

This is the request that should be send to the FossID instance:

curl --header "Content-Type: application/json" --request POST --data "{\"action\":\"create\",\"group\":\"scans\",\"data\":{\"username\":\"username\",\"key\":\"mykey\",\"project_code\":\"test_project\",\"scan_code\":\"test_ssh_cred_fail\",\"scan_name\":\"test_ssh_cred_fail\",\"git_repo_url\":\"ssh git repo url\",\"git_branch\":\"develop\"}}" <fossid REST endpoint>
{"operation":"scans_create",
 "status":"0",
 "data":[{"code": "RequestData.Base.issue_with_executing_command",
              "message":"Field git_repo_url: there was an issue executing command: timeout 200 git ls-remote 'ssh git repo' 2>&1. Exit status: 128. Output: Repository not found The requested repository does not exist, or you do not have permission to access it. fatal: Could not read from remote repository.  Please make sure you have the correct access rights and the repository exists.",
              "message_parameters":{"fieldname":"git_repo_url",
                                                    "cmd":"timeout 200 git ls-remote 'ssh git repo' 2>&1",
                                                    "exitStatus":128,
                                                    "out":"Repository not found The requested repository does not exist, or you do not have permission to access it. fatal: Could not read from remote repository.  Please make sure you have the correct access rights and the repository exists."}
              }],
"error":"RequestData.Base.issues_while_parsing_request",
"message":"These issues were found while parsing the request:",
"message_parameters":[]
}

After correcting the authentication issue, the result of the request looks like:

{"operation":"scans_create",
 "status":"1",
 "data":{"scan_id":23732},
 "message":"Scan test_ssh_cred_fail has been created."
  }

The data field in the failure case is an array with a single element (map) while in the good case, it is only a map.

from ort.

nnobelis avatar nnobelis commented on June 20, 2024

Thanks a lot @realbigflo : Yeah, it seems they changed the syntax of the error response, with even more polymorphism :(
I will have a look.

from ort.

nnobelis avatar nnobelis commented on June 20, 2024

@sschuberth I started to work on it here: #8541

Unfortunately, the exception is still present: the polymorphic deserializer currently allows to process multiple responses for the same function: T, [T], { "xxx", T }.

Unfortunately, in this case, the responses are either data: { "scan_id": N } or something totally different e.g.

"data":[{"code": "RequestData.Base.issue_with_executing_command",
              "message":"Field git_repo_url: there was an issue executing command: timeout 200 git ls-remote 'ssh git repo' 2>&1. Exit status: 128. Output: Repository not found The requested repository does not exist, or you do not have permission to access it. fatal: Could not read from remote repository.  Please make sure you have the correct access rights and the repository exists.",
              "message_parameters":{"fieldname":"git_repo_url",
                                                    "cmd":"timeout 200 git ls-remote 'ssh git repo' 2>&1",
                                                    "exitStatus":128,
                                                    "out":"Repository not found The requested repository does not exist, or you do not have permission to access it. fatal: Could not read from remote repository.  Please make sure you have the correct access rights and the repository exists."}
              }],

I still need to work this out.

from ort.

nnobelis avatar nnobelis commented on June 20, 2024

As I don't see how to fix this without an ugly hack, I asked our OPS to create a ticket at FossID support.

from ort.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.