CI: Separate docker build and test steps #101

Manually merged
jabber.developer merged 1 commits from ci/separate-build-step into master 2026-03-05 17:36:22 +00:00
Collaborator

Title: CI: Separate docker build and test steps

Description:
This PR separates the docker build and docker run commands into distinct steps in the GitHub Actions workflow.

Previously, docker build and the test execution were combined in a single step, which often cluttered the logs with build output, making it harder to spot test failures. By separating them, the CI output becomes cleaner and it is easier to distinguish between build failures and test failures.

Changes:

  • Split "Run tests" step in Linux job into "Build" and "Run tests".
  • Split "Build and run coverage" step in Code Coverage job into "Build" and "Run coverage".
**Title:** CI: Separate docker build and test steps **Description:** This PR separates the `docker build` and `docker run` commands into distinct steps in the GitHub Actions workflow. Previously, `docker build` and the test execution were combined in a single step, which often cluttered the logs with build output, making it harder to spot test failures. By separating them, the CI output becomes cleaner and it is easier to distinguish between build failures and test failures. **Changes:** - Split "Run tests" step in `Linux` job into "Build" and "Run tests". - Split "Build and run coverage" step in `Code Coverage` job into "Build" and "Run coverage".
jabber.developer2 added 4 commits 2026-03-04 19:54:49 +00:00
fix: CWE-134 format string vulnerability audit
All checks were successful
CI Code / Check spelling (pull_request) Successful in 21s
CI Code / Check coding style (pull_request) Successful in 38s
CI Code / Linux (ubuntu) (pull_request) Successful in 6m25s
CI Code / Linux (debian) (pull_request) Successful in 9m11s
CI Code / Code Coverage (pull_request) Successful in 9m13s
CI Code / Linux (arch) (pull_request) Successful in 11m27s
92953099e1
Security:
- Fix CWE-134 in iq.c: user-controlled string passed as format arg

Annotations:
- Add G_GNUC_PRINTF to variadic functions in ui.h and log.h

Compiler flags (configure.ac):
- Add -Wformat -Wformat-nonliteral -Wno-format-zero-length

Format mismatch fixes:
- chatwin.c: Jid* instead of char* for %s
- connection.c: %x -> %lx for long flags
- cmd_funcs.c: %d -> %zu for MB_CUR_MAX/MB_LEN_MAX (size_t)
- cmd_funcs.c: cast gpointer to (char*) for %s
- cmd_defs.c: %d -> %u for g_list_length() (guint)
- iq.c: from_jid->barejid -> from_jid->fulljid
- console.c, mucwin.c, privwin.c, account.c, omemo.c, presence.c:
  gpointer -> (char*) casts for %s

Bug fixes:
- api.c: broken log_warning() calls with extra format arg
- cmd_funcs.c: remove unused arg from cons_show()

Tooling:
- Expand check-cwe134.sh detection patterns
configure.ac:
- Replace basic -Wformat/-Wformat-nonliteral with -Wformat=2
- Add -Wextra, -Wnull-dereference, -Wpointer-arith, -Wimplicit-function-declaration
- Add -fstack-protector-strong, -fno-common, -D_FORTIFY_SOURCE=2
- Add GCC-specific flags via AC_COMPILE_IFELSE: -Wlogical-op, -Wduplicated-cond,
  -Wduplicated-branches, -Wstringop-overflow
- Add linker hardening via AC_LINK_IFELSE: -Wl,-z,relro -Wl,-z,now
- Suppress noisy -Wextra sub-warnings: -Wno-unused-parameter,
  -Wno-missing-field-initializers, -Wno-sign-compare, -Wno-cast-function-type
- Remove AM_CFLAGS/CFLAGS duplication line

check-cwe134.sh:
- Reduce from 5 checks to 2 (checks 1-3 are now redundant with -Wformat=2)
- Check 1: verify known wrappers have G_GNUC_PRINTF attribute
- Check 2: auto-detect unannotated variadic printf-like functions

Bug fixes found by -Wduplicated-branches:
- chatlog.c: non-MUCPM redact path passed resourcepart instead of NULL
- rosterwin.c: two instances of if/else with identical branches in roster count
- omemo.c: redundant else-if branch in omemo_automatic_start

Other fixes for new warnings:
- console.c: pointer compared to integer 0 instead of NULL (2 instances)
- vcard.c: NULL guard for filename before g_file_set_contents
- files.c: refactor to early return, eliminating NULL logfile path
- database.c: const-correctness for type, query, sort variables
- form.c/xmpp.h: const-correctness for form_set_value parameter
- muc.c/muc.h: remove meaningless top-level const on return type
- common.c: const-correctness for URL string literal
- xmpp/omemo.c: scope block for declarations after goto, move from decl
  before goto, replace goto with direct return
- http_common.h: add G_GNUC_PRINTF attributes for http_print_transfer*
- test_common.c: add currb NULL check to silence -Wnull-dereference
Add low-impact warning flags, fix warnings found by new flags
All checks were successful
CI Code / Check spelling (pull_request) Successful in 16s
CI Code / Check coding style (pull_request) Successful in 33s
CI Code / Code Coverage (pull_request) Successful in 4m48s
CI Code / Linux (ubuntu) (pull_request) Successful in 6m20s
CI Code / Linux (debian) (pull_request) Successful in 6m22s
CI Code / Linux (arch) (pull_request) Successful in 11m47s
4ef3bc8e46
Add compiler flags: -Wundef, -Wfloat-equal, -Wredundant-decls, -Walloc-zero.

Fix -Wredundant-decls warnings:
- Remove stale cons_show_desktop_prefs declaration (ui.h)
- Remove duplicate connection_set_priority prototype (connection.h)
- Remove stale omemo_devicelist_configure_and_request declaration (omemo.h)

Fix potential buffer overflow in stanza.c:
- Increase pri_str and idle_str buffers from 10 to 12 bytes
  (INT_MIN = -2147483648 needs 12 bytes including NUL)
CI: Separate build and test steps
All checks were successful
CI Code / Check spelling (pull_request) Successful in 18s
CI Code / Check coding style (pull_request) Successful in 36s
CI Code / Code Coverage (pull_request) Successful in 5m3s
CI Code / Linux (ubuntu) (pull_request) Successful in 6m35s
CI Code / Linux (debian) (pull_request) Successful in 6m39s
CI Code / Linux (arch) (pull_request) Successful in 6m59s
2ebf13b090
jabber.developer2 force-pushed ci/separate-build-step from 2ebf13b090 to 5601dfa2d4 2026-03-04 19:56:53 +00:00 Compare
jabber.developer2 force-pushed ci/separate-build-step from 5601dfa2d4 to d4254db814 2026-03-04 20:05:01 +00:00 Compare
jabber.developer approved these changes 2026-03-05 17:35:38 +00:00
jabber.developer left a comment
Owner

The change improves observability, which is always nice to see. I don't see any issues with it, so it's getting merged ASAP.

The change improves observability, which is always nice to see. I don't see any issues with it, so it's getting merged ASAP.
jabber.developer manually merged commit 1508f27e73 into master 2026-03-05 17:36:22 +00:00
Sign in to join this conversation.
No description provided.