Giter Site home page Giter Site logo

Comments (7)

s-l-teichmann avatar s-l-teichmann commented on August 17, 2024 2

The decoding of the metadata fails earlier, but this error is wrongly rated as none essential and is only written to the report.
The analysis continues and dies later as the invariant of having the document loaded is not fulfilled.
The report then is never written out so that the reason of the error vanishes into nowhere.

I'm going to fix this.

from csaf_distribution.

bernhardreiter avatar bernhardreiter commented on August 17, 2024 1

Hi @tolim
note that we are still "work in progress", so some stuff may still fail or be suboptimal.

The failure comes from a call to

func (p *processor) jsonPath(expr string, doc interface{}) (interface{}, error) {
if doc == nil {
return nil, errors.New("no document to extract data from")

So I guess that some required attribute is missing from the provider-metatdata.json file.

We'll take this as a hint to add more diagnostic messages.
Thanks for the feedback!
Bernhard

from csaf_distribution.

s-l-teichmann avatar s-l-teichmann commented on August 17, 2024 1

PR #26 introduces a mechanism to stop a running domain check and still dump out the report. This needs some work because the parts of the check which do not run due to the stop are currently marked as successful. This is not correct.

from csaf_distribution.

tschmidtb51 avatar tschmidtb51 commented on August 17, 2024

I was stumbling upon

url := "https://" + domain + "/.well-known/csaf/provider-metadata.json"
use(&p.badProviderMetadatas)
res, err := client.Get(url)

but I might be on the wrong track:

The provider-metadata.json can be found either

More than one may exist, however to be valid at least one MUST exist... Even though the .well-known path is preferred it is not the only option here.

from csaf_distribution.

bernhardreiter avatar bernhardreiter commented on August 17, 2024

I suggest we make the location of the provider-metadata.json a new issue and refer to 7.2.2: "satisfies at least one of the requirements 8 to 10"

As far as I know, the first issue here is improved: we get a diagnostic message now with current main.

from csaf_distribution.

tschmidtb51 avatar tschmidtb51 commented on August 17, 2024

I suggest we make the location of the provider-metadata.json a new issue and refer to 7.2.2: "satisfies at least one of the requirements 8 to 10"

Sounds good to me.

from csaf_distribution.

bernhardreiter avatar bernhardreiter commented on August 17, 2024

The situation has improved. A call like

./bin-linux-amd64/csaf_checker example.org

now contains the following in the output:

  "domains": [
    {
      "name": "example.org",
[..]
         "description": "provider-metadata.json",
          "messages": [
            "No provider-metadata.json found.",
            "STOPPING here - cannot perform other checks."

So we believe this issue to be resolved.

from csaf_distribution.

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.