3 Commits
Author SHA1 Message Date
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
Thomas Vincent 78f6670597 fix(poller): [1.2.x] validate endpoints timeouts uptimes and script output (#661)
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>
2026-10-14 10:10:38 -04:00
Thomas Vincent b69f1c7c62 ci: run build and flawfinder on 1.2.x (#546)
The 1.2.x branch has no workflows, so PRs targeting it (e.g. #544's
crash/memory-safety fixes) get no build or analysis coverage. `ci.yml`
only exists on develop and only triggers there.

This ports develop's `ci.yml` to 1.2.x unchanged except the branch
filters: gcc + clang build matrix and flawfinder (critical-level gate).
Actions stay SHA-pinned.

Adding this lets #544 and future 1.2.x PRs build under both compilers
before merge.

---------

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
2026-06-24 17:00:13 -07:00