DSTA-683: add Defender for Storage target containers - #82
Merged
Merged
Conversation
Update the reference to source accounts to use
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Malware scanning is disabled by default, target containers lack network access, and the Defender state migration is unsafe.
Review effort: Balanced
Findings: 6
Open (6)
- Terraform formatting failure in changed assignment · New
- Resource replacement may delete Defender settings · New
- Private network access makes containers unreachable · New
- Defender settings map must be keyed by storage account · New
- Breaking change to upload container URL output type · New
- Malware scanning is disabled by default · New
What changed in this PR
Adds storage infrastructure for clean and quarantined scan results and updates Defender configuration.
Changes:
- Creates private
clean-scansandquarantine-scanscontainers. - Refactors Defender settings targeting.
- Expands upload-container metadata outputs.
| File | Description |
|---|---|
infrastructure/terraform/variables.tf |
Updates malware-scanning defaults. |
infrastructure/terraform/output.tf |
Expands container output metadata. |
infrastructure/terraform/defender.tf |
Adds target storage and Defender configuration. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
micjustus-nc
marked this pull request as draft
October 1, 2026 10:51
Ensure hub environment is specified
micjustus-nc
force-pushed
the
feat/DSTA-683-defender-target-containers
branch
from
October 1, 2026 11:05
93ed04e to
4a31fa1
Compare
micjustus-nc
marked this pull request as ready for review
October 1, 2026 11:58
samw-nhs
previously approved these changes
Oct 1, 2026
micjustus-nc
force-pushed
the
feat/DSTA-683-defender-target-containers
branch
from
October 1, 2026 14:43
143a4d1 to
4bea18a
Compare
samw-nhs
approved these changes
Oct 1, 2026
micjustus-nc
force-pushed
the
feat/DSTA-683-defender-target-containers
branch
from
October 1, 2026 15:45
4bea18a to
4b52a83
Compare
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.
Description
This PR adds support to create two new target containers for us with Defender for Cloud malware scanning.
Context
The two target containers support our workflow to ensure trust content uploaded into their designated storage containers is scanned and free from harmful malware. The
clean-scansfolder will hold all uploaded trust content that has been scanned and considered free from harmful malware; thequarantine-scansfolder holds all content that Defender for Cloud scanned and considered potentially harmful.Running the PR
To run the Terraform scripts for this PR,
planorapplyTerraform commands require permissions to write to the Terraform backend storage.Remove existing resources
rg-nbsse-dev-uksresource group inside the NBSS Dev Extraction subscriptionRun Terraform
git clonethis repository and branch with the PR code changesIf your account has permissions to write to Terraform backend storage:
make dev terraform-planto ensure state is up-to-datemake dev terraform-applyto ensure that Defender for Cloud is applied to the storage account in the Terraform code)(Provided no Terraform errors show in the terminal)
Confirm Defender storage account and containers
rg-nbsse-dev-uksresource group inside the NBSS Dev Extraction subscription3.1. the normal storage account for uploads (sanbssedevupload)
3.2 the Defender for Cloud storage account (sanbssedevdefender)
Deployment model
This set of changes uses Terraform-based deployments to enable resources.
Deployment resources
Type of changes
Checklist
Sensitive Information Declaration
To ensure the utmost confidentiality and protect your and others privacy, we kindly ask you to NOT including PII (Personal Identifiable Information) / PID (Personal Identifiable Data) or any other sensitive data in this PR (Pull Request) and the codebase changes. We will remove any PR that do contain any sensitive information. We really appreciate your cooperation in this matter.