WIP: debug missing field propagation for automationDetails.id

Create SARIF files with and without automationDetails.id for examination.
This commit is contained in:
Michael Hohn
2023-07-11 10:45:15 -07:00
committed by =Michael Hohn
parent 606912c8c3
commit 62ec56948e
4 changed files with 233 additions and 0 deletions

40
scripts/grab.sh Normal file
View File

@@ -0,0 +1,40 @@
# Reference urls:
# https://github.com/github/codeql-cli-binaries/releases/download/v2.8.0/codeql-linux64.zip
# https://github.com/github/codeql/archive/refs/tags/codeql-cli/v2.8.0.zip
#
# grab -- retrieve and extract codeql cli and library
# Usage: grab version url prefix
grab() {
version=$1; shift
platform=$1; shift
prefix=$1; shift
mkdir -p $prefix/codeql-$version &&
cd $prefix/codeql-$version || return
# Get cli
wget "https://github.com/github/codeql-cli-binaries/releases/download/$version/codeql-$platform.zip"
# Get lib
wget "https://github.com/github/codeql/archive/refs/tags/codeql-cli/$version.zip"
# Fix attributes
if [ `uname` = Darwin ] ; then
xattr -c *.zip
fi
# Extract
unzip -q codeql-$platform.zip
unzip -q $version.zip
# Rename library directory for VS Code
mv codeql-codeql-cli-$version/ ql
# remove archives?
# rm codeql-$platform.zip
# rm $version.zip
}
# grab v2.7.6 osx64 $HOME/local
# grab v2.8.3 osx64 $HOME/local
# grab v2.8.4 osx64 $HOME/local
# grab v2.6.3 linux64 /opt
# grab v2.6.3 osx64 $HOME/local
# grab v2.4.6 osx64 $HOME/local

View File

@@ -40,3 +40,12 @@ EOF
sarif-aggregate-scans -i1 test-sas-files aggregated.scantables
sarif-pad-aggregate aggregated.scantables aggregated.scantables.padded
)
#* Tests for the automationDetails flag
#** Simple run
# This requires the tool setup, [[file:~/local/sarif-cli/README.md::Tool Setup]]
( cd ../data/codeql-dataflow-sql-injection/ &&
sarif-extract-scans-runner - > /dev/null <<EOF
sqlidb-0.sarif
EOF
)