-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update runCodeQL scripts and Dockerfile.
- Loading branch information
1 parent
1be8c55
commit 90092cc
Showing
4 changed files
with
20 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# This dockerfile builds a container that pulls down and runs the latest version of Benchmark | ||
# This dockerfile builds a container that pulls down and runs the latest version of BenchmarkJava | ||
FROM ubuntu:latest | ||
MAINTAINER "Dave Wichers [email protected]" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
sourceanalyzer -b benchmark -clean | ||
sourceanalyzer -b benchmark mvn com.fortify.sca.plugins.maven:sca-maven-plugin:translate -Dfortify.sca.source.version=1.7 | ||
sourceanalyzer -b benchmark mvn com.fortify.sca.plugins.maven:sca-maven-plugin:translate -Dfortify.sca.source.version=1.8 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,15 @@ | ||
# This script assumes the owasp-benchmark database has already been initialized by running this first: | ||
# ../../Tools/codeql-home/codeql/codeql database create owasp-benchmark --language=java | ||
../../Tools/codeql-home/codeql/codeql database analyze owasp-benchmark java-code-scanning.qls --format=sarifv2.1.0 --output=results/Benchmark_1.2-codeql_java-code-scanning_qls.sarif | ||
# The following is based on the instructions at: https://docs.github.com/en/code-security/codeql-cli/getting-started-with-the-codeql-cli/setting-up-the-codeql-cli. Follow the instructions at: Setting up the CodeQL CLI | ||
|
||
# Prerequisites: | ||
# 1) Install codeql in a tools/ directory that is a peer to the folder containing BenchmarkJava. For example, if you have a git/ folder, which contains BenchmarkJava, BenchmarkUtils, etc., then the tools/ folder would be at the same level as the git/ folder. i.e., relative to BenchmarkJava, it is at ../../tools/code-ql-home. | ||
# 2) Then the owasp-benchmark database has to be initialized by running this: | ||
# ../../tools/codeql-home/codeql/codeql database create owasp-benchmark --language=java | ||
|
||
# Mac Users: "If you are using macOS on Apple Silicon (for example, Apple M1), ensure that the Xcode command-line developer tools and Rosetta 2 are installed." | ||
## For Xcode command line, run: xcode-select -p 1>/dev/null;echo $? - If this returns 0, its installed, if 2, its not installed. | ||
## For Rosetta 2, run: lsbom -f /Library/Apple/System/Library/Receipts/com.apple.pkg.RosettaUpdateAuto.bom - And if it returns a list of files, it's installed. | ||
|
||
|
||
# This then runs the codeql scan: | ||
../../tools/codeql-home/codeql/codeql database analyze owasp-benchmark java-code-scanning.qls --format=sarifv2.1.0 --output=results/Benchmark_1.2-codeql_java-code-scanning_qls.sarif | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters