Use Orbit graph queries to answer questions about GitLab Package Registry packages and Container Registry repositories across projects and groups. Use it to find which projects host a package. It covers package versions and their files, declared dependencies, known vulnerabilities, and the pipelines that built them. Load it with the `orbit` skill. Skip it for one project's package list or for publishing, which `glab` and the package manager handle.
90%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Passed
No findings from the security scan
Use these rules and recipes with the orbit skill, which covers query syntax,
schema discovery, and the iteration budget. Run each recipe with
glab orbit query "<query>", because the recipes contain single-quoted strings.
These nodes are the free-tier GitLab Package Registry and Container Registry. Artifact Registry (Artifact Central) data is not in Orbit. When asked about Artifact Registry, say so, and do not list free-tier packages in its place.
Package, PackageFile, Dependency, and ContainerRepository.Package holds one row per package version.p.status IN ['default', 'error', 'deprecated']. Without it, counts include hidden packages, packages still processing, and packages pending_destruction.MATCH (p:Package)-[:IN_PROJECT]->(pr:Project) WHERE pr.full_path STARTS WITH 'gitlab-org/'. Walking Group and CONTAINS to a fixed depth misses deeper subgroups.PackageFile rows are the stored files of a package version, such as one .tgz or .jar. They are not the files inside the archive. Read them with -[:HAS_PACKAGE_FILE]->(f:PackageFile).BUILT_BY links a package or file to the CI/CD pipeline that built it. DECLARES_DEPENDENCY links a package to the dependencies it declares, which is not proof the dependency is used at run time.HAS_VULNERABILITY link is not proof a package is safe. The link comes from SBOM data, matched by package name and version.Vulnerability is one record in one project: the project whose SBOM matched the package, not the package's own project. One advisory found in 29 projects is 29 records. Count advisories with count(DISTINCT i.external_id) on the primary identifier, as in the recipe.HAS_VULNERABILITY link ties a vulnerability to a package version.ContainerRepository has no tags. Read the tag count from the Container Registry API with the repository id, and no /api/v4/ prefix: glab api "registry/repositories/<id>?tags_count=true".has_more: true or truncated: true, or one cut short by LIMIT, is not the full result. Never generalize from that page, such as saying all rows belong to one project. Group and count instead, as in the recipe, or page with SKIP.One package name can be published in more than one project. Group by project in one query rather than listing versions, which hides the smaller projects.
MATCH (p:Package {name: '@gitlab/frontend-utils'})-[:IN_PROJECT]->(pr:Project)
RETURN pr.full_path, count(p) AS versions
ORDER BY versions DESC
LIMIT 10MATCH (p:Package)-[:IN_PROJECT]->(pr:Project {full_path: 'gitlab-org/editor-extensions/gitlab-lsp'})
WHERE p.status IN ['default', 'error', 'deprecated']
RETURN p.package_type, count(p) AS packages
ORDER BY packages DESC
LIMIT 10To count one format, add a type filter, such as (p:Package {package_type: 'npm'}).
MATCH (p:Package)-[:IN_PROJECT]->(pr:Project)
WHERE pr.full_path STARTS WITH 'gitlab-org/' AND p.status IN ['default', 'error', 'deprecated']
RETURN pr.full_path, count(p) AS packages
ORDER BY packages DESC
LIMIT 10Count them with one aggregate query rather than a sample.
MATCH (p:Package)-[:DECLARES_DEPENDENCY]->(d:Dependency {name: 'lodash'}), (p)-[:IN_PROJECT]->(pr:Project)
WHERE pr.full_path STARTS WITH 'gitlab-org/' AND p.status IN ['default', 'error', 'deprecated']
RETURN pr.full_path, count(DISTINCT p) AS dependents
ORDER BY dependents DESC
LIMIT 10MATCH (p:Package {name: 'com/gitlab/javafuzz/javafuzz', version: '1.26'})-[:BUILT_BY]->(pl:Pipeline)
RETURN pl.id, pl.status, pl.ref
LIMIT 10For one file of the package, match PackageFile on its package_id:
MATCH (f:PackageFile {package_id: 4092779})-[:BUILT_BY]->(pl:Pipeline)
RETURN f.file_name, pl.id
LIMIT 10MATCH (p:Package {name: '@gitlab-org/duo-workflow-service', version: '0.1.2'})-[:HAS_PACKAGE_FILE]->(f:PackageFile)
RETURN f.file_name, f.size
LIMIT 50advisories counts distinct primary identifiers. affected_projects counts
the projects whose SBOM matched the package. Say with every result that a
missing link is not proof that a package is safe.
MATCH (p:Package)-[:HAS_VULNERABILITY]->(v:Vulnerability)-[:HAS_FINDING]->(o:VulnerabilityOccurrence)-[:HAS_IDENTIFIER]->(i:VulnerabilityIdentifier), (p)-[:IN_PROJECT]->(pr:Project)
WHERE pr.full_path STARTS WITH 'gitlab-org/'
RETURN p.name, p.version, count(DISTINCT i.external_id) AS advisories, count(DISTINCT v.project_id) AS affected_projects
ORDER BY advisories DESC
LIMIT 20Advisories by severity for one package version:
MATCH (p:Package {name: 'commons-io/commons-io', version: '2.3'})-[:HAS_VULNERABILITY]->(v:Vulnerability)-[:HAS_FINDING]->(o:VulnerabilityOccurrence)-[:HAS_IDENTIFIER]->(i:VulnerabilityIdentifier)
RETURN v.severity, count(DISTINCT i.external_id) AS advisories
ORDER BY advisories DESC
LIMIT 10MATCH (c:ContainerRepository)-[:IN_PROJECT]->(pr:Project {full_path: 'gitlab-org/gitlab'})
RETURN count(c) AS repositoriesRead tags from the Container Registry API with the repository id. Pass the
path without an /api/v4/ prefix, because glab api adds it:
glab api "registry/repositories/<repository-id>?tags_count=true"
glab api "projects/<project-id>/registry/repositories/<repository-id>/tags"gitlabhq/orbit-knowledge-graph
df9d9a3
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.