File Coverage

blib/lib/STIX/Observable/Extension/NTFS.pm
Criterion Covered Total %
statement 29 29 100.0
branch n/a
condition n/a
subroutine 10 10 100.0
pod n/a
total 39 39 100.0


line stmt bran cond sub pod time code
1             package STIX::Observable::Extension::NTFS;
2              
3 24     24   682 use 5.010001;
  24         113  
4 24     24   152 use strict;
  24         55  
  24         806  
5 24     24   171 use warnings;
  24         72  
  24         1346  
6 24     24   227 use utf8;
  24         50  
  24         204  
7              
8 24     24   1312 use Types::Standard qw(Str InstanceOf);
  24         67  
  24         234  
9 24     24   48704 use Types::TypeTiny qw(ArrayLike);
  24         59  
  24         195  
10              
11 24     24   15703 use Moo;
  24         72  
  24         215  
12 24     24   10952 use namespace::autoclean;
  24         95  
  24         243  
13              
14             extends 'STIX::Object';
15              
16 24         2216 use constant PROPERTIES => (qw[
17             sid
18             alternate_data_streams
19 24     24   2778 ]);
  24         60  
20              
21 24     24   167 use constant EXTENSION_TYPE => 'ntfs-ext';
  24         58  
  24         4203  
22              
23             has sid => (is => 'rw', isa => Str);
24              
25             has alternate_data_streams => (
26             is => 'rw',
27             isa => ArrayLike [InstanceOf ['STIX::Observable::Type::AlternateDataStream']],
28             default => sub { STIX::Common::List->new }
29             );
30              
31             1;
32              
33             =encoding utf-8
34              
35             =head1 NAME
36              
37             STIX::Observable::Extension::NTFS - STIX Cyber-observable Object (SCO) - NTFS File Extension
38              
39             =head1 SYNOPSIS
40              
41             use STIX::Observable::Extension::NTFS;
42              
43             my $ntfs_ext = STIX::Observable::Extension::NTFS->new();
44              
45              
46             =head1 DESCRIPTION
47              
48             The NTFS file extension specifies a default extension for capturing properties
49             specific to the storage of the file on the NTFS file system.
50              
51             =head2 METHODS
52              
53             L inherits all methods from L
54             and implements the following new ones.
55              
56             =over
57              
58             =item STIX::Observable::Extension::NTFS->new(%properties)
59              
60             Create a new instance of L.
61              
62             =item $ntfs_ext->sid
63              
64             Specifies the security ID (SID) value assigned to the file.
65              
66             =item $ntfs_ext->alternate_data_streams
67              
68             Specifies a list of NTFS alternate data streams that exist for the file
69             (see L).
70              
71             =back
72              
73              
74             =head2 HELPERS
75              
76             =over
77              
78             =item $ntfs_ext->TO_JSON
79              
80             Helper for JSON encoders.
81              
82             =item $ntfs_ext->to_hash
83              
84             Return the object HASH.
85              
86             =item $ntfs_ext->to_string
87              
88             Encode the object in JSON.
89              
90             =item $ntfs_ext->validate
91              
92             Validate the object using JSON Schema (see L).
93              
94             =back
95              
96              
97             =head1 SUPPORT
98              
99             =head2 Bugs / Feature Requests
100              
101             Please report any bugs or feature requests through the issue tracker
102             at L.
103             You will be notified automatically of any progress on your issue.
104              
105             =head2 Source Code
106              
107             This is open source software. The code repository is available for
108             public review and contribution under the terms of the license.
109              
110             L
111              
112             git clone https://github.com/giterlizzi/perl-STIX.git
113              
114              
115             =head1 AUTHOR
116              
117             =over 4
118              
119             =item * Giuseppe Di Terlizzi
120              
121             =back
122              
123              
124             =head1 LICENSE AND COPYRIGHT
125              
126             This software is copyright (c) 2024 by Giuseppe Di Terlizzi.
127              
128             This is free software; you can redistribute it and/or modify it under
129             the same terms as the Perl 5 programming language system itself.
130              
131             =cut