A cloud-native solution that protects workloads across hybrid and multi-cloud environments with threat detection and security recommendations
Hey Dikshant, sorry you’re running into this—seeing zero finding counts after agentless code scanning flipped on can definitely be confusing. I’ll walk through your questions and share some troubleshooting tips.
- Could this issue be related to agentless code scanning being auto-enabled? Yes. Defender for Cloud’s agentless code scanning is a new, umbrella feature that surfaces secrets, dependencies, IaC issues, etc., across all your Azure DevOps repos without installing pipeline extensions. When it’s enabled, the portal switches to show agentless-scan results and hides the old SARIF or pipeline-based findings until the first full agentless scan completes. That can look like “zero findings,” even though your previous scans aren’t gone—they’re just not being displayed while the new engine catches up.
- Who enables agentless scanning—Microsoft, policy, or user action?
- Microsoft can roll it out automatically as part of the Defender CSPM/DevOps plan GA.
- You can also flip it on or off from the DevOps Connector settings in the portal.
- Lastly, an Azure Policy assignment (or management group policy) could toggle it via the
Microsoft.Security/DevOpsSecuritySettingsresource type.
- How can I check who enabled the feature? Check the Activity Log for your subscription/DevOps Connector resource—filter on operations like
Microsoft.Security/DevOpsSecuritySettings/writeor “Update DevOps security settings.” The caller identity in the log entry (user/service principal/IP) tells you who or what policy did the write. If you suspect an Azure Policy, review your policy assignments under Policy → Assignments and check who last modified it. - Does agentless scanning replace or disable previous findings (e.g., SARIF/pipeline-based)? It replaces the display of pipeline-based findings in the DevOps Security view, but doesn’t delete historical SARIF results in your pipeline artifacts or in GitHub/Azure DevOps itself. Those results still exist in build logs or in GitHub Advanced Security. Once the agentless scan runs, you’ll see a combined set of findings in Defender for Cloud; until then it defaults to zero.
- Is there a delay expected before findings populate again after enablement? Absolutely. The first agentless repository scan can take up to a few hours (dependent on repo count/size). After initial discovery, subsequent scans run on a ~24-hour cadence. Until the initial pass completes, DevOps Security will show zero.
- How can I confirm that scanning is actually running successfully?
- In the portal, go to Microsoft Defender for Cloud → DevOps Security → Connector details and look for “Last scan” timestamps.
- Check the Activity Log for “Run agentless code scan” or similar operations.
- If you have Log Analytics enabled, query the
SecurityDevOpsScantable for recent entries. - You can also spot-check by breaking a repo (e.g. introduce a dummy secret) and seeing if it surfaces after the scan interval.
- Is there a way to force re-scan or re-sync findings? There’s no single “Rescan now” button in GA, but you can: a. Temporarily disable agentless scanning in the connector settings, save, then re-enable—this kicks off a fresh full scan. b. Disconnect and reconnect the DevOps Connector. c. Use the REST API (
POST /providers/Microsoft.Security/devOpsSecuritySettings/{settingName}/runScan?api-version=2023-01-01) to programmatically invoke a scan. d. Push a new commit to a few repos; that’ll trigger pipeline-based SARIF scans (if you have CredScan or other scanners configured) which will repopulate their findings until agentless scan finishes.
Reference list:
- Configure agentless code scanning (Preview): https://learn.microsoft.com/azure/defender-for-cloud/agentless-code-scanning
- Troubleshoot DevOps security connector & settings: https://learn.microsoft.com/azure/defender-for-cloud/defender-for-devops-introduction#troubleshoot-devops-security
- Agentless scanning overview & FAQs: https://learn.microsoft.com/azure/defender-for-cloud/concept-agentless-data-collection
- Activity log for Azure Security resources: https://learn.microsoft.com/azure/azure-monitor/platform/activity-log
- REST API for DevOps security settings: https://learn.microsoft.com/rest/api/security/devopssecuritysettings/runScan
If the answer is helpful, kindly upvote it. If you have extra questions about this answer, please click "Comment".