Skip to content

Next > Beta#61

Open
jondricek wants to merge 131 commits intobetafrom
next
Open

Next > Beta#61
jondricek wants to merge 131 commits intobetafrom
next

Conversation

@jondricek
Copy link
Copy Markdown
Contributor

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

kji-mitre and others added 30 commits October 1, 2025 16:31
seansica and others added 16 commits January 13, 2026 16:39
… 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)
`.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
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 6, 2026

🎉 This PR is included in version 4.11.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 8, 2026

🎉 This PR is included in version 4.11.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

seansica added 2 commits May 8, 2026 15:05
…lds-in-x_mitre_related_assets

fix(assets): make `related_asset_sectors` and `description` required in `x_mitre_related_assets` elements
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 8, 2026

🎉 This PR is included in version 4.11.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

seansica added 2 commits May 8, 2026 15:41
…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 …
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 8, 2026

🎉 This PR is included in version 4.11.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

seansica added 2 commits May 8, 2026 16:15
…ble-elements-for-analytics

fix(analytics): validate no duplicate mutable elements
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 8, 2026

🎉 This PR is included in version 4.11.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants