-
Notifications
You must be signed in to change notification settings - Fork 42
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
Cannot set string condition for RawArtifactType on Artifact Object #296
Comments
The Artifact object inherits from ObjectProperties - which enables you to set the condition: a = Artifact() |
I don't think it's as easy as that, @rpiazza . You want to set the @certau-davidg, I think it's likely that XML you've seen in the wild was not created with python-cybox, but you may be able to work around the issue by calling to_obj(), then modifying the "binding object" before exporting as XML. See the mixbox code for what I'm not sure the best way to fix this in python-cybox. We could have an explicit |
Thanks @gtback, that pretty much confirms all of our testing and object probes. At this point we will treat the Raw_Artifact as if it has an implicit condition="Contains" and avoid using condition="FitsPattern". |
You might be able to create a |
Hmm, that is a fair point. Will discuss internally. |
Any updates on this, @certau-davidg ? I'm hoping to release a new version of python-cybox in the next week or so. If there's anything we need to do to fix this, please let me know. |
Sorry @gtback like all great github dev moments I forgot to come back and leave a comment. |
Thanks for the update, @certau-davidg . We'll see if there's a good way for us to support this in the "API" (non-"binding") classes, without requiring the workaround I suggested above. |
I have seen usage of condition="Contains" for the RawArtifactType on an Artifact Object in the wild and would like to replicate this effect using the cybox artifact_object.
As far as I can tell, there does not appear to be a method to set the condition until after it has been exported to xml.
Even in the object form which is attached to the STIX object as "observable._object._properties", it still only has the "_data" and "_packed_data" objects exposed.
Am I missing something (#200)? or was the package I saw in the wild edited by hand and this part of the schema not added to the code-base?
The text was updated successfully, but these errors were encountered: