@mitre/inspec-objects 0.0.3 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,609 +0,0 @@
1
- export interface Oval {
2
- oval_definitions: OvalDefinition[];
3
- }
4
-
5
- export interface OvalDefinition {
6
- "@_schemaLocation": string;
7
- generator: Generator[];
8
- definitions: OvalOvalDefinitionValue[];
9
- tests: { [key: string]: Test[] }[];
10
- objects: OvalDefinitionObject[];
11
- states: OvalDefinitionState[];
12
- variables: Variable[];
13
- }
14
-
15
- export interface OvalOvalDefinitionValue {
16
- definition: OvalDefinitionValue[];
17
- }
18
-
19
- export interface OvalDefinitionValue {
20
- "@_class": Class;
21
- "@_id": string;
22
- "@_version": string;
23
- metadata: Metadatum[];
24
- criteria: DefinitionCriterion[];
25
- }
26
-
27
- export enum Class {
28
- Compliance = "compliance",
29
- Inventory = "inventory",
30
- }
31
-
32
- export interface DefinitionCriterion {
33
- "@_comment"?: string;
34
- "@_operator"?: Operator;
35
- criterion?: IndigoCriterion[];
36
- criteria?: PurpleCriterion[];
37
- extend_definition?: ExtendDefinition[];
38
- }
39
-
40
- export enum Operator {
41
- And = "AND",
42
- Or = "OR",
43
- }
44
-
45
- export interface PurpleCriterion {
46
- "@_operator": Operator;
47
- criterion?: IndigoCriterion[];
48
- "@_comment"?: string;
49
- extend_definition?: ExtendDefinition[];
50
- criteria?: FluffyCriterion[];
51
- }
52
-
53
- export interface FluffyCriterion {
54
- "@_comment"?: string;
55
- "@_operator": Operator;
56
- extend_definition?: ExtendDefinition[];
57
- criterion?: IndigoCriterion[];
58
- criteria?: TentacledCriterion[];
59
- }
60
-
61
- export interface TentacledCriterion {
62
- "@_operator": Operator;
63
- criterion: StickyCriterion[];
64
- "@_comment"?: string;
65
- }
66
-
67
- export interface StickyCriterion {
68
- "@_comment": string;
69
- "@_test_ref": string;
70
- }
71
-
72
- export interface IndigoCriterion {
73
- "@_comment"?: string;
74
- "@_test_ref": string;
75
- "@_negate"?: string;
76
- }
77
-
78
- export interface ExtendDefinition {
79
- "@_comment"?: string;
80
- "@_definition_ref": string;
81
- "@_negate"?: string;
82
- }
83
-
84
- export interface Metadatum {
85
- title: string;
86
- affected: Affected[];
87
- description: string;
88
- reference: Reference[];
89
- }
90
-
91
- export interface Affected {
92
- "@_family": Family;
93
- platform: Platform;
94
- }
95
-
96
- export enum Family {
97
- Unix = "unix",
98
- }
99
-
100
- export enum Platform {
101
- Ubuntu2004 = "Ubuntu 20.04",
102
- }
103
-
104
- export interface Reference {
105
- "@_ref_id": string;
106
- "@_source": Source;
107
- }
108
-
109
- export enum Source {
110
- Cpe = "CPE",
111
- Ssg = "ssg",
112
- }
113
-
114
- export interface Generator {
115
- product_name: string;
116
- product_version: string;
117
- schema_version: number;
118
- timestamp: Date;
119
- }
120
-
121
- export interface OvalDefinitionObject {
122
- textfilecontent54_object: Textfilecontent54Object[];
123
- file_object: FileObject[];
124
- variable_object: VariableObject[];
125
- symlink_object: SymlinkObject[];
126
- password_object: PasswordObject[];
127
- shadow_object: ShadowObject[];
128
- environmentvariable58_object: Object[];
129
- rpminfo_object: RpminfoObject[];
130
- systemdunitproperty_object: SystemdunitpropertyObject[];
131
- systemdunitdependency_object: SymlinkObject[];
132
- dpkginfo_object: Object[];
133
- partition_object: PartitionObject[];
134
- sysctl_object: Object[];
135
- family_object: FamilyObject[];
136
- uname_object: SymlinkObject[];
137
- }
138
-
139
- export interface Object {
140
- "@_id": string;
141
- "@_version": string;
142
- name: string;
143
- pid?: PID[];
144
- }
145
-
146
- export interface PID {
147
- "@_datatype": PIDDatatype;
148
- "@_nil": string;
149
- }
150
-
151
- export enum PIDDatatype {
152
- Int = "int",
153
- String = "string",
154
- }
155
-
156
- export interface FamilyObject {
157
- "@_id": string;
158
- "@_version": string;
159
- }
160
-
161
- export interface FileObject {
162
- "@_comment"?: string;
163
- "@_id": string;
164
- "@_version": string;
165
- filepath?: Pattern[] | string;
166
- path?: Pattern[] | string;
167
- filename?: FilenameElement[] | string;
168
- behaviors?: FileObjectBehavior[];
169
- filter?: Filter[];
170
- }
171
-
172
- export interface FileObjectBehavior {
173
- "@_max_depth"?: string;
174
- "@_recurse": Recurse;
175
- "@_recurse_direction": RecurseDirection;
176
- "@_recurse_file_system": RecurseFileSystem;
177
- }
178
-
179
- export enum Recurse {
180
- Directories = "directories",
181
- }
182
-
183
- export enum RecurseDirection {
184
- Down = "down",
185
- }
186
-
187
- export enum RecurseFileSystem {
188
- All = "all",
189
- Local = "local",
190
- }
191
-
192
- export interface FilenameElement {
193
- "#text"?: string;
194
- "@_operation"?: Operation;
195
- "@_nil"?: string;
196
- }
197
-
198
- export enum Operation {
199
- BitwiseAnd = "bitwise and",
200
- CaseInsensitiveEquals = "case insensitive equals",
201
- Equals = "equals",
202
- GreaterThan = "greater than",
203
- GreaterThanOrEqual = "greater than or equal",
204
- LessThan = "less than",
205
- LessThanOrEqual = "less than or equal",
206
- NotEqual = "not equal",
207
- PatternMatch = "pattern match",
208
- }
209
-
210
- export interface Pattern {
211
- "#text"?: string;
212
- "@_operation"?: Operation;
213
- "@_datatype"?: PIDDatatype;
214
- "@_var_check"?: Check;
215
- "@_var_ref"?: string;
216
- }
217
-
218
- export enum Check {
219
- All = "all",
220
- AtLeastOne = "at least one",
221
- NoneSatisfy = "none satisfy",
222
- }
223
-
224
- export interface Filter {
225
- "#text": string;
226
- "@_action": Action;
227
- }
228
-
229
- export enum Action {
230
- Exclude = "exclude",
231
- Include = "include",
232
- }
233
-
234
- export interface PartitionObject {
235
- "@_id": string;
236
- "@_version": string;
237
- mount_point: string;
238
- }
239
-
240
- export interface PasswordObject {
241
- "@_id": string;
242
- "@_version": string;
243
- username: EvrElement[];
244
- }
245
-
246
- export interface EvrElement {
247
- "#text": string;
248
- "@_operation": Operation;
249
- "@_datatype"?: string;
250
- "@_entity_check"?: Check;
251
- }
252
-
253
- export interface RpminfoObject {
254
- "@_id": string;
255
- "@_version": string;
256
- name: ProcessorTypeElement[] | string;
257
- }
258
-
259
- export interface ProcessorTypeElement {
260
- "#text": string;
261
- "@_operation": Operation;
262
- }
263
-
264
- export interface ShadowObject {
265
- "@_id": string;
266
- "@_version": string;
267
- username: ProcessorTypeElement[];
268
- filter: Filter[];
269
- }
270
-
271
- export interface SymlinkObject {
272
- "@_comment"?: string;
273
- "@_id": string;
274
- "@_version": string;
275
- filepath?: string;
276
- unit?: Unit;
277
- value?: ValueElement[] | ValueEnum;
278
- canonical_path?: ProcessorTypeElement[] | string;
279
- dependency?: Dependency[];
280
- processor_type?: ProcessorTypeElement[];
281
- }
282
-
283
- export interface Dependency {
284
- "#text": string;
285
- "@_entity_check": Check;
286
- }
287
-
288
- export enum Unit {
289
- MultiUserTarget = "multi-user.target",
290
- }
291
-
292
- export interface ValueElement {
293
- "#text"?: number | string;
294
- "@_operation": Operation;
295
- "@_datatype"?: PIDDatatype;
296
- "@_var_check"?: Check;
297
- "@_var_ref"?: string;
298
- }
299
-
300
- export enum ValueEnum {
301
- Active = "active",
302
- Enabled = "enabled",
303
- Inactive = "inactive",
304
- Masked = "masked",
305
- }
306
-
307
- export interface SystemdunitpropertyObject {
308
- "@_id": string;
309
- "@_version": string;
310
- unit: ProcessorTypeElement[] | string;
311
- property: Property;
312
- "@_comment"?: string;
313
- }
314
-
315
- export enum Property {
316
- ActiveState = "ActiveState",
317
- LoadState = "LoadState",
318
- UnitFileState = "UnitFileState",
319
- }
320
-
321
- export interface Textfilecontent54Object {
322
- "@_id": string;
323
- "@_version": string;
324
- filepath?: Pattern[] | string;
325
- pattern: Pattern[];
326
- instance: Instance[];
327
- "@_comment"?: string;
328
- path?: ProcessorTypeElement[] | string;
329
- filename?: ProcessorTypeElement[];
330
- behaviors?: Textfilecontent54ObjectBehavior[];
331
- filter?: Filter[];
332
- }
333
-
334
- export interface Textfilecontent54ObjectBehavior {
335
- "@_singleline": string;
336
- "@_multiline"?: string;
337
- }
338
-
339
- export interface Instance {
340
- "#text"?: number;
341
- "@_datatype": PIDDatatype;
342
- "@_operation"?: Operation;
343
- "@_var_ref"?: string;
344
- }
345
-
346
- export interface VariableObject {
347
- "@_id": string;
348
- "@_version": string;
349
- var_ref?: string;
350
- "@_comment"?: string;
351
- set?: Set[];
352
- }
353
-
354
- export interface Set {
355
- object_reference: string[];
356
- }
357
-
358
- export interface OvalDefinitionState {
359
- textfilecontent54_state: Textfilecontent54State[];
360
- variable_state: SymlinkObject[];
361
- symlink_state: SymlinkObject[];
362
- password_state: State[];
363
- shadow_state: State[];
364
- file_state: FileState[];
365
- environmentvariable58_state: SymlinkObject[];
366
- systemdunitproperty_state: SymlinkObject[];
367
- systemdunitdependency_state: SymlinkObject[];
368
- partition_state: PartitionState[];
369
- sysctl_state: SysctlState[];
370
- rpminfo_state: RpminfoState[];
371
- family_state: FamilyState[];
372
- dpkginfo_state: DpkginfoState[];
373
- uname_state: SymlinkObject[];
374
- }
375
-
376
- export interface DpkginfoState {
377
- "@_id": string;
378
- "@_version": string;
379
- evr: EvrElement[];
380
- }
381
-
382
- export interface FamilyState {
383
- "@_id": string;
384
- "@_version": string;
385
- family: Family;
386
- }
387
-
388
- export interface FileState {
389
- "@_id": string;
390
- "@_version": string;
391
- type?: ProcessorTypeElement[] | string;
392
- uread?: Gexec[];
393
- uwrite?: Gexec[];
394
- uexec?: Gexec[];
395
- gread?: Gexec[];
396
- gwrite?: Gexec[];
397
- gexec?: Gexec[];
398
- oread?: Gexec[];
399
- owrite?: Gexec[];
400
- oexec?: Gexec[];
401
- path?: ProcessorTypeElement[];
402
- "@_operator"?: Operator;
403
- suid?: Gexec[];
404
- sgid?: Gexec[];
405
- sticky?: Gexec[];
406
- "@_comment"?: string;
407
- group_id?: Instance[];
408
- user_id?: UserID[];
409
- filepath?: ProcessorTypeElement[];
410
- }
411
-
412
- export interface Gexec {
413
- "#text": boolean;
414
- "@_datatype": GexecDatatype;
415
- }
416
-
417
- export enum GexecDatatype {
418
- Boolean = "boolean",
419
- }
420
-
421
- export interface UserID {
422
- "#text"?: number;
423
- "@_datatype": PIDDatatype;
424
- "@_operation"?: Operation;
425
- "@_var_check"?: Check;
426
- "@_var_ref"?: string;
427
- }
428
-
429
- export interface PartitionState {
430
- "@_id": string;
431
- "@_version": string;
432
- mount_options: EvrElement[];
433
- }
434
-
435
- export interface State {
436
- "@_id": string;
437
- "@_version": string;
438
- password?: ProcessorTypeElement[];
439
- encrypt_method?: ProcessorTypeElement[];
440
- }
441
-
442
- export interface RpminfoState {
443
- "@_id": string;
444
- "@_version": string;
445
- version?: ProcessorTypeElement[];
446
- name?: ProcessorTypeElement[];
447
- evr?: EvrElement[];
448
- }
449
-
450
- export interface SysctlState {
451
- "@_id": string;
452
- "@_version": string;
453
- value: Instance[];
454
- }
455
-
456
- export interface Textfilecontent54State {
457
- "@_comment"?: string;
458
- "@_id": string;
459
- "@_version": string;
460
- subexpression?: ValueElement[] | number | string;
461
- text?: Text[];
462
- }
463
-
464
- export interface Text {
465
- "#text": number | string;
466
- "@_operation": Operation;
467
- }
468
-
469
- export interface Test {
470
- "@_check": Check;
471
- "@_check_existence"?: CheckExistence;
472
- "@_comment": string;
473
- "@_id": string;
474
- "@_version": string;
475
- object: TestObject[];
476
- state?: TestState[];
477
- "@_state_operator"?: Operator;
478
- }
479
-
480
- export enum CheckExistence {
481
- AllExist = "all_exist",
482
- AnyExist = "any_exist",
483
- AtLeastOneExists = "at_least_one_exists",
484
- NoneExist = "none_exist",
485
- OnlyOneExists = "only_one_exists",
486
- }
487
-
488
- export interface TestObject {
489
- "@_object_ref": string;
490
- }
491
-
492
- export interface TestState {
493
- "@_state_ref": string;
494
- }
495
-
496
- export interface Variable {
497
- external_variable: ConstantVariableElement[];
498
- local_variable: LocalVariable[];
499
- constant_variable: ConstantVariableElement[];
500
- }
501
-
502
- export interface ConstantVariableElement {
503
- "@_comment": string;
504
- "@_datatype": PIDDatatype;
505
- "@_id": string;
506
- "@_version": string;
507
- value?: string[] | string;
508
- }
509
-
510
- export interface LocalVariable {
511
- "@_comment": string;
512
- "@_datatype": PIDDatatype;
513
- "@_id": string;
514
- "@_version": string;
515
- concat?: Concat[];
516
- split?: Split[];
517
- regex_capture?: RegexCapture[];
518
- count?: Count[];
519
- object_component?: ObjectComponent[];
520
- substring?: Substring[];
521
- arithmetic?: LocalVariableArithmetic[];
522
- unique?: LocalVariableUnique[];
523
- literal_component?: LocalVariableLiteralComponent[];
524
- }
525
-
526
- export interface LocalVariableArithmetic {
527
- "@_arithmetic_operation": string;
528
- arithmetic: ArithmeticArithmetic[];
529
- variable_component: VariableComponent[];
530
- }
531
-
532
- export interface ArithmeticArithmetic {
533
- "@_arithmetic_operation": ArithmeticOperation;
534
- literal_component: ArithmeticLiteralComponent[];
535
- variable_component: VariableComponent[];
536
- }
537
-
538
- export enum ArithmeticOperation {
539
- Multiply = "multiply",
540
- }
541
-
542
- export interface ArithmeticLiteralComponent {
543
- "#text": number;
544
- "@_datatype": PIDDatatype;
545
- }
546
-
547
- export interface VariableComponent {
548
- "@_var_ref": string;
549
- }
550
-
551
- export interface Concat {
552
- literal_component: string[] | LiteralComponentEnum;
553
- variable_component?: VariableComponent[];
554
- object_component?: ObjectComponent[];
555
- }
556
-
557
- export enum LiteralComponentEnum {
558
- Empty = "/",
559
- FSExitEACCES = "(?:-F\\s+exit=-EACCES)",
560
- FSExitEPERM = "(?:-F\\s+exit=-EPERM)",
561
- }
562
-
563
- export interface ObjectComponent {
564
- "@_item_field": ItemField;
565
- "@_object_ref": string;
566
- }
567
-
568
- export enum ItemField {
569
- Filepath = "filepath",
570
- Subexpression = "subexpression",
571
- UserID = "user_id",
572
- Value = "value",
573
- }
574
-
575
- export interface Count {
576
- object_component?: ObjectComponent[];
577
- unique?: GlobToRegexElement[];
578
- }
579
-
580
- export interface GlobToRegexElement {
581
- object_component: ObjectComponent[];
582
- }
583
-
584
- export interface LocalVariableLiteralComponent {
585
- "#text": string;
586
- "@_datatype": PIDDatatype;
587
- }
588
-
589
- export interface RegexCapture {
590
- "@_pattern": string;
591
- object_component: ObjectComponent[];
592
- }
593
-
594
- export interface Split {
595
- "@_delimiter": string;
596
- object_component?: ObjectComponent[];
597
- variable_component?: VariableComponent[];
598
- }
599
-
600
- export interface Substring {
601
- "@_substring_length": string;
602
- "@_substring_start": string;
603
- object_component?: ObjectComponent[];
604
- variable_component?: VariableComponent[];
605
- }
606
-
607
- export interface LocalVariableUnique {
608
- glob_to_regex: GlobToRegexElement[];
609
- }