From 1a6e6a15de5d794b5c3fb0507c84b4db3aabf455 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 7 Nov 2024 23:33:53 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=B9=20Bump=20GraphQL=20Schema=20-=2020?= =?UTF-8?q?241106000334=20(#68)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Mondoo Tools --- enum.go | 61 +++++++++++++++++++++++++++++++++++++++++++++++ input.go | 72 +++++++++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 132 insertions(+), 1 deletion(-) diff --git a/enum.go b/enum.go index a14205c..6876cf0 100644 --- a/enum.go +++ b/enum.go @@ -1244,3 +1244,64 @@ const ( VulnerabilityScoreTypeCve VulnerabilityScoreType = "CVE" VulnerabilityScoreTypeAdvisory VulnerabilityScoreType = "ADVISORY" ) + +// WorkspaceSelectionConditionIntField represents workspace selection condition int fields. +type WorkspaceSelectionConditionIntField string + +// Workspace selection condition int fields. +const ( + WorkspaceSelectionConditionIntFieldUnknown WorkspaceSelectionConditionIntField = "UNKNOWN" // Unknwon int field. + WorkspaceSelectionConditionIntFieldBaseScore WorkspaceSelectionConditionIntField = "BASE_SCORE" // Base score field. + WorkspaceSelectionConditionIntFieldRiskScore WorkspaceSelectionConditionIntField = "RISK_SCORE" // Risk score field. +) + +// WorkspaceSelectionConditionNumericOperator represents workspace selection condition string operators. +type WorkspaceSelectionConditionNumericOperator string + +// Workspace selection condition string operators. +const ( + WorkspaceSelectionConditionNumericOperatorUnknown WorkspaceSelectionConditionNumericOperator = "UNKNOWN" // Unknown operator. + WorkspaceSelectionConditionNumericOperatorEqual WorkspaceSelectionConditionNumericOperator = "EQUAL" // Equal operator. + WorkspaceSelectionConditionNumericOperatorNotEqual WorkspaceSelectionConditionNumericOperator = "NOT_EQUAL" // Not equal operator. + WorkspaceSelectionConditionNumericOperatorGt WorkspaceSelectionConditionNumericOperator = "GT" // Greater than operator. + WorkspaceSelectionConditionNumericOperatorLt WorkspaceSelectionConditionNumericOperator = "LT" // Less than operator. +) + +// WorkspaceSelectionConditionOperator +type WorkspaceSelectionConditionOperator string + +const ( + WorkspaceSelectionConditionOperatorUnknown WorkspaceSelectionConditionOperator = "UNKNOWN" // Unknown operator. + WorkspaceSelectionConditionOperatorAnd WorkspaceSelectionConditionOperator = "AND" // AND operator, meaning the condition will be "ANDed" to other conditions. + WorkspaceSelectionConditionOperatorAndNot WorkspaceSelectionConditionOperator = "AND_NOT" // AND NOT operator, meaning the condition will be "ANDed" to other conditions with a NOT. +) + +// WorkspaceSelectionConditionStringField represents workspace selection condition string fields. +type WorkspaceSelectionConditionStringField string + +// Workspace selection condition string fields. +const ( + WorkspaceSelectionConditionStringFieldUnknown WorkspaceSelectionConditionStringField = "UNKNOWN" // Unknwon string field. + WorkspaceSelectionConditionStringFieldPlatform WorkspaceSelectionConditionStringField = "PLATFORM" // Platform field. + WorkspaceSelectionConditionStringFieldPlatformVersion WorkspaceSelectionConditionStringField = "PLATFORM_VERSION" // Platform version field. +) + +// WorkspaceSelectionConditionStringOperator represents workspace selection condition string operators. +type WorkspaceSelectionConditionStringOperator string + +// Workspace selection condition string operators. +const ( + WorkspaceSelectionConditionStringOperatorUnknown WorkspaceSelectionConditionStringOperator = "UNKNOWN" // Unknown operator. + WorkspaceSelectionConditionStringOperatorEqual WorkspaceSelectionConditionStringOperator = "EQUAL" // Equal operator. + WorkspaceSelectionConditionStringOperatorNotEqual WorkspaceSelectionConditionStringOperator = "NOT_EQUAL" // Not equal operator. +) + +// WorkspaceSelectionOperator represents workspace selection operators. +type WorkspaceSelectionOperator string + +// Workspace selection operators. +const ( + WorkspaceSelectionOperatorUnknown WorkspaceSelectionOperator = "UNKNOWN" // Unknown operator. + WorkspaceSelectionOperatorInclude WorkspaceSelectionOperator = "INCLUDE" // Include assets matching the selection. + WorkspaceSelectionOperatorExclude WorkspaceSelectionOperator = "EXCLUDE" // Exclude assets matching the selection. +) diff --git a/input.go b/input.go index a43739f..7dce4e6 100644 --- a/input.go +++ b/input.go @@ -7,7 +7,7 @@ package mondoogql // Input represents one of the Input structs: // -// APITokenOrder, AWSConfigurationOptionsInput, AWSEventPatternInput, AWSRoleCredential, AWSSecretKeyCredential, AcceptLegalPolicy, ActivePoliciesInput, ActivePolicyOrder, AddSSHKeyRequest, AdvisoryFilter, AdvisoryOrder, AdvisorySummaryOrder, AgentOrder, AgentVersionFilter, AggregateScoreFilter, AggregateScoreOrder, AnalyseAssetVulnerabilitiesInput, AnalyseIncognitoAssetInput, ApplyExceptionForScopesInput, ApplySpacePlanInput, AssetEolFilter, AssetExploitableFilter, AssetGroupOrder, AssetLastPackageUpdateTimeInput, AssetLinkInfoInput, AssetListPoliciesFilter, AssetOSRebootFilter, AssetOrder, AssetOverviewPageInfo, AssetPackageDetailsInput, AssetReportInput, AssetReportListPoliciesFilter, AssetReportPolicyOrder, AssetReportQueryOrder, AssetResourceInput, AssetSearchInput, AssetSearchSuggestionsInput, AssetSummaryOrder, AssetUpdateFilter, AssetUrlSegmentInput, AssetUrlStatsInput, AssetVulnerabilityReportInput, AuditLogOrder, AwsS3ConfigurationOptionsInput, AwsScanOptions, AzureBlobConfigurationOptionsInput, AzureConfigurationOptionsInput, AzureDevopsConfigurationOptionsInput, AzureDevopsTicketConfigInput, AzureDevopsTicketContextInput, AzureDevopsTicketContextProjectsInput, BigqueryConfigurationOptionsInput, BillingSessionInput, CaseContentInput, CaseRefInput, CaseTicketConfigInput, CasesConfigurationInput, CasesInput, CategoriesListInput, ChangeSubscriptionPlanInput, CheckScoreFilter, CheckScoreOrder, ChecksOrder, ChecksSearchInput, CiCdJobPageInfo, CiCdProjectPageInfo, CicdProjectJobsInput, CicdProjectOrder, CicdProjectsInput, ClientIntegrationConfigurationInput, ClientIntegrationInput, CloseCaseInput, ComplianceAssetOrder, ComplianceAssetsSearchInput, ComplianceControlInput, ComplianceFrameworkInput, ComplianceFrameworkMutationInput, ComplianceFrameworksInput, ContentSearchInput, ContentSearchResultItemOrder, ControlDocumentOptionsInput, ControlScoreFilter, ControlScoreOrder, ControlsOrder, ControlsSearchInput, CreateCaseInput, CreateClientIntegrationInput, CreateInvitationInput, CreateOrganizationInput, CreateServiceAccountInput, CreateSpaceInput, CveFilter, CveOrder, CveSummaryOrder, DataQueryFilter, DataQueryOrder, DeleteAPITokenInput, DeleteAgentsInput, DeleteAssetsInput, DeleteCasesInput, DeleteClientIntegrationInput, DeleteCustomPolicyInput, DeleteCustomQueryPackInput, DeleteFrameworkInput, DeleteProjectsInput, DeleteSSHKeyRequest, DeleteSSOProviderInput, DeleteServiceAccountsInput, DownloadBundleInput, DownloadFrameworkInput, EbsScanOptionsInput, Ec2ScanOptionsInput, EmailConfigurationOptionsInput, EmailPreferenceInput, EmailRecipientInput, EmailTicketConfigInput, EnableSSOProviderInput, EolAssetsConfigurationInput, ExceptionGroupsInput, ExceptionMutationInput, ExceptionReviewInput, ForkFrameworkInput, FrameworkDocumentOptionsInput, GarbageCollectAssetsConfigurationInput, GcpConfigurationOptionsInput, GcsBucketConfigurationOptionsInput, GenerateAPITokenInput, GenerateDocumentInput, GetClientIntegrationDeleteCommandInput, GetClientIntegrationTokenInput, GithubConfigurationOptionsInput, GithubTicketConfigInput, GithubTicketingConfigurationOptionsInput, GitlabConfigurationOptionsInput, GitlabTicketConfigInput, GitlabTicketingConfigurationOptionsInput, GoogleWorkspaceConfigurationOptionsInput, GroupFilter, HostConfigurationOptionsInput, HostedAwsConfigurationOptionsInput, IDSuggestionInput, IntegrationInput, IntegrationOptionsInput, IntegrationsSummaryInput, InvitationOrder, JiraConfigurationOptionsInput, JiraTicketConfigInput, JiraTicketContextInput, JiraTicketContextProjectsInput, JiraTicketContextUsersInput, K8sConfigurationOptionsInput, KeyValueInput, LibraryOrder, ListClientIntegrationsFilterInput, ListClientIntegrationsInput, ListDiscoveryResultsInput, ManagedClientsFilters, MembershipOrder, MicrosoftDefenderConfigurationOptionsInput, ModifyRiskFactorInput, MqueryAssetDataInput, MqueryAssetScoresInput, MqueryInput, MqueryScoreInput, Ms365ConfigurationOptionsInput, MvdOrder, OciConfigurationOptionsInput, OktaConfigurationOptionsInput, OrgViewPageInfo, OrganizationOverviewInput, PackageFilter, PackageInput, PackageScoresFilter, PackageScoresInput, PackageScoresOrder, PackagesOrder, PerformDiscoveryInput, PingIntegrationInput, PlanningMilestoneMetadataMutationInput, PlatformInput, PlatformVulnerabilityConfigurationInput, PlatformsListInput, PolicyAddInput, PolicyAssignmentInput, PolicyDashboardStatsInput, PolicyDeleteInput, PolicyInput, PolicyReportMquerySummaryOrder, PolicyReportSummaryOrder, PostgresConfigurationOptionsInput, ProcessCaseEventsInput, PropertyQueryMutationInput, PropertyQueryMutationTarget, PropertyQueryOverride, QueryPackAddInput, RatedPoliciesInput, RegistrationTokenInput, RegistrationTokenOrder, RemediationFilter, RemediationInput, RemediationPackageFields, RemoveOrganizationMembershipInput, RemoveSpaceMembershipInput, RenderedAssetQueryDataInput, ReportViewedInfo, ReportViewedInput, RevokeRegistrationTokenInput, RiskFactorFilter, RiskFactorFilterQuery, RiskFactorMagnitudeModification, RoleInput, S3ConfigurationOptionsInput, SSOProviderInput, ScanConfigurationInput, ScimGroupMapping, ScoreRange, SearchFilters, SecurityDashboardPageInfo, ServiceAccountOrder, SetAssetAnnotationsInput, SetCustomPolicyInput, SetCustomQueryPackInput, SetOrganizationMembershipInput, SetRoleInput, SetRolesInput, SetSSOProviderInput, SetScimGroupMappingInput, SetSpaceMembershipInput, ShodanConfigurationOptionsInput, SlackConfigurationOptionsInput, SnowflakeConfigurationOptionsInput, SpacePlanInput, SpacePlanQueryMutationDeltaInput, SpacePolicyReportInput, SpacePolicySummaryInput, SpaceReportInput, SpaceSettingsInput, SpaceVulnerabilitiesInput, SpaceVulnerabilityReportInput, SubscriptionItem, SuppressIntegrationMessageInput, TerminatedAssetsConfigurationInput, TicketContextInput, TicketingIntegrationsInput, TimestampFilter, TopPolicyActionsInput, TopVulnerabilityInput, TriggerActionInput, TriggerActionOptionsInput, UnusedServiceAccountsConfigurationInput, UpdateAPITokenInput, UpdateAgentInput, UpdateClientIntegrationConfigurationInput, UpdateClientIntegrationNameInput, UpdateOrganizationInput, UpdateServiceAccountInput, UpdateSpaceInput, UpdateUserInput, UploadFrameworkInput, VPCConfigurationInput, VulnDashboardStatsInput, VulnerabilityDashboardPageInfo, VulnerabilityScoreFilter, VulnerabilityScoreOrder, ZendeskConfigurationOptionsInput, ZendeskCustomFieldInput. +// APITokenOrder, AWSConfigurationOptionsInput, AWSEventPatternInput, AWSRoleCredential, AWSSecretKeyCredential, AcceptLegalPolicy, ActivePoliciesInput, ActivePolicyOrder, AddSSHKeyRequest, AdvisoryFilter, AdvisoryOrder, AdvisorySummaryOrder, AgentOrder, AgentVersionFilter, AggregateScoreFilter, AggregateScoreOrder, AnalyseAssetVulnerabilitiesInput, AnalyseIncognitoAssetInput, ApplyExceptionForScopesInput, ApplySpacePlanInput, AssetEolFilter, AssetExploitableFilter, AssetGroupOrder, AssetLastPackageUpdateTimeInput, AssetLinkInfoInput, AssetListPoliciesFilter, AssetOSRebootFilter, AssetOrder, AssetOverviewPageInfo, AssetPackageDetailsInput, AssetReportInput, AssetReportListPoliciesFilter, AssetReportPolicyOrder, AssetReportQueryOrder, AssetResourceInput, AssetSearchInput, AssetSearchSuggestionsInput, AssetSummaryOrder, AssetUpdateFilter, AssetUrlSegmentInput, AssetUrlStatsInput, AssetVulnerabilityReportInput, AuditLogOrder, AwsS3ConfigurationOptionsInput, AwsScanOptions, AzureBlobConfigurationOptionsInput, AzureConfigurationOptionsInput, AzureDevopsConfigurationOptionsInput, AzureDevopsTicketConfigInput, AzureDevopsTicketContextInput, AzureDevopsTicketContextProjectsInput, BigqueryConfigurationOptionsInput, BillingSessionInput, CaseContentInput, CaseRefInput, CaseTicketConfigInput, CasesConfigurationInput, CasesInput, CategoriesListInput, ChangeSubscriptionPlanInput, CheckScoreFilter, CheckScoreOrder, ChecksOrder, ChecksSearchInput, CiCdJobPageInfo, CiCdProjectPageInfo, CicdProjectJobsInput, CicdProjectOrder, CicdProjectsInput, ClientIntegrationConfigurationInput, ClientIntegrationInput, CloseCaseInput, ComplianceAssetOrder, ComplianceAssetsSearchInput, ComplianceControlInput, ComplianceFrameworkInput, ComplianceFrameworkMutationInput, ComplianceFrameworksInput, ContentSearchInput, ContentSearchResultItemOrder, ControlDocumentOptionsInput, ControlScoreFilter, ControlScoreOrder, ControlsOrder, ControlsSearchInput, CreateCaseInput, CreateClientIntegrationInput, CreateInvitationInput, CreateOrganizationInput, CreateServiceAccountInput, CreateSpaceInput, CreateWorkspaceInput, CveFilter, CveOrder, CveSummaryOrder, DataQueryFilter, DataQueryOrder, DeleteAPITokenInput, DeleteAgentsInput, DeleteAssetsInput, DeleteCasesInput, DeleteClientIntegrationInput, DeleteCustomPolicyInput, DeleteCustomQueryPackInput, DeleteFrameworkInput, DeleteProjectsInput, DeleteSSHKeyRequest, DeleteSSOProviderInput, DeleteServiceAccountsInput, DeleteWorkspacesInput, DownloadBundleInput, DownloadFrameworkInput, EbsScanOptionsInput, Ec2ScanOptionsInput, EmailConfigurationOptionsInput, EmailPreferenceInput, EmailRecipientInput, EmailTicketConfigInput, EnableSSOProviderInput, EolAssetsConfigurationInput, ExceptionGroupsInput, ExceptionMutationInput, ExceptionReviewInput, ForkFrameworkInput, FrameworkDocumentOptionsInput, GarbageCollectAssetsConfigurationInput, GcpConfigurationOptionsInput, GcsBucketConfigurationOptionsInput, GenerateAPITokenInput, GenerateDocumentInput, GetClientIntegrationDeleteCommandInput, GetClientIntegrationTokenInput, GithubConfigurationOptionsInput, GithubTicketConfigInput, GithubTicketingConfigurationOptionsInput, GitlabConfigurationOptionsInput, GitlabTicketConfigInput, GitlabTicketingConfigurationOptionsInput, GoogleWorkspaceConfigurationOptionsInput, GroupFilter, HostConfigurationOptionsInput, HostedAwsConfigurationOptionsInput, IDSuggestionInput, IntegrationInput, IntegrationOptionsInput, IntegrationsSummaryInput, InvitationOrder, JiraConfigurationOptionsInput, JiraTicketConfigInput, JiraTicketContextInput, JiraTicketContextProjectsInput, JiraTicketContextUsersInput, K8sConfigurationOptionsInput, KeyValueInput, LibraryOrder, ListClientIntegrationsFilterInput, ListClientIntegrationsInput, ListDiscoveryResultsInput, ManagedClientsFilters, MembershipOrder, MicrosoftDefenderConfigurationOptionsInput, ModifyRiskFactorInput, MqueryAssetDataInput, MqueryAssetScoresInput, MqueryInput, MqueryScoreInput, Ms365ConfigurationOptionsInput, MvdOrder, OciConfigurationOptionsInput, OktaConfigurationOptionsInput, OrgViewPageInfo, OrganizationOverviewInput, PackageFilter, PackageInput, PackageScoresFilter, PackageScoresInput, PackageScoresOrder, PackagesOrder, PerformDiscoveryInput, PingIntegrationInput, PlanningMilestoneMetadataMutationInput, PlatformInput, PlatformVulnerabilityConfigurationInput, PlatformsListInput, PolicyAddInput, PolicyAssignmentInput, PolicyDashboardStatsInput, PolicyDeleteInput, PolicyInput, PolicyReportMquerySummaryOrder, PolicyReportSummaryOrder, PostgresConfigurationOptionsInput, ProcessCaseEventsInput, PropertyQueryMutationInput, PropertyQueryMutationTarget, PropertyQueryOverride, QueryPackAddInput, RatedPoliciesInput, RegistrationTokenInput, RegistrationTokenOrder, RemediationFilter, RemediationInput, RemediationPackageFields, RemoveOrganizationMembershipInput, RemoveSpaceMembershipInput, RenderedAssetQueryDataInput, ReportViewedInfo, ReportViewedInput, RevokeRegistrationTokenInput, RiskFactorFilter, RiskFactorFilterQuery, RiskFactorMagnitudeModification, RoleInput, S3ConfigurationOptionsInput, SSOProviderInput, ScanConfigurationInput, ScimGroupMapping, ScoreRange, SearchFilters, SecurityDashboardPageInfo, ServiceAccountOrder, SetAssetAnnotationsInput, SetCustomPolicyInput, SetCustomQueryPackInput, SetOrganizationMembershipInput, SetRoleInput, SetRolesInput, SetSSOProviderInput, SetScimGroupMappingInput, SetSpaceMembershipInput, ShodanConfigurationOptionsInput, SlackConfigurationOptionsInput, SnowflakeConfigurationOptionsInput, SpacePlanInput, SpacePlanQueryMutationDeltaInput, SpacePolicyReportInput, SpacePolicySummaryInput, SpaceReportInput, SpaceSettingsInput, SpaceVulnerabilitiesInput, SpaceVulnerabilityReportInput, SubscriptionItem, SuppressIntegrationMessageInput, TerminatedAssetsConfigurationInput, TicketContextInput, TicketingIntegrationsInput, TimestampFilter, TopPolicyActionsInput, TopVulnerabilityInput, TriggerActionInput, TriggerActionOptionsInput, UnusedServiceAccountsConfigurationInput, UpdateAPITokenInput, UpdateAgentInput, UpdateClientIntegrationConfigurationInput, UpdateClientIntegrationNameInput, UpdateOrganizationInput, UpdateServiceAccountInput, UpdateSpaceInput, UpdateUserInput, UploadFrameworkInput, VPCConfigurationInput, VulnDashboardStatsInput, VulnerabilityDashboardPageInfo, VulnerabilityScoreFilter, VulnerabilityScoreOrder, WorkspaceSelectionConditionInput, WorkspaceSelectionInput, WorkspaceSelectionIntConditionInput, WorkspaceSelectionStringConditionInput, WorkspaceSelectionsInput, WorkspacesInput, ZendeskConfigurationOptionsInput, ZendeskCustomFieldInput. type Input interface{} // APITokenOrder @@ -1010,6 +1010,19 @@ type CreateSpaceInput struct { Settings *SpaceSettingsInput `json:"settings,omitempty"` } +// CreateWorkspaceInput represents create workspace input. +type CreateWorkspaceInput struct { + // The MRN of the owner of the workspace. (Required.) + OwnerMrn String `json:"ownerMrn"` + // The name of the workspace. (Required.) + Name String `json:"name"` + // Workspace selections. (Required.) + Selections WorkspaceSelectionsInput `json:"selections"` + + // Description of the workspace. (Optional.) + Description *String `json:"description,omitempty"` +} + // CveFilter represents cVE filters. type CveFilter struct { @@ -1135,6 +1148,12 @@ type DeleteServiceAccountsInput struct { Mrns []String `json:"mrns"` } +// DeleteWorkspacesInput represents delete workspaces input. +type DeleteWorkspacesInput struct { + // MRNs of workspaces to delete. (Required.) + Mrns []String `json:"mrns"` +} + // DownloadBundleInput represents download bundle input. type DownloadBundleInput struct { // The mrn is a unique identifier. (Required.) @@ -2793,6 +2812,57 @@ type VulnerabilityScoreOrder struct { Field VulnerabilityScoreOrderField `json:"field"` } +// WorkspaceSelectionConditionInput represents workspace selection condition. +type WorkspaceSelectionConditionInput struct { + // Operator determining how the condition is joined with the other conditions in the list. (Required.) + Operator WorkspaceSelectionConditionOperator `json:"operator"` + + // String condition. (Optional.) + StringCondition *WorkspaceSelectionStringConditionInput `json:"stringCondition,omitempty"` + // Int condition. (Optional.) + IntCondition *WorkspaceSelectionIntConditionInput `json:"intCondition,omitempty"` +} + +// WorkspaceSelectionInput represents workspace selection defining conditions for selecting assets for a workspace. +type WorkspaceSelectionInput struct { + // Operator the selection should use (whether to include or exclude assets matching). (Required.) + Operator WorkspaceSelectionOperator `json:"operator"` + // A list of conditions for the selection. (Required.) + Conditions []WorkspaceSelectionConditionInput `json:"conditions"` +} + +// WorkspaceSelectionIntConditionInput represents workspace selection condition int condition. +type WorkspaceSelectionIntConditionInput struct { + // Field to match. (Required.) + Field WorkspaceSelectionConditionIntField `json:"field"` + // Operator to use. (Required.) + Operator WorkspaceSelectionConditionNumericOperator `json:"operator"` + // Values to match. Values are ORed together. (Required.) + Values []Int `json:"values"` +} + +// WorkspaceSelectionStringConditionInput represents workspace selection string condition. +type WorkspaceSelectionStringConditionInput struct { + // Field to match. (Required.) + Field WorkspaceSelectionConditionStringField `json:"field"` + // Operator to use. (Required.) + Operator WorkspaceSelectionConditionStringOperator `json:"operator"` + // Values to match. Values are ORed together. (Required.) + Values []String `json:"values"` +} + +// WorkspaceSelectionsInput represents workspace selections input. +type WorkspaceSelectionsInput struct { + // A list of workspace selections. (Required.) + Selections []WorkspaceSelectionInput `json:"selections"` +} + +// WorkspacesInput represents workspaces input. +type WorkspacesInput struct { + // The scope of the workspaces to list. (Required.) + ScopeMrn String `json:"scopeMrn"` +} + // ZendeskConfigurationOptionsInput represents zendesk integration input. type ZendeskConfigurationOptionsInput struct { // (Required.)