Conversation
…only for x_mitre_analytic_refs
… replace inline dupe checks Add a new validateNoDuplicates refinement factory function that provides flexible duplicate validation for: - Object arrays with single or composite keys - Primitive arrays (strings, numbers, etc.) - Nested array paths with custom error messages Replace inline duplicate checking logic in analytic, data-component, and detection-strategy schemas with the new generic refinement, improving code reuse and maintainability. The new function supports template-based error messages with placeholders for key values, primitive values, and array indices. Deprecate the existing createUniqueObjectsOnlyRefinement in favor of the more flexible approach.
… STIX bundle integrity Add a new validateXMitreContentsReferences refinement factory function that validates all STIX IDs referenced in a collection's x_mitre_contents property have corresponding objects in the bundle's objects array. This ensures referential integrity within STIX bundles. Replace the deprecated createUniqueObjectsOnlyRefinement with the more flexible validateNoDuplicates refinement in stix-bundle schema for improved consistency. Add comprehensive test coverage with 5 tests validating: - Valid references pass validation - Missing references are rejected with appropriate error messages - Multiple missing references are all reported - Multiple valid references are accepted Fix test setup to reference the collection's own ID instead of a non-existent object in the minimal test fixture.
…ess-validation-for-stix-bundle-objects Implement uniqueness validation for STIX bundle objects
…bject exists - Add constraint to stixBundleSchema specifying that only only x-mitre-collection object exists - Rename createFirstBundleObjectRefinement to validateXMitreCollection - Add three tests checking TP and TN conditions for new x-mitre-collection constraint
Upgrade Zod from ^4.0.5 to ^4.3.6 and redesign how schemas handle .partial(), .pick(), and .omit() — which Zod 4.3+ disallows on schemas containing refinements. - Rename extensibleCampaignSchema to campaignBaseSchema and export it, giving consumers a refinement-free schema they can derive from - Extract shared campaignChecks callback to eliminate refinement duplication between full and partial schemas - Remove partial schemas from softwareSchema union to fix zod2md generating inline HTML that breaks MDX compilation - Add schema tiers documentation to principles/schema-design.mdx - Add new how-to guide for using schema variants (base, full, partial)
…e, and relationship schemas
`.pick()`, `.partial()`, and `.omit()` disallowed on object schemas containing refinements
… partials Exporting groupChecks (et al) allows users to re-compose the original groupSchema and groupPartialSchema with modifications without concern of Zod conflicts introduced in Zod v4.3.6
feat(schemas): export refinement check bundles in schema modules with partial schemas
Replaces direct console.log/console.warn calls in registerDataSource,
parseStixBundle, and the relationship deprecation refinement with a
shared logger module. Defaults to the level so informational
messages emitted during data source registration are no longer printed
unless opted into.
Levels: debug, info, warn, error, silent. Configure via
configureLogger({ level, handler }) or the ADM_LOG_LEVEL env var.
A custom LogHandler can be supplied to forward messages to an external
logging system. resetLogger() restores defaults.
Fixes the noise problem when parsing many bundles in a row, and
introduces logger configuration as a public feature.
…rols feat(logger): add configurable logger to control console output
|
🎉 This PR is included in version 4.11.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
…n-x_mitre_platforms fix(platforms): remove support for `Google Workspace` and `Azure AD`
|
🎉 This PR is included in version 4.11.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
…_mitre_related_assets elements
…lds-in-x_mitre_related_assets fix(assets): make `related_asset_sectors` and `description` required in `x_mitre_related_assets` elements
|
🎉 This PR is included in version 4.11.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
…restriction Zod v4 throws ".pick() cannot be used on object schemas containing refinements", which broke parseStixBundles top-level id/type check against stixBundleSchema. Split the bundle schema into a refinement-free base (stixBundleBaseSchema) and the refined stixBundleSchema, and pick from the base.
…erprise-attack-data fix(bundle): allow bundle parsing under Zod v4 pick-with-refinements …
|
🎉 This PR is included in version 4.11.3 🎉 The release is available on: Your semantic-release bot 📦🚀 |
…ble-elements-for-analytics fix(analytics): validate no duplicate mutable elements
|
🎉 This PR is included in version 4.11.4 🎉 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 is merging recent changes that came from the doc-cleanup branch (which went directly into main, and then into next) into the beta branch