SKY-D386 · Security in code
Legacy cipher used for encryption
HighCWE-327
OpenSSL encrypts new data with DES, RC2 or RC4. RustCrypto CBC encryption with single DES also triggers this rule.
- Languages
- Rust
- Quality gate
- counted toward the gate limits (full and diff scans)
- Finding type
- review
Why it matters
These ciphers no longer provide adequate protection for new messages.
What Skylos flags
use openssl::symm::{encrypt, Cipher};pub fn store(key: &[u8], iv: &[u8], bytes: &[u8]) { let _ = encrypt(Cipher::des_cbc(), key, Some(iv), bytes);}What Skylos leaves alone
use openssl::symm::{encrypt_aead, Cipher};pub fn store(key: &[u8], nonce: &[u8], bytes: &[u8], tag: &mut [u8]) { let _ = encrypt_aead(Cipher::aes_256_gcm(), key, Some(nonce), &[], bytes, tag);}Why Skylos leaves it alone
AES-GCM authenticates the encrypted message.
How Skylos decides
- Skylos resolves the cipher selector and the encryption call.
- A local alias of either can still be checked.
How to fix it
Use a modern authenticated encryption scheme and migrate readers separately.
When it can be wrong
- Decryption for reading legacy data is outside this check.
Seeing a case that isn't listed here? Report the wrong result so the rule can be fixed. Don't paste company code: describe the shape of it.
How to silence it
Record the reason on the reported line with
// skylos: ignore[SKY-D386].