Skip to content

Instantly share code, notes, and snippets.

@tyage
Last active January 12, 2023 08:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tyage/ccfab4afb68e3275bb1ac830973d4143 to your computer and use it in GitHub Desktop.
Save tyage/ccfab4afb68e3275bb1ac830973d4143 to your computer and use it in GitHub Desktop.
Automatically analyze generated codeql db
REPO=$1
REPO_DIR=repos/$REPO/
rm -rf $REPO_DIR
mkdir -p $REPO_DIR
cd $REPO_DIR
git clone --depth 1 "https://github.com/$REPO"
curl "https://api.github.com/repos/$REPO/code-scanning/codeql/databases/javascript" -H "accept: application/zip" -L -o codeqldb.zip
unzip -q codeqldb.zip
codeql database analyze ./javascript codeql/javascript-queries --format=sarif-latest --output=codeql.sarif --download
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment