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

Stix Export results in invalid xml #975

Closed
sinloft opened this issue Feb 24, 2016 · 2 comments
Closed

Stix Export results in invalid xml #975

sinloft opened this issue Feb 24, 2016 · 2 comments
Labels
import/export This issue involves importing and/or exporting T: bug Type: bug report: This issue describes unexpected behaviour

Comments

@sinloft
Copy link

sinloft commented Feb 24, 2016

Hi,

we recently upgraded to Misp Version 2.4.23. I tried export our data in the STIX format, and I ran into errors running the exported data through the STIX validator from https://github.com/STIXProject/stix-validator (version 2.4.0). To reproduce the problem I created an event that contains one "Targeting data" "target-email" attribute:

capture

misp.stix.event115.xml.txt

This is the output I get from the stix-validator.py

stix-validator.py misp.stix.event115.xml
[-] Performing xml schema validation on misp.stix.event115.xml
[-] Results: misp.stix.event115.xml
[!] XML Schema: False
[!] misp.stix.event115.xml:82:0:ERROR:SCHEMASV:SCHEMAV_CVC_DATATYPE_VALID_1_2_1: Element '{http://stix.mitre.org/Incident-1}Victim', attribute '{http://www.w3.org/2001/XMLSchema-instance}type': The QName value 'ciqIdentity:CIQIdentity3.0InstanceType' has no corresponding namespace declaration in scope.
[!] misp.stix.event115.xml:82:0:ERROR:SCHEMASV:SCHEMAV_CVC_DATATYPE_VALID_1_2_1: Element '{http://stix.mitre.org/Incident-1}Victim', attribute 'id': The QName value 'example:Identity-56cdc447-61c0-4dd1-8459-1e8c0a0164ca' has no corresponding namespace declaration in scope.
[!] misp.stix.event115.xml:82:0:ERROR:SCHEMASV:SCHEMAV_CVC_DATATYPE_VALID_1_2_1: Element '{http://stix.mitre.org/Incident-1}Victim', attribute 'id': 'example:Identity-56cdc447-61c0-4dd1-8459-1e8c0a0164ca' is not a valid value of the atomic type 'xs:QName'.
[!] misp.stix.event115.xml:82:0:ERROR:SCHEMASV:SCHEMAV_CVC_IDC: Element '{http://stix.mitre.org/Incident-1}Victim', attribute 'id': Warning: No precomputed value available, the value was either invalid or something strange happend.
[!] misp.stix.event115.xml:84:0:ERROR:SCHEMASV:SCHEMAV_ELEMENT_CONTENT: Element '{http://stix.mitre.org/extensions/Identity#CIQIdentity3.0-1}Specification': This element is not expected. Expected is ( {http://stix.mitre.org/common-1}Related_Identities ).

Is this a known issue?

Regards
Chris

@sinloft sinloft changed the title Stix Export results ind invalid xml Stix Export results in invalid xml Feb 24, 2016
@iglocska
Copy link
Member

Thanks for letting us know, definitely not a known issue so far. I'll look
into it and will let you know here once it's fixed.

On Wed, Feb 24, 2016 at 4:15 PM, sinloft notifications@github.com wrote:

Hi,

we recently upgraded to Misp Version 2.4.23. I tried export our data in
the STIX format, and I ran into errors running the exported data through
the STIX validator from https://github.com/STIXProject/stix-validator
(version 2.4.0). To reproduce the problem I created an event that contains
one "Targeting data" "target-email" attribute:

[image: capture]
https://cloud.githubusercontent.com/assets/1282666/13289565/ae72e198-db10-11e5-996c-0f8417ed3665.PNG

misp.stix.event115.xml.txt
https://github.com/MISP/MISP/files/144818/misp.stix.event115.xml.txt

This is the output I get from the stix-validator.py

stix-validator.py misp.stix.event115.xml

[-] Performing xml schema validation on misp.stix.event115.xml

[-] Results: misp.stix.event115.xml

[!] XML Schema: False

[!] misp.stix.event115.xml:82:0:ERROR:SCHEMASV:SCHEMAV_CVC_DATATYPE_VALID_1_2_1: Element '{http://stix.mitre.org/Incident-1}Victim', attribute '{http://www.w3.org/2001/XMLSchema-instance}type': The QName value 'ciqIdentity:CIQIdentity3.0InstanceType' has no corresponding namespace declaration in scope.

[!] misp.stix.event115.xml:82:0:ERROR:SCHEMASV:SCHEMAV_CVC_DATATYPE_VALID_1_2_1: Element '{http://stix.mitre.org/Incident-1}Victim', attribute 'id': The QName value 'example:Identity-56cdc447-61c0-4dd1-8459-1e8c0a0164ca' has no corresponding namespace declaration in scope.

[!] misp.stix.event115.xml:82:0:ERROR:SCHEMASV:SCHEMAV_CVC_DATATYPE_VALID_1_2_1: Element '{http://stix.mitre.org/Incident-1}Victim', attribute 'id': 'example:Identity-56cdc447-61c0-4dd1-8459-1e8c0a0164ca' is not a valid value of the atomic type 'xs:QName'.

[!] misp.stix.event115.xml:82:0:ERROR:SCHEMASV:SCHEMAV_CVC_IDC: Element '{http://stix.mitre.org/Incident-1}Victim', attribute 'id': Warning: No precomputed value available, the value was either invalid or something strange happend.

[!] misp.stix.event115.xml:84:0:ERROR:SCHEMASV:SCHEMAV_ELEMENT_CONTENT: Element '{http://stix.mitre.org/extensions/Identity#CIQIdentity3.0-1}Specification': This element is not expected. Expected is ( {http://stix.mitre.org/common-1}Related_Identities ).

Is this a known issue?

Regards
Chris


Reply to this email directly or view it on GitHub
#975.

@elhoim elhoim added T: enhancement Type: enhancement. This issue requires improving an existing feature import/export This issue involves importing and/or exporting T: bug Type: bug report: This issue describes unexpected behaviour and removed T: enhancement Type: enhancement. This issue requires improving an existing feature labels Feb 24, 2016
@Rafiot Rafiot added this to the release-2.5-hotfix milestone Mar 23, 2016
@adulau
Copy link
Member

adulau commented Feb 1, 2017

I think this bug was previously fixed. Don't hesitate to re-open the issue if you think that this issue is not fixed.

@adulau adulau closed this as completed Feb 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
import/export This issue involves importing and/or exporting T: bug Type: bug report: This issue describes unexpected behaviour
Projects
None yet
Development

No branches or pull requests

5 participants