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

Some modules produce an "id" property in their to_stix_mapping, but it's a reserved property #783

Closed
pcoccoli opened this issue Jan 20, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@pcoccoli
Copy link
Contributor

pcoccoli commented Jan 20, 2022

Describe the bug
In 2.1, every SCO has an id property (just like SDOs), so you can't map a native field to <sco_type>.id.

To Reproduce
In the source tree, run a command like find stix_shifter_modules/ -name "*to_stix_map.json" -exec grep -Hne '\.id"' {} \;

Output should be tested with stix2_validator (https://github.com/oasis-open/cti-stix-validator)

Expected behavior
If these native IDs need to be mapped, the modules should either use (deprecated) custom properties (see https://docs.oasis-open.org/cti/stix/v2.1/os/stix-v2.1-os.html#_p2sz1mp7z524) or extension definitions (https://docs.oasis-open.org/cti/stix/v2.1/os/stix-v2.1-os.html#_32j232tfvtly)

Screenshots

$ find stix_shifter_modules/ -name "*to_stix_map.json" -exec grep -Hne '\.id"' {} \;
stix_shifter_modules/async_dummy/stix_translation/json/to_stix_map.json:111:        "key": "process.id"
stix_shifter_modules/elastic_ecs/stix_translation/json/stix_2_1/to_stix_map.json:635:      "key": "x-oca-event.id",
stix_shifter_modules/elastic_ecs/stix_translation/json/stix_2_1/to_stix_map.json:1039:        "key": "x-ecs-user.id",
stix_shifter_modules/elastic_ecs/stix_translation/json/stix_2_1/to_stix_map.json:1127:      "key": "x-ecs-container.id",
stix_shifter_modules/elastic_ecs/stix_translation/json/stix_2_1/to_stix_map.json:1328:      "key": "x-ecs-error.id",
stix_shifter_modules/elastic_ecs/stix_translation/json/stix_2_1/to_stix_map.json:1501:      "key": "x-ecs-group.id",
stix_shifter_modules/elastic_ecs/stix_translation/json/stix_2_1/to_stix_map.json:1530:      "key": "x-oca-asset.id",
stix_shifter_modules/elastic_ecs/stix_translation/json/stix_2_1/to_stix_map.json:1928:      "key": "x-ecs-organization.id",
stix_shifter_modules/elastic_ecs/stix_translation/json/stix_2_1/to_stix_map.json:2021:      "key": "x-ecs-rule.id",
stix_shifter_modules/elastic_ecs/stix_translation/json/stix_2_1/to_stix_map.json:2051:      "key": "x-ecs-service.id",
stix_shifter_modules/elastic_ecs/stix_translation/json/stix_2_1/to_stix_map.json:2239:      "key": "x-ecs-trace.id",
stix_shifter_modules/elastic_ecs/stix_translation/json/stix_2_1/to_stix_map.json:2245:      "key": "x-ecs-transaction.id",
stix_shifter_modules/elastic_ecs/stix_translation/json/stix_2_1/to_stix_map.json:2287:      "key": "x-ecs-vulnerability.id",
stix_shifter_modules/elastic_ecs/stix_translation/json/to_stix_map.json:635:      "key": "x-oca-event.id",
stix_shifter_modules/elastic_ecs/stix_translation/json/to_stix_map.json:1067:        "key": "x-ecs-user.id",
stix_shifter_modules/elastic_ecs/stix_translation/json/to_stix_map.json:1155:      "key": "x-ecs-container.id",
stix_shifter_modules/elastic_ecs/stix_translation/json/to_stix_map.json:1356:      "key": "x-ecs-error.id",
stix_shifter_modules/elastic_ecs/stix_translation/json/to_stix_map.json:1529:      "key": "x-ecs-group.id",
stix_shifter_modules/elastic_ecs/stix_translation/json/to_stix_map.json:1558:      "key": "x-oca-asset.id",
stix_shifter_modules/elastic_ecs/stix_translation/json/to_stix_map.json:1956:      "key": "x-ecs-organization.id",
stix_shifter_modules/elastic_ecs/stix_translation/json/to_stix_map.json:2049:      "key": "x-ecs-rule.id",
stix_shifter_modules/elastic_ecs/stix_translation/json/to_stix_map.json:2079:      "key": "x-ecs-service.id",
stix_shifter_modules/elastic_ecs/stix_translation/json/to_stix_map.json:2267:      "key": "x-ecs-trace.id",
stix_shifter_modules/elastic_ecs/stix_translation/json/to_stix_map.json:2273:      "key": "x-ecs-transaction.id",
stix_shifter_modules/elastic_ecs/stix_translation/json/to_stix_map.json:2315:      "key": "x-ecs-vulnerability.id",
stix_shifter_modules/guardium/stix_translation/json/to_stix_map.json:207:        "key": "process.id"
stix_shifter_modules/security_advisor/stix_translation/json/to_stix_map.json:50:    "key": "x-security-advisor-finding.id",
stix_shifter_modules/synchronous_dummy/stix_translation/json/to_stix_map.json:111:        "key": "process.id"
stix_shifter_modules/infoblox/stix_translation/json/to_stix_map.json:272:                "key": "x-infoblox-threat.id",

Desktop (please complete the following information):
N/A

Smartphone (please complete the following information):
N/A

Additional context
N/A

@pcoccoli pcoccoli added the bug Something isn't working label Jan 20, 2022
@delliott90
Copy link
Collaborator

Resolved via #819

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants