fix: update event stream names and enforce security settings in Bicep#593
Open
Kanchan-Microsoft wants to merge 5 commits into
Open
fix: update event stream names and enforce security settings in Bicep#593Kanchan-Microsoft wants to merge 5 commits into
Kanchan-Microsoft wants to merge 5 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR aims to tighten infra security/compliance by adjusting Azure Monitor Data Collection Rule (DCR) stream routing, enforcing stronger storage encryption, and requiring HTTPS-only ingress for Container Apps.
Changes:
- Updated DCR stream naming and added an additional dataFlow intended to route events to Log Analytics.
- Enforced
requireInfrastructureEncryption: trueon storage accounts. - Disabled insecure ingress (
ingressAllowInsecure: false) for API/Web Container Apps (including update module).
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| infra/main_custom.bicep | Updates DCR streams/dataFlows and hardens storage + container app ingress settings. |
| infra/main.bicep | Mirrors the same security + DCR updates as main_custom.bicep. |
| infra/main.json | Regenerated ARM template reflecting the Bicep changes (hash, DCR, module params, dependsOn ordering). |
Comments suppressed due to low confidence (2)
infra/main.json:1
- The generated ARM template also uses
Microsoft-Eventfor a Windows Event Log DCR stream. IfMicrosoft-Eventis not a schema-supported stream name, deployments will fail or event collection will break. Fix the stream naming in the Bicep source and regenerate this template.
infra/main.json:1 - This ARM
dataFlowsentry referencesMicrosoft-Eventfor bothstreamsandoutputStream. If that stream isn’t valid for DCR Windows Event Log collection, this flow will not bind correctly. Update the Bicep to use the correct stream identifiers and regenerate the ARM output.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
Comments suppressed due to low confidence (1)
infra/main.bicep:474
- PR description says an “additional data collection rule” was added to forward
Microsoft-Eventstreams to Log Analytics, but the change shown here adds an additionaldataFlowsentry within the existing DCR instead of creating a new DCR resource. Please update the PR description to match the implementation (or add the separate DCR if that was the intent).
{
streams: [
'Microsoft-Event'
]
destinations: [
dcrLogAnalyticsDestinationName
]
transformKql: 'source'
outputStream: 'Microsoft-Event'
}
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
This pull request enhances the security and compliance of the infrastructure by updating event stream names, enforcing stricter network and encryption policies, and improving container app ingress security. The changes are applied consistently across both
infra/main.bicepandinfra/main_custom.bicep, as well as their generatedinfra/main.jsontemplates.Security and Compliance Improvements:
'Microsoft-WindowsEvent'to'Microsoft-Event'in data collection rules for better alignment with platform standards.'Microsoft-Event'streams to Log Analytics, improving event logging coverage.requireInfrastructureEncryption: true, enhancing data protection at rest.Container App Ingress Security:
ingressAllowInsecure: falsefor container apps (API and Web), ensuring only secure (HTTPS) ingress is allowed.Other Updates:
These changes collectively improve the security posture, compliance, and reliability of the deployed solution.
Does this introduce a breaking change?
Golden Path Validation
Deployment Validation
What to Check
Verify that the following are valid
Other Information