UNPKG

@pulumi/azure-compliance-policies

Version:

This repository contains a growing set of Compliance Policies to validate your infrastructure using Pulumi's Crossguard Policy-as-Code framework.

148 lines (147 loc) 9.18 kB
"use strict"; // Copyright 2016-2024, Pulumi Corporation. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // // ------------------------------- WARNING ------------------------------------- // This file was programmatically generated. Do not edit unless you know what // you're doing. // ------------------------------- WARNING ------------------------------------- Object.defineProperty(exports, "__esModule", { value: true }); exports.ScopeAccessReviewScheduleDefinitionById = exports.ScopeAccessReviewHistoryDefinitionById = exports.AccessReviewScheduleDefinitionById = exports.AccessReviewHistoryDefinitionById = void 0; const policy_1 = require("@pulumi/policy"); const compliance_policy_manager_1 = require("@pulumi/compliance-policy-manager"); const v20211201preview_1 = require("@pulumi/azure-native/authorization/v20211201preview"); const v20211201preview_2 = require("@pulumi/azure-native/authorization/v20211201preview"); const v20211201preview_3 = require("@pulumi/azure-native/authorization/v20211201preview"); const v20211201preview_4 = require("@pulumi/azure-native/authorization/v20211201preview"); var AccessReviewHistoryDefinitionById; (function (AccessReviewHistoryDefinitionById) { /** * Disallow the use of non-stable (Preview) Azure resouces (authorization.v20211201preview.AccessReviewHistoryDefinitionById). * * @severity medium * @frameworks none * @topics api, preview, unstable * @link https://learn.microsoft.com/en-us/rest/api/azure/ */ AccessReviewHistoryDefinitionById.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({ resourceValidationPolicy: { name: "azurenative-authorization-v20211201preview-accessreviewhistorydefinitionbyid-disallow-preview-resource", description: "Disallow the use of non-stable (Preview) Azure resouces (authorization.v20211201preview.AccessReviewHistoryDefinitionById).", configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema, enforcementLevel: "advisory", validateResource: (0, policy_1.validateResourceOfType)(v20211201preview_1.AccessReviewHistoryDefinitionById, (_, args, reportViolation) => { if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) { return; } reportViolation("Azure AccessReviewHistoryDefinitionById shouldn't use an unstable API (authorization.v20211201preview.AccessReviewHistoryDefinitionById). A compatible replacement can be found at 'authorization.AccessReviewHistoryDefinitionById'."); }), }, vendors: ["azure"], services: ["authorization"], severity: "medium", topics: ["api", "unstable", "preview"], }); })(AccessReviewHistoryDefinitionById || (AccessReviewHistoryDefinitionById = {})); exports.AccessReviewHistoryDefinitionById = AccessReviewHistoryDefinitionById; var AccessReviewScheduleDefinitionById; (function (AccessReviewScheduleDefinitionById) { /** * Disallow the use of non-stable (Preview) Azure resouces (authorization.v20211201preview.AccessReviewScheduleDefinitionById). * * @severity medium * @frameworks none * @topics api, preview, unstable * @link https://learn.microsoft.com/en-us/rest/api/azure/ */ AccessReviewScheduleDefinitionById.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({ resourceValidationPolicy: { name: "azurenative-authorization-v20211201preview-accessreviewscheduledefinitionbyid-disallow-preview-resource", description: "Disallow the use of non-stable (Preview) Azure resouces (authorization.v20211201preview.AccessReviewScheduleDefinitionById).", configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema, enforcementLevel: "advisory", validateResource: (0, policy_1.validateResourceOfType)(v20211201preview_2.AccessReviewScheduleDefinitionById, (_, args, reportViolation) => { if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) { return; } reportViolation("Azure AccessReviewScheduleDefinitionById shouldn't use an unstable API (authorization.v20211201preview.AccessReviewScheduleDefinitionById). A compatible replacement can be found at 'authorization.AccessReviewScheduleDefinitionById'."); }), }, vendors: ["azure"], services: ["authorization"], severity: "medium", topics: ["api", "unstable", "preview"], }); })(AccessReviewScheduleDefinitionById || (AccessReviewScheduleDefinitionById = {})); exports.AccessReviewScheduleDefinitionById = AccessReviewScheduleDefinitionById; var ScopeAccessReviewHistoryDefinitionById; (function (ScopeAccessReviewHistoryDefinitionById) { /** * Disallow the use of non-stable (Preview) Azure resouces (authorization.v20211201preview.ScopeAccessReviewHistoryDefinitionById). * * @severity medium * @frameworks none * @topics api, preview, unstable * @link https://learn.microsoft.com/en-us/rest/api/azure/ */ ScopeAccessReviewHistoryDefinitionById.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({ resourceValidationPolicy: { name: "azurenative-authorization-v20211201preview-scopeaccessreviewhistorydefinitionbyid-disallow-preview-resource", description: "Disallow the use of non-stable (Preview) Azure resouces (authorization.v20211201preview.ScopeAccessReviewHistoryDefinitionById).", configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema, enforcementLevel: "advisory", validateResource: (0, policy_1.validateResourceOfType)(v20211201preview_3.ScopeAccessReviewHistoryDefinitionById, (_, args, reportViolation) => { if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) { return; } reportViolation("Azure ScopeAccessReviewHistoryDefinitionById shouldn't use an unstable API (authorization.v20211201preview.ScopeAccessReviewHistoryDefinitionById). A compatible replacement can be found at 'authorization.ScopeAccessReviewHistoryDefinitionById'."); }), }, vendors: ["azure"], services: ["authorization"], severity: "medium", topics: ["api", "unstable", "preview"], }); })(ScopeAccessReviewHistoryDefinitionById || (ScopeAccessReviewHistoryDefinitionById = {})); exports.ScopeAccessReviewHistoryDefinitionById = ScopeAccessReviewHistoryDefinitionById; var ScopeAccessReviewScheduleDefinitionById; (function (ScopeAccessReviewScheduleDefinitionById) { /** * Disallow the use of non-stable (Preview) Azure resouces (authorization.v20211201preview.ScopeAccessReviewScheduleDefinitionById). * * @severity medium * @frameworks none * @topics api, preview, unstable * @link https://learn.microsoft.com/en-us/rest/api/azure/ */ ScopeAccessReviewScheduleDefinitionById.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({ resourceValidationPolicy: { name: "azurenative-authorization-v20211201preview-scopeaccessreviewscheduledefinitionbyid-disallow-preview-resource", description: "Disallow the use of non-stable (Preview) Azure resouces (authorization.v20211201preview.ScopeAccessReviewScheduleDefinitionById).", configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema, enforcementLevel: "advisory", validateResource: (0, policy_1.validateResourceOfType)(v20211201preview_4.ScopeAccessReviewScheduleDefinitionById, (_, args, reportViolation) => { if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) { return; } reportViolation("Azure ScopeAccessReviewScheduleDefinitionById shouldn't use an unstable API (authorization.v20211201preview.ScopeAccessReviewScheduleDefinitionById). A compatible replacement can be found at 'authorization.ScopeAccessReviewScheduleDefinitionById'."); }), }, vendors: ["azure"], services: ["authorization"], severity: "medium", topics: ["api", "unstable", "preview"], }); })(ScopeAccessReviewScheduleDefinitionById || (ScopeAccessReviewScheduleDefinitionById = {})); exports.ScopeAccessReviewScheduleDefinitionById = ScopeAccessReviewScheduleDefinitionById;