Repository navigation
fix: remove prefix.cc spam and stop refreshing prefix.cc by default - #86
Merged
Merged
Conversation
prefix.cc has no curation. Every tagged release since v0.1.1 has shipped 7 to 13 spam or broken prefix.cc rows. The spam removed by hand in Feb 2024 came back with later refreshes. main has 15 such rows in prefixcc and in each merged context: - onlyfans profiles (fugas, leaks, przecieki, veelana) - a cutt.ly short link (onlyfans) - adult sites (faptica; check and dick on pornhub.com) - commercial spam (rankrage and seokoeln on an SEO agency site; fs and qualityze on software product pages, qualityze also reported on prefix.cc) - junk teste.com entries (type, ljkl) - a namespace that prefix.cc serves corrupted (bgcat) List them in prefixcc.excluded.yaml, by host (subdomains included) or by prefix, with a reason for each. Drop matching entries when ingesting prefix.cc, and remove the rows from the bundled data. No other row shares a prefix or namespace with them, so no other row's status changes. A namespace whose host cannot be parsed is not excluded, so a malformed upstream entry cannot break the ingest. The loader rejects unknown keys, so a misspelled section cannot silently disable exclusions. A new test fails if any bundled context contains an excluded host, or an excluded prefix that came from prefix.cc. Refs linkml#61 Signed-off-by: jdsika <carlo.van-driesten@vdl.digital>
prefix.cc has no curation, so every refresh can bring in new spam unreviewed, as the June 2026 refresh did. linkml#61 asks to freeze it. The ETL now uses the bundled prefixcc.csv snapshot. Entries listed in prefixcc.excluded.yaml are still dropped from it, so a new exclusion takes effect on the next run. Canonical rows are loaded first, because merging depends on the order in which rows arrive. In sorted CSV order, 73 prefix.cc rows in merged would change: 70 would lose their canonical status (for example awol and commerce) and 3 prefix aliases would disappear. With canonical rows first, the snapshot and the merged contexts rebuild byte for byte. This relies on prefix.cc having no prefix aliases, which a test checks. slurp-prefixmaps --refresh-prefixcc still downloads prefix.cc, and prints every added or removed prefix.cc row so the change can be reviewed before committing. load_context(..., refresh=True) also uses the snapshot for prefix.cc. Semweb prefix fixes now belong in linked_data.curated.yaml, which already takes precedence over prefix.cc in the merged contexts. Before this change, fixes like the recent gx one came in through a prefix.cc refresh. README and docs explain this. Closes linkml#61 Signed-off-by: jdsika <carlo.van-driesten@vdl.digital>
kevinschaper
approved these changes
Nov 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #61.
Problem
prefix.cc has no curation, and anyone can register a prefix there.
mainnow has 15 such rows inprefixcc.csvand in eachmerged*context. Almost all are canonical, so for exampleload_converter("merged")compresseshttps://onlyfans.com/sammuwuu/xtofugas:x.leakspointing at a different spam site.The same problem has been reported to prefix.cc itself (cygri/prefix.cc#42). But prefix.cc's code hasn't changed since 2021, so we can't rely on it being fixed there.
Change
The PR has two commits, so the freeze can be dropped independently if you prefer.
fix:remove the spam and block it from coming backAdds
src/prefixmaps/data/prefixcc.excluded.yaml, which lists excluded hosts (subdomains included) and prefixes, each with a reason.from_prefixcc()drops matching entries before building the context.The loader rejects unknown sections, so a typo can't silently disable exclusions.
Removes the 15 rows from
prefixcc.csv,merged.csv,merged.monarch.csvandmerged.oak.csv:fugas,leaks,przecieki,veelanaonlyfansfaptica,check,dickrankrage,seokoelnfs,qualityzequalityzeis the spammer reported on Blacklisting spam sites cygri/prefix.cc#42type,ljklbgcat?No other row shares a prefix or namespace with these, so no other row's status changes.
A new test (
tests/test_core/test_prefixcc_exclusions.py) fails if any bundled context contains an excluded host, or an excluded prefix from prefix.cc. Run againstmain's data, it fails forprefixccand all three merged contexts.feat:stop refreshing prefix.cc by default, as asked in freeze prefix.cc refreshes #61prefixcc.csvsnapshot, minus exclusions, so adding an exclusion takes effect on the next run.mergedwould change. With canonical rows first,prefixcc.csvand all three merged CSVs rebuild byte for byte from the snapshot. Somake etlcauses no churn, and the CSV edits in this PR are exactly what the ETL now produces.slurp-prefixmaps --refresh-prefixccstill downloads prefix.cc, and prints every added or removed prefix.cc row for review.load_context(..., refresh=True)also uses the snapshot for prefix.cc. This is documented.linked_data.curated.yaml, which already takes precedence over prefix.cc in the merged contexts. README and docs say so.Not included
These look like junk rather than spam, so they're left for a maintainer to decide:
sirexthttp://t.me/sirextt/247:hellobethhttp://www.google.com/twitterhttp://stocktwits.com/leakhttp://maco.com/dawowman.orgquery URLvwdms,vwgwtest,test2,meat.invalidplaceholdersEach would be one line in
prefixcc.excluded.yaml.The
pgolink rot mentioned in #61 needs no change. A namespace IRI doesn't have to resolve, and PGO is a real vocabulary.Verification
refresh=Truebehaviour--refresh-prefixccrun into a temporary directorytox -e refreshpathmain's data.flake8with thetox -e flake8plugin set passes. The suite passes locally on Python 3.12 and 3.8, excepttest_w3id, which also fails onmainand is fixed in fix: read w3id namespaces from ids/ after upstream move #84. CI will show that one failure until fix: read w3id namespaces from ids/ after upstream move #84 is merged.