Skip to content

Commit

Permalink
Problem: outdated CodeQL scanning pipeline (fixes crypto-org-chain#772)…
Browse files Browse the repository at this point in the history
… (crypto-org-chain#773)

Solution:
- updated the GH action pipeline
- removed Nondeterministic.ql
(the more refined version is now contained in the query pack:
https://github.com/crypto-com/cosmos-sdk-codeql/blob/main/src/map-iteration.ql )
  • Loading branch information
tomtau authored and devashishdxt committed Jul 15, 2022
1 parent 09a39fc commit b9c67a0
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 67 deletions.
7 changes: 0 additions & 7 deletions .github/codeql/codeql-config.yml

This file was deleted.

14 changes: 0 additions & 14 deletions .github/codeql/queries/Nondeterministic.ql

This file was deleted.

11 changes: 0 additions & 11 deletions .github/codeql/queries/custom.qls

This file was deleted.

1 change: 0 additions & 1 deletion .github/codeql/queries/qlpack.xml

This file was deleted.

6 changes: 0 additions & 6 deletions .github/codeql/queries/qlpack.yml

This file was deleted.

61 changes: 34 additions & 27 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,14 @@ on:
branches:
- master
- release/**
paths:
- "**.go"
pull_request:
branches:
- master
- release/**
paths:
- "**.go"

jobs:
analyze:
Expand All @@ -36,35 +40,38 @@ jobs:
language: [ 'go' ]

steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Checkout repository
uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.18
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: "go"
queries: +security-and-quality,github/codeql-go/ql/src/experimental/InconsistentCode/DeferInLoop.ql@main,github/codeql-go/ql/src/experimental/Unsafe/WrongUsageOfUnsafe.ql@main,github/codeql-go/ql/src/experimental/CWE-369/DivideByZero.ql@main
packs: +crypto-com/cosmos-sdk-codeql
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
config-file: ./.github/codeql/codeql-config.yml
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
#- run: |
# make bootstrap
# make release

#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
2 changes: 1 addition & 1 deletion third_party/cosmos-sdk
Submodule cosmos-sdk updated 150 files

0 comments on commit b9c67a0

Please sign in to comment.