-
Notifications
You must be signed in to change notification settings - Fork 303
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
pytx: Searching for a ThreatDescriptor shows 'privacy_type': None #161
Comments
You aren't doing anything wrong per-se :) With a recent update we will only return the contents of https://github.com/facebook/ThreatExchange/blob/master/pytx/pytx/threat_descriptor.py#L36 With nothing to set to the attribute coming back from the server, it will be shown as from pytx import ThreatDescriptor
results = ThreatDescriptor.objects(
text='giz.exe',
owner='1678314142420566', # me
fields=ThreatDescriptor._fields
)
for result in results:
print(result.to_dict()) This will force the fields ThreatExchange returns to be all of the available fields. Before the recent change I'm not sure if you'd get the |
Perfect, thanks! It looks like 'privacy_members' is still None, but the privacy_type is now set correctly. It would be useful to know which privacy group specifically shared the descriptor. I might trust some groups more than others. I could also generate metrics for contributions to private groups. Is there another approach I could use to find that information? |
I think that's something that I've asked about in the past, but related to searching for the privacy_group that shared the content. If you used My gut feeling is that it's not shared because Privacy Groups have a |
@mgoffin is correct. A person can only see the name, description, and members if the |
Thanks for the help. Is there a way to know if a particular ThreatDescriptor or other object is shared with a privacy group? If not, I suppose I could approach it a different way. For example, I could get a list of all members in a privacy group, then look for descriptors that have that member as the owner with a privacy type of HAS_PRIVACY_GROUP. |
I don't believe so. I think this was related to my request to allow searching on the I don't think anything came of that, but the thread was in the FB group if you can find it :) |
I added a ThreatDescriptor with a privacy_type of "HAS_PRIVACY_GROUP", but searching for it in pytx is returning "None" as the privacy_type. Just to note, the indicator is not sensitive. I was just testing. Details below.
Using pytx, I added the following ThreatDescriptor:
The following response returned: {'id': '1447134161986113', 'success': True}
Then I took a look at the indicator directly in my browser with: https://graph.facebook.com/v2.8/1447134161986113/?access_token=[REDACTED]
It showed what I would expect:
However, when I did the following, privacy_type was set to 'None':
The following was printed:
Am I doing something wrong or is this the wrong expectation? Thanks!
The text was updated successfully, but these errors were encountered: