Repository navigation
Open
Description
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, astrace'd build, achecksum/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"
},
]
Metadata
Metadata
Assignees
Labels
No labels
Activity
pombredanne commentedon Nov 6, 2019
This format would imply that we provide a ScanCode-like output that is enhanced with tracecode data
mjherzog commentedon Nov 6, 2019
The second style for deployed_to makes much more sense. Assuming that "perfect" will not be a confidence value.
Include deployed_to, match and confidence related to match #3
Abstract the constant instead of string #3
To match the file with suffix #3
Add more match type and confidence level #3
Add more test and refine the folder structure #3
licodeli commentedon Nov 12, 2019
The test result is like this: https://github.com/nexB/tracecode-toolkit/blob/1-basic-command/tests/data/cli/basic/expected.json
Reorg import #3
Include checksum match #3
Add both the checksum match for sha1 and md5 #3
Format the code #3
Use function to abstract the shared code #3
Use or relationship instead of long code #3
Reine the test case #3
Remove useless code and imports #3
Avoid sha1 and md5 match run the same time #3
Make checksum match available only when path match exists too #3
Use attr instead of constructor #3
Refine variable and make develop as a base #3
Make the index dict's value as a list #3