Pull request analysis is coming to zero

Bitbucket Cloud

CI: Jenkins

Scanner command used within the pipeline script in Jenkins: sh “/var/jenkins_home/tools/hudson.plugins.sonar.SonarRunnerInstallation/sonar-scanner/bin/sonar-scanner -Dsonar.pullrequest.key=${env.CHANGE_ID} -Dsonar.pullrequest.branch=${env.BRANCH_NAME} -Dsonar.pullrequest.base=${env.CHANGE_BRANCH} -Dsonar.pullrequest.target=${env.CHANGE_TARGET}”

Repository language: Português

The code is private

Problem report:

The analysis is coming to zero, I need help identifying the problem

Context:

SonarCloud plugins:

  • Python Code Quality and Security 4.9.0.13528 (python)
  • Dataflow Bug Detection Rules for Python 1.18.0.5108 (dbdpythonfrontend)
  • Dataflow Bug Detection 1.18.0.5108 (dbd)
  • JaCoCo 1.3.0.1538 (jacoco)
  • IaC Code Quality and Security 1.21.0.5999 (iac)
  • Dataflow Bug Detection Rules for Java 1.18.0.5108 (dbdjavafrontend)
  • JavaScript/TypeScript/CSS Code Quality and Security 10.8.0.24207 (javascript)
  • License for SonarLint 8.0.0.49405 (license)
  • C# Code Quality and Security 9.11.0.78383 (csharp)
  • Java Code Quality and Security 7.27.1.33504 (java)
  • XML Code Quality and Security 2.10.0.4108 (xml)
  • PHP Code Quality and Security 3.32.0.10180 (php)
  • Text Code Quality and Security 2.5.0.2293 (text)
  • VB.NET Code Quality and Security 9.11.0.78383 (vbnet)
  • Configuration detection for Code Quality and Security 1.3.0.654 (config)
    Project server settings:
  • sonar.abap.file.suffixes=.abap,.ab4,.flow,.asprog
  • sonar.apex.file.suffixes=.cls,.trigger
  • sonar.branch.longLivedBranches.regex=release/v*.*
  • sonar.c.file.suffixes=.c,.h
  • sonar.cpp.file.suffixes=.cc,.cpp,.cxx,.c++,.hh,.hpp,.hxx,.h++,.ipp
  • sonar.cs.file.suffixes=.cs,.razor
  • sonar.css.file.suffixes=.css,.less,.scss
  • sonar.docker.file.patterns=Dockerfile,*.dockerfile
  • sonar.flex.file.suffixes=as
  • sonar.go.file.suffixes=.go
  • sonar.html.file.suffixes=.html,.xhtml,.cshtml,.vbhtml,.aspx,.ascx,.rhtml,.erb,.shtm,.shtml,.cmp,.twig
  • sonar.java.file.suffixes=.java,.jav
  • sonar.javascript.file.suffixes=.js,.jsx,.cjs,.mjs,.vue
  • sonar.json.file.suffixes=.json
  • sonar.jsp.file.suffixes=.jsp,.jspf,.jspx
  • sonar.kotlin.file.suffixes=.kt,.kts
  • sonar.objc.file.suffixes=.m
  • sonar.php.file.suffixes=php,php3,php4,php5,phtml,inc
  • sonar.plsql.file.suffixes=sql,tab,pkb
  • sonar.pullrequest.provider=BitbucketCloud
  • sonar.python.coverage.reportPaths=coverage.xml
  • sonar.python.file.suffixes=py
  • sonar.ruby.file.suffixes=.rb
  • sonar.scala.file.suffixes=.scala
  • sonar.swift.file.suffixes=.swift
  • sonar.terraform.file.suffixes=.tf
  • sonar.tsql.file.suffixes=.tsql
  • sonar.typescript.file.suffixes=.ts,.tsx,.cts,.mts
  • sonar.vbnet.file.suffixes=.vb
  • sonar.xml.file.suffixes=.xml,.xsd,.xsl,.config
  • sonar.yaml.file.suffixes=.yaml,.yml
    Project scanner properties:
  • sonar.coverage.jacoco.xmlReportPaths=target/site/jacoco/jacoco.xml,target/site/jacoco-it/jacoco.xml
  • sonar.host.url=https://sonarcloud.io
  • sonar.java.codeCoveragePlugin=jacoco
  • sonar.login=******
  • sonar.organization=simepar
  • sonar.projectBaseDir=/var/jenkins_home/workspace/ClimatOS_-_PIPELINE_PR-2860
  • sonar.projectKey=simepar_climatos-django
  • sonar.pullrequest.base=fixing-sonar-scanner-check
  • sonar.pullrequest.branch=PR-2860
  • sonar.pullrequest.key=2860
  • sonar.pullrequest.target=release/v9.31
  • sonar.python.version=3.9
  • sonar.scanner.app=ScannerCLI
  • sonar.scanner.appVersion=5.0.1.3006
  • sonar.sourceEncoding=UTF-8
  • sonar.sources=.
  • sonar.test.exclusions=climatos/apps//tests//*
  • sonar.test.inclusions=climatos/apps//tests//*
  • sonar.tests=climatos/
  • sonar.token=******
  • sonar.working.directory=/var/jenkins_home/workspace/ClimatOS_-_PIPELINE_PR-2860/.scannerwork

Hi,

Can you share your analysis log?

The analysis / scanner log is what’s output from the analysis command. Hopefully, the log you provide - redacted as necessary - will include that command as well.

This guide will help you find them.

 
Thx,
Ann

Hi,

Comando:

sonar-scanner \
-Dsonar.pullrequest.key=${env.CHANGE_ID} \
-Dsonar.pullrequest.branch=${env.CHANGE_BRANCH} \
-Dsonar.pullrequest.base=${env.CHANGE_BRANCH}
+ /var/jenkins_home/.sonar/sonar-scanner-4.7.0.2747-linux/bin/sonar-scanner -Dsonar.pullrequest.key=2870 -Dsonar.pullrequest.branch=fixing-sonar-scanner-check -Dsonar.pullrequest.base=fixing-sonar-scanner-check
INFO: Scanner configuration file: /var/jenkins_home/.sonar/sonar-scanner-4.7.0.2747-linux/conf/sonar-scanner.properties
INFO: Project root configuration file: /var/jenkins_home/workspace/ClimatOS_-_PIPELINE_PR-2870/sonar-project.properties
INFO: SonarScanner 4.7.0.2747
INFO: Java 11.0.14.1 Eclipse Adoptium (64-bit)
INFO: Linux 4.6.0-0.bpo.1-amd64 amd64
INFO: User cache: /root/.sonar/cache
INFO: Scanner configuration file: /var/jenkins_home/.sonar/sonar-scanner-4.7.0.2747-linux/conf/sonar-scanner.properties
INFO: Project root configuration file: /var/jenkins_home/workspace/ClimatOS_-_PIPELINE_PR-2870/sonar-project.properties
INFO: Analyzing on SonarCloud
INFO: Default locale: "en", source code encoding: "UTF-8" (analysis is platform dependent)
INFO: Load global settings
INFO: Load global settings (done) | time=859ms
INFO: Server id: 1BD809FA-AWHW8ct9-T_TB3XqouNu
INFO: User cache: /root/.sonar/cache
INFO: Loading required plugins
INFO: Load plugins index
INFO: Load plugins index (done) | time=748ms
INFO: Load/download plugins
INFO: Load/download plugins (done) | time=7859ms
INFO: Loaded core extensions: developer-scanner
INFO: Found an active CI vendor: 'Jenkins'
INFO: Load project settings for component key: 'simepar_climatos-django'
INFO: Load project settings for component key: 'simepar_climatos-django' (done) | time=692ms
INFO: Process project properties
INFO: Execute project builders
INFO: Execute project builders (done) | time=1ms
INFO: Project key: simepar_climatos-django
INFO: Base dir: /var/jenkins_home/workspace/ClimatOS_-_PIPELINE_PR-2870
INFO: Working dir: /var/jenkins_home/workspace/ClimatOS_-_PIPELINE_PR-2870/.scannerwork
INFO: Load project branches
INFO: Load project branches (done) | time=704ms
INFO: Check ALM binding of project 'simepar_climatos-django'
INFO: Detected project binding: BOUND
INFO: Check ALM binding of project 'simepar_climatos-django' (done) | time=682ms
INFO: Load project pull requests
INFO: Load project pull requests (done) | time=849ms
INFO: Load branch configuration
INFO: Load branch configuration (done) | time=1186ms
INFO: Load quality profiles
INFO: Load quality profiles (done) | time=774ms
INFO: Load active rules
INFO: Load active rules (done) | time=17929ms
INFO: Organization key: simepar
INFO: Pull request 2870 for merge into dev from fixing-sonar-scanner-check
WARN: The property 'sonar.login' is deprecated and will be removed in the future. Please use the 'sonar.token' property instead when passing a token.
INFO: Load project repositories
INFO: Load project repositories (done) | time=1523ms
INFO: SCM collecting changed files in the branch
WARN: Could not find ref: dev in refs/heads, refs/remotes/upstream or refs/remotes/origin
INFO: SCM collecting changed files in the branch (done) | time=94ms
INFO: Indexing files...
INFO: Project configuration:
INFO: Excluded sources: **/build-wrapper-dump.json, **/scripts/**, **/docs/**, **/migration/**/*.*, **/climatos/apps/**/migrations/**, **/climatos/static/bootstrap-colorpicker/**, **/climatos/static/bootstrap-slider/**, **/climatos/static/datatables/**, **/climatos/static/cropper/**, **/climatos/static/datetimepicker/**, **/climatos/static/django_ajax/**, **/climatos/static/editor/**, **/climatos/static/international_telephone/**, **/climatos/static/multiselect/**, **/climatos/static/openlayers/**, **/climatos/static/prototype/**, **/climatos/static/simepar-components/**, **/climatos/static/spinner/**, **/climatos/static/weather-icons/**, **/climatos/static/js/datetimepicker/**, **/climatos/static/js/jquery/**, **/climatos/static/js/proj4/**, **/climatos/static/js/select2/**, **/climatos/static/js/css-element-queries/**, **/climatos/static/js/external-packages/**, **/climatos/static/css/bootstrap-glyphicons/**, **/climatos/static/css/datetimepicker/**, **/climatos/static/css/font-simepar-icons/**
INFO: Some of the project files were automatically excluded because they looked like generated code. Enable debug logging to see which files were excluded. You can disable bundle detection by setting sonar.javascript.detectBundles=false
WARN: Invalid character encountered in file /var/jenkins_home/workspace/ClimatOS_-_PIPELINE_PR-2870/climatos/apps/proxy/static/data/swagger-ui-standalone-preset.js at line 13 for encoding UTF-8. Please fix file content or configure the encoding to be used using property 'sonar.sourceEncoding'.
INFO: 1680 files indexed
INFO: 873 files ignored because of inclusion/exclusion patterns
INFO: 0 files ignored because of scm ignore settings
WARN: The version of Java (11.0.14.1) you have used to run this analysis is deprecated and we will stop accepting it soon. Please update to at least Java 17.
INFO: Loading plugins for detected languages
INFO: Load/download plugins
INFO: Load/download plugins (done) | time=1972ms
INFO: Quality profile for css: Sonar way
INFO: Quality profile for docker: Sonar way
INFO: Quality profile for js: Sonar way
INFO: Quality profile for json: Sonar way
INFO: Quality profile for plsql: Sonar way
INFO: Quality profile for py: Sonar way
INFO: Quality profile for web: Sonar way
INFO: Quality profile for yaml: Sonar way
INFO: ------------- Run sensors on module ClimatOS - Django
INFO: Load metrics repository
INFO: Load metrics repository (done) | time=703ms
INFO: Sensor cache enabled
INFO: Load sensor cache
INFO: Load sensor cache (404) | time=1190ms
INFO: Sensor Python Sensor [python]
WARN: Your code is analyzed as compatible with all Python 3 versions by default. You can get a more precise analysis by setting the exact Python version in your configuration via the parameter "sonar.python.version"
INFO: Starting global symbols computation
INFO: 738 source files to be analyzed
INFO: 651/738 files analyzed, current file: climatos/apps/hydro/views.py
INFO: 738/738 source files have been analyzed
INFO: Starting rules execution
INFO: 738 source files to be analyzed
INFO: 152/738 files analyzed, current file: climatos/apps/station/utils/watershed_operation_report.py
INFO: 407/738 files analyzed, current file: climatos/apps/notification/utils/notification_report.py
INFO: 597/738 files analyzed, current file: climatos/apps/map/forms.py
INFO: 738/738 source files have been analyzed
INFO: The Python analyzer was able to leverage cached data from previous analyses for 0 out of 738 files. These files were not parsed.
INFO: Sensor Python Sensor [python] (done) | time=48259ms
INFO: Sensor Cobertura Sensor for Python coverage [python]
INFO: Sensor Cobertura Sensor for Python coverage [python] (done) | time=275ms
INFO: Sensor PythonXUnitSensor [python]
INFO: Sensor PythonXUnitSensor [python] (done) | time=277ms
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 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=305ms
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=54ms
INFO: Sensor IaC AzureResourceManager Sensor [iac]
INFO: Sensor IaC AzureResourceManager Sensor is restricted to changed files only
INFO: 0 source files to be analyzed
INFO: 0/0 source files have been analyzed
INFO: Sensor IaC AzureResourceManager Sensor [iac] (done) | time=113ms
INFO: Sensor JavaScript/TypeScript analysis [javascript]
INFO: Detected os: Linux arch: amd64 alpine: false. Platform: LINUX_X64
INFO: Using Node.js executable: 'node'.
INFO: Memory configuration: OS (31355 MB), Node.js (4144 MB).
INFO: Found 1 tsconfig.json file(s): [/var/jenkins_home/workspace/ClimatOS_-_PIPELINE_PR-2870/climatos/static/js/css-element-queries/tsconfig.json]
INFO: Creating TypeScript program
INFO: TypeScript configuration file /var/jenkins_home/workspace/ClimatOS_-_PIPELINE_PR-2870/climatos/static/js/css-element-queries/tsconfig.json
INFO: 173 source files to be analyzed
INFO: Creating TypeScript program (done) | time=479ms
INFO: Starting analysis with current program
INFO: Analyzed 0 file(s) with current program
INFO: Found 173 file(s) not part of any tsconfig.json: they will be analyzed without type information
INFO: 38/173 files analyzed, current file: /var/jenkins_home/workspace/ClimatOS_-_PIPELINE_PR-2870/climatos/static/apps/alert/js/alert_configs.js
INFO: 61/173 files analyzed, current file: /var/jenkins_home/workspace/ClimatOS_-_PIPELINE_PR-2870/climatos/static/apps/map/js/spatial_consistency_map/spatial_consistency.js
INFO: 77/173 files analyzed, current file: /var/jenkins_home/workspace/ClimatOS_-_PIPELINE_PR-2870/climatos/static/apps/filters/js/payload.js
INFO: 116/173 files analyzed, current file: /var/jenkins_home/workspace/ClimatOS_-_PIPELINE_PR-2870/climatos/static/apps/map/js/lightning.js
INFO: 149/173 files analyzed, current file: /var/jenkins_home/workspace/ClimatOS_-_PIPELINE_PR-2870/climatos/static/apps/common/js/filter_handler.js
INFO: 173/173 source files have been analyzed
INFO: Hit the cache for 0 out of 173
INFO: Miss the cache for 173 out of 173: FILE_CHANGED [173/173]
INFO: Sensor JavaScript/TypeScript analysis [javascript] (done) | time=65751ms
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=232ms
INFO: Sensor JavaScript inside HTML analysis [javascript]
INFO: 269 source files to be analyzed
ERROR: Failed to parse file [climatos/templates/rest_framework_swagger/index.html] at line 63: Unexpected token (63:36)
INFO: 269/269 source files have been analyzed
INFO: Hit the cache for 0 out of 269
INFO: Miss the cache for 269 out of 269: FILE_CHANGED [269/269]
INFO: Sensor JavaScript inside HTML analysis [javascript] (done) | time=1190ms
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=2ms
INFO: Sensor CSS Metrics [javascript]
INFO: Sensor CSS Metrics is restricted to changed files only
INFO: Sensor CSS Metrics [javascript] (done) | time=0ms
INFO: Sensor PL/SQL Sensor [plsql]
INFO: Sensor PL/SQL Sensor is restricted to changed files only
WARN: The Data Dictionary is not configured for the PLSQL analyzer, which prevents rule(s) S3641, S3921, S3618, S3651 from raising issues. See
INFO: 0/0 source files have been analyzed
INFO: Sensor PL/SQL Sensor [plsql] (done) | time=88ms
INFO: Sensor C# Project Type Information [csharp]
INFO: Sensor C# Project Type Information [csharp] (done) | time=0ms
INFO: Sensor C# Analysis Log [csharp]
INFO: Sensor C# Analysis Log [csharp] (done) | time=20ms
INFO: Sensor C# Properties [csharp]
INFO: Sensor C# Properties [csharp] (done) | time=0ms
INFO: Sensor Python HTML templates processing [securitypythonfrontend]
INFO: Sensor Python HTML templates processing [securitypythonfrontend] (done) | time=765ms
INFO: Sensor HTML [web]
INFO: Sensor HTML is restricted to changed files only
INFO: Sensor HTML [web] (done) | time=7ms
INFO: Sensor TextAndSecretsSensor [text]
INFO: Sensor TextAndSecretsSensor is restricted to changed files only
INFO: Sensor TextAndSecretsSensor [text] (done) | time=542ms
INFO: Sensor VB.NET Project Type Information [vbnet]
INFO: Sensor VB.NET Project Type Information [vbnet] (done) | time=2ms
INFO: Sensor VB.NET Analysis Log [vbnet]
INFO: Sensor VB.NET Analysis Log [vbnet] (done) | time=29ms
INFO: Sensor VB.NET Properties [vbnet]
INFO: Sensor VB.NET Properties [vbnet] (done) | time=0ms
INFO: Sensor IaC Docker Sensor [iac]
INFO: Sensor IaC Docker Sensor is restricted to changed files only
INFO: 0 source files to be analyzed
INFO: 0/0 source files have been analyzed
INFO: Sensor IaC Docker Sensor [iac] (done) | time=48ms
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=6ms
INFO: Sensor AWS SAM template file sensor [security]
INFO: Sensor AWS SAM template file sensor [security] (done) | time=148ms
INFO: Sensor AWS SAM Inline template file sensor [security]
INFO: Sensor AWS SAM Inline template file sensor [security] (done) | time=140ms
INFO: Sensor javabugs [dbd]
INFO: Reading IR files from: /var/jenkins_home/workspace/ClimatOS_-_PIPELINE_PR-2870/.scannerwork/ir/java
INFO: No IR files have been included for analysis.
INFO: Sensor javabugs [dbd] (done) | time=6ms
INFO: Sensor pythonbugs [dbd]
INFO: Reading IR files from: /var/jenkins_home/workspace/ClimatOS_-_PIPELINE_PR-2870/.scannerwork/ir/python
INFO: Analyzing 2866 functions to detect bugs.
INFO: Sensor pythonbugs [dbd] (done) | time=13210ms
INFO: Sensor JavaSecuritySensor [security]
INFO: Enabled taint analysis rules: S2076, S2078, S2083, S2091, S2631, S3649, S5131, S5135, S5144, S5145, S5146, S5147, S5334, S5883, S6096, S6173, S6287, S6350, S6384, S6390, S6398, S6399, S6547, S6549
INFO: Load type hierarchy and UCFGs: Starting
INFO: Load type hierarchy: Starting
INFO: Reading type hierarchy from: /var/jenkins_home/workspace/ClimatOS_-_PIPELINE_PR-2870/.scannerwork/ucfg2/java
INFO: Read 0 type definitions
INFO: Load type hierarchy: Time spent was 00:00:00.003
INFO: Load UCFGs: Starting
INFO: Load UCFGs: Time spent was 00:00:00.000
INFO: Load type hierarchy and UCFGs: Time spent was 00:00:00.003
INFO: No UCFGs have been included for analysis.
INFO: java security sensor: Time spent was 00:00:00.006
INFO: Sensor JavaSecuritySensor [security] (done) | time=21ms
INFO: Sensor CSharpSecuritySensor [security]
INFO: Enabled taint analysis rules: S2076, S2078, S2083, S2091, S2631, S3649, S5131, S5135, S5144, S5145, S5146, S5334, S5883, S6096, S6173, S6287, S6350, S6399, S6639, S6641
INFO: Load type hierarchy and UCFGs: Starting
INFO: Load type hierarchy: Starting
INFO: Reading type hierarchy from: /var/jenkins_home/workspace/ClimatOS_-_PIPELINE_PR-2870/ucfg2/cs
INFO: Read 0 type definitions
INFO: Load type hierarchy: Time spent was 00:00:00.000
INFO: Load UCFGs: Starting
INFO: Load UCFGs: Time spent was 00:00:00.000
INFO: Load type hierarchy and UCFGs: Time spent was 00:00:00.000
INFO: No UCFGs have been included for analysis.
INFO: csharp security sensor: Time spent was 00:00:00.000
INFO: Sensor CSharpSecuritySensor [security] (done) | time=0ms
INFO: Sensor PhpSecuritySensor [security]
INFO: Enabled taint analysis rules: S2076, S2078, S2083, S2091, S2631, S3649, S5131, S5135, S5144, S5145, S5146, S5334, S5335, S5883, S6173, S6287, S6350
INFO: Load type hierarchy and UCFGs: Starting
INFO: Load type hierarchy: Starting
INFO: Reading type hierarchy from: /var/jenkins_home/workspace/ClimatOS_-_PIPELINE_PR-2870/.scannerwork/ucfg2/php
INFO: Read 0 type definitions
INFO: Load type hierarchy: Time spent was 00:00:00.000
INFO: Load UCFGs: Starting
INFO: Load UCFGs: Time spent was 00:00:00.001
INFO: Load type hierarchy and UCFGs: Time spent was 00:00:00.001
INFO: No UCFGs have been included for analysis.
INFO: php security sensor: Time spent was 00:00:00.001
INFO: Sensor PhpSecuritySensor [security] (done) | time=2ms
INFO: Sensor PythonSecuritySensor [security]
INFO: Enabled taint analysis rules: S2076, S2078, S2083, S2091, S2631, S3649, S5131, S5135, S5144, S5145, S5146, S5147, S5334, S5496, S6287, S6350
INFO: Load type hierarchy and UCFGs: Starting
INFO: Load type hierarchy: Starting
INFO: Reading type hierarchy from: /var/jenkins_home/workspace/ClimatOS_-_PIPELINE_PR-2870/.scannerwork/ucfg2/python
INFO: Read 4785 type definitions
INFO: Load type hierarchy: Time spent was 00:00:00.287
INFO: Load UCFGs: Starting
INFO: Reading UCFGs from: /var/jenkins_home/workspace/ClimatOS_-_PIPELINE_PR-2870/.scannerwork/ucfg2/python
INFO: Load UCFGs: Time spent was 00:00:03.192
INFO: Load type hierarchy and UCFGs: Time spent was 00:00:03.480
INFO: Analyzing 13178 UCFGs to detect vulnerabilities.
INFO: Check cache: Starting
INFO: Load cache: Starting
INFO: Load cache: Time spent was 00:00:00.000
INFO: Check cache: Time spent was 00:00:00.000
INFO: Create runtime call graph: Starting
INFO: Variable Type Analysis #1: Starting
INFO: Create runtime type propagation graph: Starting
INFO: Create runtime type propagation graph: Time spent was 00:00:00.921
INFO: Run SCC (Tarjan) on 76594 nodes: Starting
INFO: Run SCC (Tarjan) on 76594 nodes: Time spent was 00:00:00.282
INFO: Tarjan found 75743 strongly connected components
INFO: Propagate runtime types to strongly connected components: Starting
INFO: Propagate runtime types to strongly connected components: Time spent was 00:00:00.442
INFO: Variable Type Analysis #1: Time spent was 00:00:01.648
INFO: Variable Type Analysis #2: Starting
INFO: Create runtime type propagation graph: Starting
INFO: Create runtime type propagation graph: Time spent was 00:00:00.642
INFO: Run SCC (Tarjan) on 73794 nodes: Starting
INFO: Run SCC (Tarjan) on 73794 nodes: Time spent was 00:00:00.104
INFO: Tarjan found 73722 strongly connected components
INFO: Propagate runtime types to strongly connected components: Starting
INFO: Propagate runtime types to strongly connected components: Time spent was 00:00:00.282
INFO: Variable Type Analysis #2: Time spent was 00:00:01.030
INFO: Create runtime call graph: Time spent was 00:00:02.695
INFO: Load config: Starting
INFO: Load config: Time spent was 00:00:00.147
INFO: Compute entry points: Starting
INFO: Compute entry points: Time spent was 00:00:02.103
INFO: All rules entry points : 52
INFO: Slice call graph: Starting
INFO: Retained UCFGs : 142
INFO: Slice call graph: Time spent was 00:00:00.004
INFO: Live variable analysis: Starting
INFO: Live variable analysis: Time spent was 00:00:00.063
INFO: Taint analysis for python: Starting
INFO: 0 / 142 UCFGs simulated, memory usage: 619 MB
INFO: 120 / 142 UCFGs simulated, memory usage: 660 MB
INFO: Taint analysis for python: Time spent was 00:00:00.404
INFO: Report issues: Starting
INFO: Report issues: Time spent was 00:00:00.003
INFO: Store cache: Starting
INFO: Store cache: Time spent was 00:00:00.000
INFO: python security sensor: Time spent was 00:00:08.911
INFO: python security sensor: Begin: 2023-10-27T16:45:32.677377Z, End: 2023-10-27T16:45:41.589266Z, Duration: 00:00:08.911
Load type hierarchy and UCFGs: Begin: 2023-10-27T16:45:32.677377Z, End: 2023-10-27T16:45:36.157875Z, Duration: 00:00:03.480
Load type hierarchy: Begin: 2023-10-27T16:45:32.677377Z, End: 2023-10-27T16:45:32.964923Z, Duration: 00:00:00.287
Load UCFGs: Begin: 2023-10-27T16:45:32.965071Z, End: 2023-10-27T16:45:36.157875Z, Duration: 00:00:03.192
Check cache: Begin: 2023-10-27T16:45:36.157925Z, End: 2023-10-27T16:45:36.158596Z, Duration: 00:00:00.000
Load cache: Begin: 2023-10-27T16:45:36.157958Z, End: 2023-10-27T16:45:36.158127Z, Duration: 00:00:00.000
Create runtime call graph: Begin: 2023-10-27T16:45:36.158596Z, End: 2023-10-27T16:45:38.853840Z, Duration: 00:00:02.695
Variable Type Analysis #1: Begin: 2023-10-27T16:45:36.159496Z, End: 2023-10-27T16:45:37.807501Z, Duration: 00:00:01.648
Create runtime type propagation graph: Begin: 2023-10-27T16:45:36.161252Z, End: 2023-10-27T16:45:37.082527Z, Duration: 00:00:00.921
Run SCC (Tarjan) on 76594 nodes: Begin: 2023-10-27T16:45:37.083012Z, End: 2023-10-27T16:45:37.365264Z, Duration: 00:00:00.282
Propagate runtime types to strongly connected components: Begin: 2023-10-27T16:45:37.365264Z, End: 2023-10-27T16:45:37.807320Z, Duration: 00:00:00.442
Variable Type Analysis #2: Begin: 2023-10-27T16:45:37.811176Z, End: 2023-10-27T16:45:38.841250Z, Duration: 00:00:01.030
Create runtime type propagation graph: Begin: 2023-10-27T16:45:37.811176Z, End: 2023-10-27T16:45:38.453934Z, Duration: 00:00:00.642
Run SCC (Tarjan) on 73794 nodes: Begin: 2023-10-27T16:45:38.453934Z, End: 2023-10-27T16:45:38.558855Z, Duration: 00:00:00.104
Propagate runtime types to strongly connected components: Begin: 2023-10-27T16:45:38.558855Z, End: 2023-10-27T16:45:38.841250Z, Duration: 00:00:00.282
Load config: Begin: 2023-10-27T16:45:38.854220Z, End: 2023-10-27T16:45:39.001253Z, Duration: 00:00:00.147
Compute entry points: Begin: 2023-10-27T16:45:39.001593Z, End: 2023-10-27T16:45:41.105246Z, Duration: 00:00:02.103
Slice call graph: Begin: 2023-10-27T16:45:41.111724Z, End: 2023-10-27T16:45:41.116653Z, Duration: 00:00:00.004
Live variable analysis: Begin: 2023-10-27T16:45:41.116653Z, End: 2023-10-27T16:45:41.180533Z, Duration: 00:00:00.063
Taint analysis for python: Begin: 2023-10-27T16:45:41.181273Z, End: 2023-10-27T16:45:41.585290Z, Duration: 00:00:00.404
Report issues: Begin: 2023-10-27T16:45:41.585290Z, End: 2023-10-27T16:45:41.589266Z, Duration: 00:00:00.003
Store cache: Begin: 2023-10-27T16:45:41.589266Z, End: 2023-10-27T16:45:41.589266Z, Duration: 00:00:00.000
INFO: python security sensor peak memory: 1123 MB
INFO: Sensor PythonSecuritySensor [security] (done) | time=8916ms
INFO: Sensor JsSecuritySensor [security]
INFO: Enabled taint analysis rules: S2083, S6096, S6105, S6287, S5334, S6350, S2076, S3649, S2631, S5696, S5144, S5146, S5131, S5883, S5147
INFO: Load type hierarchy and UCFGs: Starting
INFO: Load type hierarchy: Starting
INFO: Reading type hierarchy from: /var/jenkins_home/workspace/ClimatOS_-_PIPELINE_PR-2870/.scannerwork/ucfg2/js
INFO: Read 0 type definitions
INFO: Load type hierarchy: Time spent was 00:00:00.000
INFO: Load UCFGs: Starting
INFO: Load UCFGs: Time spent was 00:00:00.000
INFO: Load type hierarchy and UCFGs: Time spent was 00:00:00.000
INFO: No UCFGs have been included for analysis.
INFO: js security sensor: Time spent was 00:00:00.000
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=192ms
INFO: CPD Executor 166 files had no CPD blocks
INFO: CPD Executor Calculating CPD for 745 files
INFO: CPD Executor CPD calculation finished (done) | time=556ms
INFO: SCM writing changed lines
WARN: Could not find ref: dev in refs/heads, refs/remotes/upstream or refs/remotes/origin
INFO: SCM writing changed lines (done) | time=5ms
INFO: Analysis report generated in 212ms, dir size=2 MB
INFO: Analysis report compressed in 1492ms, zip size=1 MB
INFO: Analysis report uploaded in 3492ms
INFO: ANALYSIS SUCCESSFUL, you can find the results at:
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
INFO: Analysis total time: 3:04.247 s
INFO: ------------------------------------------------------------------------
INFO: EXECUTION SUCCESS
INFO: ------------------------------------------------------------------------
INFO: Total time: 3:21.014s
INFO: Final Memory: 107M/374M
INFO: ------------------------------------------------------------------------
[Pipeline] }
[Pipeline] // withSonarQubeEnv
[Pipeline] timeout
Timeout set to expire in 5 min 0 sec
[Pipeline] {
[Pipeline] waitForQualityGate
Checking status of SonarQube task '****' on server 'sonarcloud'
SonarQube task '*****' status is 'SUCCESS'
SonarQube task '*****' completed. Quality gate is 'OK'

Hi,

Thanks for the log. This warning shows up twice.

SCM data is used in analysis to understand what’s new in a PR, and to make that calculation, the scanner needs not just the current PR, but information on what it branched from.

This shows up in the SonarQube docs, but not the SonarCloud docs (yet! I’ll be raising that internally). The underlying mechanisms are the same, so it applies equally to both:

Before analyzing your pull requests, make sure that:

  • The pull request source branch is checked out in the local repository.
  • The branch being targeted by the pull request is fetched and present in the local repository.
  • The analysis is being run on a local repository with valid repository metadata (e.g. the .git folders have not been removed). Avoid any attempt at previewing the merge or actions involving your main branch.
  • The code in the local repository matches the code in the remote repository (e.g once a PR is issued, no code is added to the local branch on the CI side before analysis).

 
HTH,
Ann

Ok, I’ll follow the recommendations and let you know the result, thank you very much G AnnCampbell

1 Like