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

Recursive unscoping #87

Open
cybiere opened this issue Apr 21, 2019 · 2 comments
Open

Recursive unscoping #87

cybiere opened this issue Apr 21, 2019 · 2 comments

Comments

@cybiere
Copy link

cybiere commented Apr 21, 2019

It would be great to be able to recursively unscope entries, meaning unscoping domain would also unscope related subdomains, IPs, etc...

@kpcyrd
Copy link
Owner

kpcyrd commented Apr 21, 2019

That's a good point! The tricky part about it is that some structs are not strictly hierarchical, like one subdomain always belongs to one domain, but an ip might belong to multiple subdomains.

If we follow all possible relations recursively you could easily remove a large part of your database from your scope. One possible solution is explicitly whitelisting relations that are safe to follow in recursion. This would be everything with ON DELETE CASCADE set in its relations, and many-to-many tables acting as a barrier. This means when unscoping a domain you would automatically unscope its subdomains and urls, but not the ip addresses since subdomains<->ipaddrs is a many-to-many relation acting as a boundary.

I would consider noscope -r for regular recursion and noscope -rr to cross those boundaries as well on some cases (for example I think this makes sense for the subdomains<->ipaddrs table but doesn't make sense for the breach<->email table).

Would that work for you? There's a full list of all structs here, _id fields are foreign keys and there's a section about many-to-many tables at the bottom. Let me know if you want any specific use-cases covered.

Thanks!

@cybiere
Copy link
Author

cybiere commented Apr 22, 2019

That would be great this way ! I can't think of specific use cases right now, I just tried sn0int a few days ago and I felt this was missing.
I also have a few more ideas, but since I don't know anything about rust I might just open feature suggestions in here !
Thanks, this tool is really nice !

@kpcyrd kpcyrd mentioned this issue Jul 3, 2019
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

No branches or pull requests

2 participants