Skip to content

fix: handle missing related asset fields in assetsToDf function#231

Merged
jondricek merged 1 commit intomainfrom
fix-missing-related-asset-sectors
Apr 27, 2026
Merged

fix: handle missing related asset fields in assetsToDf function#231
jondricek merged 1 commit intomainfrom
fix-missing-related-asset-sectors

Conversation

@jondricek
Copy link
Copy Markdown
Contributor

This pull request improves the robustness of the assetsToDf function in stixToDf.py by adding error handling and logging for missing fields in related asset data. This ensures that missing or incomplete data does not cause the export process to fail and provides clear error messages for easier debugging.

Error handling and logging improvements:

  • Added checks for the presence of the name, related_asset_sectors, and description fields in each related_asset. If any of these fields are missing, a detailed error message is logged and a blank value is added to the corresponding output field, allowing the export to continue smoothly.
  • Included additional context in error logs by capturing the asset's name, ATT&CK ID, and STIX ID, making it easier to identify problematic assets during debugging.

@sonarqubecloud
Copy link
Copy Markdown

@jondricek jondricek merged commit 6a1f288 into main Apr 27, 2026
5 checks passed
@jondricek jondricek deleted the fix-missing-related-asset-sectors branch April 27, 2026 03:37
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

Successfully merging this pull request may close these issues.

1 participant