trestle.transforms.implementations.aws_config
trestle.transforms.implementations.aws_config ¤
Facilitate OSCAL-AWS Config transformation.
Transforms AWS Config compliance evaluation results (the JSON shape returned by the AWS Config get-compliance-details-by-config-rule / get-compliance-details-by-resource APIs: a top-level EvaluationResults list of EvaluationResult objects, see https://docs.aws.amazon.com/config/latest/APIReference/API_EvaluationResult.html) into OSCAL Assessment Results, following the same Task + ResultsTransformer + private results-factory shape used by osco.py / tanium.py in this package.
Attributes¤
logger = logging.getLogger(__name__) module-attribute ¤
Classes¤
AwsConfigResultToOscalARTransformer ¤
Bases: ResultsTransformer
flowchart TD
trestle.transforms.implementations.aws_config.AwsConfigResultToOscalARTransformer[AwsConfigResultToOscalARTransformer]
trestle.transforms.transformer_factory.ResultsTransformer[ResultsTransformer]
trestle.transforms.transformer_factory.TransformerBase[TransformerBase]
trestle.transforms.transformer_factory.ResultsTransformer --> trestle.transforms.implementations.aws_config.AwsConfigResultToOscalARTransformer
trestle.transforms.transformer_factory.TransformerBase --> trestle.transforms.transformer_factory.ResultsTransformer
click trestle.transforms.implementations.aws_config.AwsConfigResultToOscalARTransformer href "" "trestle.transforms.implementations.aws_config.AwsConfigResultToOscalARTransformer"
click trestle.transforms.transformer_factory.ResultsTransformer href "" "trestle.transforms.transformer_factory.ResultsTransformer"
click trestle.transforms.transformer_factory.TransformerBase href "" "trestle.transforms.transformer_factory.TransformerBase"
Interface for AWS Config transformer.
Source code in trestle/transforms/implementations/aws_config.py
51 52 53 54 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 | |
Attributes¤
analysis property ¤
Return statistics.
Methods:¤
__init__() ¤
Initialize.
Source code in trestle/transforms/implementations/aws_config.py
54 55 56 | |
set_modes(modes) ¤
Set the transformation modes.
Source code in trestle/transforms/implementations/aws_config.py
58 59 60 61 | |
transform(blob) ¤
Transform AWS Config evaluation results into OSCAL results.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
blob | str | text (json) blob containing AWS Config evaluation results, shaped as | required |
Returns:
| Type | Description |
|---|---|
Results | Results containing a single OSCAL Result with one Observation |
Results | per input EvaluationResult. |
Source code in trestle/transforms/implementations/aws_config.py
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 | |
handler: python