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

chore: Review CodeQL config #4133

Merged
merged 3 commits into from
Jan 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/workflows/static-analysis-codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: "CodeQL"

on:
push:
branches: [ "main" ]
pull_request: {}

jobs:
codeQl:
name: Analyze CodeQL Go
runs-on: ubuntu-latest
container: ghcr.io/kedacore/build-tools:1.19.5
if: (github.actor != 'dependabot[bot]')
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Register workspace path
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: go
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
queries: +security-and-quality

- name: Autobuild
uses: github/codeql-action/autobuild@v2

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: "/language:go"
37 changes: 37 additions & 0 deletions .github/workflows/static-analysis-semgrep.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: "Semgrep"

on:
push:
branches: [ "main" ]
pull_request_target: {}

jobs:
semgrep:
name: Analyze Semgrep
runs-on: ubuntu-latest
container: returntocorp/semgrep
if: (github.actor != 'dependabot[bot]')
steps:
- uses: actions/checkout@v3
- name: Register workspace path
if: ${{ github.event.number > 0 }}
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"

- name: Checkout Pull Request
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
id: checkout
if: ${{ github.event.number > 0 }}
run: |
apk add github-cli
gh pr checkout ${{ github.event.number }}

- run: semgrep ci --sarif --output=semgrep.sarif
env:
SEMGREP_APP_TOKEN: ${{ secrets.SEMGREP_APP_TOKEN }}

- name: Upload SARIF file for GitHub Advanced Security Dashboard
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: semgrep.sarif
if: ${{ github.event.number == '' && !cancelled() }}
83 changes: 0 additions & 83 deletions .github/workflows/static-analysis.yml

This file was deleted.

7 changes: 5 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,13 @@ New deprecation(s):

### Other

- **RabbitMQ Scaler:** Move from `streadway/amqp` to `rabbitmq/amqp091-go` ([#4004](https://github.com/kedacore/keda/pull/4039))
- **General**: Bump Golang to 1.19 ([#4094](https://github.com/kedacore/keda/issues/4094))
- **General:** Compare error with `errors.Is` ([#4004](https://github.com/kedacore/keda/pull/4004))
- **General:** Check that ScaledObject name is specified as part of a query for getting metrics ([#4088](https://github.com/kedacore/keda/pull/4088))
- **General:** Compare error with `errors.Is` ([#4004](https://github.com/kedacore/keda/pull/4004))
- **General:** Review CodeQL rules and enable it on PRs ([#4032](https://github.com/kedacore/keda/pull/4032))
- **RabbitMQ Scaler:** Move from `streadway/amqp` to `rabbitmq/amqp091-go` ([#4004](https://github.com/kedacore/keda/pull/4039))



## v2.9.2

Expand Down