-
Notifications
You must be signed in to change notification settings - Fork 9
Security workflow #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
27b2a4b
2d6dfec
0923f96
5fea2f3
1270442
f64830b
236cb78
b479438
4cb9e6f
7c9ec27
6b862ec
13c5675
e265be6
d00eb5b
c39ed13
a556a53
7c0e198
6ce3fa3
05b52dd
028cca6
af0f94d
0726037
123484d
236a5ad
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| name: Validate bicep scripts | ||
| on: | ||
| workflow_dispatch: | ||
| push: | ||
| branches: | ||
| - main | ||
| - master | ||
| pull_request: | ||
| branches: | ||
| - main | ||
| - master | ||
|
|
||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v2 | ||
|
|
||
| - name: Azure CLI script | ||
| uses: azure/CLI@v1 | ||
| with: | ||
| inlineScript: az config set bicep.use_binary_from_path=false && az bicep build -f infra/main.bicep --stdout | ||
|
|
||
| - name: Run Microsoft Security DevOps Analysis | ||
| uses: microsoft/security-devops-action@preview | ||
| env: | ||
| GDN_TEMPLATEANALYZER_VERBOSE: 1 | ||
| id: msdo | ||
| with: | ||
| tools: templateanalyzer | ||
|
|
||
| - name: Upload alerts to Security tab | ||
| uses: github/codeql-action/upload-sarif@v2 | ||
| with: | ||
| sarif_file: ${{ steps.msdo.outputs.sarifFile }} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,7 +6,6 @@ param tags object = {} | |
| param applicationInsightsName string = '' | ||
| param appServicePlanId string | ||
| param keyVaultName string = '' | ||
| param managedIdentity bool = !empty(keyVaultName) | ||
|
|
||
| // Runtime Properties | ||
| @allowed([ | ||
|
|
@@ -33,6 +32,7 @@ param numberOfWorkers int = -1 | |
| param scmDoBuildDuringDeployment bool = false | ||
| param use32BitWorkerProcess bool = false | ||
| param ftpsState string = 'FtpsOnly' | ||
| param healthCheckPath string = '' | ||
|
Owner
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This change is from upstream |
||
|
|
||
| resource appService 'Microsoft.Web/sites@2022-03-01' = { | ||
| name: name | ||
|
|
@@ -45,11 +45,13 @@ resource appService 'Microsoft.Web/sites@2022-03-01' = { | |
| linuxFxVersion: linuxFxVersion | ||
| alwaysOn: alwaysOn | ||
| ftpsState: ftpsState | ||
| minTlsVersion: '1.2' | ||
|
Owner
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In upstream already |
||
| appCommandLine: appCommandLine | ||
| numberOfWorkers: numberOfWorkers != -1 ? numberOfWorkers : null | ||
| minimumElasticInstanceCount: minimumElasticInstanceCount != -1 ? minimumElasticInstanceCount : null | ||
| use32BitWorkerProcess: use32BitWorkerProcess | ||
| functionAppScaleLimit: functionAppScaleLimit != -1 ? functionAppScaleLimit : null | ||
| healthCheckPath: healthCheckPath | ||
|
Owner
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In upstream |
||
| cors: { | ||
| allowedOrigins: union([ 'https://portal.azure.com', 'https://ms.portal.azure.com' ], allowedOrigins) | ||
| } | ||
|
|
@@ -58,7 +60,7 @@ resource appService 'Microsoft.Web/sites@2022-03-01' = { | |
| httpsOnly: true | ||
| } | ||
|
|
||
| identity: { type: managedIdentity ? 'SystemAssigned' : 'None' } | ||
| identity: { type: 'SystemAssigned' } | ||
|
Owner
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Undecided managedIdentity change |
||
|
|
||
| resource configAppSettings 'config' = { | ||
| name: 'appsettings' | ||
|
|
@@ -93,6 +95,6 @@ resource applicationInsights 'Microsoft.Insights/components@2020-02-02' existing | |
| name: applicationInsightsName | ||
| } | ||
|
|
||
| output identityPrincipalId string = managedIdentity ? appService.identity.principalId : '' | ||
| output identityPrincipalId string = appService.identity.principalId | ||
|
Owner
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Undecided managedIdentity change |
||
| output name string = appService.name | ||
| output uri string = 'https://${appService.properties.defaultHostName}' | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,9 +2,9 @@ param name string | |
| param location string = resourceGroup().location | ||
| param tags object = {} | ||
|
|
||
| param containerAppsEnvironmentName string = '' | ||
| param containerAppsEnvironmentName string | ||
| param containerName string = 'main' | ||
| param containerRegistryName string = '' | ||
| param containerRegistryName string | ||
|
Owner
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In PR |
||
| param env array = [] | ||
| param external bool = true | ||
| param imageName string | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,9 +2,9 @@ param name string | |
| param location string = resourceGroup().location | ||
| param tags object = {} | ||
|
|
||
| param containerAppsEnvironmentName string = '' | ||
| param containerRegistryName string = '' | ||
| param logAnalyticsWorkspaceName string = '' | ||
| param containerAppsEnvironmentName string | ||
| param containerRegistryName string | ||
| param logAnalyticsWorkspaceName string | ||
|
Owner
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In PR |
||
|
|
||
| module containerAppsEnvironment 'container-apps-environment.bicep' = { | ||
| name: '${name}-container-apps-environment' | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -62,7 +62,6 @@ module functions 'appservice.bicep' = { | |
| keyVaultName: keyVaultName | ||
| kind: kind | ||
| linuxFxVersion: linuxFxVersion | ||
| managedIdentity: managedIdentity | ||
|
Owner
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Related to my own change to appservice.bicep |
||
| minimumElasticInstanceCount: minimumElasticInstanceCount | ||
| numberOfWorkers: numberOfWorkers | ||
| runtimeName: runtimeName | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| param name string = 'add' | ||
|
|
||
| param keyVaultName string = '' | ||
| param keyVaultName string | ||
|
Owner
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In PR |
||
| param permissions object = { secrets: [ 'get', 'list' ] } | ||
| param principalId string | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't make that change in azure-dev yet, raised a discussion