Files
Thomas Vincent 154ca92a8f ci(1.2): harden checkouts and propagate scanner failures (#666)
This change makes the Spine 1.2 CI workflow handle credentials and
failures more carefully. It disables persisted checkout credentials,
sets timeouts, pins the scanner’s dependencies and propagates failures
through reporting pipelines. This makes failed builds or scans visible
while retaining the existing compiler matrix.

## Implementation details

On 1.2.x, CI persists checkout credentials and flawfinder failures can
be hidden by the reporting pipe. Disable persisted credentials, set job
timeouts, hash-lock the existing flawfinder version, and enable strict
Bash error propagation. Preserve the existing GCC/Clang matrix and
Action versions.

Validation: full actionlint passes. GitHub build/scanner checks must
complete before merge.

## Revision and checks

Description scope: target `1.2.x`, 3 changed files, head
[`290573466`](https://github.com/Cacti/spine/commit/290573466caec59242edad1149c6bb874a86eb51).
Checked 2026-10-23 03:06:04 UTC.

GitHub check snapshot: 5 passed. Local test figures and earlier CI runs
above are recorded evidence for their stated revisions and environments;
they do not assert that every check passes at this head.

---------

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
2026-10-24 05:14:15 -04:00

81 lines
2.1 KiB
YAML

name: CI
on:
push:
branches: [1.2.x]
pull_request:
branches: [1.2.x, 'fix/*-1.2']
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
compiler: [gcc, clang]
env:
CC: ${{ matrix.compiler }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
persist-credentials: false
- name: Install build dependencies
run: |
set -euo pipefail
sudo apt-get update
sudo apt-get install -y \
libmysqlclient-dev \
libsnmp-dev libssl-dev build-essential \
help2man autoconf automake libtool dos2unix
- name: Prepare for Spine Build
run: |
set -euo pipefail
./bootstrap
./configure --enable-warnings
- name: Build Spine
run: |
set -euo pipefail
make -j"$(nproc)"
flawfinder:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
persist-credentials: false
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065
with:
python-version: "3.x"
- name: Install flawfinder
run: |
python3 -m pip install --require-hashes --only-binary=:all: -r .github/flawfinder-requirements.txt
# Note: flawfinder will light up like a christmas tree on this codebase.
# error-level=5 means only critical hits fail the build — the rest is
# informational so we have a baseline to chip away at.
- name: Run flawfinder
run: |
set -euo pipefail
flawfinder \
--minlevel=3 \
--error-level=5 \
--columns \
--context \
. | tee flawfinder-report.txt
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
if: always()
with:
name: flawfinder-report
path: flawfinder-report.txt