From b9f5c62f44322a680e1a5f4bc5016b7a1a3e2a70 Mon Sep 17 00:00:00 2001 From: Hari Sekhon Date: Tue, 25 Feb 2025 21:29:21 +0700 Subject: [PATCH 01/16] added sonar-project.properties --- sonar-project.properties | 42 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 sonar-project.properties diff --git a/sonar-project.properties b/sonar-project.properties new file mode 100644 index 0000000..32a5bb0 --- /dev/null +++ b/sonar-project.properties @@ -0,0 +1,42 @@ +# vim:ts=4:sts=4:sw=4:et +# +# Author: Hari Sekhon +# Date: 2016-07-19 18:31:17 +0100 (Tue, 19 Jul 2016) +# +# https://github.com/HariSekhon/SQL-scripts +# +# License: see accompanying Hari Sekhon LICENSE file +# +# If you're using my code you're welcome to connect with me on LinkedIn and optionally send me feedback to help steer this or other code I publish +# +# https://www.linkedin.com/in/HariSekhon +# + +# ============================================================================ # +# S o n a r Q u b e +# ============================================================================ # + +sonar.host.url=https://sonarcloud.io + +# Required metadata +sonar.organization=harisekhon +sonar.projectName=SQL-scripts +sonar.projectKey=HariSekhon_SQL-scripts +sonar.projectVersion=1.0 + +sonar.projectDescription=SQL-scripts + +sonar.links.homepage=https://github.com/HariSekhon/SQL-scripts +sonar.links.scm=https://github.com/HariSekhon/SQL-scripts +sonar.links.issue=https://github.com/HariSekhon/SQL-scripts/issues +sonar.links.ci=https://github.com/HariSekhon/SQL-scripts/actions + +# directories to scan (defaults to sonar-project.properties dir otherwise) +sonar.sources=. + +#sonar.language=py + +sonar.sourceEncoding=UTF-8 + +#sonar.exclusions=**/tests/** +#sonar.exclusions=**/zookeeper-*/**/* From a86f2b7a26ea0e4d74c0d43c6bee66490c9b7fb1 Mon Sep 17 00:00:00 2001 From: Hari Sekhon Date: Wed, 26 Feb 2025 00:25:55 +0700 Subject: [PATCH 02/16] added sonarcloud.yaml --- .github/workflows/sonarcloud.yaml | 48 +++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .github/workflows/sonarcloud.yaml diff --git a/.github/workflows/sonarcloud.yaml b/.github/workflows/sonarcloud.yaml new file mode 100644 index 0000000..15cc547 --- /dev/null +++ b/.github/workflows/sonarcloud.yaml @@ -0,0 +1,48 @@ +# +# Author: Hari Sekhon +# Date: 2023-04-14 23:53:43 +0100 (Fri, 14 Apr 2023) +# +# vim:ts=2:sts=2:sw=2:et +# +# https://github.com/HariSekhon/SQL-scripts +# +# If you're using my code you're welcome to connect with me on LinkedIn and optionally send me feedback +# +# https://www.linkedin.com/in/HariSekhon +# + +# ============================================================================ # +# S o n a r C l o u d +# ============================================================================ # + +--- +name: SonarCloud + +on: # yamllint disable-line rule:truthy + push: + branches: + - master + - main + paths-ignore: + - '**/*.md' + pull_request: + branches: + - master + - main + paths-ignore: + - '**/*.md' + workflow_dispatch: + +permissions: + contents: read + pull-requests: read + +jobs: + SonarCloud: + # github.event.repository context not available in scheduled workflows + #if: github.event.repository.fork == false + if: github.repository_owner == 'HariSekhon' + name: SonarCloud + uses: HariSekhon/GitHub-Actions/.github/workflows/sonarcloud.yaml@master + secrets: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} From 4cc55462add7db10c7dfaf471b0be0566dedde5a Mon Sep 17 00:00:00 2001 From: Hari Sekhon Date: Wed, 26 Feb 2025 00:26:06 +0700 Subject: [PATCH 03/16] updated codeowners.yaml --- .github/workflows/codeowners.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/codeowners.yaml b/.github/workflows/codeowners.yaml index e4b6f60..071710d 100644 --- a/.github/workflows/codeowners.yaml +++ b/.github/workflows/codeowners.yaml @@ -46,7 +46,7 @@ permissions: contents: read concurrency: - group: ${{ github.ref }}-${{ github.workflow }} + group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: From 1328b9227f59dcf85b7a6efd757245ecb91cf53e Mon Sep 17 00:00:00 2001 From: Hari Sekhon Date: Wed, 26 Feb 2025 00:26:07 +0700 Subject: [PATCH 04/16] updated fork-sync.yaml --- .github/workflows/fork-sync.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/fork-sync.yaml b/.github/workflows/fork-sync.yaml index bc0f6d9..572275c 100644 --- a/.github/workflows/fork-sync.yaml +++ b/.github/workflows/fork-sync.yaml @@ -34,7 +34,7 @@ permissions: contents: write concurrency: - group: ${{ github.ref }}-${{ github.workflow }} + group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: false jobs: From f38a1b687c4e592cf61de9aff047e89bc1caf543 Mon Sep 17 00:00:00 2001 From: Hari Sekhon Date: Wed, 26 Feb 2025 00:26:08 +0700 Subject: [PATCH 05/16] updated fork-update-pr.yaml --- .github/workflows/fork-update-pr.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/fork-update-pr.yaml b/.github/workflows/fork-update-pr.yaml index 1f25904..ca2c7e6 100644 --- a/.github/workflows/fork-update-pr.yaml +++ b/.github/workflows/fork-update-pr.yaml @@ -37,7 +37,7 @@ permissions: pull-requests: write concurrency: - group: ${{ github.ref }}-${{ github.workflow }} + group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: false jobs: From d6a9e1d0a3dba38a9fc32324455773a1bc7bea66 Mon Sep 17 00:00:00 2001 From: Hari Sekhon Date: Wed, 26 Feb 2025 00:26:08 +0700 Subject: [PATCH 06/16] updated grype.yaml --- .github/workflows/grype.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/grype.yaml b/.github/workflows/grype.yaml index 928e5c6..1447493 100644 --- a/.github/workflows/grype.yaml +++ b/.github/workflows/grype.yaml @@ -46,7 +46,7 @@ permissions: security-events: write concurrency: - group: ${{ github.ref }}-${{ github.workflow }} + group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: From 4225ceaa42cbbb0064076f9a2bce034ca9c4a3b6 Mon Sep 17 00:00:00 2001 From: Hari Sekhon Date: Wed, 26 Feb 2025 00:26:08 +0700 Subject: [PATCH 07/16] updated kics.yaml --- .github/workflows/kics.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/kics.yaml b/.github/workflows/kics.yaml index 8e8adab..c3d629c 100644 --- a/.github/workflows/kics.yaml +++ b/.github/workflows/kics.yaml @@ -46,7 +46,7 @@ permissions: security-events: write concurrency: - group: ${{ github.ref }}-${{ github.workflow }} + group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: From f412635311fc0b1929aaceeb8028d89b62506140 Mon Sep 17 00:00:00 2001 From: Hari Sekhon Date: Wed, 26 Feb 2025 00:26:09 +0700 Subject: [PATCH 08/16] updated semgrep-cloud.yaml --- .github/workflows/semgrep-cloud.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/semgrep-cloud.yaml b/.github/workflows/semgrep-cloud.yaml index 1aeaee0..d3508c9 100644 --- a/.github/workflows/semgrep-cloud.yaml +++ b/.github/workflows/semgrep-cloud.yaml @@ -46,7 +46,7 @@ permissions: contents: read concurrency: - group: ${{ github.ref }}-${{ github.workflow }} + group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: From 825e93fa8929cb4230b661b428651a8b465d92d6 Mon Sep 17 00:00:00 2001 From: Hari Sekhon Date: Wed, 26 Feb 2025 00:26:09 +0700 Subject: [PATCH 09/16] updated semgrep.yaml --- .github/workflows/semgrep.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/semgrep.yaml b/.github/workflows/semgrep.yaml index 1d4c5b8..3005ed1 100644 --- a/.github/workflows/semgrep.yaml +++ b/.github/workflows/semgrep.yaml @@ -50,7 +50,7 @@ permissions: security-events: write concurrency: - group: ${{ github.ref }}-${{ github.workflow }} + group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: From b1d193c958d2ee94d39eaf423a436e2ea953e69f Mon Sep 17 00:00:00 2001 From: Hari Sekhon Date: Wed, 26 Feb 2025 00:26:09 +0700 Subject: [PATCH 10/16] updated shellcheck.yaml --- .github/workflows/shellcheck.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/shellcheck.yaml b/.github/workflows/shellcheck.yaml index ded227e..642f533 100644 --- a/.github/workflows/shellcheck.yaml +++ b/.github/workflows/shellcheck.yaml @@ -46,7 +46,7 @@ permissions: contents: read concurrency: - group: ${{ github.ref }}-${{ github.workflow }} + group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: From 3a07ca9312f289ad5f3c7c61103a628c884235a3 Mon Sep 17 00:00:00 2001 From: Hari Sekhon Date: Wed, 26 Feb 2025 00:26:10 +0700 Subject: [PATCH 11/16] updated trivy.yaml --- .github/workflows/trivy.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/trivy.yaml b/.github/workflows/trivy.yaml index cc039d7..74a08f6 100644 --- a/.github/workflows/trivy.yaml +++ b/.github/workflows/trivy.yaml @@ -48,7 +48,7 @@ permissions: security-events: write concurrency: - group: ${{ github.ref }}-${{ github.workflow }} + group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: From 1642c30becf5fd350de48a22da8ceeca9176c33f Mon Sep 17 00:00:00 2001 From: Hari Sekhon Date: Wed, 26 Feb 2025 00:26:10 +0700 Subject: [PATCH 12/16] updated validate.yaml --- .github/workflows/validate.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/validate.yaml b/.github/workflows/validate.yaml index bec0a3c..2122c48 100644 --- a/.github/workflows/validate.yaml +++ b/.github/workflows/validate.yaml @@ -46,7 +46,7 @@ permissions: contents: read concurrency: - group: ${{ github.ref }}-${{ github.workflow }} + group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: From 024a2886efc9b6a9671b4b8dd58a3621508877be Mon Sep 17 00:00:00 2001 From: Hari Sekhon Date: Wed, 26 Feb 2025 00:26:10 +0700 Subject: [PATCH 13/16] updated yaml.yaml --- .github/workflows/yaml.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/yaml.yaml b/.github/workflows/yaml.yaml index 8d990a7..4a1b8f8 100644 --- a/.github/workflows/yaml.yaml +++ b/.github/workflows/yaml.yaml @@ -50,7 +50,7 @@ permissions: contents: read concurrency: - group: ${{ github.ref }}-${{ github.workflow }} + group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: From ee8ff3f301d6250b1b6fe3a93807d63d329f41bd Mon Sep 17 00:00:00 2001 From: Hari Sekhon Date: Wed, 26 Feb 2025 19:11:22 +0700 Subject: [PATCH 14/16] added connectedMode.json --- .sonarlint/connectedMode.json | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 .sonarlint/connectedMode.json diff --git a/.sonarlint/connectedMode.json b/.sonarlint/connectedMode.json new file mode 100644 index 0000000..47f535c --- /dev/null +++ b/.sonarlint/connectedMode.json @@ -0,0 +1,4 @@ +{ + "sonarCloudOrganization": "harisekhon", + "projectKey": "HariSekhon_SQL-scripts" +} From 08310861449a9fea7d04b00cee84b1f5718c3122 Mon Sep 17 00:00:00 2001 From: Hari Sekhon Date: Sat, 1 Mar 2025 00:06:06 +0700 Subject: [PATCH 15/16] updated README.md --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index bf3f241..955f313 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,14 @@ [![AWS Aurora](https://img.shields.io/badge/SQL-AWS%20Aurora-232F3E?logo=amazonwebservices)](https://aws.amazon.com/aurora/) [![Google BigQuery](https://img.shields.io/badge/SQL-Google%20BigQuery-4285F4?logo=google%20cloud&logoColor=white)](https://cloud.google.com/bigquery) +[![Codacy](https://app.codacy.com/project/badge/Grade/c7ac78789d854b12aa3d23f36953f7e7)](https://www.codacy.com/gh/HariSekhon/SQL-scripts/dashboard) +[![CodeFactor](https://www.codefactor.io/repository/github/harisekhon/SQL-scripts/badge)](https://www.codefactor.io/repository/github/harisekhon/SQL-scripts) +[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=HariSekhon_SQL-scripts&metric=alert_status)](https://sonarcloud.io/dashboard?id=HariSekhon_SQL-scripts) +[![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=HariSekhon_SQL-scripts&metric=sqale_rating)](https://sonarcloud.io/dashboard?id=HariSekhon_SQL-scripts) +[![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=HariSekhon_SQL-scripts&metric=reliability_rating)](https://sonarcloud.io/dashboard?id=HariSekhon_SQL-scripts) +[![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=HariSekhon_SQL-scripts&metric=security_rating)](https://sonarcloud.io/dashboard?id=HariSekhon_SQL-scripts) +[![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=HariSekhon_SQL-scripts&metric=vulnerabilities)](https://sonarcloud.io/summary/new_code?id=HariSekhon_SQL-scripts) + [![CI Builds Overview](https://img.shields.io/badge/CI%20Builds-Overview%20Page-blue?logo=circleci)](https://bitbucket.org/HariSekhon/devops-bash-tools/src/master/STATUS.md) [![ShellCheck](https://github.com/HariSekhon/SQL-scripts/actions/workflows/shellcheck.yaml/badge.svg)](https://github.com/HariSekhon/SQL-scripts/actions/workflows/shellcheck.yaml) [![YAML](https://github.com/HariSekhon/SQL-scripts/actions/workflows/yaml.yaml/badge.svg)](https://github.com/HariSekhon/SQL-scripts/actions/workflows/yaml.yaml) From d91e9dac89d562db337caab195b514882e3253fa Mon Sep 17 00:00:00 2001 From: Hari Sekhon Date: Thu, 6 Nov 2025 23:18:20 +0200 Subject: [PATCH 16/16] updated README.md --- README.md | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 955f313..c5660d4 100644 --- a/README.md +++ b/README.md @@ -190,24 +190,35 @@ Does nothing: [![Readme Card](https://github-readme-stats.vercel.app/api/pin/?username=HariSekhon&repo=GitHub-Actions&theme=ambient_gradient&description_lines_count=3)](https://github.com/HariSekhon/GitHub-Actions) [![Readme Card](https://github-readme-stats.vercel.app/api/pin/?username=HariSekhon&repo=Jenkins&theme=ambient_gradient&description_lines_count=3)](https://github.com/HariSekhon/Jenkins) -### DBA - SQL +### Databases - DBA - SQL [![Readme Card](https://github-readme-stats.vercel.app/api/pin/?username=HariSekhon&repo=SQL-scripts&theme=ambient_gradient&description_lines_count=3)](https://github.com/HariSekhon/SQL-scripts) ### DevOps Reloaded -[![Readme Card](https://github-readme-stats.vercel.app/api/pin/?username=HariSekhon&repo=Nagios-Plugins&theme=ambient_gradient&description_lines_count=3)](https://github.com/HariSekhon/Nagios-Plugins) [![Readme Card](https://github-readme-stats.vercel.app/api/pin/?username=HariSekhon&repo=HAProxy-configs&theme=ambient_gradient&description_lines_count=3)](https://github.com/HariSekhon/HAProxy-configs) [![Readme Card](https://github-readme-stats.vercel.app/api/pin/?username=HariSekhon&repo=Terraform&theme=ambient_gradient&description_lines_count=3)](https://github.com/HariSekhon/Terraform) -[![Readme Card](https://github-readme-stats.vercel.app/api/pin/?username=HariSekhon&repo=Packer-templates&theme=ambient_gradient&description_lines_count=3)](https://github.com/HariSekhon/Packer-templates) +[![Readme Card](https://github-readme-stats.vercel.app/api/pin/?username=HariSekhon&repo=Packer&theme=ambient_gradient&description_lines_count=3)](https://github.com/HariSekhon/Packer) +[![Readme Card](https://github-readme-stats.vercel.app/api/pin/?username=HariSekhon&repo=Ansible&theme=ambient_gradient&description_lines_count=3)](https://github.com/HariSekhon/Ansible) +[![Readme Card](https://github-readme-stats.vercel.app/api/pin/?username=HariSekhon&repo=Environments&theme=ambient_gradient&description_lines_count=3)](https://github.com/HariSekhon/Environments) + +### Monitoring + +[![Readme Card](https://github-readme-stats.vercel.app/api/pin/?username=HariSekhon&repo=Nagios-Plugins&theme=ambient_gradient&description_lines_count=3)](https://github.com/HariSekhon/Nagios-Plugins) [![Readme Card](https://github-readme-stats.vercel.app/api/pin/?username=HariSekhon&repo=Nagios-Plugin-Kafka&theme=ambient_gradient&description_lines_count=3)](https://github.com/HariSekhon/Nagios-Plugin-Kafka) +[![Readme Card](https://github-readme-stats.vercel.app/api/pin/?username=HariSekhon&repo=Prometheus&theme=ambient_gradient&description_lines_count=3)](https://github.com/HariSekhon/Prometheus) ### Templates [![Readme Card](https://github-readme-stats.vercel.app/api/pin/?username=HariSekhon&repo=Templates&theme=ambient_gradient&description_lines_count=3)](https://github.com/HariSekhon/Templates) [![Readme Card](https://github-readme-stats.vercel.app/api/pin/?username=HariSekhon&repo=Template-repo&theme=ambient_gradient&description_lines_count=3)](https://github.com/HariSekhon/Template-repo) -### Misc +### Desktop + +[![Readme Card](https://github-readme-stats.vercel.app/api/pin/?username=HariSekhon&repo=TamperMonkey&theme=ambient_gradient&description_lines_count=3)](https://github.com/HariSekhon/TamperMonkey) +[![Readme Card](https://github-readme-stats.vercel.app/api/pin/?username=HariSekhon&repo=Hammerspoon&theme=ambient_gradient&description_lines_count=3)](https://github.com/HariSekhon/Hammerspoon) + +### Spotify [![Readme Card](https://github-readme-stats.vercel.app/api/pin/?username=HariSekhon&repo=Spotify-tools&theme=ambient_gradient&description_lines_count=3)](https://github.com/HariSekhon/Spotify-tools) [![Readme Card](https://github-readme-stats.vercel.app/api/pin/?username=HariSekhon&repo=Spotify-playlists&theme=ambient_gradient&description_lines_count=3)](https://github.com/HariSekhon/Spotify-playlists) @@ -217,7 +228,4 @@ The rest of my original source repos are Pre-built Docker images are available on my [DockerHub](https://hub.docker.com/u/harisekhon/). - -![](https://hit.yhype.me/github/profile?user_id=2211051) -