Conversation
- Remove x-mitre-data-source type - Add x-mitre-detection and x-mitre-log-source types
- TODO is for remembering to replace x_mitre_data_source_ref property with new x_mitre_data_log_ref
- Add new schema, MITRE Log Source, that replaces MITRE Data Source - Update related components to use Log Source instead of Data Source BREAKING CHANGE: The MITRE Data Source type is being replaced by Log Sources. Data sources will be deprecated and removed in the next major ATT&CK specification version.
- Rewrite all Zod schemas that implement well-defined open vocabularies to use proper case with OV suffix
- Add type field for indicator - Add type field for x-mitre-analytic - Note that x-mitre-detection and x-mitre-analytic are still being evaluated as candidate custom SDO types (subject to change)
- Move MitreCollectionLayersOV to open-vocabularies.ts module - Implement new PatternTypeOV (to be used in Indicators) - Implement new IndicatorTypeOV (to be used in Indicators)
- This schema is still a work-in-progress - This iteration may not be the finalized version
- The attack-data-model.ts module was using the now deprecated DataSource and DataSourceImpl - Both have been replaced by LogSource and LogSource impl, respectively - This can be thought of as a simple rename
- Implements the Indicator SDO definition from STIX 2.1 - Deviates from STIX 2.1 spec by specifying valid_from as optional (too strict for ATT&CK uses)
- Was previously set to a singular external reference instance - Fixed to be an array of external references
- Rename variables, functions, and classes from dataSource to logSource - Update file names containing 'dataSource' to use 'logSource' - Replace references in comments and documentation - Update import statements across the codebase
- The custom error map included in the errors sub-package was adding little value - It also sufferred from the side effect import anti-pattern where the module needed to be imported, not for its exports, but for the side effects that happen during its initialization - This resulted in inconsistent/missing imports - It could have been solved globally, but again, the value proposition of centralized error massaging is not there. Rather, just set information-rich error messages close to the source
…r messaging - Add createStixTypeValidator to provide clear type validation errors with object names - Add createMultiTypeValidator to support objects with multiple valid types (malware and software) - Rename createStixIdentifierSchema to createStixIdValidator for naming consistency - Leverage stixTypeToTypeName mapping for more descriptive error messages - Update schemas to use new validator functions
…ror function - Resolves the following error: - Error: src/schemas/common/stix-identifier.ts(24,53): error TS7053: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'Record<file | attack-pattern | bundle | campaign | course-of-action | identity | indicator | intrusion-set | malware | tool | marking-definition | x-mitre-data-component | ... 7 more ... | artifact, string>'.
Use lazy evaluation with getters in schemaMap to prevent ReferenceError when importing campaign schema. This defers schema access until runtime rather than module initialization, breaking the circular dependency chain between campaign.schema.ts -> refinements -> stix-bundle.schema.ts. Fixes: Cannot access 'campaignSchema' before initialization error
…ements and x_mitre_impact_type - Field schemas xMitreNetworkRequirementsSchema and xMitreImpactTypeSchema were not being exported
… index Switch from to explicit named exports to improve tree-shaking, prevent circular dependencies, and provide better IDE support. This change makes the module's public API more explicit and helps bundlers optimize the final build output. Any imports relying on accidentally exposed internal exports may need to be updated
- Updated asset.example.ts for Zod v4 - Updated campaign.example.ts for Zod v4 - Update Zod import path - Use z.prettifyError where possible - Cast errors to z.core.
- Accidentally converted to x_mitre_log_component_ref during logSourceSchema development
…a_sources - x_mitre_log_sources will no longer be used - x_mitre_data_sources was unintentionally defined as a nested array. This is restored to a flat array.
…Schema - Previously, this factory function was unable to validate against subtechnique due to lack of implicit mapping from STIX type 'attack-pattern' - Added a fallback to attempt subtechnique validation if technique validation fails This solution is not ideal as it allow for techniques to have subtechnique ATT&CK IDs. This factory function will likely be removed in the future in favor of a refinement factory.
- All remaining example modules are updated to support Zod v4 - tool.example.ts is deleted due to redundancy with software.example.ts
- Reverted x_mitre_log_source_ref to x_mitre_data_source_ref
… new defense types - Add new ES6 Impl class wrappers for Detection Strategy, Analytic, and Log Source - Enable hydrating the ADM TypeScript API with Detection Strategy, Analytic, and Log Source - 'found-in' relationships are processed to enable bidirectional navigation between log sources and data components - 'detects' relationships are processed to enable bidrectional navigation between det strategies and techniques
- .description is supplanted by meta({ description: string }) in Zod v4
- Moved the zod2md execution step from the docusaurus project to the root schema project - This resolves an issue where the description column does not appear in generated md files - https://github.com/matejchalk/zod2md/issues/14\#issuecomment-3097658396 - Updated dependencies accordingly
- This was redundant and unnecessary - It was also causing an issue where zod2md serializes keys specified in z.required to type - Reported here: https://github.com/matejchalk/zod2md/issues/14\#issuecomment-3097658396
…e of a MITRE platform - Added xMitrePlatformSchema (singular) - Not to be confused with the existing xMitrePlatformsSchema (plural)
- Use z.iso.datetime instead of a custom Zod type
ATT&CK Specification 3.3.0 Pre-release
|
🎉 This PR is included in version 4.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 4.0.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR will release ATT&CK specification v3.3.0 on @mitre-attack/attack-data-model@latest which is currently mapped to ADM v4.0.0.