trestle.transforms.implementations.osco
trestle.transforms.implementations.osco
¤
Facilitate OSCAL-OSCO transformation.
Attributes¤
logger = logging.getLogger(__name__)
module-attribute
¤
Classes¤
OscalProfileToOscoProfileTransformer
¤
Bases: FromOscalTransformer
Interface for Oscal Profile to Osco Profile transformer.
Source code in trestle/transforms/implementations/osco.py
587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 |
|
Functions¤
__init__(extends='ocp4-cis-node', api_version='compliance.openshift.io/v1alpha1', kind='TailoredProfile', name='customized-tailored-profile', namespace='openshift-compliance')
¤
Initialize.
Source code in trestle/transforms/implementations/osco.py
590 591 592 593 594 595 596 597 598 599 600 601 602 603 |
|
transform(profile)
¤
Transform the Profile into a OSCO yaml.
Source code in trestle/transforms/implementations/osco.py
605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 |
|
OscoResultToOscalARTransformer
¤
Bases: ResultsTransformer
Interface for Osco transformer.
Source code in trestle/transforms/implementations/osco.py
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 |
|
Attributes¤
analysis
property
¤
Analysis.
checking
property
¤
Return checking.
Functions¤
__init__()
¤
Initialize.
Source code in trestle/transforms/implementations/osco.py
58 59 60 |
|
set_modes(modes)
¤
Keep modes info.
Source code in trestle/transforms/implementations/osco.py
72 73 74 75 |
|
transform(blob)
¤
Transform the blob into a Results.
The expected blob is a string that is one of
- data from OpenShift Compliance Operator (json, yaml, xml)
- data from Auditree OSCO fetcher/check (json)
Source code in trestle/transforms/implementations/osco.py
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 |
|
OscoTransformer
¤
Bases: OscoResultToOscalARTransformer
Legacy class name.
Source code in trestle/transforms/implementations/osco.py
149 150 |
|
RuleUse
¤
Represents one rule of OSCO data.
Source code in trestle/transforms/implementations/osco.py
153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 |
|
Attributes¤
benchmark_href = args['benchmark_href']
instance-attribute
¤
benchmark_id = args['benchmark_id']
instance-attribute
¤
host_name = args['host_name']
instance-attribute
¤
id_ = args['id_']
instance-attribute
¤
idref = args['idref']
instance-attribute
¤
inventory_key
property
¤
Derive inventory key.
result = args['result']
instance-attribute
¤
scanner_name = args['scanner_name']
instance-attribute
¤
scanner_version = args['scanner_version']
instance-attribute
¤
severity = args['severity']
instance-attribute
¤
target = args['target']
instance-attribute
¤
target_type = args['target_type']
instance-attribute
¤
time = args['time']
instance-attribute
¤
version = args['version']
instance-attribute
¤
weight = args['weight']
instance-attribute
¤
Functions¤
__init__(args)
¤
Initialize given specified args.
Source code in trestle/transforms/implementations/osco.py
156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 |
|
Functions¤
handler: python