Charcoal-SE / metasmoke

Web dashboard for SmokeDetector.
https://metasmoke.erwaysoftware.com
Creative Commons Zero v1.0 Universal
43 stars 34 forks source link

ASN logic (sometimes) creates duplicate tags #516

Closed tripleee closed 6 years ago

tripleee commented 6 years ago

For example, AS-13335 is (at least) https://metasmoke.erwaysoftware.com/domains/tags/323, https://metasmoke.erwaysoftware.com/domains/tags/297, and https://metasmoke.erwaysoftware.com/domains/tags/401

ArtOfCode- commented 6 years ago

Did you add the ASN description to the tag description? That's what's done it - this is the relevant line:

https://github.com/Charcoal-SE/metasmoke/blob/master/app/models/spam_domain.rb#L19

If no tag exists with exactly that name, description, and special value, it'll create a new one.

CC @Undo1 to merge the tags, and I'll look for any more that need merging, and I'll move the description out of that call so it can be edited without this happening.

tripleee commented 6 years ago

Yeah, I figured editing would be okay to edit since the description is rather wanting in most cases, and the UI allowed if not outright invited it.

I created a query for these: https://metasmoke.erwaysoftware.com/data/sql/queries/143-duplicate-tags

tripleee commented 6 years ago

Wishlist: Could the created tag's description include the ASN name?

ArtOfCode- commented 6 years ago

How do I get the ASN's name, @tripleee? The existing command line returns "13335 | 104.24.112.0/20 | US | arin | 2014-03-28", which doesn't have the name in it.

tripleee commented 6 years ago

I'll create a separate ticket.