Documentation
¶
Index ¶
Constants ¶
const ( RuleFramework = "framework" RuleFrameworkGeneric = "framework-generic" RuleImportExistingControls = "import-existing-controls" RuleImportTemplateControls = "import-template-controls" RuleImportExistingPolicies = "import-existing-policies" RuleImportPolicyTemplates = "import-policy-templates" RuleHasAuditorAtOnboarding = "has-auditor-at-onboarding" RuleWantsAuditorRecommendation = "wants-auditor-recommendation" RuleWantsPartnerRecommendation = "wants-partner-recommendation" RuleDemoRequested = "demo-requested" )
Onboarding compliance rule IDs
const ( RuleSecureOrganization = "suggested-secure-organization" RuleInviteTeam = "suggested-invite-team" RuleCreateGroups = "suggested-create-groups" RuleCompleteRegistry = "suggested-complete-registry" RuleConfigureTrustCenter = "suggested-configure-trust-center" RuleAddPaymentMethod = "suggested-add-payment-method" RuleSetupIntegrations = "suggested-setup-integrations" )
Organization suggested-task rule IDs
Variables ¶
var NotificationTaskRules = []entx.TaskRuleSpec{ { RuleID: "review-domain-scan", Expression: fmt.Sprintf("value == %q", enums.NotificationTopicDomainScan.String()), Trigger: entx.TaskRuleOnCreateOnly, }, }
NotificationTaskRules generate suggested tasks from notification events. Trigger is create-only: a notification's topic is set once and never changes
var OnboardingComplianceRules = []entx.TaskRuleSpec{ { RuleID: RuleFramework, EachElement: "value.frameworks", Trigger: entx.TaskRuleOnCreateOnly, }, { RuleID: RuleFrameworkGeneric, Expression: "!(has(value.frameworks) && size(value.frameworks) > 0)", Trigger: entx.TaskRuleOnCreateOnly, }, { RuleID: RuleImportExistingControls, Expression: "value.existing_controls == true", Trigger: entx.TaskRuleOnCreateOnly, }, { RuleID: RuleImportTemplateControls, Expression: "!(has(value.existing_controls) && value.existing_controls == true)", Trigger: entx.TaskRuleOnCreateOnly, }, { RuleID: RuleImportExistingPolicies, Expression: "value.existing_policies_procedures == true", Trigger: entx.TaskRuleOnCreateOnly, }, { RuleID: RuleImportPolicyTemplates, Expression: "!(has(value.existing_policies_procedures) && value.existing_policies_procedures == true)", Trigger: entx.TaskRuleOnCreateOnly, }, { RuleID: RuleHasAuditorAtOnboarding, Expression: "value.has_auditor == true", Trigger: entx.TaskRuleOnCreateOnly, }, { RuleID: RuleWantsAuditorRecommendation, Expression: "value.recommend_auditors == true", Trigger: entx.TaskRuleOnCreateOnly, }, { RuleID: RuleWantsPartnerRecommendation, Expression: "value.recommend_vciso_partner == true", Trigger: entx.TaskRuleOnCreateOnly, }, }
OnboardingComplianceRules generate suggested tasks from the onboarding compliance answers
var OnboardingDemoRequestedRule = []entx.TaskRuleSpec{ { RuleID: RuleDemoRequested, Expression: "value == true", Trigger: entx.TaskRuleOnCreateOnly, }, }
OnboardingDemoRequestedRule fires directly off the sibling demo_requested field -- it lives outside OnboardingComplianceRules because "compliance" and "demo_requested" are separate ent fields
var OrganizationSuggestedRules = []entx.TaskRuleSpec{ { RuleID: RuleSecureOrganization, Expression: notPersonalOrg, Trigger: entx.TaskRuleOnCreateOnly, }, { RuleID: RuleCreateGroups, Expression: notPersonalOrg, Trigger: entx.TaskRuleOnCreateOnly, }, { RuleID: RuleInviteTeam, Expression: notPersonalOrg, Trigger: entx.TaskRuleOnCreateOnly, }, { RuleID: RuleSetupIntegrations, Expression: notPersonalOrg, Trigger: entx.TaskRuleOnCreateOnly, }, { RuleID: RuleAddPaymentMethod, Expression: notPersonalOrg, Trigger: entx.TaskRuleOnCreateOnly, }, { RuleID: RuleCompleteRegistry, Expression: notPersonalOrg, Trigger: entx.TaskRuleOnCreateOnly, }, { RuleID: RuleConfigureTrustCenter, Expression: notPersonalOrg, Trigger: entx.TaskRuleOnCreateOnly, }, }
OrganizationSuggestedRules fire once when a non-personal organization is created
Functions ¶
This section is empty.
Types ¶
type Source ¶
type Source string
Source categorizes where a suggested task came from, defaults to recommendation
type Template ¶
type Template struct {
// Title is the title of the generated task
Title string `yaml:"title"`
// Details is the body content of the generated task
Details string `yaml:"details"`
// Priority is the priority of the generated task
Priority int `yaml:"priority"`
// TaskKindName is the kind of task to generate
TaskKindName string `yaml:"taskKindName,omitempty"`
// Source is where the task rule originates
Source Source `yaml:"source,omitempty"`
// Metadata is arbitrary extra data attached to the task. Recognized keys by the frontend:
// link: if provided, the task is not opened and the user is taken there instead, so details should be short
// docsLink: the URL for the View Docs/Docs buttons
// references: additional information shown in the task view
Metadata map[string]any `yaml:"metadata,omitempty"`
}
Template is the rendered content for one task rule