Skip to content

Output format design #3

Description

@pombredanne

We are relating development codebase paths (aka. "source code") to deployed/deployment codebase paths (aka. "binaries") .

A simple design for the output is to reuse exactly the ScanCode format and add a new attribute to the "files". We could have as a major either the scan for the devel or deploy side.
If we have devel as a major, then the results should be the list of deploy paths that a devel file is deployed_to as proposed below. This could be either a simple list of paths, OR a richer list of where we have for each "deployed_to" path we know:

  • the matcher that was used to establish the trace, e.g. the devel-to-deploy relationship such as a path match, a strace'd build, a checksum/sha1 match, etc.
  • the level of confidence of that match (a sha1 match is super strong and high confidence while a mere file name match is weak and low confidence)
  "files": [
    {
      "path": "samples/README",
      "type": "file",
      "name": "README",
      "base_name": "README",
      "extension": "",
      "size": 236,
      "date": "2019-09-10",
      "sha1": "2e07e32c52d607204fad196052d70e3d18fb8636",
      "md5": "effc6856ef85a9250fb1a470792b3f38",
      "mime_type": "text/plain",
      "file_type": "ASCII text",
      "programming_language": null,
      "is_binary": false,
      "is_text": true,
      "is_archive": false,
      "is_media": false,
      "is_source": false,
      "is_script": false,
      "files_count": 0,
      "dirs_count": 0,
      "size_count": 0,
      "scan_errors": []
      "deployed_to": [
         "samples/screenshot.png",
         "samples/screenshot.foo",
         "samples/screenshot.baz",
      ]
... OR ...
      "deployed_to": [
         {"path": "samples/screenshot.png",
          "matcher": "path match",
          "confidence": "low"
         },
         {"path": "samples/screenshot.png",
          "matcher": "strace",
          "confidence": "perfect"
         },
         {"path": "samples/screenshot.png",
          "matcher": "checksum",
          "confidence": "perfect"
         },
      ]

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions