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

incorrect dependency tree for yarn.lock v2 #5611

Closed
DmitriyLewen opened this issue Nov 20, 2023 · 0 comments · Fixed by #5612
Closed

incorrect dependency tree for yarn.lock v2 #5611

DmitriyLewen opened this issue Nov 20, 2023 · 0 comments · Fixed by #5612
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug. scan/vulnerability Issues relating to vulnerability scanning

Comments

@DmitriyLewen
Copy link
Contributor

Description

yarn.lock v2 uses protocols in dependencies section:

# This file is generated by running "yarn install" inside your project.
# Manual changes might be lost - proceed with caution!

__metadata:
  version: 8
  cacheKey: 10c0

"app@workspace:.":
  version: 0.0.0-use.local
  resolution: "app@workspace:."
  dependencies:
    debug: "npm:^4.3.4"
  languageName: unknown
  linkType: soft

"debug@npm:^4.3.4":
  version: 4.3.4
  resolution: "debug@npm:4.3.4"
  dependencies:
    ms: "npm:2.1.2"
  peerDependenciesMeta:
    supports-color:
      optional: true
  checksum: cedbec45298dd5c501d01b92b119cd3faebe5438c3917ff11ae1bff86a6c722930ac9c8659792824013168ba6db7c4668225d845c633fbdafbbf902a6389f736
  languageName: node
  linkType: hard

"ms@npm:2.1.2":
  version: 2.1.2
  resolution: "ms@npm:2.1.2"
  checksum: a437714e2f90dbf881b5191d35a6db792efbca5badf112f87b9e1c712aace4b4b9b742dd6537f3edf90fd6f684de897cec230abde57e87883766712ddda297cc
  languageName: node
  linkType: hard

In this case, we will not be able to fill Indirect field correctly:

...
  "Results": [
    {
      "Target": "yarn.lock",
      "Class": "lang-pkgs",
      "Type": "yarn",
      "Packages": [
        {
          "ID": "[email protected]",
          "Name": "debug",
          "Version": "4.3.4",
          "DependsOn": [
            ""
          ],
          "Layer": {},
          "Locations": [
            {
              "StartLine": 16,
              "EndLine": 26
            }
          ]
        },
        {
          "ID": "[email protected]",
          "Name": "ms",
          "Version": "2.1.2",
          "Layer": {},
          "Locations": [
            {
              "StartLine": 28,
              "EndLine": 33
            }
          ]
        }
      ]
    }
  ]
}
@DmitriyLewen DmitriyLewen added kind/bug Categorizes issue or PR as related to a bug. scan/vulnerability Issues relating to vulnerability scanning labels Nov 20, 2023
@DmitriyLewen DmitriyLewen self-assigned this Nov 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. scan/vulnerability Issues relating to vulnerability scanning
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant