• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

OISF / suricata / 22618661228

02 Mar 2026 09:33PM UTC coverage: 42.258% (-34.4%) from 76.611%
22618661228

push

github

victorjulien
github-actions: bump actions/download-artifact from 7.0.0 to 8.0.0

Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 7.0.0 to 8.0.0.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/37930b1c2...70fc10c6e)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-version: 8.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

91511 of 216553 relevant lines covered (42.26%)

3416852.41 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

67.16
/rust/src/ssh/logger.rs
1
/* Copyright (C) 2020 Open Information Security Foundation
2
 *
3
 * You can copy, redistribute or modify this Program under the terms of
4
 * the GNU General Public License version 2 as published by the Free
5
 * Software Foundation.
6
 *
7
 * This program is distributed in the hope that it will be useful,
8
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
10
 * GNU General Public License for more details.
11
 *
12
 * You should have received a copy of the GNU General Public License
13
 * version 2 along with this program; if not, write to the Free Software
14
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
15
 * 02110-1301, USA.
16
 */
17

18
use super::ssh::{SSHTransaction, SSH_MAX_BANNER_LEN};
19
use crate::jsonbuilder::{JsonBuilder, JsonError};
20

21
fn log_ssh(tx: &SSHTransaction, js: &mut JsonBuilder) -> Result<bool, JsonError> {
19✔
22
    js.open_object("ssh")?;
19✔
23
    if tx.cli_hdr.protover.is_empty() && tx.srv_hdr.protover.is_empty() {
19✔
24
        return Ok(false);
×
25
    }
19✔
26
    if !tx.cli_hdr.protover.is_empty() {
19✔
27
        js.open_object("client")?;
17✔
28
        js.set_string_from_bytes_limited(
17✔
29
            "proto_version",
17✔
30
            &tx.cli_hdr.protover,
17✔
31
            SSH_MAX_BANNER_LEN,
17✔
32
        )?;
17✔
33
        if !tx.cli_hdr.swver.is_empty() {
17✔
34
            js.set_string_from_bytes_limited(
17✔
35
                "software_version",
17✔
36
                &tx.cli_hdr.swver,
17✔
37
                SSH_MAX_BANNER_LEN,
17✔
38
            )?;
17✔
39
        }
×
40
        if !tx.cli_hdr.hassh.is_empty() || !tx.cli_hdr.hassh_string.is_empty() {
17✔
41
            js.open_object("hassh")?;
×
42
            if !tx.cli_hdr.hassh.is_empty() {
×
43
                js.set_string_from_bytes("hash", &tx.cli_hdr.hassh)?;
×
44
            }
×
45
            if !tx.cli_hdr.hassh_string.is_empty() {
×
46
                js.set_string_from_bytes("string", &tx.cli_hdr.hassh_string)?;
×
47
            }
×
48
            js.close()?;
×
49
        }
17✔
50
        js.close()?;
17✔
51
    }
2✔
52
    if !tx.srv_hdr.protover.is_empty() {
19✔
53
        js.open_object("server")?;
19✔
54
        js.set_string_from_bytes_limited(
19✔
55
            "proto_version",
19✔
56
            &tx.srv_hdr.protover,
19✔
57
            SSH_MAX_BANNER_LEN,
19✔
58
        )?;
19✔
59
        if !tx.srv_hdr.swver.is_empty() {
19✔
60
            js.set_string_from_bytes_limited(
19✔
61
                "software_version",
19✔
62
                &tx.srv_hdr.swver,
19✔
63
                SSH_MAX_BANNER_LEN,
19✔
64
            )?;
19✔
65
        }
×
66
        if !tx.srv_hdr.hassh.is_empty() || !tx.srv_hdr.hassh_string.is_empty() {
19✔
67
            js.open_object("hassh")?;
×
68
            if !tx.srv_hdr.hassh.is_empty() {
×
69
                js.set_string_from_bytes("hash", &tx.srv_hdr.hassh)?;
×
70
            }
×
71
            if !tx.srv_hdr.hassh_string.is_empty() {
×
72
                js.set_string_from_bytes("string", &tx.srv_hdr.hassh_string)?;
×
73
            }
×
74
            js.close()?;
×
75
        }
19✔
76
        js.close()?;
19✔
77
    }
×
78
    js.close()?;
19✔
79
    return Ok(true);
19✔
80
}
19✔
81

82
#[no_mangle]
83
pub unsafe extern "C" fn SCSshLogJson(tx: *mut std::os::raw::c_void, js: &mut JsonBuilder) -> bool {
19✔
84
    let tx = cast_pointer!(tx, SSHTransaction);
19✔
85
    if let Ok(x) = log_ssh(tx, js) {
19✔
86
        return x;
19✔
87
    }
×
88
    return false;
×
89
}
19✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc