{"id":36613762,"url":"https://github.com/scanoss/integration-sonarqube","last_synced_at":"2026-01-12T09:04:07.932Z","repository":{"id":225887524,"uuid":"767035473","full_name":"scanoss/integration-sonarqube","owner":"scanoss","description":null,"archived":false,"fork":false,"pushed_at":"2025-04-15T18:25:08.000Z","size":135,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-15T19:30:07.134Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/scanoss.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-03-04T15:34:08.000Z","updated_at":"2025-04-15T18:25:11.000Z","dependencies_parsed_at":"2024-03-04T20:39:32.335Z","dependency_job_id":"b0c87f72-5836-4063-94f4-20958e93d301","html_url":"https://github.com/scanoss/integration-sonarqube","commit_stats":null,"previous_names":["scanoss/integration-sonarqube"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/scanoss/integration-sonarqube","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scanoss%2Fintegration-sonarqube","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scanoss%2Fintegration-sonarqube/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scanoss%2Fintegration-sonarqube/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scanoss%2Fintegration-sonarqube/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scanoss","download_url":"https://codeload.github.com/scanoss/integration-sonarqube/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scanoss%2Fintegration-sonarqube/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28337617,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T06:09:07.588Z","status":"ssl_error","status_checked_at":"2026-01-12T06:05:18.301Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-12T09:04:06.310Z","updated_at":"2026-01-12T09:04:07.895Z","avatar_url":"https://github.com/scanoss.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SCANOSS Sonarqube Integration Example \n\nThis repository serves as an example to demonstrate how to use the [SCANOSS Sonarqube Example Plugin](https://github.com/scanoss/scanoss-sonar-example-plugin/) for license compliance in your projects. \n\nThe SCANOSS Sonar Example Plugin provides a few predefined metrics that can be enabled as checks in Sonar Quality Gates: Copyleft, Copyright, and Vulnerabilities.\n\n## Overview\n\nThe repository is structured into a single `main` branch that showcases the plugin execution:\n\n- [`main`](https://github.com/scanoss/integration-sonarqube/tree/main): Demonstrates a scenario where the codebase comply with the policies:\n    - No copyleft licenses are found within the codebase.\n\nIntroduction of copyleft components can be tested by adding code to the repository.\n\n\n## How to Use Sonarqube Integration in Your Project\n\nFollow these steps to use the SCANOSS Sonarqube Example Plugin in your project:\n\n### Pre-requisites:\n\n- Sonarqube instance\n\n- Install SCANOSS Sonarqube Plugin (See [Plugin's repository](https://github.com/scanoss/scanoss-sonar-example-plugin/) for further information)\n\n- Configure project in Sonarqube. Additionally to project creation, you will need:\n  - CI Access Token: Generate a new Token at Project Setup\n  - Quality Gate configured: Create a new Quality Gate or add a condition to an existing one. An example condition is \n    - Metric: \"Copyleft License Count\" \n    - Operator: \"is grater than\"\n    - Value: 0\n\n### Project Setup Instructions:\n\n1. Add the required project variables and secrets to the GitHub repository's settings.\n\n- SONAR HOST URL (Variable): `SONAR_HOST_URL` pointing to your sonar instance. Example: https://sonar.mycompany.com\n- SONAR TOKEN (Secret): `SONAR_TOKEN` secret corresponding to your Sonar's project Analysis Method (Other CI).\n\n2. Add a `sonar-project.properties` file at the root folder of your project containing the project Key from your Sonar instance:\n```\nsonar.projectKey=integration-sonarqube\n```\n\n3. Add a workflow file under `.github/workflows` with the following basic setup:\n```yaml\nname: SCANOSS Sonarqube Copyleft detection\n\non:\n  push:\n    branches:\n      - 'main'\n\njobs:\n  scanoss:\n    name: SCANOSS Scan\n    runs-on: ubuntu-latest\n    permissions: read-all\n    steps:\n      - uses: actions/checkout@v3\n        with:\n          fetch-depth: 0 \n      - uses: sonarsource/sonarqube-scan-action@master\n        env:\n          SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}\n          SONAR_HOST_URL: ${{ vars.SONAR_HOST_URL }}\n      - uses: sonarsource/sonarqube-quality-gate-action@master\n        timeout-minutes: 5\n        env:\n          SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}\n```\n\n## Expected results\n\nWhen the project scan is complete, if the Quality Gate fails, the commit will be marked as failed and you will get a message as follows:\n\n```\n✖ Quality Gate has FAILED.\n\nDetailed information can be found at: https://sonar.mycompany.com/dashboard?id=integration-sonarqube\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscanoss%2Fintegration-sonarqube","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscanoss%2Fintegration-sonarqube","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscanoss%2Fintegration-sonarqube/lists"}