Skip to content

Fix hooked_syscall in older kernels #5003

Fix hooked_syscall in older kernels

Fix hooked_syscall in older kernels #5003

Workflow file for this run

#
# When a PR is opened or updated: Run Tracee Tests
#
name: PR
on:
workflow_dispatch: {}
pull_request:
branches:
- main
paths:
- "!docs/**"
- "!deploy/**"
- "!packaging/**"
- "!**.yaml"
- "!**.md"
- "!**.txt"
- "!**.conf"
# override previous rules:
- "go.mod"
- "go.sum"
- "**.c"
- "**.h"
- "**.go"
- "**.sh"
- "**/pr.yaml"
- "**/action.yaml"
concurrency:
group: ${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
TESTS: >
TRC-102
TRC-103
TRC-104
TRC-105
TRC-107
TRC-1010
TRC-1014
TRC-1016
TRC-1018
TRC-1022
ARM64_TESTS: >
TRC-102
TRC-103
TRC-104
TRC-105
TRC-107
TRC-1010
TRC-1014
TRC-1016
TRC-1018
NETTESTS: >
IPv4
IPv6
TCP
UDP
ICMP
ICMPv6
DNS
HTTP
INSTTESTS: >
VFS_WRITE
FILE_MODIFICATION
SECURITY_INODE_RENAME
BPF_ATTACH
CONTAINERS_DATA_SOURCE
PROCTREE_DATA_SOURCE
jobs:
#
# CODE VERIFICATION
#
verify-analyze-code:
name: Verify and Analyze Code
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
with:
submodules: true
- name: Install Dependencies
uses: ./.github/actions/build-dependencies
- name: Lint
run: |
if test -z "$(gofmt -l .)"; then
echo "Congrats! There is nothing to fix."
else
echo "The following lines should be fixed."
gofmt -s -d .
exit 1
fi
- name: Lint (Revive)
run: |
make check-lint
- name: Check Code Style
run: |
make check-fmt
- name: Check Golang Vet
run: |
make check-vet
- name: Check with StaticCheck
run: |
make check-staticcheck
- name: Check with errcheck
run: |
make check-err
#
# SIGNATURES CODE VERIFICATION
#
verify-signatures:
name: Verify Signatures
needs:
- verify-analyze-code
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
with:
submodules: true
- name: Install Dependencies
uses: ./.github/actions/build-dependencies
- name: Build Signatures
run: |
make signatures
- name: Test Signatures
run: |
make test-signatures
#
# TOOLS BUILD VERIFICATION
#
verify-tools:
name: Verify Other Tools
needs:
- verify-analyze-code
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
with:
submodules: true
- name: Install Dependencies
uses: ./.github/actions/build-dependencies
- name: Build Tracee Benchmark Tool
run: |
make clean
make tracee-bench
- name: Build Tracee GPT Docs Tool
run: |
make clean
make tracee-gptdocs
- name: Build E2E Network Signatures
run: |
make clean
make e2e-net-signatures
- name: Build E2E Instrumentation Signatures
run: |
make clean
make e2e-inst-signatures
#
# CODE TESTS
#
unit-tests:
name: Unit Tests
needs:
- verify-analyze-code
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
with:
submodules: true
- name: Install Dependencies
uses: ./.github/actions/build-dependencies
- name: Run Unit Tests
run: |
make test-unit
#
# INTEGRATION TESTS
#
integration-tests:
name: Integration Tests
needs:
- verify-analyze-code
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
with:
submodules: true
- name: Install Dependencies
uses: ./.github/actions/build-dependencies
- name: Run Integration Tests
run: |
sudo env "PATH=$PATH" make test-integration
#
# PERFORMANCE TESTS
#
performance-tests:
name: Performance Tests
needs:
- verify-analyze-code
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
with:
submodules: true
- name: Install Dependencies
uses: ./.github/actions/build-dependencies
- name: Run Performance Tests
run: |
sudo env "PATH=$PATH" make test-performance
#
# KERNEL TESTS
#
kernel-tests:
name: ${{ matrix.job_name }} ${{ matrix.architecture }}
needs:
- unit-tests
- verify-signatures
- verify-tools
runs-on: ${{ matrix.runner }}
strategy:
matrix:
include:
#
# Cloud Taylored Distributions
#
# GKE
- job_name: "GKE 5.4"
architecture: "x86_64"
runner: "github-self-hosted_ami-07803dec079f9dab8_${{ github.event.number }}-${{ github.run_id }}_x64c"
- job_name: "GKE 5.10"
architecture: "x86_64"
runner: "github-self-hosted_ami-03ca8e4a64be4e6e2_${{ github.event.number }}-${{ github.run_id }}_x64c"
- job_name: "GKE 5.15"
architecture: "x86_64"
runner: "github-self-hosted_ami-0e71c360809862bd7_${{ github.event.number }}-${{ github.run_id }}_x64c"
- job_name: "GKE 5.15"
architecture: "aarch64"
runner: "github-self-hosted_ami-0b66222a60f8f97be_${{ github.event.number }}-${{ github.run_id }}_arm64c"
#
# Specific Distributions
#
# AMZN 2
- job_name: "AMZN2 5.10"
architecture: "x86_64"
runner: "github-self-hosted_ami-0b9c1568cd5551408_${{ github.event.number }}-${{ github.run_id }}_x64c"
- job_name: "AMZN2 5.10"
architecture: "aarch64"
runner: "github-self-hosted_ami-071a53e3ad06e6a7e_${{ github.event.number }}-${{ github.run_id }}_arm64c"
#
# Regular Distributions
#
# RHEL 8
- job_name: "RHEL8 4.18"
architecture: "x86_64"
runner: "github-self-hosted_ami-0763bdb83bba5e638_${{ github.event.number }}-${{ github.run_id }}_x64c"
- job_name: "RHEL8 4.18"
architecture: "aarch64"
runner: "github-self-hosted_ami-06152079b6b8d1f26_${{ github.event.number }}-${{ github.run_id }}_arm64c"
# FOCAL 5.4
- job_name: "Focal 5.4"
architecture: "x86_64"
runner: "github-self-hosted_ami-0d9d35323406a6cad_${{ github.event.number }}-${{ github.run_id }}_x64c"
- job_name: "Focal 5.4"
architecture: "aarch64"
runner: "github-self-hosted_ami-0a241eeae02842052_${{ github.event.number }}-${{ github.run_id }}_arm64c"
# FOCAL 5.13
- job_name: "Focal 5.13"
architecture: "x86_64"
runner: "github-self-hosted_ami-0c86a42b0f61bd86e_${{ github.event.number }}-${{ github.run_id }}_x64c"
- job_name: "Focal 5.13"
architecture: "aarch64"
runner: "github-self-hosted_ami-07de8512322c4a33a_${{ github.event.number }}-${{ github.run_id }}_arm64c"
# JAMMY 5.15
- job_name: "Jammy 5.15"
architecture: "x86_64"
runner: "github-self-hosted_ami-02f0ed24d636fa1a7_${{ github.event.number }}-${{ github.run_id }}_x64c"
- job_name: "Jammy 5.15"
architecture: "aarch64"
runner: "github-self-hosted_ami-0b6d16ce9f5576b40_${{ github.event.number }}-${{ github.run_id }}_arm64c"
# JAMMY 5.19
- job_name: "Jammy 5.19"
architecture: "x86_64"
runner: "github-self-hosted_ami-02ce72d6cd652cbbd_${{ github.event.number }}-${{ github.run_id }}_x64c"
- job_name: "Jammy 5.19"
architecture: "aarch64"
runner: "github-self-hosted_ami-07271263d87a0e883_${{ github.event.number }}-${{ github.run_id }}_arm64c"
# LUNAR 6.2
- job_name: "Lunar 6.2"
architecture: "x86_64"
runner: "github-self-hosted_ami-0344a20747442e3c7_${{ github.event.number }}-${{ github.run_id }}_x64c"
- job_name: "Lunar 6.2"
architecture: "aarch64"
runner: "github-self-hosted_ami-0c0d64eea6367efd8_${{ github.event.number }}-${{ github.run_id }}_arm64c"
# MANTIC 6.5
- job_name: "Mantic 6.5"
architecture: "x86_64"
runner: "github-self-hosted_ami-0564e75d9605addaf_${{ github.event.number }}-${{ github.run_id }}_x64c"
- job_name: "Mantic 6.5"
architecture: "aarch64"
runner: "github-self-hosted_ami-028acebc5083c4840_${{ github.event.number }}-${{ github.run_id }}_arm64c"
env:
HOME: "/tmp/root"
GOPATH: "/tmp/go"
GOCACHE: "/tmp/go-cache"
GOROOT: "/usr/local/go"
steps:
- name: "Checkout"
uses: actions/checkout@v3
with:
submodules: true
- name: "Environment Variables"
run: |
if [[ "${{ matrix.architecture }}" == "aarch64" ]]; then
echo "TESTS=${{ env.ARM64_TESTS }}" >> $GITHUB_ENV
fi
- name: "Kernel"
run: |
./tests/e2e-kernel-test.sh
- name: "Network"
run: |
./tests/e2e-net-test.sh
- name: "Instrumentation"
run: |
./tests/e2e-inst-test.sh