[package]
edition = "2024"
rust-version = "1.85"
name = "boreal"
version = "1.2.0"
build = false
exclude = ["/tests"]
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "A library to evaluate YARA rules, used to scan bytes for textual and binary pattern"
readme = "README.md"
keywords = [
"boreal",
"yara",
"string-matching",
"scan",
]
categories = ["text-processing"]
license = "MIT OR Apache-2.0"
repository = "https://github.com/vthib/boreal"
resolver = "2"
[package.metadata.docs.rs]
features = [
"authenticode",
"memmap",
"magic",
"cuckoo",
]
[features]
authenticode = [
"dep:const-oid",
"dep:der",
"dep:md-5",
"dep:sha1",
"dep:sha2",
]
authenticode-verify = [
"dep:rsa",
"dep:dsa",
"dep:p256",
"dep:p384",
"dep:spki",
"md-5?/oid",
"sha1?/oid",
"sha2?/oid",
]
cuckoo = [
"dep:serde_json",
"yara/module-cuckoo",
]
default = [
"hash",
"object",
"memmap",
"process",
"authenticode",
]
hash = [
"dep:md-5",
"dep:sha1",
"dep:sha2",
"dep:crc32fast",
"dep:tlsh2",
]
magic = [
"dep:magic",
"yara/module-magic",
]
memmap = ["dep:memmap2"]
object = ["dep:object"]
process = [
"dep:libc",
"dep:windows-sys",
"dep:mach2",
]
profiling = []
serialize = ["dep:borsh"]
[lib]
name = "boreal"
path = "src/lib.rs"
[dependencies.aho-corasick]
version = "1.1"
[dependencies.boreal-parser]
version = "1.2.0"
[dependencies.borsh]
version = "1.6.0"
optional = true
[dependencies.codespan-reporting]
version = "0.13"
[dependencies.const-oid]
version = "0.9"
features = ["db"]
optional = true
[dependencies.crc32fast]
version = "1.5"
optional = true
[dependencies.der]
version = "0.7"
features = [
"derive",
"oid",
"std",
]
optional = true
[dependencies.dsa]
version = "0.6"
optional = true
default-features = false
[dependencies.magic]
version = "0.16"
optional = true
[dependencies.md-5]
version = "0.10"
optional = true
[dependencies.memchr]
version = "2.8"
[dependencies.memmap2]
version = "0.9"
optional = true
[dependencies.object]
version = "0.39"
features = ["read"]
optional = true
default-features = false
[dependencies.p256]
version = "0.13"
features = [
"ecdsa",
"pem",
]
optional = true
default-features = false
[dependencies.p384]
version = "0.13"
features = [
"ecdsa",
"pem",
]
optional = true
default-features = false
[dependencies.regex-automata]
version = "0.4"
features = [
"std",
"syntax",
"perf",
"meta",
"nfa",
"dfa",
"hybrid",
]
default-features = false
[dependencies.regex-syntax]
version = "0.8"
default-features = false
[dependencies.rsa]
version = "0.9"
optional = true
default-features = false
[dependencies.serde_json]
version = "1.0"
optional = true
[dependencies.sha1]
version = "0.10"
optional = true
[dependencies.sha2]
version = "0.10"
optional = true
[dependencies.spki]
version = "0.7"
optional = true
default-features = false
[dependencies.tlsh2]
version = "1.1"
optional = true
[dev-dependencies.base64]
version = "0.22"
[dev-dependencies.glob]
version = "0.3.1"
[dev-dependencies.tempfile]
version = "3.24"
default-features = false
[dev-dependencies.yara]
version = "0.32"
features = ["vendored"]
[target.'cfg(target_os = "linux")'.dependencies.libc]
version = "0.2"
optional = true
[target.'cfg(target_os = "macos")'.dependencies.libc]
version = "0.2"
optional = true
[target.'cfg(target_os = "macos")'.dependencies.mach2]
version = "0.6"
optional = true
[target."cfg(windows)".dependencies.windows-sys]
version = "0.61"
features = [
"Win32_Foundation",
"Win32_Security",
"Win32_System_Diagnostics_Debug",
"Win32_System_Memory",
"Win32_System_Threading",
]
optional = true
[lints.clippy]
inline_always = "allow"
match_same_arms = "allow"
module_name_repetitions = "allow"
multiple_crate_versions = "allow"
single_match_else = "allow"
struct_excessive_bools = "allow"
struct_field_names = "allow"
too_many_lines = "allow"
undocumented_unsafe_blocks = "deny"
unnested_or_patterns = "allow"
[lints.clippy.all]
level = "deny"
priority = -1
[lints.clippy.cargo]
level = "deny"
priority = -1
[lints.clippy.pedantic]
level = "deny"
priority = -1
[lints.rust]
ambiguous_negative_literals = "deny"
deprecated_safe_2024 = "deny"
explicit_outlives_requirements = "deny"
impl_trait_overcaptures = "deny"
keyword_idents_2024 = "deny"
let_underscore_drop = "deny"
macro_use_extern_crate = "deny"
missing_abi = "deny"
missing_docs = "deny"
missing_unsafe_on_extern = "deny"
non_ascii_idents = "deny"
redundant_lifetimes = "deny"
rust_2024_guarded_string_incompatible_syntax = "deny"
rust_2024_incompatible_pat = "deny"
rust_2024_prelude_collisions = "deny"
single_use_lifetimes = "deny"
trivial_casts = "deny"
trivial_numeric_casts = "deny"
unit_bindings = "deny"
unsafe_attr_outside_unsafe = "deny"
unsafe_code = "deny"
unsafe_op_in_unsafe_fn = "deny"
unused_crate_dependencies = "deny"
unused_extern_crates = "deny"
unused_import_braces = "deny"
unused_lifetimes = "deny"
unused_macro_rules = "deny"
unused_qualifications = "deny"
unused_results = "deny"
variant_size_differences = "deny"
[lints.rust.unexpected_cfgs]
level = "warn"
priority = 0
check-cfg = ["cfg(coverage_nightly)"]