Files
codeql-c-sqli/info.org
2025-03-04 19:48:28 -08:00

1.5 KiB

mac

build db

cpp-sqli-834ef46/

  SRCDIR=$(pwd)
  DB=$SRCDIR/cpp-sqli-$(cd $SRCDIR && git rev-parse --short HEAD)

  echo $DB
  test -d "$DB" && rm -fR "$DB"
  mkdir -p "$DB"

  cd $SRCDIR && codeql database create --language=cpp -s . -j 8 -v $DB --command='./build.sh'

analyze db

  # Check paths
  echo $DB
  echo $SRCDIR

  # setup
  cd $SRCDIR
  codeql pack install

  # Run the query
  cd $SRCDIR
  codeql database analyze                         \
         -v                                       \
         --ram=14000                              \
         -j12                                     \
         --rerun                                  \
         --format=sarif-latest                    \
         --output cpp-sqli-834ef46.sarif          \
         --                                       \
         $DB                                      \
         $SRCDIR/SqlInjection.ql

hardware

  0:$ uname -a
  Darwin ghm3 23.6.0 Darwin Kernel Version 23.6.0: Thu Dec 19 20:47:16 PST 2024; root:xnu-10063.141.1.703.2~1/RELEASE_ARM64_T6031 arm64

  0:$ sw_vers -productVersion
  14.7.3

  0:$ sysctl -n machdep.cpu.brand_string
  Apple M3 Max

  0:$ sysctl hw.model
  hw.model: Mac15,8

codeql

  0:$ codeql --version
  CodeQL command-line toolchain release 2.20.0.