Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/attack-spec-version.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const ATTACK_SPEC_VERSION = '3.3.0' as const;
5 changes: 3 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
export { ATTACK_SPEC_VERSION } from '@/attack-spec-version.js';
export * from '@/classes/index.js';
export * from '@/data-sources/index.js';
export * from '@/schemas/index.js';
export * from '@/refinements/index.js';
export * from '@/main.js';
export * from '@/refinements/index.js';
export * from '@/schemas/index.js';
1 change: 1 addition & 0 deletions src/schemas/common/common-properties.ts
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,7 @@ export const objectMarkingRefsSchema = z
'Identifier must start with "marking-definition--"',
),
)
.nonempty()
.meta({
description: 'The list of marking-definition objects to be applied to this object.',
});
Expand Down
3 changes: 2 additions & 1 deletion src/schemas/sdo/group.schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
createAttackExternalReferencesSchema,
createStixIdValidator,
stixTimestampSchema,
xMitreContributorsSchema,
xMitreDomainsSchema,
xMitreModifiedByRefSchema,
} from '../common/index.js';
Expand All @@ -30,7 +31,7 @@ export const groupSchema = attackBaseDomainObjectSchema

x_mitre_domains: xMitreDomainsSchema,

x_mitre_contributors: z.array(z.string()).optional(),
x_mitre_contributors: xMitreContributorsSchema.optional(),

x_mitre_modified_by_ref: xMitreModifiedByRefSchema.optional(),

Expand Down
6 changes: 2 additions & 4 deletions src/schemas/sdo/software.schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import {
createMultiStixTypeValidator,
descriptionSchema,
externalReferencesSchema,
objectMarkingRefsSchema,
stixCreatedByRefSchema,
xMitreContributorsSchema,
xMitreDomainsSchema,
xMitreModifiedByRefSchema,
xMitrePlatformsSchema,
Expand All @@ -29,13 +29,11 @@ export const softwareSchema = attackBaseDomainObjectSchema.extend({

external_references: externalReferencesSchema,

object_marking_refs: objectMarkingRefsSchema,

// Malware: Required
// Tool: Optional
x_mitre_platforms: xMitrePlatformsSchema.optional(),

x_mitre_contributors: z.array(z.string()).optional(),
x_mitre_contributors: xMitreContributorsSchema.optional(),

x_mitre_aliases: aliasesSchema.optional().meta({
description:
Expand Down