Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

External ssues not being uploaded to sonarqube #1

Open
hermanmaleiane opened this issue Jul 21, 2023 · 1 comment
Open

External ssues not being uploaded to sonarqube #1

hermanmaleiane opened this issue Jul 21, 2023 · 1 comment

Comments

@hermanmaleiane
Copy link

hermanmaleiane commented Jul 21, 2023

Hi

I know it´s not related to the plugin but i would like to know if you had sucess uploading the reports to sonarqube.

I dont have erros but external issues are being ignored by the scanner.

./trivy image -f json -o results.json nexus-12:8443/maven3-trivy-scanner:qual
./trivy sonarqube results.json > sonarqube.json
./trivy sonarqube sonarqube.json -- filePath=Dockerfile > sonarqube.json

sonar-scanner -Dsonar.login= -Dsonar.password= -Dsonar.projectKey=otrs-ticket-admin-web-qual -Dsonar.projectKey=otrs-ticket-admin-web-qual -Dsonar.sources=. 
	-Dsonar.externalIssuesReportPaths=C:\Users\Herman.Maleiane\Downloads\sonar-scanner-4.8.0.2856-windows\bin\sonarqube.json

Imported 0 issues in 0 files
INFO: External issues ignored for 1 unknown files, including: Dockerfile
INFO: Sensor Import external issues report (done) | time=74ms

{
  "issues": [
    {
      "engineId": "Trivy",
      "ruleId": "CVE-2011-3374",
      "type": "VULNERABILITY",
      "severity": "MINOR",
      "primaryLocation": {
        "message": "It was found that apt-key in apt, all versions, do not correctly validate gpg keys with the master keyring, leading to a potential man-in-the-middle attack.",
        "filePath": "Dockerfile"
      }
    },
    {
      "engineId": "Trivy",
      "ruleId": "CVE-2019-18276",
      "type": "VULNERABILITY",
      "severity": "MINOR",
      "primaryLocation": {
        "message": "An issue was discovered in disable_priv_mode in shell.c in GNU Bash through 5.0 patch 11. By default, if Bash is run with its effective UID not equal to its real UID, it will drop privileges by setting its effective UID to its real UID. However, it does so incorrectly. On Linux and other systems that support \"saved UID\" functionality, the saved UID is not dropped. An attacker with command execution in the shell can use \"enable -f\" for runtime loading of a new builtin, which can be a shared object that calls setuid() and therefore regains privileges. However, binaries running with an effective UID of 0 are unaffected.",
        "filePath": "Dockerfile"
      }
    }

The problem is in the attribute filepath
Thanks in advance

@readonlyuser1
Copy link

readonlyuser1 commented Sep 28, 2023

"filePath": "Dockerfile"
Dockerfile is not indexed in sonarqube

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants