Continuum / Client / get_supply_chain_managed_policy

get_supply_chain_managed_policy

Continuum.Client.get_supply_chain_managed_policy(**kwargs)

Returns one read-only policy created and managed by an AWS service, such as the malicious-package baseline. You can read a service-managed policy and create policy exceptions for it, but you can’t change or delete it.

See also: AWS API Documentation

Request Syntax

response = client.get_supply_chain_managed_policy(
    id='string'
)
Parameters:

id (string) –

[REQUIRED]

The ID of the service-managed policy. ListSupplyChainPolicies returns the IDs.

Return type:

dict

Returns:

Response Syntax

{
    'id': 'string',
    'arn': 'string',
    'managedBy': 'string',
    'policy': {
        'name': 'string',
        'description': 'string',
        'rules': [
            {
                'ruleId': 'string',
                'enforcementMode': 'AUDIT'|'ENFORCE',
                'denyWhen': {
                    'allOf': [
                        {
                            'signal': 'PACKAGE_IDENTITY'|'INSPECTOR_SEVERITY'|'KEV'|'MALICIOUS',
                            'operator': 'MATCHES'|'AT_LEAST'|'EQUALS'|'NOT_EQUALS'|'IN'|'PRESENT',
                            'value': {
                                'packageIdentity': {
                                    'ecosystem': 'string',
                                    'name': 'string',
                                    'version': 'string',
                                    'versionRange': 'string'
                                },
                                'severity': 'LOW'|'MEDIUM'|'HIGH'|'CRITICAL'|'UNTRIAGED',
                                'stringValue': 'string',
                                'stringSet': [
                                    'string',
                                ]
                            }
                        },
                    ]
                }
            },
        ]
    }
}

Response Structure

  • (dict) –

    Output for GetSupplyChainManagedPolicy.

    • id (string) –

      The ID of the service-managed policy.

    • arn (string) –

      The ARN of the service-managed policy.

    • managedBy (string) –

      The AWS service that manages the policy, as a service principal.

    • policy (dict) –

      The name, description, and rules of the policy.

      • name (string) –

        The display name of the policy.

      • description (string) –

        A description of the policy.

      • rules (list) –

        The deny rules of the policy, from 1 to 5.

        • (dict) –

          A single deny rule. The rule matches a package when all of its conditions are true. When several rules match, the strongest enforcement mode wins.

          • ruleId (string) –

            The identifier of the rule, unique within the policy. Policy exceptions and decision evidence refer to rules by this ID.

          • enforcementMode (string) –

            What happens when the rule matches. ENFORCE denies the package. AUDIT records the match and allows the package.

          • denyWhen (dict) –

            The conditions that must all be true for the rule to match.

            • allOf (list) –

              The conditions, from 1 to 20. All of them must be true for the rule to match.

              • (dict) –

                A single condition: a signal, an operator, and a value. The service checks that the operator and value are valid for the signal when the policy is created or updated.

                • signal (string) –

                  The package attribute that the condition tests.

                • operator (string) –

                  How the signal is compared with the value.

                • value (dict) –

                  The value to compare the signal with. Omit it for the PRESENT operator, which takes no value.

                  Note

                  This is a Tagged Union structure. Only one of the following top level keys will be set: packageIdentity, severity, stringValue, stringSet. If a client receives an unknown member it will set SDK_UNKNOWN_MEMBER as the top level key, which maps to the name or tag of the unknown member. The structure of SDK_UNKNOWN_MEMBER is as follows:

                  'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
                  
                  • packageIdentity (dict) –

                    The package to match, for the PACKAGE_IDENTITY signal.

                    • ecosystem (string) –

                      The package ecosystem, such as npm or pypi.

                    • name (string) –

                      The package name, as used in its ecosystem.

                    • version (string) –

                      Exact version. Mutually exclusive with versionRange, validated server-side.

                    • versionRange (string) –

                      A version range as one or more comparisons separated by commas, such as >=1.0, <2.0. Each comparison is =, >, >=, <, or <= followed by a version in the ecosystem’s own format. Ecosystem shorthands such as ^1.0 or ~=1.2 aren’t accepted. Mutually exclusive with version.

                  • severity (string) –

                    An Amazon Inspector severity, for the INSPECTOR_SEVERITY signal.

                  • stringValue (string) –

                    A single value, for the EQUALS and NOT_EQUALS operators.

                  • stringSet (list) –

                    A set of up to 20 values, for the IN operator.

                    • (string) –

                      A condition value, from 1 to 256 characters.

Exceptions