mirror of
https://github.com/Cacti/spine.git
synced 2026-12-02 21:37:07 +09:00
Consecutive SNMP items with the same credentials can target different hostnames or require different timeouts. Include hostname and timeout in the batch key so each endpoint gets its own session. External scripts also read one byte less than the allocated buffer, which makes a full truncated response indistinguishable from a complete value. Read the full capacity once and return U for a full buffer or embedded NUL. Uptimes must be whole unsigned counters. Reject decimal, negative and overflowing responses and check seconds-to-centiseconds conversion before multiplication. Invalid values cannot advance reindex state. Backports the confirmed bugs fixed in #641. Keeps the maintenance branch’s single-read response contract, timeout handling and nonblocking child reaping. Changes poller.c and extends the existing maintenance CI branch filter to stacked fix branches. Release notes are collected in #664. Validation: native build and version smoke test passed through mise. Compiled production hostname comparisons reject the old behavior and pass with the fix. A probe linked to the maintenance production objects passed short output, the maximum terminated value, overflow, embedded NUL and a response whose child keeps stdout open; the last case returned in under 0.5 seconds. The probe substitutes only semaphore boundaries because macOS does not support the legacy unnamed semaphore implementation. No database or live device was contacted. The modified file passed the flawfinder critical gate. Additional validation: the compiled maintenance timeout comparison fails before the fix and passes afterward. Eleven production uptime parser boundary cases pass under ASan/UBSan. The native build and all five existing script-output probes still pass. --------- Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
70 lines
1.7 KiB
YAML
70 lines
1.7 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
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
compiler: [gcc, clang]
|
|
env:
|
|
CC: ${{ matrix.compiler }}
|
|
steps:
|
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
|
|
|
- name: Install build dependencies
|
|
run: |
|
|
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: |
|
|
./bootstrap
|
|
./configure --enable-warnings
|
|
|
|
- name: Build Spine
|
|
run: |
|
|
make -j"$(nproc)"
|
|
|
|
flawfinder:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
|
|
|
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065
|
|
with:
|
|
python-version: "3.x"
|
|
|
|
- name: Install flawfinder
|
|
run: pip install flawfinder==2.0.19
|
|
|
|
# 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: |
|
|
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
|