Hello @harshavardhanc,
Do you think that the problem described in this comment could be the cause of your problem?
The scanner reads the environment variables set by CircleCI to either trigger branch or PR analysis. If CircleCI starts a build following a commit on a branch, and there is not yet a pull request open for that branch, then there will not be any environment variables that are related to a pullrequest availablein the build, so we will trigger a regular branch analysis.