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

Similarity ID duplication #3675

Closed
LeonidWeinberg opened this issue Jun 16, 2021 · 0 comments · Fixed by #3673
Closed

Similarity ID duplication #3675

LeonidWeinberg opened this issue Jun 16, 2021 · 0 comments · Fixed by #3673
Assignees
Labels
bug Something isn't working query New query feature

Comments

@LeonidWeinberg
Copy link

Expected Behavior

Each result has a unique similarity ID

Actual Behavior

Similarity ID duplicated with different results

Steps to Reproduce the Problem

  1. scan a project

  2. inspect results.json

    {
    	"query_name": "Apt Get Install Pin Version Not Defined",
    	"query_id": "965a08d7-ef86-4f14-8792-4a3b2098937e",
    	"query_url": "https://docs.docker.com/develop/develop-images/dockerfile_best-practices/",
    	"severity": "MEDIUM",
    	"platform": "Dockerfile",
    	"files": [
    		{
    			"file_name": "/mnt/fs/5cbab97d-a452-5ad8-8639-e03f66b728a0/github.com+AnsgarSchmidt+Mosquitto+ae53b04/Dockerfile",
    			"similarity_id": "7b32bf91c24708170b5bc3c97f8ef572a9052ae4b3714b0469846f4a13815ce0",
    			"line": 10,
    			"issue_type": "MissingAttribute",
    			"search_key": "FROM={{ubuntu:18.04}}.RUN={{apt-get update     \u0026\u0026     apt-get upgrade -y \u0026\u0026     apt-get install -y wget build-essential libwrap0-dev libssl-dev python-distutils-extra                        libc-ares-dev uuid-dev}}",
    			"search_value": "",
    			"expected_value": "Package 'wget' has version defined",
    			"actual_value": "Package 'wget' does not have version defined",
    			"value": null
    		},
    		{
    			"file_name": "/mnt/fs/5cbab97d-a452-5ad8-8639-e03f66b728a0/github.com+AnsgarSchmidt+Mosquitto+ae53b04/Dockerfile",
    			"similarity_id": "7b32bf91c24708170b5bc3c97f8ef572a9052ae4b3714b0469846f4a13815ce0",
    			"line": 10,
    			"issue_type": "MissingAttribute",
    			"search_key": "FROM={{ubuntu:18.04}}.RUN={{apt-get update     \u0026\u0026     apt-get upgrade -y \u0026\u0026     apt-get install -y wget build-essential libwrap0-dev libssl-dev python-distutils-extra                        libc-ares-dev uuid-dev}}",
    			"search_value": "",
    			"expected_value": "Package 'build-essential' has version defined",
    			"actual_value": "Package 'build-essential' does not have version defined",�
    			"value": null
    		},
    		{
    			"file_name": "/mnt/fs/5cbab97d-a452-5ad8-8639-e03f66b728a0/github.com+AnsgarSchmidt+Mosquitto+ae53b04/Dockerfile",
    			"similarity_id": "7b32bf91c24708170b5bc3c97f8ef572a9052ae4b3714b0469846f4a13815ce0",
    			"line": 10,
    			"issue_type": "MissingAttribute",
    			"search_key": "FROM={{ubuntu:18.04}}.RUN={{apt-get update     \u0026\u0026     apt-get upgrade -y \u0026\u0026     apt-get install -y wget build-essential libwrap0-dev libssl-dev python-distutils-extra                        libc-ares-dev uuid-dev}}",
    			"search_value": "",
    			"expected_value": "Package 'libwrap0-dev' has version defined",
    			"actual_value": "Package 'libwrap0-dev' does not have version defined",
    			"value": null
    		},
    		{
    			"file_name": "/mnt/fs/5cbab97d-a452-5ad8-8639-e03f66b728a0/github.com+AnsgarSchmidt+Mosquitto+ae53b04/Dockerfile",
    			"similarity_id": "7b32bf91c24708170b5bc3c97f8ef572a9052ae4b3714b0469846f4a13815ce0",
    			"line": 10,
    			"issue_type": "MissingAttribute",
    			"search_key": "FROM={{ubuntu:18.04}}.RUN={{apt-get update     \u0026\u0026     apt-get upgrade -y \u0026\u0026     apt-get install -y wget build-essential libwrap0-dev libssl-dev python-distutils-extra                        libc-ares-dev uuid-dev}}",
    			"search_value": "",
    			"expected_value": "Package 'libssl-dev' has version defined",
    			"actual_value": "Package 'libssl-dev' does not have version defined",
    			"value": null
    		},
    		{
    			"file_name": "/mnt/fs/5cbab97d-a452-5ad8-8639-e03f66b728a0/github.com+AnsgarSchmidt+Mosquitto+ae53b04/Dockerfile",
    			"similarity_id": "7b32bf91c24708170b5bc3c97f8ef572a9052ae4b3714b0469846f4a13815ce0",
    			"line": 10,
    			"issue_type": "MissingAttribute",
    			"search_key": "FROM={{ubuntu:18.04}}.RUN={{apt-get update     \u0026\u0026     apt-get upgrade -y \u0026\u0026     apt-get install -y wget build-essential libwrap0-dev libssl-dev python-distutils-extra                        libc-ares-dev uuid-dev}}",
    			"search_value": "",
    			"expected_value": "Package 'python-distutils-extra' has version defined",
    			"actual_value": "Package 'python-distutils-extra' does not have version defined",
    			"value": null
    		},
    		{
    			"file_name": "/mnt/fs/5cbab97d-a452-5ad8-8639-e03f66b728a0/github.com+AnsgarSchmidt+Mosquitto+ae53b04/Dockerfile",
    			"similarity_id": "7b32bf91c24708170b5bc3c97f8ef572a9052ae4b3714b0469846f4a13815ce0",
    			"line": 10,
    			"issue_type": "MissingAttribute",
    			"search_key": "FROM={{ubuntu:18.04}}.RUN={{apt-get update     \u0026\u0026     apt-get upgrade -y \u0026\u0026     apt-get install -y wget build-essential libwrap0-dev libssl-dev python-distutils-extra                        libc-ares-dev uuid-dev}}",
    			"search_value": "",
    			"expected_value": "Package 'libc-ares-dev' has version defined",
    			"actual_value": "Package 'libc-ares-dev' does not have version defined",
    			"value": null
    		},
    		{
    			"file_name": "/mnt/fs/5cbab97d-a452-5ad8-8639-e03f66b728a0/github.com+AnsgarSchmidt+Mosquitto+ae53b04/Dockerfile",
    			"similarity_id": "7b32bf91c24708170b5bc3c97f8ef572a9052ae4b3714b0469846f4a13815ce0",
    			"line": 10,
    			"issue_type": "MissingAttribute",
    			"search_key": "FROM={{ubuntu:18.04}}.RUN={{apt-get update     \u0026\u0026     apt-get upgrade -y \u0026\u0026     apt-get install -y wget build-essential libwrap0-dev libssl-dev python-distutils-extra                        libc-ares-dev uuid-dev}}",
    			"search_value": "",
    			"expected_value": "Package 'uuid-dev' has version defined",
    			"actual_value": "Package 'uuid-dev' does not have version defined",
    			"value": null
    		}
    	],
    	"category": "Supply-Chain",
    	"description": "When installing a package, its pin version should be defined"
    }
    

Specifications

  • Version: 1.3.1
  • Platform: windows
  • Subsystem:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working query New query feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants