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

[FEATURE REQUEST] Ingest Github dependency information using GraphQL API #1348

Open
heryxpc opened this issue Aug 28, 2024 · 0 comments
Open
Labels
data-addition Describes adding new data to the graph GitHub Related to GitHub intel module

Comments

@heryxpc
Copy link
Contributor

heryxpc commented Aug 28, 2024

Title: Ingest dependencies information as Dependency nodes using GH GraphQL API

Description:
Currently, there is custom code to capture PythonLibrary dependencies https://github.com/lyft/cartography/blob/master/cartography/intel/github/repos.py#L523.
This is not generic (only supports Python setup.cfg and requirements.txt files), not covering other ecosystem's dependencies.

If the dependency graph is enabled (see https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/configuring-the-dependency-graph), Github automatically parses the project dependency lock files to generate a comprehensive graph.

This information is available via Github's GraphQL API, like:

repository(owner: "lyft", name: "cartography") {
    dependencyGraphManifests(first: 10) {
      nodes {
        dependencies(first: 10) {
          nodes {
            packageName
            requirements
          }
        }
      }
    }
  }

The idea is building a generic module that can ingest a node named Dependency during Github ingestion to surface (at least) direct dependencies.
This would be useful for software composition analysis to identify supply chain risks in any ecosystem supported by Github.

[optional Relevant Links:]
https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/about-supply-chain-security
https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/about-the-dependency-graph

@chandanchowdhury chandanchowdhury added GitHub Related to GitHub intel module data-addition Describes adding new data to the graph labels Aug 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data-addition Describes adding new data to the graph GitHub Related to GitHub intel module
Projects
None yet
Development

No branches or pull requests

2 participants