Skip to content

CodeQL

CodeQL #46

Workflow file for this run

# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"
on:
push:
branches: [ "master" ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "master" ]
schedule:
- cron: '43 23 * * 5'
jobs:
analyze:
name: Analyze
# Runner size impacts CodeQL analysis time. To learn more, please see:
# - https://gh.io/recommended-hardware-resources-for-running-codeql
# - https://gh.io/supported-runners-and-hardware-resources
# - https://gh.io/using-larger-runners
# Consider using larger runners for possible analysis time improvements.
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [ 'c-cpp' ]
# CodeQL supports [ 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' ]
# Use only 'java-kotlin' to analyze code written in Java, Kotlin or both
# Use only 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
# Learn more about CodeQL language support at:
# https://aka.ms/codeql-docs/language-support
steps:
- name: Checkout repository
uses: actions/checkout@v4
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# For more details on CodeQL's query packs, refer to:
# https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality
- name: Install dependencies
run: |
if test -x "$(which brew)"; then
brew install make automake autoconf libtool pkg-config gcc libimobiledevice usbmuxd
elif test -x "$(which apt-get)"; then
sudo apt-get update
sudo apt-get install make automake autoconf libtool pkg-config gcc libimobiledevice6 libplist3 libplist-dev libplist-utils libusbmuxd6 libusbmuxd-tools usbmuxd socat libavahi-client-dev shellcheck
fi
- name: Build
# Command-line programs to run using the OS shell.
# See:
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
run: |
echo "Run, Build Application using script"
ls
if test -x "$(which xcodebuild)"; then cd USBFlux && xcodebuild; fi
export NOCONFIGURE=yes && sh ./autogen.sh
./configure --with-static-libplist=no
make
make check
- name: Debug failure
run: |
if test -r config.log; then cat config.log && wc -l config.log; elif test -e config.log; then stat config.log; else ls -AR; fi
echo "looking for libplist.a..."
if test -x "$(which locate)"; then \
echo "attempting to use locate..."; \
(locate libplist.a || locate libplist-2.0.a || echo "locate failed!"); \
elif test -x "$(which mlocate)"; then \
echo "attempting to use mlocate..."; \
(mlocate libplist.a || mlocate libplist-2.0.a || echo "mlocate fail!"); \
elif test -x "$(which plocate)"; then \
echo "attempting to use plocate..."; \
(plocate libplist.a || plocate libplist-2.0.a || echo "plocate fail!"); \
elif test -x "$(which glocate)"; then \
echo "attempting to use glocate..."; \
(glocate libplist.a || glocate libplist-2.0.a || echo "glocate fail!"); \
elif test -x "$(which find)"; then \
echo "attempting to use find..."; \
(find / -name libplist.a || find / -name libplist-2.0.a || echo "not found!"); \
else \
echo "unsure how to find a static libplist!"; \
fi
if: "${{ failure() }}"
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"