Skip to content

Commit

Permalink
feat: added filter by resource types #278
Browse files Browse the repository at this point in the history
  • Loading branch information
cmendible committed Jan 7, 2025
1 parent 339359b commit 9af8119
Show file tree
Hide file tree
Showing 72 changed files with 336 additions and 689 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ jobs:
run: |
{ echo -n '\'; go run ./cmd/main.go rules; } > ./docs/static/rules.txt
- name: Create types.txt file
run: |
{ echo -n '\'; go run ./cmd/main.go types; } > ./docs/static/types.txt
- name: Setup Node
uses: actions/setup-node@v3
with:
Expand Down
155 changes: 80 additions & 75 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,81 +42,84 @@ The output generated by **Azure Quick Review (azqr)** is written by default to a

**Azure Quick Review (azqr)** currently supports the following Azure services:

* Microsoft.AVS/privateClouds
* Microsoft.AnalysisServices/servers
* Microsoft.ApiManagement/service
* Microsoft.App/containerApps
* Microsoft.App/managedenvironments
* Microsoft.AppConfiguration/configurationStores
* Microsoft.Automation/automationAccounts
* Microsoft.Batch/batchAccounts
* Microsoft.Cache/Redis
* Microsoft.Cdn/profiles
* Microsoft.CognitiveServices/accounts
* Microsoft.Compute/galleries
* Microsoft.Compute/virtualMachineScaleSets
* Microsoft.Compute/virtualMachines
* Microsoft.ContainerInstance/containerGroups
* Microsoft.ContainerRegistry/registries
* Microsoft.ContainerService/managedClusters
* Microsoft.DBforMariaDB/servers
* Microsoft.DBforMariaDB/servers/databases
* Microsoft.DBforMySQL/flexibleServers
* Microsoft.DBforMySQL/servers
* Microsoft.DBforPostgreSQL/flexibleServers
* Microsoft.DBforPostgreSQL/servers
* Microsoft.Dashboard/grafana
* Microsoft.DataFactory/factories
* Microsoft.Databricks/workspaces
* Microsoft.DesktopVirtualization/hostPools
* Microsoft.DesktopVirtualization/scalingPlans
* Microsoft.DesktopVirtualization/workspaces
* Microsoft.Devices/IotHubs
* Microsoft.DocumentDB/databaseAccounts
* Microsoft.EventGrid/domains
* Microsoft.EventHub/namespaces
* Microsoft.Insights/activityLogAlerts
* Microsoft.Insights/components
* Microsoft.KeyVault/vaults
* Microsoft.Kusto/clusters
* Microsoft.Logic/workflows
* Microsoft.NetApp/netAppAccounts
* Microsoft.Network/ExpressRoutePorts
* Microsoft.Network/applicationGateways
* Microsoft.Network/azureFirewalls
* Microsoft.Network/connections
* Microsoft.Network/expressRouteCircuits
* Microsoft.Network/frontdoorWebApplicationFirewallPolicies
* Microsoft.Network/loadBalancers
* Microsoft.Network/natGateways
* Microsoft.Network/networkSecurityGroups
* Microsoft.Network/networkWatcherScanners
* Microsoft.Network/privateDnsZones
* Microsoft.Network/privateEndpoints
* Microsoft.Network/publicIPAddresses
* Microsoft.Network/routeTables
* Microsoft.Network/trafficManagerProfiles
* Microsoft.Network/virtualNetworkGateways
* Microsoft.Network/virtualNetworks
* Microsoft.OperationalInsights/workspaces
* Microsoft.RecoveryServices/vaults
* Microsoft.ServiceBus/namespaces
* Microsoft.SignalRService/SignalR
* Microsoft.SignalRService/webPubSub
* Microsoft.Sql/servers
* Microsoft.Sql/servers/databases
* Microsoft.Sql/servers/elasticPools
* Microsoft.Storage/storageAccounts
* Microsoft.Synapse workspaces/bigDataPools
* Microsoft.Synapse/workspaces
* Microsoft.Synapse/workspaces/sqlPools
* Microsoft.VirtualMachineImages/imageTemplates
* Microsoft.Web/serverFarms
* Microsoft.Web/sites
* Specialized.Workload/AVD
* Specialized.Workload/AVS
* Specialized.Workload/HPC
* Specialized.Workload/SAP
Abbreviation | Resource Type
---|---
aa | Microsoft.Automation/automationAccounts
adf | Microsoft.DataFactory/factories
afd | Microsoft.Cdn/profiles
afw | Microsoft.Network/azureFirewalls
agw | Microsoft.Network/applicationGateways
aks | Microsoft.ContainerService/managedClusters
amg | Microsoft.Dashboard/grafana
apim | Microsoft.ApiManagement/service
appcs | Microsoft.AppConfiguration/configurationStores
appi | Microsoft.Insights/components
appi | Microsoft.Insights/activityLogAlerts
as | Microsoft.AnalysisServices/servers
asp | Microsoft.Web/serverFarms
asp | Microsoft.Web/sites
avd | Specialized.Workload/AVD
avs | Microsoft.AVS/privateClouds
avs | Specialized.Workload/AVS
ba | Microsoft.Batch/batchAccounts
ca | Microsoft.App/containerApps
cae | Microsoft.App/managedenvironments
ci | Microsoft.ContainerInstance/containerGroups
cog | Microsoft.CognitiveServices/accounts
con | Microsoft.Network/connections
cosmos | Microsoft.DocumentDB/databaseAccounts
cr | Microsoft.ContainerRegistry/registries
dbw | Microsoft.Databricks/workspaces
dec | Microsoft.Kusto/clusters
disk | Microsoft.Compute/disks
erc | Microsoft.Network/expressRouteCircuits
erc | Microsoft.Network/ExpressRoutePorts
evgd | Microsoft.EventGrid/domains
evh | Microsoft.EventHub/namespaces
fdfp | Microsoft.Network/frontdoorWebApplicationFirewallPolicies
gal | Microsoft.Compute/galleries
hpc | Specialized.Workload/HPC
iot | Microsoft.Devices/IotHubs
it | Microsoft.VirtualMachineImages/imageTemplates
kv | Microsoft.KeyVault/vaults
lb | Microsoft.Network/loadBalancers
log | Microsoft.OperationalInsights/workspaces
logic | Microsoft.Logic/workflows
maria | Microsoft.DBforMariaDB/servers
maria | Microsoft.DBforMariaDB/servers/databases
mysql | Microsoft.DBforMySQL/flexibleServers
mysql | Microsoft.DBforMySQL/servers
netapp | Microsoft.NetApp/netAppAccounts
ng | Microsoft.Network/natGateways
nsg | Microsoft.Network/networkSecurityGroups
nw | Microsoft.Network/networkWatchers
pdnsz | Microsoft.Network/privateDnsZones
pep | Microsoft.Network/privateEndpoints
pip | Microsoft.Network/publicIPAddresses
psql | Microsoft.DBforPostgreSQL/flexibleServers
psql | Microsoft.DBforPostgreSQL/servers
redis | Microsoft.Cache/Redis
rsv | Microsoft.RecoveryServices/vaults
rt | Microsoft.Network/routeTables
sap | Specialized.Workload/SAP
sb | Microsoft.ServiceBus/namespaces
sigr | Microsoft.SignalRService/SignalR
sql | Microsoft.Sql/servers
sql | Microsoft.Sql/servers/databases
sql | Microsoft.Sql/servers/elasticPools
st | Microsoft.Storage/storageAccounts
synw | Microsoft.Synapse/workspaces
synw | Microsoft.Synapse workspaces/bigDataPools
synw | Microsoft.Synapse/workspaces/sqlPools
traf | Microsoft.Network/trafficManagerProfiles
vdpool | Microsoft.DesktopVirtualization/hostPools
vdpool | Microsoft.DesktopVirtualization/scalingPlans
vdpool | Microsoft.DesktopVirtualization/workspaces
vgw | Microsoft.Network/virtualNetworkGateways
vm | Microsoft.Compute/virtualMachines
vmss | Microsoft.Compute/virtualMachineScaleSets
vnet | Microsoft.Network/virtualNetworks
wps | Microsoft.SignalRService/webPubSub

## Usage

Expand Down Expand Up @@ -207,6 +210,8 @@ azqr:
- <subscription_id> # format: <subscription_id>
resourceGroups:
- <resource_group_resource_id> # format: /subscriptions/<subscription_id>/resourceGroups/<resource_group_name>
resourceTypes:
- <resource type abbreviation> # format: Abbreviation of the resource type. For example: "vm" for "Microsoft.Compute/virtualMachines"
exclude:
subscriptions:
- <subscription_id> # format: <subscription_id>
Expand Down
9 changes: 2 additions & 7 deletions cmd/azqr/aa.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
package azqr

import (
"github.com/Azure/azqr/internal/azqr"
"github.com/Azure/azqr/internal/scanners/aa"
"github.com/Azure/azqr/internal/scanners"
"github.com/spf13/cobra"
)

Expand All @@ -19,10 +18,6 @@ var aaCmd = &cobra.Command{
Long: "Scan Azure Automation Account",
Args: cobra.NoArgs,
Run: func(cmd *cobra.Command, args []string) {
serviceScanners := []azqr.IAzureScanner{
&aa.AutomationAccountScanner{},
}

scan(cmd, serviceScanners)
scan(cmd, scanners.ScannerList["aa"])
},
}
9 changes: 2 additions & 7 deletions cmd/azqr/adf.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
package azqr

import (
"github.com/Azure/azqr/internal/azqr"
"github.com/Azure/azqr/internal/scanners/adf"
"github.com/Azure/azqr/internal/scanners"
"github.com/spf13/cobra"
)

Expand All @@ -19,10 +18,6 @@ var adfCmd = &cobra.Command{
Long: "Scan Azure Data Factory",
Args: cobra.NoArgs,
Run: func(cmd *cobra.Command, args []string) {
serviceScanners := []azqr.IAzureScanner{
&adf.DataFactoryScanner{},
}

scan(cmd, serviceScanners)
scan(cmd, scanners.ScannerList["adf"])
},
}
9 changes: 2 additions & 7 deletions cmd/azqr/afd.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
package azqr

import (
"github.com/Azure/azqr/internal/azqr"
"github.com/Azure/azqr/internal/scanners/afd"
"github.com/Azure/azqr/internal/scanners"
"github.com/spf13/cobra"
)

Expand All @@ -19,10 +18,6 @@ var afdCmd = &cobra.Command{
Long: "Scan Azure Front Door",
Args: cobra.NoArgs,
Run: func(cmd *cobra.Command, args []string) {
serviceScanners := []azqr.IAzureScanner{
&afd.FrontDoorScanner{},
}

scan(cmd, serviceScanners)
scan(cmd, scanners.ScannerList["afd"])
},
}
9 changes: 2 additions & 7 deletions cmd/azqr/afw.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
package azqr

import (
"github.com/Azure/azqr/internal/azqr"
"github.com/Azure/azqr/internal/scanners/afw"
"github.com/Azure/azqr/internal/scanners"
"github.com/spf13/cobra"
)

Expand All @@ -19,10 +18,6 @@ var afwCmd = &cobra.Command{
Long: "Scan Azure Firewall",
Args: cobra.NoArgs,
Run: func(cmd *cobra.Command, args []string) {
serviceScanners := []azqr.IAzureScanner{
&afw.FirewallScanner{},
}

scan(cmd, serviceScanners)
scan(cmd, scanners.ScannerList["afw"])
},
}
9 changes: 2 additions & 7 deletions cmd/azqr/agw.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
package azqr

import (
"github.com/Azure/azqr/internal/azqr"
"github.com/Azure/azqr/internal/scanners/agw"
"github.com/Azure/azqr/internal/scanners"
"github.com/spf13/cobra"
)

Expand All @@ -19,10 +18,6 @@ var agwCmd = &cobra.Command{
Long: "Scan Azure Application Gateway",
Args: cobra.NoArgs,
Run: func(cmd *cobra.Command, args []string) {
serviceScanners := []azqr.IAzureScanner{
&agw.ApplicationGatewayScanner{},
}

scan(cmd, serviceScanners)
scan(cmd, scanners.ScannerList["agw"])
},
}
9 changes: 2 additions & 7 deletions cmd/azqr/aks.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
package azqr

import (
"github.com/Azure/azqr/internal/azqr"
"github.com/Azure/azqr/internal/scanners/aks"
"github.com/Azure/azqr/internal/scanners"
"github.com/spf13/cobra"
)

Expand All @@ -19,10 +18,6 @@ var aksCmd = &cobra.Command{
Long: "Scan Azure Kubernetes Service",
Args: cobra.NoArgs,
Run: func(cmd *cobra.Command, args []string) {
serviceScanners := []azqr.IAzureScanner{
&aks.AKSScanner{},
}

scan(cmd, serviceScanners)
scan(cmd, scanners.ScannerList["aks"])
},
}
9 changes: 2 additions & 7 deletions cmd/azqr/amg.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
package azqr

import (
"github.com/Azure/azqr/internal/azqr"
"github.com/Azure/azqr/internal/scanners/amg"
"github.com/Azure/azqr/internal/scanners"
"github.com/spf13/cobra"
)

Expand All @@ -19,10 +18,6 @@ var amgCmd = &cobra.Command{
Long: "Scan Azure Managed Grafana",
Args: cobra.NoArgs,
Run: func(cmd *cobra.Command, args []string) {
serviceScanners := []azqr.IAzureScanner{
&amg.ManagedGrafanaScanner{},
}

scan(cmd, serviceScanners)
scan(cmd, scanners.ScannerList["amg"])
},
}
9 changes: 2 additions & 7 deletions cmd/azqr/apim.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
package azqr

import (
"github.com/Azure/azqr/internal/azqr"
"github.com/Azure/azqr/internal/scanners/apim"
"github.com/Azure/azqr/internal/scanners"
"github.com/spf13/cobra"
)

Expand All @@ -19,10 +18,6 @@ var apimCmd = &cobra.Command{
Long: "Scan Azure API Management",
Args: cobra.NoArgs,
Run: func(cmd *cobra.Command, args []string) {
serviceScanners := []azqr.IAzureScanner{
&apim.APIManagementScanner{},
}

scan(cmd, serviceScanners)
scan(cmd, scanners.ScannerList["apim"])
},
}
9 changes: 2 additions & 7 deletions cmd/azqr/appcs.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
package azqr

import (
"github.com/Azure/azqr/internal/azqr"
"github.com/Azure/azqr/internal/scanners/appcs"
"github.com/Azure/azqr/internal/scanners"
"github.com/spf13/cobra"
)

Expand All @@ -19,10 +18,6 @@ var appcsCmd = &cobra.Command{
Long: "Scan Azure App Configuration",
Args: cobra.NoArgs,
Run: func(cmd *cobra.Command, args []string) {
serviceScanners := []azqr.IAzureScanner{
&appcs.AppConfigurationScanner{},
}

scan(cmd, serviceScanners)
scan(cmd, scanners.ScannerList["appcs"])
},
}
9 changes: 2 additions & 7 deletions cmd/azqr/appi.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
package azqr

import (
"github.com/Azure/azqr/internal/azqr"
"github.com/Azure/azqr/internal/scanners/appi"
"github.com/Azure/azqr/internal/scanners"
"github.com/spf13/cobra"
)

Expand All @@ -19,10 +18,6 @@ var appiCmd = &cobra.Command{
Long: "Scan Azure Application Insights",
Args: cobra.NoArgs,
Run: func(cmd *cobra.Command, args []string) {
serviceScanners := []azqr.IAzureScanner{
&appi.AppInsightsScanner{},
}

scan(cmd, serviceScanners)
scan(cmd, scanners.ScannerList["appi"])
},
}
Loading

0 comments on commit 9af8119

Please sign in to comment.