v4/go-gate: follow local callback aliases at store-implementation cal… #227
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Security | |
| on: | |
| push: | |
| branches: [master] | |
| pull_request: | |
| branches: [master] | |
| schedule: | |
| - cron: '23 3 * * 2' | |
| workflow_dispatch: | |
| permissions: {} | |
| jobs: | |
| sanitizers: | |
| name: Sanitizers | |
| runs-on: ubuntu-24.04 | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 | |
| - name: Install test dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y --no-install-recommends \ | |
| autoconf \ | |
| automake \ | |
| build-essential \ | |
| clang \ | |
| libtool \ | |
| make \ | |
| pkg-config | |
| - name: Run sanitizer suite | |
| run: | | |
| ./autogen.sh | |
| ./configure --disable-man | |
| make -j"$(nproc)" | |
| make check-sanitizers | |
| coverage: | |
| name: Coverage | |
| runs-on: ubuntu-24.04 | |
| permissions: | |
| contents: read | |
| env: | |
| CODACY_API_TOKEN: ${{ secrets.CODACY_API_TOKEN }} | |
| CODACY_ORGANIZATION_PROVIDER: gh | |
| CODACY_USERNAME: firehol | |
| CODACY_PROJECT_NAME: iprange | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 | |
| - name: Install coverage dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y --no-install-recommends \ | |
| autoconf \ | |
| automake \ | |
| build-essential \ | |
| lcov \ | |
| libtool \ | |
| make \ | |
| pkg-config | |
| - name: Generate LCOV report | |
| run: | | |
| ./autogen.sh | |
| CFLAGS='-O0 -g --coverage' LDFLAGS='--coverage' ./configure --disable-man | |
| make -j"$(nproc)" | |
| IPRANGE_BIN="$PWD/iprange" ./run-tests.sh | |
| BUILD_DIR="$PWD" TEST_CFLAGS='-O0 -g --coverage' TEST_LDFLAGS='--coverage' ./run-unit-tests.sh | |
| lcov --capture --directory . --output-file coverage.info --ignore-errors mismatch,gcov,inconsistent | |
| lcov --remove coverage.info '/usr/*' '*/tests.unit/*' --output-file coverage.filtered.info --ignore-errors inconsistent,corrupt,unused | |
| mv coverage.filtered.info coverage.info | |
| lcov --summary coverage.info --ignore-errors inconsistent,corrupt | |
| - name: Upload coverage artifact | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a | |
| with: | |
| name: coverage-lcov | |
| path: coverage.info | |
| retention-days: 14 | |
| - name: Upload coverage to Codacy | |
| if: env.CODACY_API_TOKEN != '' | |
| run: | | |
| curl -fsSLO https://artifacts.codacy.com/bin/codacy-coverage-reporter/14.1.3/codacy-coverage-reporter-linux | |
| curl -fsSLO https://github.com/codacy/codacy-coverage-reporter/releases/download/14.1.3/codacy-coverage-reporter-linux.SHA512SUM | |
| sha512sum -c codacy-coverage-reporter-linux.SHA512SUM | |
| chmod +x codacy-coverage-reporter-linux | |
| ./codacy-coverage-reporter-linux report \ | |
| --api-token "$CODACY_API_TOKEN" \ | |
| --organization-provider "$CODACY_ORGANIZATION_PROVIDER" \ | |
| --username "$CODACY_USERNAME" \ | |
| --project-name "$CODACY_PROJECT_NAME" \ | |
| -r coverage.info | |
| static-analysis: | |
| name: Static analysis ratchet | |
| runs-on: ubuntu-24.04 | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 | |
| - name: Install static analysis dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y --no-install-recommends \ | |
| cppcheck \ | |
| flawfinder | |
| - name: Run cppcheck | |
| run: | | |
| cppcheck \ | |
| --enable=warning,performance,portability \ | |
| --error-exitcode=1 \ | |
| --inline-suppr \ | |
| --suppress=missingIncludeSystem \ | |
| --suppress=resourceLeak:src/ipset_load.c \ | |
| --suppress=resourceLeak:src/ipset6_load.c \ | |
| '-DVERSION="ci"' \ | |
| src 2> cppcheck.log | |
| - name: Run flawfinder | |
| run: | | |
| flawfinder \ | |
| --minlevel=4 \ | |
| --error-level=4 \ | |
| --dataonly \ | |
| --quiet \ | |
| src > flawfinder.log | |
| - name: Upload static analysis artifacts | |
| if: always() | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a | |
| with: | |
| name: static-analysis | |
| path: | | |
| cppcheck.log | |
| flawfinder.log | |
| retention-days: 14 |