Skip to main content

SKY-D386 · Security in code

Legacy cipher used for encryption

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
Wrong result? Report itA false positive, a missed case or a confusing message: it goes privately to the founder.

Why it matters

These ciphers no longer provide adequate protection for new messages.

What Skylos flags

src/lib.rs · RustReported on line 3
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

src/lib.rs · Rust
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

  1. Skylos resolves the cipher selector and the encryption call.
  2. 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].

From the Skylos rule handbook, Skylos 5.8.0 (commit 5b880b0). All rules.