Import of Sarif report not working - this.bases is null

Hi everyone.

We are trying to upload a vulnerability sarif report from trivy from a github action to sonarqube 10.2 but we cannot see the results in the dashboard.
We are using the GitHub - aquasecurity/trivy-action: Runs Trivy as GitHub action to scan your Docker container image for vulnerabilities and the creation is successful and the report is valid.

This is what we can see when we follow the sonarqube/api/ce/task?id=…

{"task":{"id":"AY0g8mmq2xBPXuAlw4C6","type":"REPORT","componentId":"AY0SKm0Z2xBPXuAlw3_g","componentKey":"container","componentName":"container","componentQualifier":"TRK","status":"FAILED","submittedAt":"2024-01-19T08:59:34+0000","submitterLogin":"admin","startedAt":"2024-01-19T08:59:43+0000","executedAt":"2024-01-19T08:59:44+0000","executionTimeMs":1313,"errorMessage":"Fail to process issues of component \u0027container\u0027 (Visit of Component {key\u003dcontainer,type\u003dPROJECT} failed)","errorStacktrace":"org.sonar.ce.task.projectanalysis.component.VisitException: Visit of Component {key\u003dcontainer,type\u003dPROJECT} failed\n\tat org.sonar.ce.task.projectanalysis.component.VisitException.rethrowOrWrap(\n\tat org.sonar.ce.task.projectanalysis.component.VisitorsCrawler.visit(\n\tat org.sonar.ce.task.projectanalysis.step.ExecuteVisitorsStep.execute(\n\tat org.sonar.ce.task.step.ComputationStepExecutor.executeStep(\n\tat org.sonar.ce.task.step.ComputationStepExecutor.executeSteps(\n\tat org.sonar.ce.task.step.ComputationStepExecutor.execute(\n\tat org.sonar.ce.task.projectanalysis.taskprocessor.ReportTaskProcessor.process(\n\tat org.sonar.ce.taskprocessor.CeWorkerImpl$ExecuteTask.executeTask(\n\tat org.sonar.ce.taskprocessor.CeWorkerImpl$\n\tat org.sonar.ce.taskprocessor.CeWorkerImpl.findAndProcessTask(\n\tat org.sonar.ce.taskprocessor.CeWorkerImpl$TrackRunningState.get(\n\tat\n\tat\n\tat$TrustedFutureInterruptibleTask.runInterruptibly(\n\tat\n\tat\n\tat java.base/java.util.concurrent.Executors$ Source)\n\tat java.base/ Source)\n\tat java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ Source)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor$ Source)\n\tat java.base/ Source)\nCaused by: java.lang.IllegalStateException: Fail to process issues of component \u0027container\u0027\n\tat org.sonar.ce.task.projectanalysis.issue.IntegrateIssuesVisitor.visitAny(\n\tat org.sonar.ce.task.projectanalysis.component.TypeAwareVisitorWrapper.visitAny(\n\tat org.sonar.ce.task.projectanalysis.component.VisitorsCrawler.visitNode(\n\tat org.sonar.ce.task.projectanalysis.component.VisitorsCrawler.visitImpl(\n\tat org.sonar.ce.task.projectanalysis.component.VisitorsCrawler.visit(\n\t... 20 more\nCaused by: java.lang.NullPointerException: Cannot invoke \"\" because \"this.bases\" is null\n\tat org.sonar.core.issue.tracking.Tracking.getUnmatchedBases(\n\tat org.sonar.core.issue.tracking.AbstractTracker.match(\n\tat org.sonar.core.issue.tracking.AnticipatedTransitionTracker.track(\n\tat org.sonar.ce.task.projectanalysis.issue.TransitionIssuesToAnticipatedStatesVisitor.onIssue(\n\tat org.sonar.ce.task.projectanalysis.issue.IssueVisitors.onIssue(\n\tat org.sonar.ce.task.projectanalysis.issue.IntegrateIssuesVisitor.processIssue(\n\tat org.sonar.ce.task.projectanalysis.issue.IntegrateIssuesVisitor.lambda$processIssues$0(\n\tat java.base/java.lang.Iterable.forEach(Unknown Source)\n\tat org.sonar.ce.task.projectanalysis.issue.IntegrateIssuesVisitor.processIssues(\n\tat org.sonar.ce.task.projectanalysis.issue.IntegrateIssuesVisitor.visitAny(\n\t... 24 more\n","scannerContext":"Plugins:\nBundled analyzers:\n - Clean as You Code (cayc)\n - IaC Code Quality and Security (iac)\n - PL/SQL Code Quality and Security (plsql)\n - Scala Code Quality and Security (sonarscala)\n - C# Code Quality and Security (csharp)\n - Vulnerability Analysis (security)\n - Java Code Quality and Security (java)\n - HTML Code Quality and Security (web)\n - Flex Code Quality and Security (flex)\n - XML Code Quality and Security (xml)\n - Text Code Quality and Security (text)\n - VB.NET Code Quality and Security (vbnet)\n - Swift Code Quality and Security (swift)\n - CFamily Code Quality and Security (cpp)\n - Python Code Quality and Security (python)\n - Dataflow Bug Detection Rules for Python (dbdpythonfrontend)\n - Dataflow Bug Detection (dbd)\n - Go Code Quality and Security (go)\n - JaCoCo (jacoco)\n - Kotlin Code Quality and Security (kotlin)\n - RPG Code Quality (rpg)\n - Dataflow Bug Detection Rules for Java (dbdjavafrontend)\n - PL/I Code Quality and Security (pli)\n - T-SQL Code Quality and Security (tsql)\n - VB6 Code Quality and Security (vb)\n - Apex Code Quality and Security (sonarapex)\n - JavaScript/TypeScript/CSS Code Quality and Security (javascript)\n - Ruby Code Quality and Security (ruby)\n - Vulnerability Rules for C# (securitycsharpfrontend)\n - Vulnerability Rules for Java (securityjavafrontend)\n - Vulnerability Rules for JS (securityjsfrontend)\n - COBOL Code Quality (cobol)\n - Vulnerability Rules for Python (securitypythonfrontend)\n - PHP Code Quality and Security (php)\n - ABAP Code Quality and Security (abap)\n - Configuration detection for Code Quality and Security (config)\n - Vulnerability Rules for PHP (securityphpfrontend)\nGlobal server settings:\n - sonar.auth.github.allowUsersToSignUp\u003dtrue\n - sonar.auth.github.enabled\u003dtrue\n - sonar.auth.github.groupsSync\u003dtrue\n - sonar.auth.github.organizations\u003dsmc-org\n - sonar.auth.github.webUrl\u003d\n -\***********\n - sonar.core.serverBaseURL\u003dhttps://***.****.**/sonarqube\n - sonar.core.startTime\u003d2023-12-12T08:33:46+0000\n - sonar.dbcleaner.branchesToKeepWhenInactive\u003dmaster\n - sonar.dbcleaner.daysBeforeDeletingInactiveBranchesAndPRs\u003d7\n - sonar.forceAuthentication\u003dtrue\n - sonar.plugins.risk.consent\u003dACCEPTED\n - sonar.projectCreation.mainBranchName\u003dmaster\nProject server settings:\nProject scanner properties:\n -\u003d*****\n -\u003dhttps://***.****.**/sonarqube/\n - sonar.projectBaseDir\u003d/usr/src\n - sonar.projectKey\u003dcontainer\n - sonar.sarifReportPaths\u003d/usr/src/result.sarif\n -\u003dScannerCLI\n - sonar.scanner.appVersion\u003d5.0.1.3006\n - sonar.sourceEncoding\u003dUTF-8\n -\u003d/usr/src/.scannerwork","hasScannerContext":true,"branch":"***","branchType":"BRANCH","warningCount":1,"warnings":["SCM provider autodetection failed. Please use \"sonar.scm.provider\" to define SCM of your project, or disable the SCM Sensor in the project settings."]}}

Hey there.

We haven’t had a report like this yet, with many users using the SARIF import. Can you share the specific report that triggered this issue?

Hi Colin.

Please find below the sarif report. (16.7 KB)


Thanks for opening this thread.

Could you also share the logs from the compute engine so that we get more context?

Also, can you try to run an analysis without passing the sarif file, to make sure it succeeds?



Please find attached the CE log.

log_sonarqube_2901_CE.txt (23.5 KB)


In the logs, I see an indexation task failure.

Could you force a full reindexation (instruction here)?

And then retry and send me the full logs if something goes wrong?

Thanks a lot,

Hello Aurélien,

I’ve done the full reindexing then I’ve attempted the operation again.
(Now the log is clean, there are no more indexing issues).
The result is the same, I see the same exception:
Cannot invoke “” because “this.bases” is null


Have you tried that? I would need the information before doing extra-investigation.

For this canse we are using a pipeline to trigger a workflow that does the docker container vulnerability scanning and sends this trivy report scan to our sonarqube instance.

We are doing analysis (without the trivy vulnerabiliy scanning) on other projects that we have and we have no problem on that part.

Could you share a small reproducer with us?

Can you please be more concise on what exactly should I share? The sarif report was attached above.

I’ve tried to import your Sarif on another project and it worked fine. So, it seems the issue is related to the project or the way you trigger the analysis. I guess you can’t share the project itself with us, but you might be able to create a minimal setup that recreate the issue and would allow us to investigate.


Please find attached the code that triggers our trivy scanner and sends the resulting report to our sonarqube instance.

Regards, (864 Bytes)

Update: We are using Enterprise Edition Version 10.2.1 (build 78527)