Created
May 19, 2021 22:04
-
-
Save Moose0621/15760b0412ccd709915db15f3039f453 to your computer and use it in GitHub Desktop.
Simple commands to run CodeQL CLI
This file contains hidden or 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
| #!/usr/bin/env bash | |
| databaseDir=$1 | |
| language=$2 | |
| codeql database create $databaseDir --language $language --source-root . --command='mvn package -DskipTests=true' | |
| codeql database analyze $databaseDir $language-code-scanning.qls --format=sarif-latest --output=output.sarif | |
| codeql github upload-results -r Org/Repo -f refs/heads/BRANCH_NAME_HERE -c PUT_COMMIT_HASH_HERE -s output.sarif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment