Additional Microsoft Defender tools and services that provide security across various platforms and environments
Hello Tushar Gopalka,
Welcome to the Microsoft Q&A and thank you for posting your questions here.
I understand that you are having Clickfix attack on Azure Static webapp.
This can not resolved by simply redeploying or blocking the malicious URLs. The repeat appearance after 2 to 4 hours means the injection source is still active. You first need to check whether the malicious content is entering through the CI/CD pipeline, deployment token, repository workflow, dependency/build process, third-party runtime script, or client/browser network path. By experience, is either a compromised Azure Static Web Apps deployment path or a runtime JavaScript injection. Azure Static Web Apps deployments are controlled by the build/deployment workflow, deployment token, application configuration, and deployed artifact, so these must be validated first. You have to reset deployment tokens, and Static Web Apps configuration headers such as CSP should be applied through staticwebapp.config.json. - https://learn.microsoft.com/en-us/azure/static-web-apps/build-configuration, https://learn.microsoft.com/en-us/azure/static-web-apps/deployment-token-management, and https://learn.microsoft.com/en-us/azure/static-web-apps/configuration gives you more insights.
What you can do as best practice to resolve is to:
- Reset the Azure Static Web Apps deployment token immediately.
- Rotate the matching GitHub or Azure DevOps deployment secret.
- Review and lock down the Static Web Apps workflow file.
- Rebuild from a known-good commit before the first observed compromise.
- Compare local build output, CI artifact, Azure-served content, and browser-rendered DOM.
- Remove malicious dependencies, build scripts, or third-party scripts if found.
- Add a strict Content Security Policy through
staticwebapp.config.json. - Review Azure Activity Log and Static Web Apps diagnostics for deployment or configuration changes.
- Escalate to Microsoft Support only if the live Azure-hosted content changes without any matching deployment after token rotation and pipeline lockdown.
After the deployment token is reset, the workflow is hardened, the artifact source is validated, and CSP is enforced, the ClickFix injection should stop unless the issue is platform-side or caused outside the application delivery path. If it still returns without a deployment event, contact Azure Support or Product Group via your Azure Portal or contact Priority Customer Support for investigation on backend Static Web Apps platform telemetry.
Use the below are more resource links for more reading and implementation steps as above:
- Azure Static Web Apps diagnostics overview - https://learn.microsoft.com/en-us/azure/static-web-apps/diagnostics-overview
- Activity Log in Azure Monitor - https://learn.microsoft.com/en-us/azure/azure-monitor/platform/activity-log
- ClickFix social engineering technique - https://www.microsoft.com/en-us/security/blog/2025/08/21/think-before-you-clickfix-analyzing-the-clickfix-social-engineering-technique/
- GitHub Actions secure use reference - https://docs.github.com/en/actions/reference/security/secure-use
I hope this is helpful. Please! Do not hesitate to let me know if you have any other questions, steps or clarifications.
Please do not close the thread by upvoting and accepting the answer if any part of it is helpful.