diff --git a/.github/workflows/authors.yml b/.github/workflows/authors.yml index 35b0456ae347..080096b1766d 100644 --- a/.github/workflows/authors.yml +++ b/.github/workflows/authors.yml @@ -15,7 +15,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout PR code - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 with: ref: ${{ github.event.pull_request.head.sha }} fetch-depth: 0 diff --git a/.github/workflows/builds.yml b/.github/workflows/builds.yml index 8d5def58c889..b5f6786c73b6 100644 --- a/.github/workflows/builds.yml +++ b/.github/workflows/builds.yml @@ -139,7 +139,7 @@ jobs: texlive-capt-of \ texlive-needspace - - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - run: git config --global --add safe.directory /__w/suricata/suricata - uses: ./.github/actions/install-cbindgen # Download and extract dependency archives created during prep @@ -285,7 +285,7 @@ jobs: - run: rustup component add rustfmt - run: rustup component add clippy - - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - run: git config --global --add safe.directory /__w/suricata/suricata - uses: ./.github/actions/install-cbindgen @@ -527,7 +527,7 @@ jobs: which \ zlib-devel - - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - run: git config --global --add safe.directory /__w/suricata/suricata - uses: ./.github/actions/install-cbindgen @@ -720,7 +720,7 @@ jobs: - name: Install Rust run: curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain 1.67.1 -y - run: echo "$HOME/.cargo/bin" >> $GITHUB_PATH - - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - uses: ./.github/actions/install-cbindgen - run: git config --global --add safe.directory /__w/suricata/suricata - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 @@ -816,7 +816,7 @@ jobs: sudo \ which \ zlib-devel - - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - uses: ./.github/actions/install-cbindgen - run: git config --global --add safe.directory /__w/suricata/suricata - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 @@ -910,7 +910,7 @@ jobs: sudo \ which \ zlib-devel - - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - run: git config --global --add safe.directory /__w/suricata/suricata - uses: ./.github/actions/install-cbindgen - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 @@ -1010,7 +1010,7 @@ jobs: sudo \ which \ zlib-devel - - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - run: git config --global --add safe.directory /__w/suricata/suricata - uses: ./.github/actions/install-cbindgen - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 @@ -1101,7 +1101,7 @@ jobs: sudo \ which \ zlib-devel - - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - uses: ./.github/actions/install-cbindgen - run: git config --global --add safe.directory /__w/suricata/suricata - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 @@ -1187,7 +1187,7 @@ jobs: which \ zlib-devel - run: adduser suricata - - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - uses: ./.github/actions/install-cbindgen - run: git config --global --add safe.directory /__w/suricata/suricata - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 @@ -1280,7 +1280,7 @@ jobs: sudo \ which \ zlib-devel - - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - run: git config --global --add safe.directory /__w/suricata/suricata - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 with: @@ -1334,7 +1334,7 @@ jobs: dnf config-manager --set-enabled crb - - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - uses: ./.github/actions/install-cbindgen - run: git config --global --add safe.directory /__w/suricata/suricata - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 @@ -1342,7 +1342,7 @@ jobs: - name: Install minimal dependencies run: ./scripts/docs-almalinux9-minimal-build.sh - - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - run: git config --global --add safe.directory /__w/suricata/suricata - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 with: @@ -1410,7 +1410,7 @@ jobs: software-properties-common \ zlib1g \ zlib1g-dev - - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - run: git config --global --add safe.directory /__w/suricata/suricata - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 with: @@ -1487,7 +1487,7 @@ jobs: # packaged Rust version is too old for coverage, so get from rustup - name: Install Rust run: curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain 1.67.1 -y - - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - run: git config --global --add safe.directory /__w/suricata/suricata - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 with: @@ -1608,7 +1608,7 @@ jobs: # specific version to match up to the llvm version in ubuntu below - name: Install Rust run: curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain 1.67.1 -y - - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - run: git config --global --add safe.directory /__w/suricata/suricata - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 with: @@ -1714,7 +1714,7 @@ jobs: # specific version to match up to the llvm version in ubuntu below - name: Install Rust run: curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain 1.67.1 -y - - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - run: git config --global --add safe.directory /__w/suricata/suricata - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 with: @@ -1849,7 +1849,7 @@ jobs: time \ wget \ dpdk-dev - - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - run: git config --global --add safe.directory /__w/suricata/suricata - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 with: @@ -1937,7 +1937,7 @@ jobs: time \ wget \ dpdk-dev - - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - run: git config --global --add safe.directory /__w/suricata/suricata - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 with: @@ -2040,7 +2040,7 @@ jobs: # packaged Rust version is too old for coverage, so get from rustup - name: Install Rust run: curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain 1.67.1 -y - - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - run: git config --global --add safe.directory /__w/suricata/suricata - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 with: @@ -2131,7 +2131,7 @@ jobs: zlib1g-dev \ exuberant-ctags \ dpdk-dev - - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - run: git config --global --add safe.directory /__w/suricata/suricata - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 with: @@ -2281,7 +2281,7 @@ jobs: zlib1g \ zlib1g-dev \ exuberant-ctags - - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - run: git config --global --add safe.directory /__w/suricata/suricata - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 with: @@ -2359,7 +2359,7 @@ jobs: zlib1g \ zlib1g-dev - run: echo "$HOME/.cargo/bin" >> $GITHUB_PATH - - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - run: git config --global --add safe.directory /__w/suricata/suricata - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 with: @@ -2439,7 +2439,7 @@ jobs: - name: Checkout Netmap repository if: steps.netmap-cache.outputs.cache-hit != 'true' - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 with: repository: luigirizzo/netmap # gets cloned to $GITHUB_WORKSPACE/netmap/ @@ -2459,7 +2459,7 @@ jobs: make -j ${{ env.CPUS }} sudo make install - - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - run: git config --global --add safe.directory /__w/suricata/suricata - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 with: @@ -2494,7 +2494,7 @@ jobs: git \ libtool - - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - run: git config --global --add safe.directory /__w/suricata/suricata - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 with: @@ -2595,7 +2595,7 @@ jobs: ninja -C build install ldconfig cd $HOME - - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - run: git config --global --add safe.directory /__w/suricata/suricata - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 with: @@ -2672,7 +2672,7 @@ jobs: texlive-latex-extra \ zlib1g \ zlib1g-dev - - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - run: git config --global --add safe.directory /__w/suricata/suricata - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 with: @@ -2774,7 +2774,7 @@ jobs: texlive-latex-extra \ zlib1g \ zlib1g-dev - - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - run: git config --global --add safe.directory /__w/suricata/suricata - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 with: @@ -2856,7 +2856,7 @@ jobs: texlive-latex-extra \ zlib1g \ zlib1g-dev - - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - run: git config --global --add safe.directory /__w/suricata/suricata - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 with: @@ -2936,7 +2936,7 @@ jobs: - name: Install Rust run: curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain $RUST_VERSION_KNOWN -y - run: echo "$HOME/.cargo/bin" >> $GITHUB_PATH - - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - run: git config --global --add safe.directory /__w/suricata/suricata - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 with: @@ -3007,7 +3007,7 @@ jobs: - name: Install Rust run: curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain $RUST_VERSION_KNOWN -y - run: echo "$HOME/.cargo/bin" >> $GITHUB_PATH - - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - run: git config --global --add safe.directory /__w/suricata/suricata - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 with: @@ -3057,7 +3057,7 @@ jobs: rust \ xz - run: echo "$HOME/.cargo/bin" >> $GITHUB_PATH - - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - run: git config --global --add safe.directory /__w/suricata/suricata - name: Downloading prep archive uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 @@ -3112,7 +3112,7 @@ jobs: # preinstalled one to be picked up by configure - name: cbindgen run: cargo install --root /usr --force --debug --version 0.24.3 cbindgen - - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - run: git config --global --add safe.directory /__w/suricata/suricata - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 with: @@ -3168,7 +3168,7 @@ jobs: # preinstalled one to be picked up by configure - name: cbindgen run: cargo install --root /usr --force --debug --version 0.24.3 cbindgen - - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - run: git config --global --add safe.directory /__w/suricata/suricata - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 with: @@ -3212,7 +3212,7 @@ jobs: # preinstalled one to be picked up by configure - name: cbindgen run: cargo install --root /usr --force --debug --version 0.24.3 cbindgen - - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - run: git config --global --add safe.directory /__w/suricata/suricata - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 with: diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index e835712e42c4..9717f8762d0a 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -37,11 +37,11 @@ jobs: # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] steps: - name: Checkout repository - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@v3.26.13 + uses: github/codeql-action/init@v3.27.0 with: languages: ${{ matrix.language }} queries: security-extended @@ -62,4 +62,4 @@ jobs: ./configure --enable-warnings make - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v3.26.13 + uses: github/codeql-action/analyze@v3.27.0 diff --git a/.github/workflows/commits.yml b/.github/workflows/commits.yml index 75e8648d5d5e..16c557a36b7d 100644 --- a/.github/workflows/commits.yml +++ b/.github/workflows/commits.yml @@ -74,7 +74,7 @@ jobs: cd $HOME/.cargo/bin curl -OL https://github.com/eqrion/cbindgen/releases/download/v0.24.3/cbindgen chmod 755 cbindgen - - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 with: fetch-depth: 0 # The action above is supposed to do this for us, but it doesn't appear to stick. diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 5f78264d4678..56a94e64d5a4 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -114,7 +114,7 @@ jobs: texlive-latex-extra \ zlib1g \ zlib1g-dev - - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - run: git config --global --add safe.directory /__w/suricata/suricata - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 with: diff --git a/.github/workflows/formatting.yml b/.github/workflows/formatting.yml index 82f1d4dfcbbd..0366f104ec89 100644 --- a/.github/workflows/formatting.yml +++ b/.github/workflows/formatting.yml @@ -89,7 +89,7 @@ jobs: # My patience simply ran too short to keep on looking. See follow-on # action to manually fix this up. - name: Checkout - might be merge commit! - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 with: fetch-depth: 0 # Use last commit of branch, not potential merge commit! diff --git a/.github/workflows/prepare-deps.yml b/.github/workflows/prepare-deps.yml index 8f3a5e0d4859..85b59687cda6 100644 --- a/.github/workflows/prepare-deps.yml +++ b/.github/workflows/prepare-deps.yml @@ -78,7 +78,7 @@ jobs: # Now checkout Suricata for the bundle script. - name: Checking out Suricata - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - run: git config --global --add safe.directory /__w/suricata/suricata - name: Fetching libhtp diff --git a/.github/workflows/rust-checks.yml b/.github/workflows/rust-checks.yml index 671ba558d57e..0a701ac6d847 100644 --- a/.github/workflows/rust-checks.yml +++ b/.github/workflows/rust-checks.yml @@ -80,7 +80,7 @@ jobs: echo "$HOME/.cargo/bin" >> $GITHUB_PATH - name: Install Cargo Audit run: cargo install cargo-audit - - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - name: Configure Suricata run: | ./scripts/bundle.sh libhtp @@ -158,7 +158,7 @@ jobs: sudo \ which \ zlib-devel - - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - name: Install Minimum Supported Rust Version run: | curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain $(awk -F '"' '/rust-version/ { print $2 }' rust/Cargo.toml.in) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 96f3ee920fc1..28d8b3ee7218 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -71,7 +71,7 @@ jobs: echo "$HOME/.cargo/bin" >> $GITHUB_PATH - name: Install cbindgen run: cargo install --debug cbindgen - - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - run: git config --global --add safe.directory /__w/suricata/suricata - run: ./scripts/bundle.sh - run: ./autogen.sh diff --git a/.github/workflows/scan-build.yml b/.github/workflows/scan-build.yml index e3d31f97ecd0..366f5233ccd3 100644 --- a/.github/workflows/scan-build.yml +++ b/.github/workflows/scan-build.yml @@ -67,7 +67,7 @@ jobs: software-properties-common \ zlib1g \ zlib1g-dev - - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - run: git config --global --add safe.directory /__w/suricata/suricata - run: ./scripts/bundle.sh - run: ./autogen.sh diff --git a/.github/workflows/scorecards-analysis.yml b/.github/workflows/scorecards-analysis.yml index 9451ce4bc0d4..757d90932450 100644 --- a/.github/workflows/scorecards-analysis.yml +++ b/.github/workflows/scorecards-analysis.yml @@ -25,7 +25,7 @@ jobs: steps: - name: "Checkout code" - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: "Run analysis" uses: ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46 # v2.4.0 @@ -51,6 +51,6 @@ jobs: # Upload the results to GitHub's code scanning dashboard. - name: "Upload SARIF results" - uses: github/codeql-action/upload-sarif@563627499baf8d9e7b90a56ba0e1c42113d43fb9 # v1 + uses: github/codeql-action/upload-sarif@cbe18979603527f12c7871a6eb04833ecf1548c7 # v1 with: sarif_file: results.sarif diff --git a/rules/dns-events.rules b/rules/dns-events.rules index d4c02b5c2f78..6f3f711f8ee8 100644 --- a/rules/dns-events.rules +++ b/rules/dns-events.rules @@ -2,9 +2,9 @@ alert dns any any -> any any (msg:"SURICATA DNS malformed request data"; flow:to_server; app-layer-event:dns.malformed_data; classtype:protocol-command-decode; sid:2240002; rev:2;) alert dns any any -> any any (msg:"SURICATA DNS malformed response data"; flow:to_client; app-layer-event:dns.malformed_data; classtype:protocol-command-decode; sid:2240003; rev:2;) # Response flag set on to_server packet -alert dns any any -> any any (msg:"SURICATA DNS Not a request"; flow:to_server; app-layer-event:dns.not_a_request; classtype:protocol-command-decode; sid:2240004; rev:2;) +alert dns any any -> any any (msg:"SURICATA DNS Not a request"; flow:to_server; app-layer-event:dns.not_request; classtype:protocol-command-decode; sid:2240004; rev:3;) # Response flag not set on to_client packet -alert dns any any -> any any (msg:"SURICATA DNS Not a response"; flow:to_client; app-layer-event:dns.not_a_response; classtype:protocol-command-decode; sid:2240005; rev:2;) +alert dns any any -> any any (msg:"SURICATA DNS Not a response"; flow:to_client; app-layer-event:dns.not_response; classtype:protocol-command-decode; sid:2240005; rev:3;) # Z flag (reserved) not 0 alert dns any any -> any any (msg:"SURICATA DNS Z flag set"; app-layer-event:dns.z_flag_set; classtype:protocol-command-decode; sid:2240006; rev:2;) alert dns any any -> any any (msg:"SURICATA DNS Invalid opcode"; app-layer-event:dns.invalid_opcode; classtype:protocol-command-decode; sid:2240007; rev:1;) diff --git a/rules/ipsec-events.rules b/rules/ipsec-events.rules index ccfd65145c57..2e5eee4ba681 100644 --- a/rules/ipsec-events.rules +++ b/rules/ipsec-events.rules @@ -10,8 +10,8 @@ alert ike any any -> any any (msg:"SURICATA IKE weak cryptographic parameters (E alert ike any any -> any any (msg:"SURICATA IKE weak cryptographic parameters (PRF)"; flow:to_client; app-layer-event:ike.weak_crypto_prf; classtype:protocol-command-decode; sid:2224003; rev:2;) alert ike any any -> any any (msg:"SURICATA IKE weak cryptographic parameters (Auth)"; flow:to_client; app-layer-event:ike.weak_crypto_auth; classtype:protocol-command-decode; sid:2224004; rev:3;) alert ike any any -> any any (msg:"SURICATA IKE weak cryptographic parameters (Diffie-Hellman)"; flow:to_client; app-layer-event:ike.weak_crypto_dh; classtype:protocol-command-decode; sid:2224005; rev:3;) -alert ike any any -> any any (msg:"SURICATA IKE no Diffie-Hellman exchange parameters"; flow:to_client; app-layer-event:ike.weak_crypto_nodh; classtype:protocol-command-decode; sid:2224006; rev:2;) -alert ike any any -> any any (msg:"SURICATA IKE no authentication"; flow:to_client; app-layer-event:ike.weak_crypto_noauth; classtype:protocol-command-decode; sid:2224007; rev:2;) +alert ike any any -> any any (msg:"SURICATA IKE no Diffie-Hellman exchange parameters"; flow:to_client; app-layer-event:ike.weak_crypto_no_dh; classtype:protocol-command-decode; sid:2224006; rev:3;) +alert ike any any -> any any (msg:"SURICATA IKE no authentication"; flow:to_client; app-layer-event:ike.weak_crypto_no_auth; classtype:protocol-command-decode; sid:2224007; rev:3;) alert ike any any -> any any (msg:"SURICATA IKE no encryption (AH)"; flow:to_client; app-layer-event:ike.no_encryption; classtype:protocol-command-decode; sid:2224008; rev:2;) alert ike any any -> any any (msg:"SURICATA IKE invalid proposal"; flow:to_server; app-layer-event:ike.invalid_proposal; classtype:protocol-command-decode; sid:2224009; rev:2;) alert ike any any -> any any (msg:"SURICATA IKE invalid proposal selected"; flow:to_client; app-layer-event:ike.invalid_proposal; classtype:protocol-command-decode; sid:2224010; rev:2;) diff --git a/rules/modbus-events.rules b/rules/modbus-events.rules index 27348e4a0b2b..afcc80a7e3a2 100644 --- a/rules/modbus-events.rules +++ b/rules/modbus-events.rules @@ -4,8 +4,6 @@ alert modbus any any -> any any (msg:"SURICATA Modbus invalid Protocol version"; alert modbus any any -> any any (msg:"SURICATA Modbus unsolicited response"; app-layer-event:modbus.unsolicited_response; classtype:protocol-command-decode; sid:2250002; rev:2;) # Malformed request or response. Malformed means length field is wrong alert modbus any any -> any any (msg:"SURICATA Modbus invalid Length"; app-layer-event:modbus.invalid_length; classtype:protocol-command-decode; sid:2250003; rev:2;) -# Unit identifier field is incorrect -alert modbus any any -> any any (msg:"SURICATA Modbus invalid Unit Identifier"; app-layer-event:modbus.invalid_unit_identifier; classtype:protocol-command-decode; sid:2250004; rev:2;) # Modbus Function code is incorrect alert modbus any any -> any any (msg:"SURICATA Modbus invalid Function code"; app-layer-event:modbus.invalid_function_code; classtype:protocol-command-decode; sid:2250005; rev:2;) # Modbus Request/Response value field is incorrect diff --git a/rust/src/http2/detect.rs b/rust/src/http2/detect.rs index 74bb59223d15..cc013881cae2 100644 --- a/rust/src/http2/detect.rs +++ b/rust/src/http2/detect.rs @@ -961,7 +961,7 @@ fn http2_tx_set_settings(state: &mut HTTP2State, input: &[u8]) { match STANDARD.decode(input) { Ok(dec) => { if dec.len() % 6 != 0 { - state.set_event(HTTP2Event::InvalidHTTP1Settings); + state.set_event(HTTP2Event::InvalidHttp1Settings); } let head = parser::HTTP2FrameHeader { @@ -982,12 +982,12 @@ fn http2_tx_set_settings(state: &mut HTTP2State, input: &[u8]) { }); } Err(_) => { - state.set_event(HTTP2Event::InvalidHTTP1Settings); + state.set_event(HTTP2Event::InvalidHttp1Settings); } } } Err(_) => { - state.set_event(HTTP2Event::InvalidHTTP1Settings); + state.set_event(HTTP2Event::InvalidHttp1Settings); } } } diff --git a/rust/src/http2/http2.rs b/rust/src/http2/http2.rs index 9281c011ff29..89b599a9f8ef 100644 --- a/rust/src/http2/http2.rs +++ b/rust/src/http2/http2.rs @@ -498,7 +498,7 @@ pub enum HTTP2Event { ExtraHeaderData, LongFrameData, StreamIdReuse, - InvalidHTTP1Settings, + InvalidHttp1Settings, FailedDecompression, InvalidRange, HeaderIntegerOverflow, diff --git a/rust/src/mqtt/detect.rs b/rust/src/mqtt/detect.rs index c7dedc7ee85d..1a7d0483652f 100644 --- a/rust/src/mqtt/detect.rs +++ b/rust/src/mqtt/detect.rs @@ -243,16 +243,29 @@ fn mqtt_tx_get_reason_code(tx: &MQTTTransaction) -> Option { return None; } -fn mqtt_tx_unsuback_has_reason_code(tx: &MQTTTransaction, code: &DetectUintData) -> c_int { +fn mqtt_tx_suback_unsuback_has_reason_code( + tx: &MQTTTransaction, code: &DetectUintData, +) -> c_int { for msg in tx.msg.iter() { - if let MQTTOperation::UNSUBACK(ref unsuback) = msg.op { - if let Some(ref reason_codes) = unsuback.reason_codes { - for rc in reason_codes.iter() { + match msg.op { + MQTTOperation::UNSUBACK(ref unsuback) => { + if let Some(ref reason_codes) = unsuback.reason_codes { + for rc in reason_codes.iter() { + if detect_match_uint(code, *rc) { + return 1; + } + } + } + } + MQTTOperation::SUBACK(ref suback) => { + // in SUBACK these are stored as "QOS granted" historically + for rc in suback.qoss.iter() { if detect_match_uint(code, *rc) { return 1; } } } + _ => {} } } return 0; @@ -476,7 +489,7 @@ unsafe extern "C" fn mqtt_reason_code_match( return 1; } } - return mqtt_tx_unsuback_has_reason_code(tx, ctx); + return mqtt_tx_suback_unsuback_has_reason_code(tx, ctx); } unsafe extern "C" fn mqtt_reason_code_free(_de: *mut c_void, ctx: *mut c_void) { @@ -1109,7 +1122,7 @@ pub unsafe extern "C" fn ScDetectMqttRegister() { keyword_name, b"unsubscribe topic query\0".as_ptr() as *const libc::c_char, ALPROTO_MQTT, - false, + false, // only to server true, unsub_topic_get_data_wrapper, ); @@ -1127,7 +1140,7 @@ pub unsafe extern "C" fn ScDetectMqttRegister() { G_MQTT_TYPE_BUFFER_ID = DetectHelperBufferRegister( b"mqtt.type\0".as_ptr() as *const libc::c_char, ALPROTO_MQTT, - false, // only to server + true, true, ); @@ -1153,7 +1166,7 @@ pub unsafe extern "C" fn ScDetectMqttRegister() { keyword_name, b"subscribe topic query\0".as_ptr() as *const libc::c_char, ALPROTO_MQTT, - false, + false, // only to server true, sub_topic_get_data_wrapper, ); @@ -1172,7 +1185,7 @@ pub unsafe extern "C" fn ScDetectMqttRegister() { G_MQTT_REASON_CODE_BUFFER_ID = DetectHelperBufferRegister( b"mqtt.reason_code\0".as_ptr() as *const libc::c_char, ALPROTO_MQTT, - false, // only to server + true, true, ); let kw = SCSigTableElmt { @@ -1189,8 +1202,8 @@ pub unsafe extern "C" fn ScDetectMqttRegister() { G_MQTT_CONNACK_SESSIONPRESENT_BUFFER_ID = DetectHelperBufferRegister( b"mqtt.connack.session_present\0".as_ptr() as *const libc::c_char, ALPROTO_MQTT, - false, // only to server true, + false, // only to client ); let kw = SCSigTableElmt { name: b"mqtt.qos\0".as_ptr() as *const libc::c_char, @@ -1223,7 +1236,7 @@ pub unsafe extern "C" fn ScDetectMqttRegister() { b"mqtt.publish.topic\0".as_ptr() as *const libc::c_char, b"MQTT PUBLISH topic\0".as_ptr() as *const libc::c_char, ALPROTO_MQTT, - false, + true, // PUBLISH goes both ways true, mqtt_pub_topic_get_data, ); @@ -1242,7 +1255,7 @@ pub unsafe extern "C" fn ScDetectMqttRegister() { b"mqtt.publish.message\0".as_ptr() as *const libc::c_char, b"MQTT PUBLISH message\0".as_ptr() as *const libc::c_char, ALPROTO_MQTT, - false, + true, // PUBLISH goes both ways true, mqtt_pub_msg_get_data, ); @@ -1309,7 +1322,7 @@ pub unsafe extern "C" fn ScDetectMqttRegister() { b"mqtt.connect.willtopic\0".as_ptr() as *const libc::c_char, b"MQTT CONNECT will topic\0".as_ptr() as *const libc::c_char, ALPROTO_MQTT, - false, + false, // only to server true, mqtt_conn_willtopic_get_data, ); @@ -1328,7 +1341,7 @@ pub unsafe extern "C" fn ScDetectMqttRegister() { b"mqtt.connect.willmessage\0".as_ptr() as *const libc::c_char, b"MQTT CONNECT will message\0".as_ptr() as *const libc::c_char, ALPROTO_MQTT, - false, + false, // only to server true, mqtt_conn_willmsg_get_data, ); @@ -1347,7 +1360,7 @@ pub unsafe extern "C" fn ScDetectMqttRegister() { b"mqtt.connect.username\0".as_ptr() as *const libc::c_char, b"MQTT CONNECT username\0".as_ptr() as *const libc::c_char, ALPROTO_MQTT, - false, + false, // only to server true, mqtt_conn_username_get_data, ); @@ -1366,7 +1379,7 @@ pub unsafe extern "C" fn ScDetectMqttRegister() { b"mqtt.connect.protocol_string\0".as_ptr() as *const libc::c_char, b"MQTT CONNECT protocol string\0".as_ptr() as *const libc::c_char, ALPROTO_MQTT, - false, + false, // only to server true, mqtt_conn_protocolstring_get_data, ); @@ -1385,7 +1398,7 @@ pub unsafe extern "C" fn ScDetectMqttRegister() { b"mqtt.connect.password\0".as_ptr() as *const libc::c_char, b"MQTT CONNECT password\0".as_ptr() as *const libc::c_char, ALPROTO_MQTT, - false, + false, // only to server true, mqtt_conn_password_get_data, ); @@ -1404,7 +1417,7 @@ pub unsafe extern "C" fn ScDetectMqttRegister() { b"mqtt.connect.clientid\0".as_ptr() as *const libc::c_char, b"MQTT CONNECT clientid\0".as_ptr() as *const libc::c_char, ALPROTO_MQTT, - false, + false, // only to server true, mqtt_conn_clientid_get_data, ); diff --git a/src/decode.h b/src/decode.h index 510a7960e5d6..f36c41a8422e 100644 --- a/src/decode.h +++ b/src/decode.h @@ -103,8 +103,6 @@ struct PktPool_; /* declare these here as they are called from the * PACKET_RECYCLE and PACKET_CLEANUP macro's. */ typedef struct AppLayerDecoderEvents_ AppLayerDecoderEvents; -void AppLayerDecoderEventsResetEvents(AppLayerDecoderEvents *events); -void AppLayerDecoderEventsFreeEvents(AppLayerDecoderEvents **events); /* Address */ typedef struct Address_ { diff --git a/src/detect-engine-analyzer.c b/src/detect-engine-analyzer.c index dcf3ce60a6a3..d852792fd3da 100644 --- a/src/detect-engine-analyzer.c +++ b/src/detect-engine-analyzer.c @@ -52,6 +52,7 @@ #include "detect-flowbits.h" #include "util-var-name.h" #include "detect-icmp-id.h" +#include "detect-tcp-window.h" static int rule_warnings_only = 0; @@ -932,6 +933,14 @@ static void DumpMatches(RuleAnalyzer *ctx, JsonBuilder *js, const SigMatchData * jb_close(js); break; } + case DETECT_WINDOW: { + const DetectWindowData *wd = (const DetectWindowData *)smd->ctx; + jb_open_object(js, "window"); + jb_set_uint(js, "size", wd->size); + jb_set_bool(js, "negated", wd->negated); + jb_close(js); + break; + } case DETECT_FLOW_AGE: { const DetectU32Data *cd = (const DetectU32Data *)smd->ctx; jb_open_object(js, "flow_age"); diff --git a/src/detect-engine-frame.h b/src/detect-engine-frame.h index a529e55c4d00..062d57d2b330 100644 --- a/src/detect-engine-frame.h +++ b/src/detect-engine-frame.h @@ -29,8 +29,6 @@ void DetectRunPrefilterFrame(DetectEngineThreadCtx *det_ctx, const SigGroupHead bool DetectRunFrameInspectRule(ThreadVars *tv, DetectEngineThreadCtx *det_ctx, const Signature *s, Flow *f, Packet *p, const Frames *frames, const Frame *frame); -int PrefilterGenericMpmFrameRegister(DetectEngineCtx *de_ctx, SigGroupHead *sgh, MpmCtx *mpm_ctx, - const DetectBufferMpmRegistry *mpm_reg, int list_id); int DetectEngineInspectFrameBufferGeneric(DetectEngineThreadCtx *det_ctx, const DetectEngineFrameInspectionEngine *engine, const Signature *s, Packet *p, const Frames *frames, const Frame *frame); diff --git a/src/detect-engine-mpm.h b/src/detect-engine-mpm.h index 16195414042b..10bdb86f5bcb 100644 --- a/src/detect-engine-mpm.h +++ b/src/detect-engine-mpm.h @@ -113,8 +113,6 @@ void DetectEngineFrameMpmRegister(DetectEngineCtx *de_ctx, const char *name, int const DetectBufferMpmRegistry *mpm_reg, int list_id), AppProto alproto, uint8_t type); -int PrefilterGenericMpmPktRegister(DetectEngineCtx *de_ctx, SigGroupHead *sgh, MpmCtx *mpm_ctx, - const DetectBufferMpmRegistry *mpm_reg, int list_id); int PrefilterGenericMpmFrameRegister(DetectEngineCtx *de_ctx, SigGroupHead *sgh, MpmCtx *mpm_ctx, const DetectBufferMpmRegistry *mpm_reg, int list_id); diff --git a/src/detect-http-header.c b/src/detect-http-header.c index be825e5ec714..8839544a5f92 100644 --- a/src/detect-http-header.c +++ b/src/detect-http-header.c @@ -638,7 +638,7 @@ void DetectHttpRequestHeaderRegister(void) DetectAppLayerMultiRegister("http_request_header", ALPROTO_HTTP2, SIG_FLAG_TOSERVER, HTTP2StateOpen, GetHttp2HeaderData, 2, HTTP2StateOpen); DetectAppLayerMultiRegister("http_request_header", ALPROTO_HTTP1, SIG_FLAG_TOSERVER, - HTP_REQUEST_HEADERS, GetHttp1HeaderData, 2, 0); + HTP_REQUEST_HEADERS, GetHttp1HeaderData, 2, HTP_REQUEST_HEADERS); DetectBufferTypeSetDescriptionByName("http_request_header", "HTTP header name and value"); g_http_request_header_buffer_id = DetectBufferTypeGetByName("http_request_header"); @@ -671,7 +671,7 @@ void DetectHttpResponseHeaderRegister(void) DetectAppLayerMultiRegister("http_response_header", ALPROTO_HTTP2, SIG_FLAG_TOCLIENT, HTTP2StateOpen, GetHttp2HeaderData, 2, HTTP2StateOpen); DetectAppLayerMultiRegister("http_response_header", ALPROTO_HTTP1, SIG_FLAG_TOCLIENT, - HTP_RESPONSE_HEADERS, GetHttp1HeaderData, 2, 0); + HTP_RESPONSE_HEADERS, GetHttp1HeaderData, 2, HTP_RESPONSE_HEADERS); DetectBufferTypeSetDescriptionByName("http_response_header", "HTTP header name and value"); g_http_response_header_buffer_id = DetectBufferTypeGetByName("http_response_header"); diff --git a/src/detect-icmpv4hdr.c b/src/detect-icmpv4hdr.c index 259fbdc2ecc6..dbda7c6f14d1 100644 --- a/src/detect-icmpv4hdr.c +++ b/src/detect-icmpv4hdr.c @@ -28,6 +28,7 @@ #include "detect-engine.h" #include "detect-engine-mpm.h" #include "detect-icmpv4hdr.h" +#include "detect-engine-prefilter.h" /* prototypes */ static int DetectIcmpv4HdrSetup(DetectEngineCtx *, Signature *, const char *); diff --git a/src/packet.c b/src/packet.c index bd63de756835..cb6dcf618380 100644 --- a/src/packet.c +++ b/src/packet.c @@ -22,6 +22,7 @@ #include "util-profiling.h" #include "util-validate.h" #include "action-globals.h" +#include "app-layer-events.h" /** \brief issue drop action * diff --git a/src/suricata.c b/src/suricata.c index 0de8039be1f0..49505f94ba89 100644 --- a/src/suricata.c +++ b/src/suricata.c @@ -505,7 +505,7 @@ static void SetBpfStringFromFile(char *filename) char *bpf_filter = NULL; char *bpf_comment_tmp = NULL; char *bpf_comment_start = NULL; - uint32_t bpf_len = 0; + size_t bpf_len = 0; SCStat st; FILE *fp = NULL; size_t nm = 0; @@ -520,7 +520,8 @@ static void SetBpfStringFromFile(char *filename) SCLogError("Failed to stat file %s", filename); exit(EXIT_FAILURE); } - bpf_len = st.st_size + 1; + // st.st_size is signed on Windows + bpf_len = ((size_t)(st.st_size)) + 1; bpf_filter = SCCalloc(1, bpf_len); if (unlikely(bpf_filter == NULL)) {