Skip to content

ci: add Facebook Infer static analysis workflow#4

Open
agabhin wants to merge 1 commit into
masterfrom
add-infer-ci
Open

ci: add Facebook Infer static analysis workflow#4
agabhin wants to merge 1 commit into
masterfrom
add-infer-ci

Conversation

@agabhin

@agabhin agabhin commented Apr 7, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add .github/workflows/infer.yml running Facebook Infer via compile_commands.json generated by meson/ninja
  • Add --infer mode to install-ubuntu-dependencies.sh that downloads Infer v1.2.0 from GitHub releases
  • Fix %d format specifier for unsigned int fields in example/printcap.c (caught by cppcheck)

Why Infer

Infer's inter-procedural dataflow analysis targets exactly the bug classes that have appeared in libfuse historically:

Bug class Recent examples
NULL dereference CVE-2026-33150, fuse_get_context() null check fix
Use-after-free CVE-2026-33150 (fuse_ring freed then stored)
Memory leaks pthread_setspecific, mountpoint, pipe leaks
Resource leaks fd leak in fuse_daemonize()

Unlike cppcheck/GCC analyzer, Infer tracks values across function call boundaries, which is how most of these bugs manifest.

@agabhin agabhin force-pushed the add-infer-ci branch 6 times, most recently from 8041043 to 4876dff Compare April 8, 2026 17:37
Replace the standalone infer.yml workflow with an infer-codechecker
job in the existing codechecker.yml, consistent with how GCC and
cppcheck analyzers are already integrated.

Changes:
- Add --infer flag to codechecker.sh with run_codechecker_infer()
- Add infer-codechecker job to codechecker.yml
- Simplify install_infer() to only download the binary (build deps
  are provided by --codechecker)
- Remove standalone infer.yml and infer-suppressions.txt

This lets developers reproduce Infer issues locally via:
  ./codechecker.sh --infer --codechecker --build-dir builddir

Signed-off-by: Abhinav Agarwal <abhinavagarwal1996@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants