Must-share information (formatted with Markdown):
- which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
INFO: Scanner configuration file: /usr/lib/sonar-scanner/conf/sonar-scanner.properties
INFO: Project root configuration file: NONE
INFO: SonarQube Scanner 4.0.0.1744
INFO: Java 11.0.18 Alpine (64-bit)
INFO: Linux 4.15.0-136-generic amd64
- how is SonarQube deployed: zip, Docker, Helm
as far i know we have a enterprise solution, we use sonar-scan to upload the reports from integration testing, to sonarcloud, - what are you trying to achieve
That when the sonar-scan finish shows up the results in the web interface - what have you tried so far to achieve this
– verify connection method issues.
– solve issues in the log
Do not share screenshots of logs – share the text itself (bonus points for being well-formatted)!
#Command Executed in a bash script
sonar-scanner -D sonar.login="${SONAR_LOGIN}" -D sonar.projectKey="${SONAR_PROJECT_KEY}" -D sonar.pullrequest.branch=feature_fix_sq_integration -D sonar.pullrequest.key=1850 -D sonar.pullrequest.base=main -D sonar.python.coverage.reportPaths='coverage/*-coverage-*.xml' -D sonar.python.version='3.8'
Running sonar-scanner ...
INFO: Scanner configuration file: /usr/lib/sonar-scanner/conf/sonar-scanner.properties
INFO: Project root configuration file: /tmp/build/7411baae/src/sonar-project.properties
INFO: SonarQube Scanner 4.0.0.1744
INFO: Java 11.0.18 Alpine (64-bit)
INFO: Linux 4.15.0-136-generic amd64
INFO: User cache: /root/.sonar/cache
INFO: SonarQube server 9.9.3.79811
INFO: Default locale: "en_US", source code encoding: "UTF-8"
INFO: Load global settings
INFO: Load global settings (done) | time=588ms
INFO: Server id: SOM31D-AServerIDtdP-PIMpum
INFO: User cache: /root/.sonar/cache
INFO: Load/download plugins
INFO: Load plugins index
INFO: Load plugins index (done) | time=166ms
INFO: Load/download plugins (done) | time=572ms
INFO: Loaded core extensions: developer-scanner
INFO: Process project properties
INFO: Process project properties (done) | time=17ms
INFO: Execute project builders
INFO: Execute project builders (done) | time=3ms
INFO: Project key: MY-TEAM:MY-APP
INFO: Base dir: /tmp/build/7411baae/src
INFO: Working dir: /tmp/build/7411baae/src/.scannerwork
INFO: Load project settings for component key: 'MY-TEAM:MY-APP'
INFO: Load project settings for component key: 'MY-TEAM:MY-APP' (done) | time=126ms
INFO: Load project branches
INFO: Load project branches (done) | time=111ms
INFO: Load branch configuration
INFO: Found manual configuration of branch/PR analysis. Skipping automatic configuration.
INFO: Load branch configuration (done) | time=4ms
INFO: Load quality profiles
INFO: Load quality profiles (done) | time=182ms
INFO: Load active rules
INFO: Load active rules (done) | time=5533ms
INFO: Load analysis cache
INFO: Load analysis cache | time=956ms
INFO: Pull request 1850 for merge into main from feature_fix_sq_integration
INFO: Load project repositories
INFO: Load project repositories (done) | time=134ms
INFO: SCM collecting changed files in the branch
WARN: Could not find ref 'main' in refs/heads, refs/remotes, refs/remotes/upstream or refs/remotes/origin #(NOT SURE HOW TO FIX THIS YES)
INFO: SCM collecting changed files in the branch (done) | time=58ms
INFO: Indexing files...
INFO: Project configuration:
INFO: Excluded sources: **/helm_chart/**, **/tests/**/*, **/*_tests/**/*, **/*.java, **/*.js, **/*.css, **/*.jade, **/*.html, **/*.xml, **/*.scss, **/SOME-IRRELEVANT-PATH/sql/**, **/common/common/testing/**, **/*.ts
INFO: Excluded sources for coverage: **/*.spec.ts
INFO: 2053 files indexed
INFO: 3339 files ignored because of inclusion/exclusion patterns
INFO: 2 files ignored because of scm ignore settings
INFO: Quality profile for css: Sonar way
INFO: Quality profile for json: Sonar way
INFO: Quality profile for py: Sonar way
INFO: Quality profile for yaml: Sonar way
INFO: ------------- Run sensors on module MY-TEAM:MY-APP
INFO: Load metrics repository
INFO: Load metrics repository (done) | time=108ms
INFO: Sensor IaC CloudFormation Sensor [iac]
INFO: 0 source files to be analyzed
INFO: 0/0 source files have been analyzed
INFO: Sensor IaC CloudFormation Sensor [iac] (done) | time=4186ms
INFO: Sensor IaC Kubernetes Sensor [iac]
INFO: 0 source files to be analyzed
INFO: 0/0 source files have been analyzed
INFO: Sensor IaC Kubernetes Sensor [iac] (done) | time=2908ms
INFO: Sensor C# Project Type Information [csharp]
INFO: Sensor C# Project Type Information [csharp] (done) | time=4ms
INFO: Sensor C# Analysis Log [csharp]
INFO: Sensor C# Analysis Log [csharp] (done) | time=16ms
INFO: Sensor C# Properties [csharp]
INFO: Sensor C# Properties [csharp] (done) | time=1ms
INFO: Sensor HTML [web]
INFO: Sensor HTML is restricted to changed files only
INFO: Sensor HTML [web] (done) | time=10ms
INFO: Sensor TextAndSecretsSensor [text]
INFO: Sensor TextAndSecretsSensor is restricted to changed files only
INFO: 120 source files to be analyzed
INFO: 120/120 source files have been analyzed
INFO: Sensor TextAndSecretsSensor [text] (done) | time=2826ms
INFO: Sensor VB.NET Project Type Information [vbnet]
INFO: Sensor VB.NET Project Type Information [vbnet] (done) | time=3ms
INFO: Sensor VB.NET Analysis Log [vbnet]
INFO: Sensor VB.NET Analysis Log [vbnet] (done) | time=16ms
INFO: Sensor VB.NET Properties [vbnet]
INFO: Sensor VB.NET Properties [vbnet] (done) | time=1ms
INFO: Sensor Python Sensor [python]
INFO: The cache version has changed since the previous analysis, cached data will not be used during this analysis. Retrieved: "3.24.1.11916". Current version: "3.24.1.11916;3.8".
INFO: Starting global symbols computation
INFO: 1007 source files to be analyzed
INFO: 899/1007 files analyzed, current file: SOME-IRRELEVANT-PATH/SOME-IRRELEVANT-PATH/services/survey/survey_template_service.py
INFO: 1007/1007 source files have been analyzed
INFO: Starting rules execution
INFO: 1007 source files to be analyzed
INFO: 90/1007 files analyzed, current file: SOME-IRRELEVANT-PATH/SOME-IRRELEVANT-PATH/services/model/tms_tenant_model_service.py
INFO: 226/1007 files analyzed, current file: SOME-IRRELEVANT-PATH/SOME-IRRELEVANT-PATH/api/widgets/widget_service.py
INFO: 350/1007 files analyzed, current file: SOME-IRRELEVANT-PATH/SOME-IRRELEVANT-PATH/security/survey_core_datastore.py
INFO: 505/1007 files analyzed, current file: common/common/testing_utils/testing_assertions.py
INFO: 679/1007 files analyzed, current file: SOME-IRRELEVANT-PATH/SOME-IRRELEVANT-PATH/security/event_handlers.py
INFO: 844/1007 files analyzed, current file: SOME-IRRELEVANT-PATH/pcpworker/services/distributed_lock.py
INFO: 1007/1007 source files have been analyzed
INFO: The Python analyzer was able to leverage cached data from previous analyses for 0 out of 1007 files. These files were not parsed.
INFO: Sensor Python Sensor [python] (done) | time=80786ms
INFO: Sensor Cobertura Sensor for Python coverage [python]
INFO: Python test coverage
INFO: Parsing report '/tmp/build/7411baae/src/coverage/integration-coverage-ea6430d.xml'
INFO: Parsing report '/tmp/build/7411baae/src/coverage/unit-coverage-ea6430d.xml'
INFO: Sensor Cobertura Sensor for Python coverage [python] (done) | time=1033ms
INFO: Sensor PythonXUnitSensor [python]
INFO: Sensor PythonXUnitSensor [python] (done) | time=206ms
INFO: Sensor JaCoCo XML Report Importer [jacoco]
INFO: 'sonar.coverage.jacoco.xmlReportPaths' is not defined. Using default locations: target/site/jacoco/jacoco.xml,target/site/jacoco-it/jacoco.xml,build/reports/jacoco/test/jacocoTestReport.xml
INFO: No report imported, no coverage information will be imported by JaCoCo XML Report Importer
INFO: Sensor JaCoCo XML Report Importer [jacoco] (done) | time=3ms
INFO: Sensor JavaScript inside YAML analysis [javascript]
INFO: No input files found for analysis
INFO: Hit the cache for 0 out of 0
INFO: Miss the cache for 0 out of 0
INFO: Sensor JavaScript inside YAML analysis [javascript] (done) | time=13ms
INFO: Sensor CSS Rules [javascript]
INFO: Sensor CSS Rules is restricted to changed files only
INFO: No CSS, PHP, HTML or VueJS files are found in the project. CSS analysis is skipped.
INFO: Sensor CSS Rules [javascript] (done) | time=5ms
INFO: Sensor CSS Metrics [javascript]
INFO: Sensor CSS Metrics is restricted to changed files only
INFO: Sensor CSS Metrics [javascript] (done) | time=1ms
INFO: Sensor ThymeLeaf template sensor [securityjavafrontend]
INFO: Sensor ThymeLeaf template sensor [securityjavafrontend] (done) | time=5ms
INFO: Sensor Python HTML templates processing [securitypythonfrontend]
INFO: HTML files are not indexed : you may want to add them in the scanned files of this project to detect Python XSS vulnerabilities
INFO: Sensor Python HTML templates processing [securitypythonfrontend] (done) | time=24ms
INFO: Sensor IaC Docker Sensor [iac]
INFO: Sensor IaC Docker Sensor is restricted to changed files only
INFO: 1 source file to be analyzed
ERROR: Unable to parse file: file:///tmp/build/7411baae/src/Dockerfile. #( NOT SURE IGF THIS ERROR COULD BE RELEVANT)
ERROR: Cannot parse 'Dockerfile': String index out of range: -1
INFO: 1/1 source file has been analyzed
INFO: Sensor IaC Docker Sensor [iac] (done) | time=134ms
INFO: Sensor Serverless configuration file sensor [security]
INFO: 0 Serverless function entries were found in the project
INFO: 0 Serverless function handlers were kept as entrypoints
INFO: Sensor Serverless configuration file sensor [security] (done) | time=8ms
INFO: Sensor AWS SAM template file sensor [security]
INFO: Sensor AWS SAM template file sensor [security] (done) | time=5ms
INFO: Sensor AWS SAM Inline template file sensor [security]
INFO: Sensor AWS SAM Inline template file sensor [security] (done) | time=5ms
INFO: Sensor javabugs [dbd]
INFO: Reading IR files from: /tmp/build/7411baae/src/.scannerwork/ir/java
INFO: No IR files have been included for analysis.
INFO: Sensor javabugs [dbd] (done) | time=1ms
INFO: Sensor pythonbugs [dbd]
INFO: Reading IR files from: /tmp/build/7411baae/src/.scannerwork/ir/python
INFO: Analyzing 2950 functions to detect bugs.
INFO: Sensor pythonbugs [dbd] (done) | time=10341ms
INFO: Sensor JavaSecuritySensor [security]
INFO: Reading type hierarchy from: /tmp/build/7411baae/src/.scannerwork/ucfg2/java
INFO: Read 0 type definitions
INFO: No UCFGs have been included for analysis.
INFO: Sensor JavaSecuritySensor [security] (done) | time=4ms
INFO: Sensor CSharpSecuritySensor [security]
INFO: Reading type hierarchy from: /tmp/build/7411baae/src/ucfg_cs2
INFO: Read 0 type definitions
INFO: No UCFGs have been included for analysis.
INFO: Sensor CSharpSecuritySensor [security] (done) | time=0ms
INFO: Sensor PhpSecuritySensor [security]
INFO: Reading type hierarchy from: /tmp/build/7411baae/src/.scannerwork/ucfg2/php
INFO: Read 0 type definitions
INFO: No UCFGs have been included for analysis.
INFO: Sensor PhpSecuritySensor [security] (done) | time=1ms
INFO: Sensor PythonSecuritySensor [security]
INFO: Reading type hierarchy from: /tmp/build/7411baae/src/.scannerwork/ucfg2/python
INFO: Read 2188 type definitions
INFO: Reading UCFGs from: /tmp/build/7411baae/src/.scannerwork/ucfg2/python
INFO: 19:08:05.577973 Building Runtime Type propagation graph
INFO: 19:08:08.646966 Running Tarjan on 89945 nodes
INFO: 19:08:08.996673 Tarjan found 89145 components
INFO: 19:08:10.440836 Variable type analysis: done
INFO: 19:08:10.446523 Building Runtime Type propagation graph
INFO: 19:08:11.425288 Running Tarjan on 88248 nodes
INFO: 19:08:11.60998 Tarjan found 87484 components
INFO: 19:08:12.051199 Variable type analysis: done
INFO: Analyzing 12968 ucfgs to detect vulnerabilities.
INFO: All rules entrypoints : 93
INFO: Retained UCFGs : 1465
INFO: Taint analysis starting. Entrypoints: 93
INFO: Running symbolic analysis for 'PYTHON'
INFO: Taint analysis: done.
INFO: Sensor PythonSecuritySensor [security] (done) | time=17162ms
INFO: Sensor JsSecuritySensor [security]
INFO: No taint analysis rules have been enabled, will not execute taint analysis.
INFO: Sensor JsSecuritySensor [security] (done) | time=0ms
INFO: ------------- Run sensors on project
INFO: Sensor Analysis Warnings import [csharp]
INFO: Sensor Analysis Warnings import [csharp] (done) | time=3ms
INFO: Sensor Zero Coverage Sensor
INFO: Sensor Zero Coverage Sensor (done) | time=346ms
INFO: SCM Publisher SCM provider for this project is: git
INFO: SCM Publisher 3 source files to be analyzed
INFO: SCM Publisher 3/3 source files have been analyzed (done) | time=3957ms
INFO: CPD Executor 228 files had no CPD blocks
INFO: CPD Executor Calculating CPD for 779 files
INFO: CPD Executor CPD calculation finished (done) | time=498ms
INFO: SCM writing changed lines
WARN: Could not find ref 'main' in refs/heads, refs/remotes, refs/remotes/upstream or refs/remotes/origin
INFO: SCM writing changed lines (done) | time=13ms
INFO: Analysis report generated in 536ms, dir size=1.7 MB
INFO: Analysis report compressed in 2600ms, zip size=1.1 MB
INFO: Analysis report uploaded in 2190ms
INFO: ANALYSIS SUCCESSFUL, you can find the results at: https://sonar.MY-COMPANIE.int/dashboard?id=MY-TEAM%3AMY-APP&pullRequest=1850
INFO: Note that you will be able to access the updated dashboard once the server has processed the submitted analysis report
INFO: More about the report processing at https://sonar.MY-COMPANIE.int/api/ce/task?id=AZC3y9_NCg3ish7uopd6
INFO: Analysis total time: 2:26.781 s
INFO: ------------------------------------------------------------------------
INFO: EXECUTION SUCCESS
INFO: ------------------------------------------------------------------------
INFO: Total time: 2:30.570s
INFO: Final Memory: 168M/577M
INFO: ------------------------------------------------------------------------
After all this log, when i go to the sonarqube page.
Not sure what else to do.
The connections works.
the scripts works.
The scanner works
not sure how to debug more about this.