mirror of
https://github.com/aquasecurity/trivy.git
synced 2026-01-31 13:53:14 +08:00
30 lines
891 B
Plaintext
30 lines
891 B
Plaintext
Test case: Malformed Cargo.toml with valid Cargo.lock.
|
|
|
|
This test verifies that the analyzer handles a corrupted Cargo.toml file gracefully.
|
|
The Cargo.toml contains only "[" which is invalid TOML, but Cargo.lock is valid.
|
|
|
|
Expected behavior:
|
|
- Fall back to parsing only Cargo.lock
|
|
- All packages should have RelationshipUnknown (cannot determine relationships)
|
|
- Package information should still be extracted from Cargo.lock
|
|
|
|
-- Cargo.lock --
|
|
# This file is automatically @generated by Cargo.
|
|
# It is not intended for manual editing.
|
|
version = 3
|
|
|
|
[[package]]
|
|
name = "app"
|
|
version = "0.1.0"
|
|
dependencies = [
|
|
"memchr 2.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
|
]
|
|
|
|
[[package]]
|
|
name = "memchr"
|
|
version = "2.5.0"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d"
|
|
-- Cargo.toml --
|
|
[
|