@intentius/chant-lexicon-azure 0.124.31 → 0.124.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/actions/appservice.js +7 -0
- package/dist/actions/compute.js +9 -0
- package/dist/actions/container.js +14 -0
- package/dist/actions/identity.js +11 -0
- package/dist/actions/index.js +11 -0
- package/dist/actions/keyvault.js +12 -0
- package/dist/actions/network.js +9 -0
- package/dist/actions/sql.js +9 -0
- package/dist/actions/storage.js +15 -0
- package/dist/api/read-client.js +146 -0
- package/dist/codegen/docs-cli.js +2 -0
- package/dist/codegen/docs.js +83 -0
- package/dist/codegen/generate-cli.js +11 -0
- package/dist/codegen/generate-lexicon.js +77 -0
- package/dist/codegen/generate-typescript.js +163 -0
- package/dist/codegen/generate.js +106 -0
- package/dist/codegen/naming.js +139 -0
- package/dist/codegen/package.js +64 -0
- package/dist/composites/aks-cluster.js +68 -0
- package/dist/composites/app-service.js +62 -0
- package/dist/composites/application-gateway.js +107 -0
- package/dist/composites/catalog.js +856 -0
- package/dist/composites/container-instance.js +36 -0
- package/dist/composites/container-registry.js +62 -0
- package/dist/composites/cosmos-database.js +56 -0
- package/dist/composites/from-arm.js +47 -0
- package/dist/composites/function-app.js +57 -0
- package/dist/composites/index.js +16 -0
- package/dist/composites/keyvault.js +69 -0
- package/dist/composites/landing-zone.js +119 -0
- package/dist/composites/private-endpoint.js +61 -0
- package/dist/composites/redis-cache.js +21 -0
- package/dist/composites/service-bus-pipeline.js +54 -0
- package/dist/composites/sql-database.js +62 -0
- package/dist/composites/storage-account.js +59 -0
- package/dist/composites/vm-linux.js +139 -0
- package/dist/composites/vnet-default.js +102 -0
- package/dist/coverage.js +28 -0
- package/dist/deep-observe.js +356 -0
- package/dist/default-tags.js +50 -0
- package/dist/deploy-scopes.d.ts.map +1 -1
- package/dist/deploy-scopes.js +157 -0
- package/dist/describe-resources.js +187 -0
- package/dist/detect.js +17 -0
- package/dist/export-resources.js +108 -0
- package/dist/generated/index.d.ts.map +1 -1
- package/dist/generated/index.js +16598 -0
- package/dist/generated/runtime.js +4 -0
- package/dist/governance.js +144 -0
- package/dist/health.d.ts +42 -0
- package/dist/health.d.ts.map +1 -0
- package/dist/health.js +137 -0
- package/dist/import/generator.js +140 -0
- package/dist/import/live-export.js +39 -0
- package/dist/import/parser.js +192 -0
- package/dist/index.js +44 -0
- package/dist/integrity.json +5 -5
- package/dist/intrinsics.js +179 -0
- package/dist/lint/audit-catalog.js +36 -0
- package/dist/lint/audit-lineage.js +71 -0
- package/dist/lint/post-synth/arm-refs.d.ts +1 -0
- package/dist/lint/post-synth/arm-refs.d.ts.map +1 -1
- package/dist/lint/post-synth/arm-refs.js +96 -0
- package/dist/lint/post-synth/azr010.js +45 -0
- package/dist/lint/post-synth/azr011.js +43 -0
- package/dist/lint/post-synth/azr012.js +41 -0
- package/dist/lint/post-synth/azr013.js +50 -0
- package/dist/lint/post-synth/azr014.js +49 -0
- package/dist/lint/post-synth/azr015.js +66 -0
- package/dist/lint/post-synth/azr016.js +37 -0
- package/dist/lint/post-synth/azr017.js +37 -0
- package/dist/lint/post-synth/azr018.js +42 -0
- package/dist/lint/post-synth/azr019.js +41 -0
- package/dist/lint/post-synth/azr020.js +37 -0
- package/dist/lint/post-synth/azr021.js +36 -0
- package/dist/lint/post-synth/azr022.js +39 -0
- package/dist/lint/post-synth/azr023.js +39 -0
- package/dist/lint/post-synth/azr024.js +39 -0
- package/dist/lint/post-synth/azr025.js +37 -0
- package/dist/lint/post-synth/azr026.js +38 -0
- package/dist/lint/post-synth/azr027.js +37 -0
- package/dist/lint/post-synth/azr028.js +37 -0
- package/dist/lint/post-synth/azr029.js +38 -0
- package/dist/lint/post-synth/azr030.js +44 -0
- package/dist/lint/post-synth/azr031.js +36 -0
- package/dist/lint/post-synth/azr032.js +53 -0
- package/dist/lint/post-synth/azr033.js +35 -0
- package/dist/lint/post-synth/index.js +50 -0
- package/dist/lint/rules/hardcoded-location.js +82 -0
- package/dist/lint/rules/index.js +6 -0
- package/dist/lint/rules/nsg-wildcard.js +44 -0
- package/dist/lint/rules/storage-https.js +62 -0
- package/dist/lsp/completions.d.ts.map +1 -1
- package/dist/lsp/completions.js +18 -0
- package/dist/lsp/hover.d.ts.map +1 -1
- package/dist/lsp/hover.js +44 -0
- package/dist/manifest.json +1 -1
- package/dist/meta.json +6 -1
- package/dist/okf/types/containerApps.md +5 -0
- package/dist/op/activities/az-apply.js +563 -0
- package/dist/op/activities/azure.js +48 -0
- package/dist/op/activities/floci-az.js +37 -0
- package/dist/op/activities/index.js +10 -0
- package/dist/op/builders.js +70 -0
- package/dist/ownership.js +13 -0
- package/dist/package-cli.js +21 -0
- package/dist/parameter.js +13 -0
- package/dist/plugin.d.ts.map +1 -1
- package/dist/plugin.js +478 -0
- package/dist/pseudo.js +40 -0
- package/dist/rules/arm-refs.ts +5 -3
- package/dist/serializer.d.ts +7 -0
- package/dist/serializer.d.ts.map +1 -1
- package/dist/serializer.js +543 -0
- package/dist/spec/api-versions.js +130 -0
- package/dist/spec/fetch.js +196 -0
- package/dist/spec/parse.d.ts.map +1 -1
- package/dist/spec/parse.js +318 -0
- package/dist/taggable.js +34 -0
- package/dist/types/index.d.ts +5 -0
- package/dist/validate-cli.js +16 -0
- package/dist/validate.js +53 -0
- package/package.json +8 -8
- package/src/attributes.test.ts +17 -0
- package/src/codegen/generate-typescript.ts +1 -1
- package/src/codegen/generate.ts +1 -1
- package/src/codegen/package.ts +2 -2
- package/src/deploy-scopes.ts +2 -1
- package/src/generated/index.d.ts +5 -0
- package/src/generated/index.ts +1 -1
- package/src/generated/lexicon-azure.json +6 -1
- package/src/health.test.ts +66 -0
- package/src/health.ts +162 -0
- package/src/lint/post-synth/arm-refs.ts +5 -3
- package/src/lint/post-synth/post-synth.test.ts +1 -1
- package/src/lsp/completions.ts +2 -1
- package/src/lsp/hover.ts +2 -1
- package/src/plugin.ts +11 -2
- package/src/serializer-names.test.ts +83 -0
- package/src/serializer-outputs.test.ts +65 -0
- package/src/serializer.ts +112 -30
- package/src/spec/parse.test.ts +15 -0
- package/src/spec/parse.ts +10 -0
- package/src/taggable.ts +2 -2
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ARM template JSON parser — converts ARM templates to intermediate representation.
|
|
3
|
+
*
|
|
4
|
+
* Handles ARM bracket expressions: [resourceId(...)], [reference(...)],
|
|
5
|
+
* [parameters(...)], [variables(...)], [concat(...)], etc.
|
|
6
|
+
*/
|
|
7
|
+
import { BaseValueParser } from "@intentius/chant/import/base-parser";
|
|
8
|
+
/**
|
|
9
|
+
* ARM template parser.
|
|
10
|
+
*/
|
|
11
|
+
export class ArmParser extends BaseValueParser {
|
|
12
|
+
// ARM expresses intrinsics as bracketed string expressions (e.g.
|
|
13
|
+
// "[resourceId(...)]"), not single-key objects, so there are no object-form
|
|
14
|
+
// intrinsics to dispatch during value walking.
|
|
15
|
+
dispatchIntrinsic() {
|
|
16
|
+
return null;
|
|
17
|
+
}
|
|
18
|
+
parse(content) {
|
|
19
|
+
const template = JSON.parse(content);
|
|
20
|
+
if (!template.resources || !Array.isArray(template.resources)) {
|
|
21
|
+
throw new Error("Invalid ARM template: missing resources array");
|
|
22
|
+
}
|
|
23
|
+
const parameters = [];
|
|
24
|
+
const resources = [];
|
|
25
|
+
// Parse parameters
|
|
26
|
+
if (template.parameters) {
|
|
27
|
+
for (const [name, param] of Object.entries(template.parameters)) {
|
|
28
|
+
const p = param;
|
|
29
|
+
parameters.push({
|
|
30
|
+
name,
|
|
31
|
+
type: mapArmParameterType(p.type),
|
|
32
|
+
description: p.metadata?.description ?? p.description,
|
|
33
|
+
defaultValue: p.defaultValue,
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
// Parse resources
|
|
38
|
+
for (const resource of template.resources) {
|
|
39
|
+
const r = resource;
|
|
40
|
+
const type = r.type;
|
|
41
|
+
const name = r.name;
|
|
42
|
+
// Collect all properties including resource-level fields
|
|
43
|
+
const properties = {};
|
|
44
|
+
// Resource-level fields
|
|
45
|
+
for (const field of ["location", "sku", "kind", "identity", "tags", "zones", "plan"]) {
|
|
46
|
+
if (r[field] !== undefined) {
|
|
47
|
+
properties[field] = this.parseValue(r[field]);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
// Nested properties
|
|
51
|
+
if (r.properties && typeof r.properties === "object") {
|
|
52
|
+
for (const [key, value] of Object.entries(r.properties)) {
|
|
53
|
+
properties[key] = this.parseValue(value);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
// Parse dependsOn
|
|
57
|
+
const dependsOn = r.dependsOn;
|
|
58
|
+
const deps = dependsOn?.map((d) => this.extractResourceName(d)) ?? [];
|
|
59
|
+
resources.push({
|
|
60
|
+
logicalId: name,
|
|
61
|
+
type,
|
|
62
|
+
properties,
|
|
63
|
+
// ResourceIR has no dedicated dependsOn field — preserve ARM dependencies in metadata.
|
|
64
|
+
...(deps.length > 0 && { metadata: { dependsOn: deps } }),
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
return {
|
|
68
|
+
parameters,
|
|
69
|
+
resources,
|
|
70
|
+
metadata: {
|
|
71
|
+
format: "arm",
|
|
72
|
+
schema: template.$schema,
|
|
73
|
+
contentVersion: template.contentVersion,
|
|
74
|
+
},
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Parse a value, handling ARM bracket expressions.
|
|
79
|
+
*/
|
|
80
|
+
parseValue(value) {
|
|
81
|
+
if (typeof value === "string") {
|
|
82
|
+
return this.parseBracketExpression(value);
|
|
83
|
+
}
|
|
84
|
+
if (Array.isArray(value)) {
|
|
85
|
+
return value.map((v) => this.parseValue(v));
|
|
86
|
+
}
|
|
87
|
+
if (typeof value === "object" && value !== null) {
|
|
88
|
+
const result = {};
|
|
89
|
+
for (const [k, v] of Object.entries(value)) {
|
|
90
|
+
result[k] = this.parseValue(v);
|
|
91
|
+
}
|
|
92
|
+
return result;
|
|
93
|
+
}
|
|
94
|
+
return value;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Parse ARM bracket expressions like [resourceId(...)], [reference(...)], etc.
|
|
98
|
+
*/
|
|
99
|
+
parseBracketExpression(value) {
|
|
100
|
+
if (!value.startsWith("[") || !value.endsWith("]"))
|
|
101
|
+
return value;
|
|
102
|
+
// Escaped bracket
|
|
103
|
+
if (value.startsWith("[["))
|
|
104
|
+
return value.slice(1);
|
|
105
|
+
const expr = value.slice(1, -1);
|
|
106
|
+
// resourceId(...)
|
|
107
|
+
const resourceIdMatch = expr.match(/^resourceId\((.+)\)$/);
|
|
108
|
+
if (resourceIdMatch) {
|
|
109
|
+
return { __intrinsic: "ResourceId", args: this.parseArgs(resourceIdMatch[1]) };
|
|
110
|
+
}
|
|
111
|
+
// reference(...)
|
|
112
|
+
const referenceMatch = expr.match(/^reference\((.+)\)$/);
|
|
113
|
+
if (referenceMatch) {
|
|
114
|
+
return { __intrinsic: "Reference", args: this.parseArgs(referenceMatch[1]) };
|
|
115
|
+
}
|
|
116
|
+
// parameters(...)
|
|
117
|
+
const parametersMatch = expr.match(/^parameters\('([^']+)'\)$/);
|
|
118
|
+
if (parametersMatch) {
|
|
119
|
+
return { __intrinsic: "Ref", name: parametersMatch[1] };
|
|
120
|
+
}
|
|
121
|
+
// concat(...)
|
|
122
|
+
const concatMatch = expr.match(/^concat\((.+)\)$/);
|
|
123
|
+
if (concatMatch) {
|
|
124
|
+
return { __intrinsic: "Concat", args: this.parseArgs(concatMatch[1]) };
|
|
125
|
+
}
|
|
126
|
+
// resourceGroup().location, resourceGroup().name, etc.
|
|
127
|
+
const rgMatch = expr.match(/^resourceGroup\(\)\.(\w+)$/);
|
|
128
|
+
if (rgMatch) {
|
|
129
|
+
return { __intrinsic: "ResourceGroup", property: rgMatch[1] };
|
|
130
|
+
}
|
|
131
|
+
// subscription().subscriptionId, etc.
|
|
132
|
+
const subMatch = expr.match(/^subscription\(\)\.(\w+)$/);
|
|
133
|
+
if (subMatch) {
|
|
134
|
+
return { __intrinsic: "Subscription", property: subMatch[1] };
|
|
135
|
+
}
|
|
136
|
+
// uniqueString(...)
|
|
137
|
+
const uniqueMatch = expr.match(/^uniqueString\((.+)\)$/);
|
|
138
|
+
if (uniqueMatch) {
|
|
139
|
+
return { __intrinsic: "UniqueString", args: this.parseArgs(uniqueMatch[1]) };
|
|
140
|
+
}
|
|
141
|
+
// Return raw expression as-is
|
|
142
|
+
return value;
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Parse comma-separated args from a function call string.
|
|
146
|
+
*/
|
|
147
|
+
parseArgs(argsStr) {
|
|
148
|
+
const args = [];
|
|
149
|
+
let depth = 0;
|
|
150
|
+
let current = "";
|
|
151
|
+
for (const char of argsStr) {
|
|
152
|
+
if (char === "(")
|
|
153
|
+
depth++;
|
|
154
|
+
if (char === ")")
|
|
155
|
+
depth--;
|
|
156
|
+
if (char === "," && depth === 0) {
|
|
157
|
+
args.push(current.trim().replace(/^'|'$/g, ""));
|
|
158
|
+
current = "";
|
|
159
|
+
}
|
|
160
|
+
else {
|
|
161
|
+
current += char;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
if (current.trim()) {
|
|
165
|
+
args.push(current.trim().replace(/^'|'$/g, ""));
|
|
166
|
+
}
|
|
167
|
+
return args;
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Extract a resource name from a dependsOn resourceId expression.
|
|
171
|
+
*/
|
|
172
|
+
extractResourceName(dep) {
|
|
173
|
+
if (dep.startsWith("[")) {
|
|
174
|
+
// Try to extract from resourceId expression
|
|
175
|
+
const match = dep.match(/resourceId\([^,]+,\s*'([^']+)'\)/);
|
|
176
|
+
if (match)
|
|
177
|
+
return match[1];
|
|
178
|
+
}
|
|
179
|
+
return dep;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
function mapArmParameterType(type) {
|
|
183
|
+
switch (type?.toLowerCase()) {
|
|
184
|
+
case "string": return "String";
|
|
185
|
+
case "int": return "Number";
|
|
186
|
+
case "bool": return "String";
|
|
187
|
+
case "array": return "CommaDelimitedList";
|
|
188
|
+
case "object": return "String";
|
|
189
|
+
case "securestring": return "String";
|
|
190
|
+
default: return "String";
|
|
191
|
+
}
|
|
192
|
+
}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @intentius/chant-lexicon-azure — barrel export
|
|
3
|
+
*
|
|
4
|
+
* Azure Resource Manager lexicon for chant.
|
|
5
|
+
*/
|
|
6
|
+
// Typed Op step-builder wrappers (chant #1288 Stage 2) — azApply/azDelete/
|
|
7
|
+
// azGroupEnsure/azGroupDelete/flociAzUp/flociAzDown with authoring-time
|
|
8
|
+
// types derived from this lexicon's own *Args interfaces (see
|
|
9
|
+
// ./op/builders.ts's module doc for why these live here rather than in
|
|
10
|
+
// core). Opt-in: `@intentius/chant/op`'s same-named exports are core's
|
|
11
|
+
// original untyped builders, unchanged.
|
|
12
|
+
export { azApply, azDelete, azGroupEnsure, azGroupDelete, flociAzUp, flociAzDown } from "./op/builders.js";
|
|
13
|
+
// --- Core ---
|
|
14
|
+
export { defaultTags } from "./default-tags.js";
|
|
15
|
+
export { deploymentScope, isDeploymentScope } from "./deploy-scopes.js";
|
|
16
|
+
export { azureSerializer } from "./serializer.js";
|
|
17
|
+
export { azurePlugin } from "./plugin.js";
|
|
18
|
+
export { Parameter } from "./parameter.js";
|
|
19
|
+
// Deep observation (#1086): the `az resource show` reader and the noise
|
|
20
|
+
// rules it shares with core's normalization pass.
|
|
21
|
+
export { observeResourcesDeepAzure, azureDeepNormalizationHooks, AZURE_READ_ONLY_NAMES, AZURE_SERVER_COMPUTED_NAMES, AZURE_SERVICE_DEFAULTS, } from "./deep-observe.js";
|
|
22
|
+
// --- Intrinsics ---
|
|
23
|
+
export { ResourceId, ResourceIdIntrinsic, Reference, ReferenceIntrinsic, Concat, ConcatIntrinsic, ResourceGroup, ResourceGroupIntrinsic, Subscription, SubscriptionIntrinsic, UniqueString, UniqueStringIntrinsic, Format, FormatIntrinsic, If, IfIntrinsic, ListKeys, ListKeysIntrinsic, } from "./intrinsics.js";
|
|
24
|
+
// --- Pseudo-parameters ---
|
|
25
|
+
export { Azure, ResourceGroupName, ResourceGroupLocation, ResourceGroupId, SubscriptionId, TenantId, DeploymentName, } from "./pseudo.js";
|
|
26
|
+
// --- Re-exports from core ---
|
|
27
|
+
export { isChildProject } from "@intentius/chant/child-project";
|
|
28
|
+
export { stackOutput, isStackOutput } from "@intentius/chant/stack-output";
|
|
29
|
+
export { LexiconOutput, output, isLexiconOutput } from "@intentius/chant/lexicon-output";
|
|
30
|
+
// --- Generated resource classes ---
|
|
31
|
+
export * from "./generated/index.js";
|
|
32
|
+
// --- Composites ---
|
|
33
|
+
export { StorageAccountSecure, VnetDefault, VmLinux, AppService, AksCluster, SqlDatabase, KeyVaultSecure, ContainerRegistrySecure, FunctionApp, ServiceBusPipeline, CosmosDatabase, ApplicationGateway, ContainerInstance, RedisCache, PrivateEndpoint, GovernanceFoundation, GovernanceBaseline, LocationRestriction, ActivityLogSink, } from "./composites/index.js";
|
|
34
|
+
// Azure governance authoring: the desired-state config the Azure
|
|
35
|
+
// external governance reconciler applies, and the typed landing-zone authoring layer.
|
|
36
|
+
export { landingZoneConfig, locationRestriction, DENY_CLASSIC_RESOURCES, DENY_UNMANAGED_DISKS, ACTIVITY_LOG_TO_LOG_ANALYTICS_DEFINITION_ID, FOUNDATION_MANAGEMENT_GROUPS, } from "./governance.js";
|
|
37
|
+
// --- RBAC role constants ---
|
|
38
|
+
export { StorageRoles, ComputeRoles, NetworkRoles, KeyVaultRoles, SqlRoles, ContainerRoles, AppServiceRoles, IdentityRoles, } from "./actions/index.js";
|
|
39
|
+
// --- Codegen pipeline ---
|
|
40
|
+
export { generate, writeGeneratedFiles } from "./codegen/generate.js";
|
|
41
|
+
export { packageLexicon } from "./codegen/package.js";
|
|
42
|
+
// --- Spec utilities ---
|
|
43
|
+
export { fetchArmSchemas } from "./spec/fetch.js";
|
|
44
|
+
export { parseArmSchema, armShortName, armServiceName } from "./spec/parse.js";
|
package/dist/integrity.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"algorithm": "sha256",
|
|
3
3
|
"artifacts": {
|
|
4
|
-
"manifest.json": "
|
|
5
|
-
"meta.json": "
|
|
6
|
-
"types/index.d.ts": "
|
|
4
|
+
"manifest.json": "75da2d173ccd6370dd6b0574b09ce00ef7c611c3bf83b2bde013ea9d8625b239",
|
|
5
|
+
"meta.json": "d2521221ed616d882ded4296f0071685bd74e4b645d55dabc9685733c37dc419",
|
|
6
|
+
"types/index.d.ts": "29631032bda9533849178968290e65d72250eab0b8bab424f2d9ef9b4e8546a4",
|
|
7
7
|
"rules/hardcoded-location.ts": "0b895449c8c94066e81721c46be24249231029fe13b471477456df5c4e45b8bf",
|
|
8
8
|
"rules/nsg-wildcard.ts": "8f9d44833ba364778c05731f84c20f00734bb0d40d9fd0d91645965d18a258ae",
|
|
9
9
|
"rules/storage-https.ts": "d340ba970bd9b35304bd7d288a9e99610a7677e6c56af4846305a98d4df0fbbc",
|
|
10
|
-
"rules/arm-refs.ts": "
|
|
10
|
+
"rules/arm-refs.ts": "1ff54e29511d5b0572586d64d7c5ca476a13f401f14f89b4d601b01aa6dde891",
|
|
11
11
|
"rules/azr010.ts": "c61da411a3b325d49f2f790030f11aa4d518a671a23ff3d13be5206e2ddfedab",
|
|
12
12
|
"rules/azr011.ts": "81b05ecaaf6e90a8afc692cd203d28eddf6126a3d7d9d4d4955e4aa6f2c7fa4c",
|
|
13
13
|
"rules/azr012.ts": "e59ddbab64c0bddd2d65bd5cb66e976f858d86216825a18837653d14224a321e",
|
|
@@ -37,5 +37,5 @@
|
|
|
37
37
|
"skills/chant-azure-patterns.md": "1a3bacfac612826b77332d2692a59195638db9f1b5e8ea2eda7579621d25f603",
|
|
38
38
|
"skills/chant-azure-aks.md": "2d4e0098c1a22b54ffadd410564d9df0f3a04cb4eb7c6261f20ae33106e7aca8"
|
|
39
39
|
},
|
|
40
|
-
"composite": "
|
|
40
|
+
"composite": "990e7a1acfe3ab9a04d7fb6de37a56774ed9a172cbc590ba4f1d35956d96700c"
|
|
41
41
|
}
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ARM template function intrinsics.
|
|
3
|
+
*
|
|
4
|
+
* Each intrinsic implements INTRINSIC_MARKER + toJSON() for serialization
|
|
5
|
+
* to ARM template bracket expressions: "[resourceId(...)]", "[concat(...)]", etc.
|
|
6
|
+
*/
|
|
7
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
8
|
+
import { INTRINSIC_MARKER, resolveIntrinsicValue } from "@intentius/chant/intrinsic";
|
|
9
|
+
/**
|
|
10
|
+
* resourceId(resourceType, name1, name2, ...) — returns a resource ID string.
|
|
11
|
+
*/
|
|
12
|
+
export class ResourceIdIntrinsic {
|
|
13
|
+
constructor(resourceType, ...names) {
|
|
14
|
+
this[_a] = true;
|
|
15
|
+
this.resourceType = resourceType;
|
|
16
|
+
this.names = names;
|
|
17
|
+
}
|
|
18
|
+
toJSON() {
|
|
19
|
+
const args = [
|
|
20
|
+
`'${this.resourceType}'`,
|
|
21
|
+
...this.names.map((n) => serializeArg(n)),
|
|
22
|
+
].join(", ");
|
|
23
|
+
return `[resourceId(${args})]`;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
_a = INTRINSIC_MARKER;
|
|
27
|
+
export function ResourceId(resourceType, ...names) {
|
|
28
|
+
return new ResourceIdIntrinsic(resourceType, ...names);
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* reference(name, apiVersion?) — returns the runtime state of a resource.
|
|
32
|
+
*/
|
|
33
|
+
export class ReferenceIntrinsic {
|
|
34
|
+
constructor(name, apiVersion) {
|
|
35
|
+
this[_b] = true;
|
|
36
|
+
this.name = name;
|
|
37
|
+
this.apiVersion = apiVersion;
|
|
38
|
+
}
|
|
39
|
+
toJSON() {
|
|
40
|
+
if (this.apiVersion) {
|
|
41
|
+
return `[reference('${this.name}', '${this.apiVersion}')]`;
|
|
42
|
+
}
|
|
43
|
+
return `[reference('${this.name}')]`;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
_b = INTRINSIC_MARKER;
|
|
47
|
+
export function Reference(name, apiVersion) {
|
|
48
|
+
return new ReferenceIntrinsic(name, apiVersion);
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* concat(value1, value2, ...) — concatenates strings.
|
|
52
|
+
*/
|
|
53
|
+
export class ConcatIntrinsic {
|
|
54
|
+
constructor(...values) {
|
|
55
|
+
this[_c] = true;
|
|
56
|
+
this.values = values;
|
|
57
|
+
}
|
|
58
|
+
toJSON() {
|
|
59
|
+
const args = this.values.map((v) => serializeArg(v)).join(", ");
|
|
60
|
+
return `[concat(${args})]`;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
_c = INTRINSIC_MARKER;
|
|
64
|
+
export function Concat(...values) {
|
|
65
|
+
return new ConcatIntrinsic(...values);
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* resourceGroup() — returns the current resource group object.
|
|
69
|
+
*/
|
|
70
|
+
export class ResourceGroupIntrinsic {
|
|
71
|
+
constructor() {
|
|
72
|
+
this[_d] = true;
|
|
73
|
+
}
|
|
74
|
+
toJSON() {
|
|
75
|
+
return "[resourceGroup()]";
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
_d = INTRINSIC_MARKER;
|
|
79
|
+
export function ResourceGroup() {
|
|
80
|
+
return new ResourceGroupIntrinsic();
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* subscription() — returns the current subscription object.
|
|
84
|
+
*/
|
|
85
|
+
export class SubscriptionIntrinsic {
|
|
86
|
+
constructor() {
|
|
87
|
+
this[_e] = true;
|
|
88
|
+
}
|
|
89
|
+
toJSON() {
|
|
90
|
+
return "[subscription()]";
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
_e = INTRINSIC_MARKER;
|
|
94
|
+
export function Subscription() {
|
|
95
|
+
return new SubscriptionIntrinsic();
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* uniqueString(value1, ...) — generates a deterministic hash string.
|
|
99
|
+
*/
|
|
100
|
+
export class UniqueStringIntrinsic {
|
|
101
|
+
constructor(...values) {
|
|
102
|
+
this[_f] = true;
|
|
103
|
+
this.values = values;
|
|
104
|
+
}
|
|
105
|
+
toJSON() {
|
|
106
|
+
const args = this.values.map((v) => serializeArg(v)).join(", ");
|
|
107
|
+
return `[uniqueString(${args})]`;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
_f = INTRINSIC_MARKER;
|
|
111
|
+
export function UniqueString(...values) {
|
|
112
|
+
return new UniqueStringIntrinsic(...values);
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* format(formatString, arg1, arg2, ...) — formats a string.
|
|
116
|
+
*/
|
|
117
|
+
export class FormatIntrinsic {
|
|
118
|
+
constructor(fmt, ...args) {
|
|
119
|
+
this[_g] = true;
|
|
120
|
+
this.fmt = fmt;
|
|
121
|
+
this.args = args;
|
|
122
|
+
}
|
|
123
|
+
toJSON() {
|
|
124
|
+
const allArgs = [`'${this.fmt}'`, ...this.args.map((a) => serializeArg(a))].join(", ");
|
|
125
|
+
return `[format(${allArgs})]`;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
_g = INTRINSIC_MARKER;
|
|
129
|
+
export function Format(fmt, ...args) {
|
|
130
|
+
return new FormatIntrinsic(fmt, ...args);
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* if(condition, trueValue, falseValue) — conditional expression.
|
|
134
|
+
*/
|
|
135
|
+
export class IfIntrinsic {
|
|
136
|
+
constructor(condition, trueValue, falseValue) {
|
|
137
|
+
this[_h] = true;
|
|
138
|
+
this.condition = condition;
|
|
139
|
+
this.trueValue = trueValue;
|
|
140
|
+
this.falseValue = falseValue;
|
|
141
|
+
}
|
|
142
|
+
toJSON() {
|
|
143
|
+
return `[if('${this.condition}', ${serializeArg(this.trueValue)}, ${serializeArg(this.falseValue)})]`;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
_h = INTRINSIC_MARKER;
|
|
147
|
+
export function If(condition, trueValue, falseValue) {
|
|
148
|
+
return new IfIntrinsic(condition, trueValue, falseValue);
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* listKeys(resourceId, apiVersion) — lists access keys for a resource.
|
|
152
|
+
*/
|
|
153
|
+
export class ListKeysIntrinsic {
|
|
154
|
+
constructor(resourceId, apiVersion) {
|
|
155
|
+
this[_j] = true;
|
|
156
|
+
this.resourceId = resourceId;
|
|
157
|
+
this.apiVersion = apiVersion;
|
|
158
|
+
}
|
|
159
|
+
toJSON() {
|
|
160
|
+
return `[listKeys(${serializeArg(this.resourceId)}, '${this.apiVersion}')]`;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
_j = INTRINSIC_MARKER;
|
|
164
|
+
export function ListKeys(resourceId, apiVersion) {
|
|
165
|
+
return new ListKeysIntrinsic(resourceId, apiVersion);
|
|
166
|
+
}
|
|
167
|
+
// --- Helpers ---
|
|
168
|
+
function serializeArg(value) {
|
|
169
|
+
if (typeof value === "string")
|
|
170
|
+
return `'${value}'`;
|
|
171
|
+
if (typeof value === "number" || typeof value === "boolean")
|
|
172
|
+
return String(value);
|
|
173
|
+
const resolved = resolveIntrinsicValue(value);
|
|
174
|
+
if (typeof resolved === "string" && resolved.startsWith("[") && resolved.endsWith("]")) {
|
|
175
|
+
// Nested ARM expression — strip outer brackets
|
|
176
|
+
return resolved.slice(1, -1);
|
|
177
|
+
}
|
|
178
|
+
return JSON.stringify(resolved);
|
|
179
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The azure lexicon's `chant audit` catalog — metadata for the AZR* ARM
|
|
3
|
+
* post-synth rules. Contributed via `azurePlugin.auditCatalog()` (#687).
|
|
4
|
+
*/
|
|
5
|
+
import { auditRule, applyLineage } from "@intentius/chant/audit/catalog";
|
|
6
|
+
import { azureAuditLineage } from "./audit-lineage.js";
|
|
7
|
+
const AZ_SEC = { name: "Microsoft Cloud Security Benchmark", url: "https://learn.microsoft.com/en-us/security/benchmark/azure/" };
|
|
8
|
+
export const azureAuditCatalog = {
|
|
9
|
+
AZR010: auditRule("AZR010", "report-only", "guidance", "Redundant dependsOn", "Remove dependsOn already implied by reference()/resourceId().", { category: "best-practice" }),
|
|
10
|
+
AZR011: auditRule("AZR011", "merge-worthy", "guidance", "Missing or invalid apiVersion", "Set a valid YYYY-MM-DD apiVersion on every resource.", { category: "correctness" }),
|
|
11
|
+
AZR012: auditRule("AZR012", "report-only", "guidance", "Deprecated API version", "Move to a current apiVersion.", { category: "best-practice" }),
|
|
12
|
+
AZR013: auditRule("AZR013", "merge-worthy", "guidance", "Resource missing location", "Add the required location property.", { category: "correctness" }),
|
|
13
|
+
AZR014: auditRule("AZR014", "merge-worthy", "guidance", "Storage account allows public blob access", "Set allowBlobPublicAccess to false.", { authority: [AZ_SEC] }),
|
|
14
|
+
AZR015: auditRule("AZR015", "merge-worthy", "guidance", "Storage account missing encryption", "Enable encryption services for data at rest.", { authority: [AZ_SEC] }),
|
|
15
|
+
AZR016: auditRule("AZR016", "report-only", "guidance", "Key Vault soft-delete not enabled", "Enable soft-delete.", { category: "best-practice" }),
|
|
16
|
+
AZR017: auditRule("AZR017", "report-only", "guidance", "Key Vault purge protection not enabled", "Enable purge protection.", { category: "best-practice" }),
|
|
17
|
+
AZR018: auditRule("AZR018", "report-only", "guidance", "SQL Server missing auditing", "Enable auditing for compliance and threat detection.", { category: "best-practice" }),
|
|
18
|
+
AZR019: auditRule("AZR019", "merge-worthy", "guidance", "SQL database missing TDE", "Enable Transparent Data Encryption.", { authority: [AZ_SEC] }),
|
|
19
|
+
AZR020: auditRule("AZR020", "report-only", "guidance", "App Service missing managed identity", "Enable a system- or user-assigned identity.", { category: "best-practice" }),
|
|
20
|
+
AZR021: auditRule("AZR021", "merge-worthy", "guidance", "App Service not HTTPS-only", "Set httpsOnly to true.", { authority: [AZ_SEC] }),
|
|
21
|
+
AZR022: auditRule("AZR022", "merge-worthy", "guidance", "App Service min TLS below 1.2", "Set minTlsVersion to 1.2+.", { authority: [AZ_SEC] }),
|
|
22
|
+
AZR023: auditRule("AZR023", "report-only", "guidance", "VM not using a managed disk", "Use a managed disk.", { category: "best-practice" }),
|
|
23
|
+
AZR024: auditRule("AZR024", "report-only", "guidance", "VM missing boot diagnostics", "Enable boot diagnostics.", { category: "best-practice" }),
|
|
24
|
+
AZR025: auditRule("AZR025", "report-only", "guidance", "AKS cluster missing RBAC", "Enable Kubernetes RBAC.", { category: "best-practice" }),
|
|
25
|
+
AZR026: auditRule("AZR026", "report-only", "guidance", "AKS cluster missing network policy", "Configure a networkPolicy.", { category: "best-practice" }),
|
|
26
|
+
AZR027: auditRule("AZR027", "merge-worthy", "guidance", "Container Registry admin user enabled", "Disable the admin user; use Azure AD / service principals.", { authority: [AZ_SEC] }),
|
|
27
|
+
AZR028: auditRule("AZR028", "report-only", "guidance", "Network interface missing NSG", "Associate an NSG to control traffic.", { category: "best-practice" }),
|
|
28
|
+
AZR029: auditRule("AZR029", "merge-worthy", "guidance", "Managed disk missing encryption", "Enable encryption for data at rest.", { authority: [AZ_SEC] }),
|
|
29
|
+
AZR030: auditRule("AZR030", "merge-worthy", "guidance", "Resource at unsupported template scope", "Move the resource to a project deployed at a scope its schema supports.", { category: "correctness" }),
|
|
30
|
+
// governance posture regressions.
|
|
31
|
+
AZR031: auditRule("AZR031", "merge-worthy", "guidance", "Policy assignment not enforced (DoNotEnforce)", "Set enforcementMode to Default so the assigned guardrail applies.", { authority: [AZ_SEC] }),
|
|
32
|
+
AZR032: auditRule("AZR032", "merge-worthy", "guidance", "Custom policy definition assigned nowhere", "Pair the policy definition with a policy assignment — unassigned it enforces nothing.", { authority: [AZ_SEC] }),
|
|
33
|
+
AZR033: auditRule("AZR033", "merge-worthy", "guidance", "Subscriptions may leave the tenant", "Set blockSubscriptionsLeavingTenant: true on the Microsoft.Subscription/policies resource.", { authority: [AZ_SEC] }),
|
|
34
|
+
};
|
|
35
|
+
// Prior art credits live beside the rules in ./audit-lineage.ts (see core audit/prior-art.ts).
|
|
36
|
+
applyLineage(azureAuditCatalog, azureAuditLineage);
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
export const azureAuditLineage = {
|
|
2
|
+
AZR010: [
|
|
3
|
+
{ tool: "bicep-linter", rule: "no-unnecessary-dependson", url: "https://learn.microsoft.com/en-us/azure/azure-resource-manager/bicep/linter-rule-no-unnecessary-dependson", relation: "equivalent" },
|
|
4
|
+
],
|
|
5
|
+
AZR011: [
|
|
6
|
+
{ tool: "arm-ttk", rule: "apiVersions-Should-Be-Recent", url: "https://github.com/Azure/arm-ttk/blob/master/arm-ttk/testcases/deploymentTemplate/apiVersions-Should-Be-Recent.test.ps1", relation: "overlaps" },
|
|
7
|
+
],
|
|
8
|
+
AZR012: [
|
|
9
|
+
{ tool: "arm-ttk", rule: "apiVersions-Should-Be-Recent", url: "https://github.com/Azure/arm-ttk/blob/master/arm-ttk/testcases/deploymentTemplate/apiVersions-Should-Be-Recent.test.ps1", relation: "overlaps" },
|
|
10
|
+
{ tool: "bicep-linter", rule: "use-recent-api-versions", url: "https://learn.microsoft.com/en-us/azure/azure-resource-manager/bicep/linter-rule-use-recent-api-versions", relation: "overlaps" },
|
|
11
|
+
],
|
|
12
|
+
AZR014: [
|
|
13
|
+
{ tool: "psrule-azure", rule: "Azure.Storage.BlobPublicAccess", url: "https://azure.github.io/PSRule.Rules.Azure/en/rules/Azure.Storage.BlobPublicAccess/", relation: "equivalent" },
|
|
14
|
+
{ tool: "checkov", rule: "CKV_AZURE_59", url: "https://www.checkov.io/5.Policy%20Index/arm.html", relation: "equivalent" },
|
|
15
|
+
],
|
|
16
|
+
AZR016: [
|
|
17
|
+
{ tool: "psrule-azure", rule: "Azure.KeyVault.SoftDelete", url: "https://azure.github.io/PSRule.Rules.Azure/en/rules/Azure.KeyVault.SoftDelete/", relation: "equivalent" },
|
|
18
|
+
{ tool: "checkov", rule: "CKV_AZURE_111", url: "https://www.checkov.io/5.Policy%20Index/arm.html", relation: "equivalent" },
|
|
19
|
+
{ tool: "kics", rule: "Key Vault Not Recoverable", url: "https://docs.kics.io/latest/queries/azureresourcemanager-queries/azure/7c25f361-7c66-44bf-9b69-022acd5eb4bd/", relation: "overlaps" },
|
|
20
|
+
],
|
|
21
|
+
AZR017: [
|
|
22
|
+
{ tool: "psrule-azure", rule: "Azure.KeyVault.PurgeProtect", url: "https://azure.github.io/PSRule.Rules.Azure/en/rules/Azure.KeyVault.PurgeProtect/", relation: "equivalent" },
|
|
23
|
+
{ tool: "checkov", rule: "CKV_AZURE_110", url: "https://www.checkov.io/5.Policy%20Index/arm.html", relation: "equivalent" },
|
|
24
|
+
{ tool: "kics", rule: "Key Vault Not Recoverable", url: "https://docs.kics.io/latest/queries/azureresourcemanager-queries/azure/7c25f361-7c66-44bf-9b69-022acd5eb4bd/", relation: "overlaps" },
|
|
25
|
+
],
|
|
26
|
+
AZR018: [
|
|
27
|
+
{ tool: "psrule-azure", rule: "Azure.SQL.Auditing", url: "https://azure.github.io/PSRule.Rules.Azure/en/rules/Azure.SQL.Auditing/", relation: "equivalent" },
|
|
28
|
+
{ tool: "checkov", rule: "CKV_AZURE_23", url: "https://www.checkov.io/5.Policy%20Index/arm.html", relation: "equivalent" },
|
|
29
|
+
{ tool: "kics", rule: "SQL Server Database Without Auditing", url: "https://docs.kics.io/latest/queries/azureresourcemanager-queries/azure/e055285c-bc01-48b4-8aa5-8a54acdd29df/", relation: "equivalent" },
|
|
30
|
+
],
|
|
31
|
+
AZR019: [
|
|
32
|
+
{ tool: "psrule-azure", rule: "Azure.SQL.TDE", url: "https://azure.github.io/PSRule.Rules.Azure/en/rules/Azure.SQL.TDE/", relation: "equivalent" },
|
|
33
|
+
],
|
|
34
|
+
AZR020: [
|
|
35
|
+
{ tool: "psrule-azure", rule: "Azure.AppService.ManagedIdentity", url: "https://azure.github.io/PSRule.Rules.Azure/en/rules/Azure.AppService.ManagedIdentity/", relation: "equivalent" },
|
|
36
|
+
{ tool: "checkov", rule: "CKV_AZURE_71", url: "https://www.checkov.io/5.Policy%20Index/arm.html", relation: "equivalent" },
|
|
37
|
+
],
|
|
38
|
+
AZR021: [
|
|
39
|
+
{ tool: "psrule-azure", rule: "Azure.AppService.UseHTTPS", url: "https://azure.github.io/PSRule.Rules.Azure/en/rules/Azure.AppService.UseHTTPS/", relation: "equivalent" },
|
|
40
|
+
{ tool: "checkov", rule: "CKV_AZURE_14", url: "https://www.checkov.io/5.Policy%20Index/arm.html", relation: "equivalent" },
|
|
41
|
+
{ tool: "kics", rule: "Website Not Forcing HTTPS", url: "https://docs.kics.io/latest/queries/azureresourcemanager-queries/azure/488847ff-6031-487c-bf42-98fd6ac5c9a0/", relation: "equivalent" },
|
|
42
|
+
],
|
|
43
|
+
AZR022: [
|
|
44
|
+
{ tool: "psrule-azure", rule: "Azure.AppService.MinTLS", url: "https://azure.github.io/PSRule.Rules.Azure/en/rules/Azure.AppService.MinTLS/", relation: "equivalent" },
|
|
45
|
+
{ tool: "checkov", rule: "CKV_AZURE_15", url: "https://www.checkov.io/5.Policy%20Index/arm.html", relation: "equivalent" },
|
|
46
|
+
{ tool: "kics", rule: "Web App Not Using TLS Last Version", url: "https://docs.kics.io/latest/queries/azureresourcemanager-queries/azure/b5c851d5-00f1-43dc-a8de-3218fd6f71be/", relation: "equivalent" },
|
|
47
|
+
],
|
|
48
|
+
AZR023: [
|
|
49
|
+
{ tool: "psrule-azure", rule: "Azure.VM.UseManagedDisks", url: "https://azure.github.io/PSRule.Rules.Azure/en/rules/Azure.VM.UseManagedDisks/", relation: "equivalent" },
|
|
50
|
+
{ tool: "checkov", rule: "CKV_AZURE_92", url: "https://www.checkov.io/5.Policy%20Index/arm.html", relation: "equivalent" },
|
|
51
|
+
],
|
|
52
|
+
AZR025: [
|
|
53
|
+
{ tool: "psrule-azure", rule: "Azure.AKS.UseRBAC", url: "https://azure.github.io/PSRule.Rules.Azure/en/rules/Azure.AKS.UseRBAC/", relation: "equivalent" },
|
|
54
|
+
{ tool: "checkov", rule: "CKV_AZURE_5", url: "https://www.checkov.io/5.Policy%20Index/arm.html", relation: "equivalent" },
|
|
55
|
+
{ tool: "kics", rule: "AKS Cluster RBAC Disabled", url: "https://docs.kics.io/latest/queries/azureresourcemanager-queries/azure/9307a2ed-35c2-413d-94de-a1a0682c2158/", relation: "equivalent" },
|
|
56
|
+
],
|
|
57
|
+
AZR026: [
|
|
58
|
+
{ tool: "psrule-azure", rule: "Azure.AKS.NetworkPolicy", url: "https://azure.github.io/PSRule.Rules.Azure/en/rules/Azure.AKS.NetworkPolicy/", relation: "equivalent" },
|
|
59
|
+
{ tool: "checkov", rule: "CKV_AZURE_7", url: "https://www.checkov.io/5.Policy%20Index/arm.html", relation: "equivalent" },
|
|
60
|
+
{ tool: "kics", rule: "AKS Cluster Network Policy Not Configured", url: "https://docs.kics.io/latest/queries/azureresourcemanager-queries/azure/25c0228e-4444-459b-a2df-93c7df40b7ed/", relation: "equivalent" },
|
|
61
|
+
],
|
|
62
|
+
AZR027: [
|
|
63
|
+
{ tool: "psrule-azure", rule: "Azure.ACR.AdminUser", url: "https://azure.github.io/PSRule.Rules.Azure/en/rules/Azure.ACR.AdminUser/", relation: "equivalent" },
|
|
64
|
+
{ tool: "checkov", rule: "CKV_AZURE_137", url: "https://www.checkov.io/5.Policy%20Index/arm.html", relation: "equivalent" },
|
|
65
|
+
],
|
|
66
|
+
AZR029: [
|
|
67
|
+
{ tool: "checkov", rule: "CKV_AZURE_2", url: "https://www.checkov.io/5.Policy%20Index/arm.html", relation: "equivalent" },
|
|
68
|
+
{ tool: "kics", rule: "Azure Managed Disk Without Encryption", url: "https://docs.kics.io/latest/queries/azureresourcemanager-queries/azure/350f3955-b5be-436f-afaa-3d2be2fa6cdd/", relation: "equivalent" },
|
|
69
|
+
{ tool: "psrule-azure", rule: "Azure.VM.ADE", url: "https://azure.github.io/PSRule.Rules.Azure/en/rules/Azure.VM.ADE/", relation: "overlaps" },
|
|
70
|
+
],
|
|
71
|
+
};
|
|
@@ -55,6 +55,7 @@ export declare function isBracketExpression(value: unknown): boolean;
|
|
|
55
55
|
*
|
|
56
56
|
* Handles:
|
|
57
57
|
* - [resourceId('Type', 'name')] -> extracts 'name'
|
|
58
|
+
* - [resourceId('Type', 'a', 'b')] -> extracts 'a/b'
|
|
58
59
|
* - [reference('name')] -> extracts 'name'
|
|
59
60
|
* - [reference('name').prop] -> extracts 'name'
|
|
60
61
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"arm-refs.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/arm-refs.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACrC,SAAS,CAAC,EAAE,WAAW,EAAE,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAClC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACrC,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/B,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,GAAG,WAAW,GAAG,IAAI,CAWzF;AAED;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,GAAG,CAAC,MAAM,CAAC,CAI/D;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAE3D;AAED
|
|
1
|
+
{"version":3,"file":"arm-refs.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/arm-refs.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACrC,SAAS,CAAC,EAAE,WAAW,EAAE,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAClC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACrC,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/B,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,GAAG,WAAW,GAAG,IAAI,CAWzF;AAED;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,GAAG,CAAC,MAAM,CAAC,CAI/D;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAE3D;AAED;;;;;;;;GAQG;AACH,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAkBhE"}
|