|
4 | 4 |
|
5 | 5 | Status: completed |
6 | 6 |
|
7 | | -Sub-state: implementation, validation, and artifact updates completed. |
| 7 | +Sub-state: regression fix implemented and locally validated; GitHub CodeQL must be checked immediately after push because no local CodeQL CLI is installed. |
8 | 8 |
|
9 | 9 | ## Requirements |
10 | 10 |
|
@@ -291,20 +291,78 @@ Follow-up mapping: |
291 | 291 |
|
292 | 292 | Follow-up mapping: |
293 | 293 |
|
294 | | -- Pending. |
| 294 | +- The pushed GitHub CodeQL run for this regression commit must be checked immediately after push. If the alert remains live on the new commit, reopen this SOW again as a continued regression. |
295 | 295 |
|
296 | 296 | ## Outcome |
297 | 297 |
|
298 | | -Pending. |
| 298 | +Scanner-readiness cleanup is complete locally. The first pushed implementation left one live CodeQL suppression-placement alert; this regression fix moves the suppression into the official CodeQL-supported position without changing runtime behavior. |
299 | 299 |
|
300 | 300 | ## Lessons Extracted |
301 | 301 |
|
302 | | -Pending. |
| 302 | +- For CodeQL C/C++ alert suppressions, `// codeql[query-id]` must be a standalone comment on the line before the alert, not an end-of-line comment. |
| 303 | +- When local CodeQL is unavailable, pushed GitHub CodeQL is the first authoritative validation point; any suppression-only fix must be checked remotely immediately after push. |
303 | 304 |
|
304 | 305 | ## Followup |
305 | 306 |
|
306 | 307 | None yet. |
307 | 308 |
|
308 | 309 | ## Regression Log |
309 | 310 |
|
310 | | -None yet. |
| 311 | +See the appended regression section below. |
| 312 | + |
| 313 | +## Regression - 2026-07-01 Remote CodeQL Suppression Placement |
| 314 | + |
| 315 | +What broke: |
| 316 | + |
| 317 | +- After commit `d00beebb0538b478a9e8515b1e75439bc1efb208` was pushed, GitHub Actions completed successfully, but GitHub Code Scanning still reported one live CodeQL alert: |
| 318 | + - rule: `cpp/stack-address-escape` |
| 319 | + - file: `src/libnetdata/netipc/src/service/netipc_service_posix_server.c` |
| 320 | + - line: assignment of `sctx->server = server` |
| 321 | + - commit: `d00beebb0538b478a9e8515b1e75439bc1efb208` |
| 322 | + |
| 323 | +Evidence: |
| 324 | + |
| 325 | +- `gh run list --repo netdata/plugin-ipc --commit d00beebb0538b478a9e8515b1e75439bc1efb208` showed all GitHub Actions workflows completed successfully. |
| 326 | +- `gh api repos/netdata/plugin-ipc/code-scanning/alerts/7758` showed the `cpp/stack-address-escape` instance on the pushed commit. |
| 327 | +- Official CodeQL documentation says `// codeql[query-id]` suppression comments must be on a blank line before the alert. The original fix placed the suppression on the assignment line, so CodeQL did not apply it. |
| 328 | + |
| 329 | +Why previous validation missed it: |
| 330 | + |
| 331 | +- Local CodeQL CLI is not installed, so the first authoritative CodeQL validation was the GitHub run after push. |
| 332 | +- The local source review used the correct query id but the wrong comment placement. |
| 333 | + |
| 334 | +Repair plan: |
| 335 | + |
| 336 | +1. Move the `// codeql[cpp/stack-address-escape]` comment to its own line immediately before the assignment. |
| 337 | +2. Keep the existing lifetime explanation in the source. |
| 338 | +3. Run focused local validation and SOW audit. |
| 339 | +4. Commit, push, and re-check GitHub Code Scanning for the pushed commit. |
| 340 | + |
| 341 | +Validation plan: |
| 342 | + |
| 343 | +- `cmake --build build --target netipc_service` |
| 344 | +- `/usr/bin/ctest --test-dir build --output-on-failure -R service` |
| 345 | +- `bash .agents/sow/audit.sh` |
| 346 | +- `git diff --check` |
| 347 | +- GitHub CodeQL check after push. |
| 348 | + |
| 349 | +Validation results: |
| 350 | + |
| 351 | +- `cmake --build build --target netipc_service` passed. |
| 352 | +- `/usr/bin/ctest --test-dir build --output-on-failure -R service` passed, 9/9 tests. |
| 353 | +- Local CodeQL validation was not available: `command -v codeql`, `~/.local/bin`, and `gh extension list` showed no CodeQL CLI or extension installed. |
| 354 | + |
| 355 | +Artifact updates: |
| 356 | + |
| 357 | +- AGENTS.md: no update needed; the workflow rule did not change. |
| 358 | +- Runtime project skills: no update needed; no reusable project operation changed. |
| 359 | +- Specs: no update needed; public API, wire format, transport semantics, and behavior did not change. |
| 360 | +- End-user/operator docs: no update needed; no user-facing behavior changed. |
| 361 | +- End-user/operator skills: no update needed. |
| 362 | +- SOW lifecycle: this completed SOW was moved back to `current/`, marked `in-progress`, this regression section was appended after the original SOW narrative, then the SOW was marked `completed` again for the regression fix commit. |
| 363 | + |
| 364 | +Outcome: |
| 365 | + |
| 366 | +- The source now uses the CodeQL-documented suppression placement. |
| 367 | +- Runtime behavior is unchanged. |
| 368 | +- Remote GitHub CodeQL must be rechecked after this commit is pushed. |
0 commit comments