Updated readme information

This commit is contained in:
Michael Hohn
2024-04-16 18:54:17 -07:00
committed by =Michael Hohn
parent 7e6998f57f
commit 04e366d0a0
2 changed files with 11 additions and 5 deletions

View File

@@ -9,6 +9,7 @@
}
],
"settings": {
"git.ignoreLimitWarning": true
"git.ignoreLimitWarning": true,
"sarif-viewer.connectToGithubCodeScanning": "off"
}
}

View File

@@ -23,11 +23,16 @@
Query results are available in several output formats using the cli. The
following produces the sarif format, a json-based result description.
Requires [[file:~/local/codeql-workshop-sql-injection-java/src/README.org::*Build the codeql database][Build the codeql database]]
#+BEGIN_SRC sh
# The setup information from before
SRCDIR=$HOME/local/codeql-training-material.java-sqli/java/codeql-dataflow-sql-injection
SRCDIR=$HOME/local/codeql-workshop-sql-injection-java
DB=$SRCDIR/java-sqli-$(cd $SRCDIR && git rev-parse --short HEAD)
# The directory containing the query
SESSIONDIR=$(pwd -P)
# Check paths
echo $DB
echo $SRCDIR
@@ -35,18 +40,18 @@
# To see the help
codeql database analyze -h
# Run a query
# Run a query \
codeql database analyze \
-v \
--ram=14000 \
-j12 \
--rerun \
--search-path ~/local/vmsync/ql \
--format=sarif-latest \
--output java-sqli.sarif \
--sarif-include-query-help=always \
-- \
$DB \
$SRCDIR/SqlInjection.ql
$SESSIONDIR/full-query.ql
# Examine the file in an editor
edit java-sqli.sarif