Skip to content

Commit

Permalink
Support warning suppression (#13)
Browse files Browse the repository at this point in the history
* Support warning suppression

* Note requirement to keep codeql/java-queries and CodeQL version in sync

Co-authored-by: Yaroslav Afenkin <yaroslavafenkin@users.noreply.github.com>
Co-authored-by: Daniel Beck <1831569+daniel-beck@users.noreply.github.com>
  • Loading branch information
3 people committed Jan 26, 2023
1 parent 5aba87e commit e2a80c7
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/jenkins-security-scan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
- name: Install CodeQL CLI
uses: jenkins-infra/fetch-codeql-action@v1
with:
version: v2.11.2
version: v2.11.2 # Keep version of codeql/java-queries in sync: https://github.com/github/codeql/blob/main/java/ql/src/CHANGELOG.md
- name: Install jq
run: |
sudo apt-get update
Expand All @@ -54,15 +54,16 @@ jobs:
set -o errexit
set -o nounset
set -o pipefail
codeql pack install "$CODEQL_RULES_DIR/src/"
codeql pack download codeql/java-queries@0.4.2
echo "::group::Create Database"
LGTM_INDEX_XML_MODE=all codeql database create --language=java --source-root="$CHECKOUT_DIR" "$GITHUB_WORKSPACE/database" || { echo "Failed to create database" >&2 ; exit 1 ; }
echo "::endgroup::"
echo "::group::Analyze Database"
codeql database analyze --sarif-add-query-help --format=sarifv2.1.0 --output=output.sarif "$GITHUB_WORKSPACE/database" "$CODEQL_RULES_DIR/src/" || { echo "Failed to analyze database" >&2 ; exit 1 ; }
codeql database analyze --sarif-add-query-help --format=sarifv2.1.0 --output=output.sarif "$GITHUB_WORKSPACE/database" "$CODEQL_RULES_DIR/src/" codeql/java-queries:AlertSuppression.ql codeql/java-queries:AlertSuppressionAnnotations.ql || { echo "Failed to analyze database" >&2 ; exit 1 ; }
echo "::endgroup::"
# Prevent conflicts with otherwise set up CodeQL scan
Expand Down

0 comments on commit e2a80c7

Please sign in to comment.