Listen to this Post

Introduction
Microsoft Defender for Cloud has expanded its agentless code scanning capabilities to include GitHub, building on its existing support for Azure DevOps. This update introduces customizable scanner selection and granular scope configuration, enabling security teams to detect vulnerabilities in code and infrastructure-as-code (IaC) without disrupting CI/CD pipelines.
Learning Objectives
- Understand the benefits of agentless code scanning in cloud security.
- Learn how to configure customizable scanners and scope in Defender for Cloud.
- Differentiate between agentless scanning and traditional in-pipeline scanning.
- Enabling Agentless Code Scanning in Defender for Cloud
Command (Azure CLI):
az security setting update --name DefenderForCloudAgentlessScanning --value On
Step-by-Step Guide:
- Log in to the Azure portal and navigate to Microsoft Defender for Cloud.
2. Under Environment Settings, select GitHub repositories.
3. Toggle Agentless Scanning to On.
4. Configure scanner preferences (e.g., Bandit, Checkov, ESLint).
This enables automated security scanning without requiring agents in your CI/CD workflow.
2. Customizing Scanner Selection
Command (Azure REST API):
PATCH https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Security/gitHubOwners/{ownerName}?api-version=2023-09-01-preview
{
"properties": {
"scannerSelection": ["Bandit", "Checkov"]
}
}
Step-by-Step Guide:
- Access the Defender for Cloud GitHub integration settings.
- Under Scanner Configuration, select preferred tools (e.g., Bandit for Python, Checkov for Terraform).
3. Save changes to apply the scanner selection.
This ensures only relevant security tools run on your repositories.
3. Configuring Granular Scope for Scanning
Command (PowerShell):
Set-AzSecurityGitHubRepository -Organization "my-org" -Repository "my-repo" -InclusionState "Included"
Step-by-Step Guide:
- In Defender for Cloud, go to GitHub Scanning Scope.
- Define inclusion/exclusion rules for organizations, projects, or repositories.
- Apply rules to focus scanning on critical assets.
This minimizes unnecessary scans and optimizes security coverage.
4. Comparing Agentless vs. In-Pipeline Scanning
Key Differences:
- Agentless: No CI/CD integration needed, scans repositories directly.
- In-Pipeline: Requires pipeline modifications but provides real-time feedback.
Reference: Agentless vs. In-Pipeline Scanning
5. Automating Scan Results with Azure Logic Apps
Command (Azure CLI):
az logicapp workflow create --name "ScanResultProcessor" --resource-group "my-rg" --location "eastus"
Step-by-Step Guide:
- Create a Logic App to process Defender for Cloud scan results.
- Use the Defender for Cloud connector to trigger alerts.
3. Configure actions (e.g., email notifications, Jira tickets).
This automates vulnerability remediation workflows.
What Undercode Say
- Key Takeaway 1: Agentless scanning reduces friction in DevSecOps by eliminating CI/CD pipeline dependencies.
- Key Takeaway 2: Granular scope control ensures efficient resource usage, targeting only high-risk repositories.
Analysis:
The expansion of Defender for Cloud’s agentless scanning to GitHub marks a significant shift in cloud-native security. By decoupling scanning from pipelines, Microsoft enables scalable security without developer workflow interruptions. This approach aligns with the growing adoption of IaC and the need for seamless security integration. Future enhancements may include AI-driven prioritization of vulnerabilities, further reducing manual triage efforts.
Prediction
As agentless scanning becomes mainstream, we expect broader adoption across multi-cloud environments, with tighter integrations into platforms like GitLab and Bitbucket. AI-powered remediation suggestions could further streamline security operations, reducing mean time to resolution (MTTR) for critical vulnerabilities.
IT/Security Reporter URL:
Reported By: Markolauren Defenderforclouds – Hackers Feeds
Extra Hub: Undercode MoN
Basic Verification: Pass ✅


