Skip to content

Add Snap ecosystem support#1624

Open
andrew wants to merge 1 commit into
mainfrom
snap-ecosystem
Open

Add Snap ecosystem support#1624
andrew wants to merge 1 commit into
mainfrom
snap-ecosystem

Conversation

@andrew
Copy link
Copy Markdown
Member

@andrew andrew commented May 7, 2026

Adds support for indexing Snap packages from the Snap Store.

The full package list comes from snapcraft.io/store/sitemap.xml (~7400 snaps in a single request) rather than api.snapcraft.io/api/v1/snaps/names, which is aggressively rate-limited and returned 429 on the second call during testing. The sitemap also includes <lastmod> dates so the same fetch drives recently_updated_package_names.

Per-package metadata comes from api.snapcraft.io/v2/snaps/info/{name} with the required Snap-Device-Series: 16 header. This endpoint is not rate-limited in practice.

Maps links.source → repository_url, license → licenses, summary → description, publisher → namespace and maintainer. Channel-map entries are deduped by version across architectures; each version records architectures, channels, revision, base, confinement, size, and the .snap download URL with its sha3-384 hash. The base snap (core24 etc) is recorded as a runtime dependency so reverse lookups like "what runs on core22" work. purl type is snap.

Repology doesn't index snap at all, likely because of the v1 API rate limits.

To enable in production:

Registry.find_or_create_by(name: 'snapcraft.io', url: 'https://snapcraft.io', ecosystem: 'snap', github: 'snapcore', default: true).sync_all_packages_async

Closes #1615

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for Snap packages (snapcraft)

1 participant