We're adding continuous coverage-guided fuzzing (cargo-fuzz) and openvtc-core has lots of
good parse surfaces (config, credentials, message types). A few changes make them cleanly
fuzzable:
1. A parsing-only build that drops hardware/network deps
We build the fuzz targets with --no-default-features to avoid the openpgp-card / PCSC
hardware stack. Please make sure openvtc-core compiles and the parse/validate functions
are reachable with --no-default-features (i.e. the serde models, MessageType,
CredentialKind, DID validation don't transitively require the default hardware/network
features). A dedicated parsing feature that gates exactly the pure surfaces would be ideal.
2. Keep the validators/classifiers pub
We depend on these being public:
openvtc_core::MessageType: TryFrom<&str>
openvtc_core::CredentialKind::from_credential(serde_json::Value)
openvtc_core::config::PublicConfig (Deserialize)
openvtc_core::messaging::validate_did(&str) — currently may be private; please export
it (or a small pub validation surface). Our validate_did harness is the only one that
may fail to build today.
3. Split decrypt from parse for the secured/protected configs
SecuredConfig/ProtectedConfig loading is keyring-decrypt + serde in one step. Please expose
the post-decrypt parse(&[u8]) separately so we can fuzz the deserialization of decrypted
plaintext without needing a keyring or real keys.
4. verify_vrc_proof without a live TDK
messaging::verify_vrc_proof needs a TDK/credential context. A way to verify a VRC against an
injected verifying key (no network, no live TDK) would let us fuzz the proof verifier directly.
5. (Nice to have) #[derive(Arbitrary)] on the config/credential structs + an in-repo fuzz/ workspace.
We have harnesses ready for items reachable today (config parse, message-type, credential-kind)
and will contribute the rest as the hooks land. cargo-fuzz needs nightly; we override the
stable pin for fuzz builds only.
We're adding continuous coverage-guided fuzzing (cargo-fuzz) and
openvtc-corehas lots ofgood parse surfaces (config, credentials, message types). A few changes make them cleanly
fuzzable:
1. A parsing-only build that drops hardware/network deps
We build the fuzz targets with
--no-default-featuresto avoid theopenpgp-card/ PCSChardware stack. Please make sure
openvtc-corecompiles and the parse/validate functionsare reachable with
--no-default-features(i.e. the serde models,MessageType,CredentialKind, DID validation don't transitively require the default hardware/networkfeatures). A dedicated
parsingfeature that gates exactly the pure surfaces would be ideal.2. Keep the validators/classifiers
pubWe depend on these being public:
openvtc_core::MessageType: TryFrom<&str>openvtc_core::CredentialKind::from_credential(serde_json::Value)openvtc_core::config::PublicConfig(Deserialize)openvtc_core::messaging::validate_did(&str)— currently may be private; please exportit (or a small
pubvalidation surface). Ourvalidate_didharness is the only one thatmay fail to build today.
3. Split decrypt from parse for the secured/protected configs
SecuredConfig/ProtectedConfigloading is keyring-decrypt + serde in one step. Please exposethe post-decrypt
parse(&[u8])separately so we can fuzz the deserialization of decryptedplaintext without needing a keyring or real keys.
4.
verify_vrc_proofwithout a live TDKmessaging::verify_vrc_proofneeds a TDK/credential context. A way to verify a VRC against aninjected verifying key (no network, no live TDK) would let us fuzz the proof verifier directly.
5. (Nice to have)
#[derive(Arbitrary)]on the config/credential structs + an in-repofuzz/workspace.We have harnesses ready for items reachable today (config parse, message-type, credential-kind)
and will contribute the rest as the hooks land. cargo-fuzz needs nightly; we override the
stable pin for fuzz builds only.