clamav/common
Valerie Snyder 6d9b57eeeb
libclamav: cl_scan*_ex() functions provide verdict separate from errors
It is a shortcoming of existing scan APIs that it is not possible
to return an error without masking a verdict.
We presently work around this limitation by counting up detections at
the end and then overriding the error code with `CL_VIRUS`, if necessary.

The `cl_scanfile_ex()`, `cl_scandesc_ex()`, and `cl_scanmap_ex()` functions
should provide the scan verdict separately from the error code.

This introduces a new enum for recording and reporting a verdict:
`cl_verdict_t` with options:

- `CL_VERDICT_NOTHING_FOUND`
- `CL_VERDICT_TRUSTED`
- `CL_VERDICT_STRONG_INDICATOR`
- `CL_VERDICT_POTENTIALLY_UNWANTED`

Notably, the newer scan APIs may set the verdict to `CL_VERDICT_TRUSTED`
if there is a (hash-based) FP signature for a file, or in the cause where
Authenticode or similar certificate-based verification was performed, or
in the case where an application scan callback returned `CL_VERIFIED`.

CLAM-763
CLAM-865
2025-08-14 22:40:46 -04:00
..
linux Bump copyright dates for 2025 2025-02-14 10:24:30 -05:00
mac Bump copyright dates for 2025 2025-02-14 10:24:30 -05:00
win Bump copyright dates for 2025 2025-02-14 10:24:30 -05:00
actions.c Windows: Fix filepath basename issue 2025-08-11 18:14:19 -04:00
actions.h Bump copyright dates for 2025 2025-02-14 10:24:30 -05:00
cert_util.c Bump copyright dates for 2025 2025-02-14 10:24:30 -05:00
cert_util.h Bump copyright dates for 2025 2025-02-14 10:24:30 -05:00
cert_util_internal.h Bump copyright dates for 2025 2025-02-14 10:24:30 -05:00
clamdcom.c Bump copyright dates for 2025 2025-02-14 10:24:30 -05:00
clamdcom.h Bump copyright dates for 2025 2025-02-14 10:24:30 -05:00
CMakeLists.txt Bump copyright dates for 2025 2025-02-14 10:24:30 -05:00
exeScanner.c Bump copyright dates for 2025 2025-02-14 10:24:30 -05:00
exeScanner.h Bump copyright dates for 2025 2025-02-14 10:24:30 -05:00
fdpassing.h Bump copyright dates for 2025 2025-02-14 10:24:30 -05:00
getopt.c Fix typos and remove duplicate #include 2024-04-10 19:31:46 -04:00
getopt.h Add explicit log level parameter to application logging API 2022-02-15 15:13:55 -08:00
hostid.c Bump copyright dates for 2025 2025-02-14 10:24:30 -05:00
hostid.h Bump copyright dates for 2025 2025-02-14 10:24:30 -05:00
idmef_logging.c Add explicit log level parameter to application logging API 2022-02-15 15:13:55 -08:00
idmef_logging.h Rename "shared" library to "common" 2021-04-20 17:31:19 -07:00
misc.c FIPS-compliant CVD signing and verification 2025-03-26 19:33:25 -04:00
misc.h Bump copyright dates for 2025 2025-02-14 10:24:30 -05:00
optparser.c FIPS & FIPS-like limits on hash algs for cryptographic uses 2025-08-14 22:39:15 -04:00
optparser.h Extend config inline comment support to exclude leading tabs 2025-05-24 14:35:36 -04:00
output.c Windows: Fix issue printing unicode filenames (#1461) 2025-07-25 17:42:43 -04:00
output.h Bump copyright dates for 2025 2025-02-14 10:24:30 -05:00
scanmem.c libclamav: cl_scan*_ex() functions provide verdict separate from errors 2025-08-14 22:40:46 -04:00
scanmem.h ClamScan & libclamav: improve precision of bytes-scanned, bytes-read 2025-08-14 22:39:15 -04:00
service.c Bump copyright dates for 2025 2025-02-14 10:24:30 -05:00
service.h Bump copyright dates for 2025 2025-02-14 10:24:30 -05:00
tar.c Bump copyright dates for 2025 2025-02-14 10:24:30 -05:00
tar.h Bump copyright dates for 2025 2025-02-14 10:24:30 -05:00