updates for module system; include a db

This commit is contained in:
Michael Hohn
2025-02-17 17:09:04 -08:00
committed by =Michael Hohn
parent c1b3c8d901
commit f3b703a35f
267 changed files with 56982 additions and 32 deletions

View File

@@ -63,8 +63,8 @@
To get started, build the codeql database (adjust paths to your setup):
#+BEGIN_SRC sh
# Build the db with source commit id.
export PATH=$HOME/local/codeql-v2.9.3/codeql:"$PATH"
SRCDIR=$HOME/local/codeql-dataflow-sql-injection
# export PATH=$HOME/local/vmsync/codeql250:"$PATH"
SRCDIR=$(pwd)
DB=$SRCDIR/cpp-sqli-$(cd $SRCDIR && git rev-parse --short HEAD)
echo $DB
@@ -76,6 +76,7 @@
Then add this database directory to your VS Code =DATABASES= tab.
** Build codeql database in steps
For larger projects, using a single command to build everything is costly when
any part of the build fails.
@@ -184,8 +185,8 @@
#+BEGIN_SRC sh
# The setup information from before
export PATH=$HOME/local/codeql-v2.9.3/codeql:"$PATH"
SRCDIR=$HOME/local/codeql-dataflow-sql-injection
export PATH=$HOME/local/vmsync/codeql250:"$PATH"
SRCDIR=$HOME/local/codeql-training-material.cpp-sqli/cpp/codeql-dataflow-sql-injection
DB=$SRCDIR/cpp-sqli-$(cd $SRCDIR && git rev-parse --short HEAD)
# Check paths
@@ -196,16 +197,16 @@
codeql database analyze -h
# Run a query
codeql database analyze \
-v \
--ram=14000 \
-j12 \
--rerun \
--search-path $HOME/local/codeql-v2.9.3/ql \
--format=sarif-latest \
--output cpp-sqli.sarif \
-- \
$DB \
codeql database analyze \
-v \
--ram=14000 \
-j12 \
--rerun \
--search-path ~/local/vmsync/ql \
--format=sarif-latest \
--output cpp-sqli.sarif \
-- \
$DB \
$SRCDIR/SqlInjection.ql
# Examine the file in an editor