From d18a95ba0ed734f3b10f971843015cc21e230468 Mon Sep 17 00:00:00 2001 From: Bryan Larson Date: Tue, 5 Nov 2024 07:38:57 -0700 Subject: [PATCH 1/2] chore(ci): Added code scanning --- .github/workflows/code-scan.yml | 15 +++++++++++++++ sonar-project.properties | 8 ++++++++ 2 files changed, 23 insertions(+) create mode 100644 .github/workflows/code-scan.yml create mode 100644 sonar-project.properties diff --git a/.github/workflows/code-scan.yml b/.github/workflows/code-scan.yml new file mode 100644 index 0000000..e002789 --- /dev/null +++ b/.github/workflows/code-scan.yml @@ -0,0 +1,15 @@ +name: Code Scan + +on: + pull_request: + branches: [ master, development ] + schedule: + - cron: '0 12 * * 1' # runs at 12:00 UTC on Mondays + workflow_dispatch: + +jobs: + scan: + uses: hms-dbmi/actions/.github/workflows/code-scan.yml@main + secrets: + SONAR_HOST_URL: ${{ secrets.BLHMSDBMI_SONAR_HOST_URL }} + SONAR_TOKEN: ${{ secrets.BLHMSDBMI_SONAR_TOKEN }} diff --git a/sonar-project.properties b/sonar-project.properties new file mode 100644 index 0000000..f4bd715 --- /dev/null +++ b/sonar-project.properties @@ -0,0 +1,8 @@ +sonar.projectKey=hms-dbmi_dbmi-fileservice_e78292f8-f5d1-4b7f-8de9-f04d6c887c86 + +# relative paths to source directories. More details and properties are described +# at https://docs.sonarqube.org/latest/project-administration/narrowing-the-focus/ +sonar.sources=app/ + +# Set python version +sonar.python.version=3.11 From 216cd05f6107524ca0a4485189721d7ce289fade Mon Sep 17 00:00:00 2001 From: Bryan Larson Date: Tue, 5 Nov 2024 07:56:22 -0700 Subject: [PATCH 2/2] chore(ci): Fixed root folder for code scans --- sonar-project.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sonar-project.properties b/sonar-project.properties index f4bd715..f947357 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -2,7 +2,7 @@ sonar.projectKey=hms-dbmi_dbmi-fileservice_e78292f8-f5d1-4b7f-8de9-f04d6c887c86 # relative paths to source directories. More details and properties are described # at https://docs.sonarqube.org/latest/project-administration/narrowing-the-focus/ -sonar.sources=app/ +sonar.sources=fileservice/ # Set python version sonar.python.version=3.11