Skip to content

ci(libscap): Run libscap fuzzer in CI - #3063

Open
tks98 wants to merge 1 commit into
falcosecurity:masterfrom
tks98:fuzz-ci
Open

ci(libscap): Run libscap fuzzer in CI#3063
tks98 wants to merge 1 commit into
falcosecurity:masterfrom
tks98:fuzz-ci

Conversation

@tks98

@tks98 tks98 commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

What type of PR is this?

/kind test

Any specific area of the project related to this PR?

/area libscap
/area tests

Does this PR require a change in the driver versions?

No.

What this PR does / why we need it:

This follows up on #2857 by running the libscap fuzzer using the synthetic corpus only for 15 seconds for simplicity.

The idea would be that a long running fuzz job would be added to oss-fuzz and this would just validate functionality and severe regressions.

I was able to test this CI stage using act locally to try to validate it works as close as I could to actual GitHub actions but can make any changes required once it's actually run here.

act pull_request -j libscap-fuzz-smoke \
  --container-architecture linux/amd64 \
  -P ubuntu-24.04=catthehacker/ubuntu:act-24.04

Does this PR introduce a user-facing change?:

NONE

Generate a targeted synthetic corpus and run the fuzzer in a bounded CI job.

Signed-off-by: tks98 <travis.kenneth.smith@gmail.com>
@poiana

poiana commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

@tks98: The label(s) area/ci cannot be applied, because the repository doesn't have them.

Details

In response to this:

What type of PR is this?

/kind test

Any specific area of the project related to this PR?

/area CI
/area libscap
/area tests

Does this PR require a change in the driver versions?

No.

What this PR does / why we need it:

This follows up on #2857 by running the libscap fuzzer using the synthetic corpus only for 15 seconds for simplicity.

The idea would be that a long running fuzz job would be added to oss-fuzz and this would just validate functionality and severe regressions.

I was able to test this CI stage using act locally to try to validate it works as close as I could to actual GitHub actions but can make any changes required once it's actually run here.

act pull_request -j libscap-fuzz-smoke \
 --container-architecture linux/amd64 \
 -P ubuntu-24.04=catthehacker/ubuntu:act-24.04

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@poiana poiana added the size/M label Jul 21, 2026
@poiana
poiana requested review from hbrueckner and terror96 July 21, 2026 13:58
@poiana

poiana commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: tks98
Once this PR has been reviewed and has the lgtm label, please assign jasondellaluce for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@github-actions

Copy link
Copy Markdown

Perf diff from master - unit tests

    21.41%     -1.15%  [.] std::__shared_ptr<sinsp_threadinfo, (__gnu_cxx::_Lock_policy)2>::__shared_ptr(std::__weak_ptr<sinsp_threadinfo, (__gnu_cxx::_Lock_policy)2> const&, std::nothrow_t)
    10.72%     -0.95%  [.] sinsp_threadinfo::get_main_thread()
     8.38%     +0.76%  [.] std::__shared_count<(__gnu_cxx::_Lock_policy)2>::_M_get_use_count() const
     9.01%     +0.37%  [.] std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_add_ref_lock_nothrow()
    20.67%     +0.34%  [.] sinsp_thread_manager::create_thread_dependencies(std::shared_ptr<sinsp_threadinfo> const&)
     4.30%     +0.30%  [.] thread_group_info::get_first_thread() const
     0.27%     +0.13%  [.] scap_event_encode_params_v
     5.66%     -0.13%  [.] std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count(std::__weak_count<(__gnu_cxx::_Lock_policy)2> const&, std::nothrow_t)
     0.03%     +0.10%  [.] std::shared_ptr<libsinsp::state::dynamic_field_infos> libsinsp::state::dynamic_field_infos::make<sinsp_fdinfo>()
     0.01%     +0.09%  [.] scap_empty_params_set_is_set

Heap diff from master - unit tests

peak heap memory consumption: -8.38K
peak RSS (including heaptrack overhead): 0B
total memory leaked: 0B

Heap diff from master - scap file

peak heap memory consumption: 0B
peak RSS (including heaptrack overhead): 0B
total memory leaked: 0B

Benchmarks diff from master

Comparing gbench_data.json to /root/actions-runner/_work/libs/libs/build/gbench_data.json
Benchmark                                                         Time             CPU      Time Old      Time New       CPU Old       CPU New
----------------------------------------------------------------------------------------------------------------------------------------------
BM_sinsp_split_mean                                            +0.0270         +0.0270           297           305           297           305
BM_sinsp_split_median                                          +0.0284         +0.0287           296           305           296           305
BM_sinsp_split_stddev                                          -0.7576         -0.7399             4             1             4             1
BM_sinsp_split_cv                                              -0.7640         -0.7467             0             0             0             0
BM_sinsp_concatenate_paths_relative_path_mean                  -0.1800         -0.1799            84            69            84            69
BM_sinsp_concatenate_paths_relative_path_median                -0.1833         -0.1830            84            69            84            69
BM_sinsp_concatenate_paths_relative_path_stddev                -0.8800         -0.8840             1             0             1             0
BM_sinsp_concatenate_paths_relative_path_cv                    -0.8537         -0.8586             0             0             0             0
BM_sinsp_concatenate_paths_empty_path_mean                     +0.1098         +0.1099            46            51            46            51
BM_sinsp_concatenate_paths_empty_path_median                   +0.1117         +0.1118            46            51            46            51
BM_sinsp_concatenate_paths_empty_path_stddev                   -0.9572         -0.9556             0             0             0             0
BM_sinsp_concatenate_paths_empty_path_cv                       -0.9614         -0.9600             0             0             0             0
BM_sinsp_concatenate_paths_absolute_path_mean                  -0.2554         -0.2555            85            64            85            64
BM_sinsp_concatenate_paths_absolute_path_median                -0.2412         -0.2413            86            65            86            65
BM_sinsp_concatenate_paths_absolute_path_stddev                +2.0683         +2.0735             1             3             1             3
BM_sinsp_concatenate_paths_absolute_path_cv                    +3.1207         +3.1281             0             0             0             0

@codecov

codecov Bot commented Jul 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.94%. Comparing base (5e67456) to head (ab1ea72).
⚠️ Report is 8 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3063   +/-   ##
=======================================
  Coverage   75.94%   75.94%           
=======================================
  Files         300      300           
  Lines       33276    33276           
  Branches     5057     5055    -2     
=======================================
  Hits        25271    25271           
  Misses       8005     8005           
Flag Coverage Δ
libsinsp 75.94% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/libscap area/tests dco-signoff: yes kind/test PRs increasing the test coverage without fixing any failing test release-note-none size/M

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

2 participants