mirror of
https://github.com/hohn/codeql-workshop-sql-injection-java.git
synced 2025-12-16 02:33:04 +01:00
Updated readme information
This commit is contained in:
committed by
=Michael Hohn
parent
7e6998f57f
commit
04e366d0a0
@@ -9,6 +9,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"settings": {
|
"settings": {
|
||||||
"git.ignoreLimitWarning": true
|
"git.ignoreLimitWarning": true,
|
||||||
|
"sarif-viewer.connectToGithubCodeScanning": "off"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -23,11 +23,16 @@
|
|||||||
Query results are available in several output formats using the cli. The
|
Query results are available in several output formats using the cli. The
|
||||||
following produces the sarif format, a json-based result description.
|
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
|
#+BEGIN_SRC sh
|
||||||
# The setup information from before
|
# 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)
|
DB=$SRCDIR/java-sqli-$(cd $SRCDIR && git rev-parse --short HEAD)
|
||||||
|
|
||||||
|
# The directory containing the query
|
||||||
|
SESSIONDIR=$(pwd -P)
|
||||||
|
|
||||||
# Check paths
|
# Check paths
|
||||||
echo $DB
|
echo $DB
|
||||||
echo $SRCDIR
|
echo $SRCDIR
|
||||||
@@ -35,18 +40,18 @@
|
|||||||
# To see the help
|
# To see the help
|
||||||
codeql database analyze -h
|
codeql database analyze -h
|
||||||
|
|
||||||
# Run a query
|
# Run a query \
|
||||||
codeql database analyze \
|
codeql database analyze \
|
||||||
-v \
|
-v \
|
||||||
--ram=14000 \
|
--ram=14000 \
|
||||||
-j12 \
|
-j12 \
|
||||||
--rerun \
|
--rerun \
|
||||||
--search-path ~/local/vmsync/ql \
|
|
||||||
--format=sarif-latest \
|
--format=sarif-latest \
|
||||||
--output java-sqli.sarif \
|
--output java-sqli.sarif \
|
||||||
|
--sarif-include-query-help=always \
|
||||||
-- \
|
-- \
|
||||||
$DB \
|
$DB \
|
||||||
$SRCDIR/SqlInjection.ql
|
$SESSIONDIR/full-query.ql
|
||||||
|
|
||||||
# Examine the file in an editor
|
# Examine the file in an editor
|
||||||
edit java-sqli.sarif
|
edit java-sqli.sarif
|
||||||
|
|||||||
Reference in New Issue
Block a user