Hi ahd
Could you please follow the below steps to resolve this issue:
- Ensure the workflow includes the pull request trigger:
If this trigger is missing, GitHub won’t annotate PRs.on: pull_request: branches: - main
- Go to your Repository -> Security -> Code scanning alerts -> Click on setup code scanning -> select codeql analysis. This ensures CodeQL runs whenever a PR is created.
- Add the following permissions to your workflow, this allows CodeQL to post annotations on PRs.
permissions: contents: read security-events: write
Hope this helps!
Please Let me know if you have any queries.