From 1089eba2fd3fc387941cd0ff5727acde34e22242 Mon Sep 17 00:00:00 2001 From: Christian Zunker Date: Mon, 27 Nov 2023 14:08:22 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Add=20new=20inputs=20for=20server-s?= =?UTF-8?q?ide=20vuln=20management?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Christian Zunker --- enum.go | 36 ++++++++++++++++++++ input.go | 101 +++++++++++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 134 insertions(+), 3 deletions(-) diff --git a/enum.go b/enum.go index dec53b8..d7ce74a 100644 --- a/enum.go +++ b/enum.go @@ -1,3 +1,6 @@ +// Copyright (c) Mondoo, Inc. +// SPDX-License-Identifier: MPL-2.0 +// // Code generated by gen.go; DO NOT EDIT. package mondoogql @@ -344,6 +347,31 @@ const ( CveSummaryOrderFieldScore CveSummaryOrderField = "SCORE" ) +// DocumentFormat +type DocumentFormat string + +const ( + DocumentFormatPdf DocumentFormat = "PDF" +) + +// DocumentStatus +type DocumentStatus string + +const ( + DocumentStatusQueued DocumentStatus = "QUEUED" + DocumentStatusRunning DocumentStatus = "RUNNING" + DocumentStatusCompleted DocumentStatus = "COMPLETED" + DocumentStatusFailed DocumentStatus = "FAILED" +) + +// DocumentType +type DocumentType string + +const ( + DocumentTypeFrameworkReport DocumentType = "FRAMEWORK_REPORT" + DocumentTypeControlReport DocumentType = "CONTROL_REPORT" +) + // EOLStatus type EOLStatus string @@ -410,6 +438,7 @@ type GitlabIntegrationType string const ( GitlabIntegrationTypeGroup GitlabIntegrationType = "GROUP" + GitlabIntegrationTypeNone GitlabIntegrationType = "NONE" ) // Grade @@ -524,6 +553,13 @@ const ( MembershipOrderFieldName MembershipOrderField = "NAME" ) +// MqueryAssetDataFormat +type MqueryAssetDataFormat string + +const ( + MqueryAssetDataFormatJSON MqueryAssetDataFormat = "JSON" +) + // MqueryState type MqueryState string diff --git a/input.go b/input.go index 2a3dfe6..3ca7eaf 100644 --- a/input.go +++ b/input.go @@ -1,10 +1,13 @@ +// Copyright (c) Mondoo, Inc. +// SPDX-License-Identifier: MPL-2.0 +// // Code generated by gen.go; DO NOT EDIT. package mondoogql // Input represents one of the Input structs: // -// APITokenOrder, AWSConfigurationOptionsInput, AWSEventPatternInput, AcceptLegalPolicy, AddSSHKeyRequest, AdvisoryOrder, AdvisorySummaryOrder, AgentOrder, AgentVersionFilter, ApplySpacePlanInput, AssetEolFilter, AssetExploitableFilter, AssetGroupFilter, AssetGroupOrder, AssetLinkInfoInput, AssetOSRebootFilter, AssetOrder, AssetOverviewPageInfo, AssetReportInput, AssetReportPolicyOrder, AssetReportQueryOrder, AssetReportRecommendedActionOrder, AssetResourceInput, AssetSearchInput, AssetSearchSuggestionsInput, AssetSummaryOrder, AssetUpdateFilter, AssetVulnerabilityReportInput, AuditLogOrder, AwsS3ConfigurationOptionsInput, AwsScanOptions, AzureBlobConfigurationOptionsInput, AzureConfigurationOptionsInput, BigqueryConfigurationOptionsInput, BillingSessionInput, CategoriesListInput, ChangeSubscriptionPlanInput, ChecksOrder, ChecksSearchInput, CiCdJobPageInfo, CiCdProjectPageInfo, CicdProjectJobsInput, CicdProjectOrder, CicdProjectsInput, ClientIntegrationConfigurationInput, ClientIntegrationInput, ComplianceAssetOrder, ComplianceAssetsSearchInput, ComplianceControlInput, ComplianceFrameworkInput, ComplianceFrameworkMutationInput, ComplianceFrameworksInput, ContentSearchInput, ContentSearchResultItemOrder, ControlsOrder, ControlsSearchInput, CreateAgentInput, CreateClientIntegrationInput, CreateInvitationInput, CreateOrganizationInput, CreateServiceAccountInput, CreateSpaceInput, CveOrder, CveSummaryOrder, DeleteAPITokenInput, DeleteAgentsInput, DeleteAssetsInput, DeleteClientIntegrationInput, DeleteProjectsInput, DeleteSSHKeyRequest, DeleteSSOProviderInput, DeleteServiceAccountsInput, DownloadBundleInput, EbsScanOptionsInput, Ec2ScanOptionsInput, EmailPreferenceInput, EnableSSOProviderInput, ExceptionMutationInput, ExceptionReviewInput, GarbageCollectAssetsConfigurationInput, GcpConfigurationOptionsInput, GcsBucketConfigurationOptionsInput, GenerateAPITokenInput, GetClientIntegrationDeleteCommandInput, GetClientIntegrationTokenInput, GithubConfigurationOptionsInput, GitlabConfigurationOptionsInput, GoogleWorkspaceConfigurationOptionsInput, GroupFilter, HostedAwsConfigurationOptionsInput, IDSuggestionInput, IntegrationInput, IntegrationOptionsInput, IntegrationsSummaryInput, InvitationOrder, JiraConfigurationOptionsInput, JiraTicketContextInput, JiraTicketContextProjectsInput, JiraTicketContextUsersInput, K8sConfigurationOptionsInput, KeyValueInput, LibraryOrder, ListClientIntegrationsFilterInput, ListClientIntegrationsInput, ListDiscoveryResultsInput, ListExceptionsInput, ManagedClientsFilters, MembershipOrder, MqueryAssetScoresInput, MqueryInput, Ms365ConfigurationOptionsInput, OciConfigurationOptionsInput, OktaConfigurationOptionsInput, OrgViewPageInfo, OrganizationOverviewInput, PackagesOrder, PerformDiscoveryInput, PingIntegrationInput, PlanningMilestoneMetadataMutationInput, PlatformInput, PlatformsListInput, PolicyAddInput, PolicyAssignmentInput, PolicyBundleInput, PolicyDashboardStatsInput, PolicyDeleteInput, PolicyInput, PolicyOrder, PolicyReportMquerySummaryOrder, PolicyReportSummaryOrder, PostgresConfigurationOptionsInput, PropertyQueryMutationInput, PropertyQueryMutationTarget, PropertyQueryOverride, QueryPackAddInput, RatedPoliciesInput, RegistrationTokenInput, RegistrationTokenOrder, RemoveOrganizationMembershipInput, RemoveSpaceMembershipInput, ReportViewedInfo, ReportViewedInput, RevokeRegistrationTokenInput, RoleInput, S3ConfigurationOptionsInput, SSOProviderInput, ScanConfigurationInput, ScoreRange, ScoringMutationDeltaInput, ScoringMutationInput, SecurityDashboardPageInfo, ServiceAccountOrder, SetAssetAnnotationsInput, SetOrganizationMembershipInput, SetRoleInput, SetRolesInput, SetSSOProviderInput, SetSpaceMembershipInput, SlackConfigurationOptionsInput, SnowflakeConfigurationOptionsInput, SpacePlanInput, SpacePlanQueryMutationDeltaInput, SpacePolicyReportInput, SpaceReportInput, SpaceSettingsInput, SpaceVulnerabilitiesInput, SpaceVulnerabilityReportInput, SubscriptionItem, SuppressIntegrationMessageInput, TerminatedAssetsConfigurationInput, TicketContentInput, TicketContextInput, TicketInput, TopPolicyActionsInput, TopVulnerabilityInput, TriggerActionInput, TriggerActionOptionsInput, UnusedServiceAccountsConfigurationInput, UpdateAPITokenInput, UpdateAgentInput, UpdateClientIntegrationConfigurationInput, UpdateClientIntegrationNameInput, UpdateOrganizationInput, UpdateServiceAccountInput, UpdateSpaceInput, UpdateUserInput, VulnDashboardStatsInput, VulnerabilityDashboardPageInfo. +// APITokenOrder, AWSConfigurationOptionsInput, AWSEventPatternInput, AcceptLegalPolicy, AddSSHKeyRequest, AdvisoryOrder, AdvisorySummaryOrder, AgentOrder, AgentVersionFilter, AnalyseAssetVulnerabilitiesInput, AnalyseIncognitoAssetInput, ApplySpacePlanInput, AssetEolFilter, AssetExploitableFilter, AssetGroupFilter, AssetGroupOrder, AssetLastPackageUpdateTimeInput, AssetLinkInfoInput, AssetOSRebootFilter, AssetOrder, AssetOverviewPageInfo, AssetReportInput, AssetReportPolicyOrder, AssetReportQueryOrder, AssetReportRecommendedActionOrder, AssetResourceInput, AssetSearchInput, AssetSearchSuggestionsInput, AssetSummaryOrder, AssetUpdateFilter, AssetVulnerabilityReportInput, AuditLogOrder, AwsS3ConfigurationOptionsInput, AwsScanOptions, AzureBlobConfigurationOptionsInput, AzureConfigurationOptionsInput, BigqueryConfigurationOptionsInput, BillingSessionInput, CategoriesListInput, ChangeSubscriptionPlanInput, ChecksOrder, ChecksSearchInput, CiCdJobPageInfo, CiCdProjectPageInfo, CicdProjectJobsInput, CicdProjectOrder, CicdProjectsInput, ClientIntegrationConfigurationInput, ClientIntegrationInput, ComplianceAssetOrder, ComplianceAssetsSearchInput, ComplianceControlInput, ComplianceFrameworkInput, ComplianceFrameworkMutationInput, ComplianceFrameworksInput, ContentSearchInput, ContentSearchResultItemOrder, ControlDocumentOptionsInput, ControlsOrder, ControlsSearchInput, CreateAgentInput, CreateClientIntegrationInput, CreateInvitationInput, CreateOrganizationInput, CreateServiceAccountInput, CreateSpaceInput, CveOrder, CveSummaryOrder, DeleteAPITokenInput, DeleteAgentsInput, DeleteAssetsInput, DeleteClientIntegrationInput, DeleteProjectsInput, DeleteSSHKeyRequest, DeleteSSOProviderInput, DeleteServiceAccountsInput, DownloadBundleInput, EbsScanOptionsInput, Ec2ScanOptionsInput, EmailPreferenceInput, EnableSSOProviderInput, ExceptionMutationInput, ExceptionReviewInput, FrameworkDocumentOptionsInput, GarbageCollectAssetsConfigurationInput, GcpConfigurationOptionsInput, GcsBucketConfigurationOptionsInput, GenerateAPITokenInput, GenerateDocumentInput, GetClientIntegrationDeleteCommandInput, GetClientIntegrationTokenInput, GithubConfigurationOptionsInput, GitlabConfigurationOptionsInput, GoogleWorkspaceConfigurationOptionsInput, GroupFilter, HostedAwsConfigurationOptionsInput, IDSuggestionInput, IntegrationInput, IntegrationOptionsInput, IntegrationsSummaryInput, InvitationOrder, JiraConfigurationOptionsInput, JiraTicketContextInput, JiraTicketContextProjectsInput, JiraTicketContextUsersInput, K8sConfigurationOptionsInput, KeyValueInput, LibraryOrder, ListClientIntegrationsFilterInput, ListClientIntegrationsInput, ListDiscoveryResultsInput, ListExceptionsInput, ManagedClientsFilters, MembershipOrder, MqueryAssetDataInput, MqueryAssetScoresInput, MqueryInput, Ms365ConfigurationOptionsInput, OciConfigurationOptionsInput, OktaConfigurationOptionsInput, OrgViewPageInfo, OrganizationOverviewInput, PackageInput, PackagesOrder, PerformDiscoveryInput, PingIntegrationInput, PlanningMilestoneMetadataMutationInput, PlatformInput, PlatformsListInput, PolicyAddInput, PolicyAssignmentInput, PolicyBundleInput, PolicyDashboardStatsInput, PolicyDeleteInput, PolicyInput, PolicyOrder, PolicyReportMquerySummaryOrder, PolicyReportSummaryOrder, PostgresConfigurationOptionsInput, PropertyQueryMutationInput, PropertyQueryMutationTarget, PropertyQueryOverride, QueryPackAddInput, RatedPoliciesInput, RegistrationTokenInput, RegistrationTokenOrder, RemoveOrganizationMembershipInput, RemoveSpaceMembershipInput, ReportViewedInfo, ReportViewedInput, RevokeRegistrationTokenInput, RoleInput, S3ConfigurationOptionsInput, SSOProviderInput, ScanConfigurationInput, ScoreRange, ScoringMutationDeltaInput, ScoringMutationInput, SecurityDashboardPageInfo, ServiceAccountOrder, SetAssetAnnotationsInput, SetOrganizationMembershipInput, SetRoleInput, SetRolesInput, SetSSOProviderInput, SetSpaceMembershipInput, SlackConfigurationOptionsInput, SnowflakeConfigurationOptionsInput, SpacePlanInput, SpacePlanQueryMutationDeltaInput, SpacePolicyReportInput, SpaceReportInput, SpaceSettingsInput, SpaceVulnerabilitiesInput, SpaceVulnerabilityReportInput, SubscriptionItem, SuppressIntegrationMessageInput, TerminatedAssetsConfigurationInput, TicketContentInput, TicketContextInput, TicketInput, TopPolicyActionsInput, TopVulnerabilityInput, TriggerActionInput, TriggerActionOptionsInput, UnusedServiceAccountsConfigurationInput, UpdateAPITokenInput, UpdateAgentInput, UpdateClientIntegrationConfigurationInput, UpdateClientIntegrationNameInput, UpdateOrganizationInput, UpdateServiceAccountInput, UpdateSpaceInput, UpdateUserInput, VulnDashboardStatsInput, VulnerabilityDashboardPageInfo. type Input interface{} // APITokenOrder @@ -87,6 +90,23 @@ type AgentVersionFilter struct { Not Boolean `json:"not"` } +// AnalyseAssetVulnerabilitiesInput +type AnalyseAssetVulnerabilitiesInput struct { + // (Required.) + Mrn ID `json:"mrn"` +} + +// AnalyseIncognitoAssetInput +type AnalyseIncognitoAssetInput struct { + // (Required.) + Platform PlatformInput `json:"platform"` + // (Required.) + Packages []PackageInput `json:"packages"` + + // (Optional.) + KernelVersion *String `json:"kernelVersion,omitempty"` +} + // ApplySpacePlanInput type ApplySpacePlanInput struct { // (Required.) @@ -129,6 +149,12 @@ type AssetGroupOrder struct { Field String `json:"field"` } +// AssetLastPackageUpdateTimeInput +type AssetLastPackageUpdateTimeInput struct { + // (Required.) + Mrn ID `json:"mrn"` +} + // AssetLinkInfoInput type AssetLinkInfoInput struct { // (Required.) @@ -571,6 +597,14 @@ type ContentSearchResultItemOrder struct { Field ContentSearchResultItemOrderField `json:"field"` } +// ControlDocumentOptionsInput +type ControlDocumentOptionsInput struct { + // (Required.) + FrameworkMRN String `json:"frameworkMRN"` + // (Required.) + ControlMRN String `json:"controlMRN"` +} + // ControlsOrder type ControlsOrder struct { // (Required.) @@ -824,6 +858,12 @@ type ExceptionReviewInput struct { Action ExceptionReviewAction `json:"action"` } +// FrameworkDocumentOptionsInput +type FrameworkDocumentOptionsInput struct { + // (Required.) + FrameworkMRN String `json:"frameworkMRN"` +} + // GarbageCollectAssetsConfigurationInput type GarbageCollectAssetsConfigurationInput struct { @@ -871,6 +911,27 @@ type GenerateAPITokenInput struct { Roles *[]RoleInput `json:"roles,omitempty"` } +// GenerateDocumentInput +type GenerateDocumentInput struct { + // (Required.) + ScopeMRN String `json:"scopeMRN"` + // (Required.) + Format DocumentFormat `json:"format"` + // (Required.) + Type DocumentType `json:"type"` + // (Required.) + Name String `json:"name"` + + // (Optional.) + TargetMRN *String `json:"targetMRN,omitempty"` + // (Optional.) + FrameworkOptions *FrameworkDocumentOptionsInput `json:"frameworkOptions,omitempty"` + // (Optional.) + ControlOptions *ControlDocumentOptionsInput `json:"controlOptions,omitempty"` + // (Optional.) + CaptureDebug *Boolean `json:"captureDebug,omitempty"` +} + // GetClientIntegrationDeleteCommandInput type GetClientIntegrationDeleteCommandInput struct { // (Required.) @@ -903,13 +964,21 @@ type GithubConfigurationOptionsInput struct { // GitlabConfigurationOptionsInput type GitlabConfigurationOptionsInput struct { - // (Required.) - Group String `json:"group"` // (Required.) Type GitlabIntegrationType `json:"type"` + // (Optional.) + Group *String `json:"group,omitempty"` // (Optional.) Token *String `json:"token,omitempty"` + // (Optional.) + DiscoverGroups *Boolean `json:"discoverGroups,omitempty"` + // (Optional.) + DiscoverProjects *Boolean `json:"discoverProjects,omitempty"` + // (Optional.) + DiscoverTerraform *Boolean `json:"discoverTerraform,omitempty"` + // (Optional.) + BaseURL *String `json:"baseUrl,omitempty"` } // GoogleWorkspaceConfigurationOptionsInput @@ -1117,6 +1186,19 @@ type MembershipOrder struct { Field MembershipOrderField `json:"field"` } +// MqueryAssetDataInput +type MqueryAssetDataInput struct { + // (Required.) + ScopeMrn String `json:"scopeMrn"` + // (Required.) + QueryMrn String `json:"queryMrn"` + + // (Optional.) + Query *String `json:"query,omitempty"` + // (Optional.) + Format *MqueryAssetDataFormat `json:"format,omitempty"` +} + // MqueryAssetScoresInput type MqueryAssetScoresInput struct { // (Required.) @@ -1187,6 +1269,19 @@ type OrganizationOverviewInput struct { OrganizationMrn String `json:"organizationMrn"` } +// PackageInput +type PackageInput struct { + // (Required.) + Name String `json:"name"` + // (Required.) + Version String `json:"version"` + + // (Optional.) + Arch *String `json:"arch,omitempty"` + // (Optional.) + Format *String `json:"format,omitempty"` +} + // PackagesOrder type PackagesOrder struct { // (Required.)