NAME
STIX::Common::ExtensionDefinition - STIX Extension Definition
SYNOPSIS
use STIX::Common::ExtensionDefinition;
use STIX::Indicator;
my $extension_definition = STIX::Common::ExtensionDefinition->new(
extension_types => ['property-extension'],
name => 'Extension Foo 1',
schema => 'https://www.example.com/schema-foo-1/v1/',
version => '1.2.1',
);
my $indicator = STIX::Indicator->new(
name => 'File hash for Poison Ivy variant',
description => 'This file hash indicates that a sample of Poison Ivy is present.',
labels => ['malicious-activity'],
pattern => q{[file:hashes.'SHA-256' = 'ef537f25c895bfa782526529a9b63d97aa631564d5d789c2b765448c8635fb6c']},
pattern_type => 'stix',
valid_from => '2014-02-20T09:00:00.000000Z',
extensions => {$extension_definition->id => {extension_type => 'property-extension', rank => 5, toxicity => 8}}
);
DESCRIPTION
The STIX Extension Definition object allows producers of threat intelligence to extend existing STIX objects or to create entirely new STIX objects in a standardized way.
METHODS
STIX::Common::ExtensionDefinition inherits all methods from STIX::Common::Properties and implements the following new ones.
- STIX::Common::ExtensionDefinition->new(%properties)
-
Create a new instance of STIX::Common::ExtensionDefinition.
- $extension_definition->description
-
A detailed explanation of what data the extension conveys and how it is intended to be used.
- $extension_definition->extension_properties
-
The list of new property names that are added to an object by this extension
- $extension_definition->extension_types
-
Which extension types are contained within this extension.
- $extension_definition->id
- $extension_definition->name
-
A name used for display purposes during execution, development, or debugging.
- $extension_definition->schema
-
The normative definition of the extension, either as a URL or as plain text explaining the definition.
- $extension_definition->type
-
The type of this object, which MUST be the literal
extension-definition
. - $extension_definition->version
-
The version of this extension.
HELPERS
- $extension_definition->TO_JSON
-
Helper for JSON encoders.
- $extension_definition->to_hash
-
Return the object HASH.
- $extension_definition->to_string
-
Encode the object in JSON.
- $extension_definition->validate
-
Validate the object using JSON Schema (see STIX::Schema).
SUPPORT
Bugs / Feature Requests
Please report any bugs or feature requests through the issue tracker at https://github.com/giterlizzi/perl-STIX/issues. You will be notified automatically of any progress on your issue.
Source Code
This is open source software. The code repository is available for public review and contribution under the terms of the license.
https://github.com/giterlizzi/perl-STIX
git clone https://github.com/giterlizzi/perl-STIX.git
AUTHOR
Giuseppe Di Terlizzi <gdt@cpan.org>
LICENSE AND COPYRIGHT
This software is copyright (c) 2024 by Giuseppe Di Terlizzi.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.