pyoaev.contracts.contract_config ================================ .. py:module:: pyoaev.contracts.contract_config Module Contents --------------- .. py:class:: SupportedLanguage Bases: :py:obj:`str`, :py:obj:`enum.Enum` .. py:attribute:: fr :type: str :value: 'fr' .. py:attribute:: en :type: str :value: 'en' .. py:class:: ContractFieldType Bases: :py:obj:`str`, :py:obj:`enum.Enum` .. py:attribute:: Text :type: str :value: 'text' .. py:attribute:: Number :type: str :value: 'number' .. py:attribute:: Tuple :type: str :value: 'tuple' .. py:attribute:: Checkbox :type: str :value: 'checkbox' .. py:attribute:: Textarea :type: str :value: 'textarea' .. py:attribute:: Select :type: str :value: 'select' .. py:attribute:: Article :type: str :value: 'article' .. py:attribute:: Challenge :type: str :value: 'challenge' .. py:attribute:: DependencySelect :type: str :value: 'dependency-select' .. py:attribute:: Attachment :type: str :value: 'attachment' .. py:attribute:: Team :type: str :value: 'team' .. py:attribute:: Expectation :type: str :value: 'expectation' .. py:attribute:: Asset :type: str :value: 'asset' .. py:attribute:: AssetGroup :type: str :value: 'asset-group' .. py:attribute:: Payload :type: str :value: 'payload' .. py:class:: ContractFieldKey Bases: :py:obj:`str`, :py:obj:`enum.Enum` .. py:attribute:: Asset :type: str :value: 'assets' .. py:attribute:: AssetGroup :type: str :value: 'asset_groups' .. py:class:: ContractOutputType Bases: :py:obj:`str`, :py:obj:`enum.Enum` .. py:attribute:: Text :type: str :value: 'text' .. py:attribute:: Number :type: str :value: 'number' .. py:attribute:: Port :type: str :value: 'port' .. py:attribute:: PortsScan :type: str :value: 'portscan' .. py:attribute:: IPv4 :type: str :value: 'ipv4' .. py:attribute:: IPv6 :type: str :value: 'ipv6' .. py:attribute:: CVE :type: str :value: 'cve' .. py:attribute:: Asset :type: str :value: 'asset' .. py:class:: ExpectationType Bases: :py:obj:`str`, :py:obj:`enum.Enum` .. py:attribute:: text :type: str :value: 'TEXT' .. py:attribute:: document :type: str :value: 'DOCUMENT' .. py:attribute:: article :type: str :value: 'ARTICLE' .. py:attribute:: challenge :type: str :value: 'CHALLENGE' .. py:attribute:: manual :type: str :value: 'MANUAL' .. py:attribute:: prevention :type: str :value: 'PREVENTION' .. py:attribute:: detection :type: str :value: 'DETECTION' .. py:attribute:: vulnerability :type: str :value: 'VULNERABILITY' .. py:class:: Expectation .. py:attribute:: expectation_type :type: ExpectationType .. py:attribute:: expectation_name :type: str .. py:attribute:: expectation_description :type: str .. py:attribute:: expectation_score :type: int .. py:attribute:: expectation_expectation_group :type: bool .. py:class:: LinkedFieldModel .. py:attribute:: key :type: str .. py:attribute:: type :type: ContractFieldType .. py:class:: ContractElement Bases: :py:obj:`abc.ABC` Helper class that provides a standard way to create an ABC using inheritance. .. py:attribute:: key :type: str .. py:attribute:: label :type: str .. py:attribute:: type :type: str :value: '' .. py:attribute:: mandatoryGroups :type: List[str] :value: [] .. py:attribute:: mandatoryConditionFields :type: List[str] :value: [] .. py:attribute:: mandatoryConditionValues :type: Dict[str, any] :value: [] .. py:attribute:: visibleConditionFields :type: List[str] :value: [] .. py:attribute:: visibleConditionValues :type: Dict[str, any] :value: [] .. py:attribute:: linkedFields :type: List[str] :value: [] .. py:attribute:: mandatory :type: bool :value: False .. py:attribute:: readOnly :type: bool :value: False .. py:property:: get_type :type: str :abstractmethod: .. py:class:: ContractCardinalityElement Bases: :py:obj:`ContractElement`, :py:obj:`abc.ABC` Helper class that provides a standard way to create an ABC using inheritance. .. py:attribute:: cardinality :type: str .. py:attribute:: defaultValue :type: List[str] :value: [] .. py:class:: ContractOutputElement Bases: :py:obj:`abc.ABC` Helper class that provides a standard way to create an ABC using inheritance. .. py:attribute:: type :type: str .. py:attribute:: field :type: str .. py:attribute:: labels :type: List[str] .. py:attribute:: isFindingCompatible :type: bool .. py:attribute:: isMultiple :type: bool .. py:class:: ContractConfig .. py:attribute:: type :type: str .. py:attribute:: expose :type: bool .. py:attribute:: label :type: dict[SupportedLanguage, str] .. py:attribute:: color_dark :type: str .. py:attribute:: color_light :type: str .. py:class:: Domain .. py:attribute:: domain_id :type: str .. py:attribute:: domain_name :type: str .. py:attribute:: domain_color :type: str .. py:attribute:: domain_created_at :type: str .. py:attribute:: domain_updated_at :type: str .. py:class:: Contract .. py:attribute:: contract_id :type: str .. py:attribute:: label :type: dict[SupportedLanguage, str] .. py:attribute:: fields :type: List[ContractElement] .. py:attribute:: outputs :type: List[ContractOutputElement] .. py:attribute:: config :type: ContractConfig .. py:attribute:: manual :type: bool .. py:attribute:: variables :type: List[pyoaev.contracts.contract_utils.ContractVariable] .. py:attribute:: contract_attack_patterns_external_ids :type: List[str] :value: [] .. py:attribute:: contract_vulnerability_external_ids :type: List[str] :value: [] .. py:attribute:: is_atomic_testing :type: bool :value: True .. py:attribute:: platforms :type: List[str] :value: [] .. py:attribute:: external_id :type: str :value: None .. py:attribute:: domains :type: List[Domain] :value: None .. py:method:: add_attack_pattern(var: str) .. py:method:: add_vulnerability(var: str) .. py:method:: add_variable(var: pyoaev.contracts.contract_utils.ContractVariable) .. py:method:: to_contract_add_input(source_id: str) .. py:method:: to_contract_update_input() .. py:class:: ContractTeam Bases: :py:obj:`ContractCardinalityElement` Helper class that provides a standard way to create an ABC using inheritance. .. py:property:: get_type :type: str .. py:class:: ContractText Bases: :py:obj:`ContractCardinalityElement` Helper class that provides a standard way to create an ABC using inheritance. .. py:attribute:: defaultValue :type: str :value: '' .. py:property:: get_type :type: str .. py:function:: prepare_contracts(contracts) .. py:class:: ContractTuple Bases: :py:obj:`ContractCardinalityElement` Helper class that provides a standard way to create an ABC using inheritance. .. py:attribute:: attachmentKey :type: str :value: None .. py:attribute:: contractAttachment :type: bool .. py:attribute:: tupleFilePrefix :type: str :value: 'file :: ' .. py:property:: get_type :type: str .. py:class:: ContractTextArea Bases: :py:obj:`ContractCardinalityElement` Helper class that provides a standard way to create an ABC using inheritance. .. py:attribute:: defaultValue :type: str :value: '' .. py:attribute:: richText :type: bool :value: False .. py:property:: get_type :type: str .. py:class:: ContractCheckbox Bases: :py:obj:`ContractElement` Helper class that provides a standard way to create an ABC using inheritance. .. py:attribute:: defaultValue :type: bool :value: False .. py:property:: get_type :type: str .. py:class:: ContractAttachment Bases: :py:obj:`ContractCardinalityElement` Helper class that provides a standard way to create an ABC using inheritance. .. py:property:: get_type :type: str .. py:class:: ContractExpectations Bases: :py:obj:`ContractCardinalityElement` Helper class that provides a standard way to create an ABC using inheritance. .. py:attribute:: cardinality .. py:attribute:: predefinedExpectations :type: List[Expectation] :value: [] .. py:property:: get_type :type: str .. py:class:: ContractSelect Bases: :py:obj:`ContractCardinalityElement` Helper class that provides a standard way to create an ABC using inheritance. .. py:attribute:: choices :type: dict[str, str] :value: None .. py:property:: get_type :type: str .. py:class:: ContractAsset Bases: :py:obj:`ContractCardinalityElement` Helper class that provides a standard way to create an ABC using inheritance. .. py:attribute:: key :type: str :value: 'assets' .. py:property:: get_type :type: str .. py:class:: ContractAssetGroup Bases: :py:obj:`ContractCardinalityElement` Helper class that provides a standard way to create an ABC using inheritance. .. py:attribute:: key :type: str :value: 'asset_groups' .. py:property:: get_type :type: str .. py:class:: ContractPayload Bases: :py:obj:`ContractCardinalityElement` Helper class that provides a standard way to create an ABC using inheritance. .. py:property:: get_type :type: str