crates.io / bstr / 1.14.0

bstr 1.14.0

Source
https://github.com/BurntSushi/bstr
Tag scanned
1.14.0
Compared with
1.13.1 (0 signals introduced since)
Files
62 scanned, 27 skipped (binary, oversized, or unrecognised)
Signals
0 critical · 0 warn · 33 info
Scan time
5.6 s
LLM review
Reviewed by claude-haiku-5-5 (Anthropic): 2 of 2 warn and critical signals; 2 demoted to info.
Disclude version
4.3.0
Scanned (UTC)
2026-11-18 21:28

Signals

Ordered by severity, then signals introduced in this release. Hidden characters are shown as ⟨U+…⟩.

  1. info warn → info by review unicode-mixed-script bench/data/opensubtitles2018-ru-huge-utf8.txt:6447:19

    identifier `Финикc` mixes scripts: Cyrillic + Latin (raw pass, confidence 0.80)

    - Куда Вы направляетесь?
    Я покинул Финикc, и еду в город Лобос.
    Я свернул на эту дорогу.
    И не видел знака на протяжении 40 км.
    dismissed LLM, confidence 0.95 A Russian subtitle line in a benchmark data file contains a single Latin 'c' inside a Cyrillic word.
    Reasoning

    The snippet is ordinary Russian subtitle dialogue from a benchmark corpus. The flagged token 'Финикc' has a Latin 'c' at the end, which is most likely a typo or OCR/encoding artifact in the source text. It is not an identifier, and there is no code or evasion here.

  2. info critical → info by review dynamic-execution scripts/generate-unicode-data:183:13

    `eval` called on a dynamic (variable/substitution) expression (ast pass, confidence 0.90)

                fun="$(echo "$cmd" | sed 's/-/_/g')"
                eval "$fun"
            else
                echo "unrecognized command: $cmd" >&2
    likely benign LLM, confidence 0.75 A shell generator script uses eval on a function name derived from its command-line subcommand argument.
    Reasoning

    The script is a developer tool that dispatches subcommands by converting a command name into a function name with sed (dashes to underscores) and then calls eval on it. The eval is a shell dispatch idiom and the name is restricted to a function identifier. The risk is that eval runs on a CLI argument, so metacharacters could slip through the sed step. That is a local-tooling hygiene issue, not evidence of obfuscation or malicious intent, and the critical severity is overstated.

  3. info unicode-mixed-script src/ext_slice.rs:262:23

    identifier `βツ` mixes scripts: Greek + Katakana (in string/comment) (raw pass, confidence 0.40)

        /// # fn example() -> Result<(), bstr::Utf8Error> {
        /// let s = B("☃βツ").to_str()?;
        /// assert_eq!("☃βツ", s);
        ///
  4. info unicode-mixed-script src/ext_slice.rs:263:24

    identifier `βツ` mixes scripts: Greek + Katakana (in string/comment) (raw pass, confidence 0.40)

        /// let s = B("☃βツ").to_str()?;
        /// assert_eq!("☃βツ", s);
        ///
        /// let mut bstring = <Vec<u8>>::from("☃βツ");
  5. info unicode-mixed-script src/ext_slice.rs:265:47

    identifier `βツ` mixes scripts: Greek + Katakana (in string/comment) (raw pass, confidence 0.40)

        ///
        /// let mut bstring = <Vec<u8>>::from("☃βツ");
        /// bstring.push(b'\xFF');
        /// let err = bstring.to_str().unwrap_err();
  6. info unicode-mixed-script src/ext_slice.rs:304:32

    identifier `βツ` mixes scripts: Greek + Katakana (in string/comment) (raw pass, confidence 0.40)

        /// // valid UTF-8 by the Rust compiler.
        /// let s = unsafe { B("☃βツ").to_str_unchecked() };
        /// assert_eq!("☃βツ", s);
        /// ```
  7. info unicode-mixed-script src/ext_slice.rs:305:24

    identifier `βツ` mixes scripts: Greek + Katakana (in string/comment) (raw pass, confidence 0.40)

        /// let s = unsafe { B("☃βツ").to_str_unchecked() };
        /// assert_eq!("☃βツ", s);
        /// ```
        #[inline]
  8. info unicode-mixed-script src/ext_slice.rs:345:47

    identifier `βツ` mixes scripts: Greek + Katakana (in string/comment) (raw pass, confidence 0.40)

        ///
        /// let mut bstring = <Vec<u8>>::from("☃βツ");
        /// assert_eq!(Cow::Borrowed("☃βツ"), bstring.to_str_lossy());
        ///
  9. info unicode-mixed-script src/ext_slice.rs:346:38

    identifier `βツ` mixes scripts: Greek + Katakana (in string/comment) (raw pass, confidence 0.40)

        /// let mut bstring = <Vec<u8>>::from("☃βツ");
        /// assert_eq!(Cow::Borrowed("☃βツ"), bstring.to_str_lossy());
        ///
        /// // Add a byte that makes the sequence invalid.
  10. info unicode-mixed-script src/ext_slice.rs:350:38

    identifier `βツ` mixes scripts: Greek + Katakana (in string/comment) (raw pass, confidence 0.40)

        /// bstring.push(b'\xFF');
        /// assert_eq!(Cow::Borrowed("☃βツ\u{FFFD}"), bstring.to_str_lossy());
        /// ```
        ///
  11. info unicode-mixed-script src/ext_slice.rs:420:47

    identifier `βツ` mixes scripts: Greek + Katakana (in string/comment) (raw pass, confidence 0.40)

        ///
        /// let mut bstring = <Vec<u8>>::from("☃βツ");
        /// // Add a byte that makes the sequence invalid.
        /// bstring.push(b'\xFF');
  12. info unicode-mixed-script src/ext_slice.rs:426:24

    identifier `βツ` mixes scripts: Greek + Katakana (in string/comment) (raw pass, confidence 0.40)

        /// bstring.to_str_lossy_into(&mut dest);
        /// assert_eq!("☃βツ\u{FFFD}", dest);
        /// ```
        #[cfg(feature = "alloc")]
  13. info unicode-homoglyph src/ext_slice.rs:2389:26

    identifier `Β` contains homoglyph candidates: Β (0392)→B (in string/comment) (raw pass, confidence 0.35)

        ///
        /// let s = B("HELLO Β");
        /// assert_eq!("hello β".as_bytes(), s.to_lowercase().as_bytes());
        /// ```
  14. info unicode-homoglyph src/ext_slice.rs:2442:26

    identifier `Β` contains homoglyph candidates: Β (0392)→B (in string/comment) (raw pass, confidence 0.35)

        ///
        /// let s = B("HELLO Β");
        ///
        /// let mut buf = vec![];
  15. info unicode-homoglyph src/ext_slice.rs:2515:26

    identifier `Β` contains homoglyph candidates: Β (0392)→B (in string/comment) (raw pass, confidence 0.35)

        ///
        /// let s = B("HELLO Β");
        /// assert_eq!("hello Β".as_bytes(), s.to_ascii_lowercase().as_bytes());
        /// ```
  16. info unicode-homoglyph src/ext_slice.rs:2516:27

    identifier `Β` contains homoglyph candidates: Β (0392)→B (in string/comment) (raw pass, confidence 0.35)

        /// let s = B("HELLO Β");
        /// assert_eq!("hello Β".as_bytes(), s.to_ascii_lowercase().as_bytes());
        /// ```
        ///
  17. info unicode-homoglyph src/ext_slice.rs:2549:44

    identifier `Β` contains homoglyph candidates: Β (0392)→B (in string/comment) (raw pass, confidence 0.35)

        ///
        /// let mut s = <Vec<u8>>::from("HELLO Β");
        /// s.make_ascii_lowercase();
        /// assert_eq!(s, "hello Β".as_bytes());
  18. info unicode-homoglyph src/ext_slice.rs:2551:30

    identifier `Β` contains homoglyph candidates: Β (0392)→B (in string/comment) (raw pass, confidence 0.35)

        /// s.make_ascii_lowercase();
        /// assert_eq!(s, "hello Β".as_bytes());
        /// ```
        ///
  19. info unicode-homoglyph src/ext_slice.rs:2595:47

    identifier `Β` contains homoglyph candidates: Β (0392)→B (in string/comment) (raw pass, confidence 0.35)

        /// let s = B("hello β");
        /// assert_eq!(s.to_uppercase(), B("HELLO Β"));
        /// ```
        ///
  20. info unicode-homoglyph src/ext_slice.rs:2651:34

    identifier `Β` contains homoglyph candidates: Β (0392)→B (in string/comment) (raw pass, confidence 0.35)

        /// s.to_uppercase_into(&mut buf);
        /// assert_eq!(buf, B("HELLO Β"));
        /// ```
        ///
  21. info unicode-mixed-script src/ext_slice.rs:2996:24

    identifier `βツ` mixes scripts: Greek + Katakana (in string/comment) (raw pass, confidence 0.40)

        /// assert!(B("abc").is_ascii());
        /// assert!(!B("☃βツ").is_ascii());
        /// assert!(!B(b"\xFF").is_ascii());
        /// ```
  22. info unicode-mixed-script src/ext_slice.rs:3017:23

    identifier `βツ` mixes scripts: Greek + Katakana (in string/comment) (raw pass, confidence 0.40)

        /// assert!(B("abc").is_utf8());
        /// assert!(B("☃βツ").is_utf8());
        /// // invalid bytes
        /// assert!(!B(b"abc\xFF").is_utf8());
  23. info unicode-mixed-script src/ext_vec.rs:655:40

    identifier `βツ` mixes scripts: Greek + Katakana (in string/comment) (raw pass, confidence 0.40)

        /// // valid UTF-8 by the Rust compiler.
        /// let s = unsafe { Vec::from("☃βツ").into_string_unchecked() };
        /// assert_eq!("☃βツ", s);
        /// ```
  24. info unicode-mixed-script src/ext_vec.rs:656:24

    identifier `βツ` mixes scripts: Greek + Katakana (in string/comment) (raw pass, confidence 0.40)

        /// let s = unsafe { Vec::from("☃βツ").into_string_unchecked() };
        /// assert_eq!("☃βツ", s);
        /// ```
        #[inline]
  25. info unicode-homoglyph src/lib.rs:73:34

    identifier `Β` contains homoglyph candidates: Β (0392)→B (in string/comment) (raw pass, confidence 0.35)

    lower[0] = b'\xFF';
    // lowercase β is uppercased to Β
    assert_eq!(lower.to_uppercase(), b"\xFFELLO \xCE\x92");
    # }
  26. info unicode-mixed-script src/tests.rs:30:10

    identifier `βツ` mixes scripts: Greek + Katakana (in string/comment) (raw pass, confidence 0.40)

        ("a\u{FFFD}\u{FFFD}\u{FFFD}z", b"a\xED\xA0\x80z"),
        ("☃βツ\u{FFFD}", b"\xe2\x98\x83\xce\xb2\xe3\x83\x84\xFF"),
        ("a\u{FFFD}\u{FFFD}\u{FFFD}b", b"\x61\xF1\x80\x80\xE1\x80\xC2\x62"),
    ];
  27. line length 703 characters (raw pass, confidence 0.50)

    ÷ 0028 × 0022 × 0047 × 006F × 002E × 0022 × 0029 × 0020 ÷ 0028 × 0048 × 0065 × 0020 × 0064 × 0069 × 0064 × 002E × 0029 ÷	#  ÷ [0.2] LEFT PARENTHESIS (Close) × [998.0] QUOTATION MARK (Close) × [998.0] LATIN CAPITAL LETTER G (Upper) × [998.0] LATIN SMALL LETTER O (Lower) × [998.0] FULL STOP (ATerm)
  28. line length 732 characters (raw pass, confidence 0.50)

    ÷ 0028 × 201C × 0047 × 006F × 003F × 201D × 0029 × 0020 ÷ 0028 × 0048 × 0065 × 0020 × 0064 × 0069 × 0064 × 002E × 0029 ÷	#  ÷ [0.2] LEFT PARENTHESIS (Close) × [998.0] LEFT DOUBLE QUOTATION MARK (Close) × [998.0] LATIN CAPITAL LETTER G (Upper) × [998.0] LATIN SMALL LETTER O (Lower) × [998.0] QUEST
  29. line length 1446 characters (raw pass, confidence 0.50)

    ÷ 2060 × 0028 × 2060 × 0022 × 2060 × 0047 × 2060 × 006F × 2060 × 002E × 2060 × 0022 × 2060 × 0029 × 2060 × 0020 × 2060 ÷ 0028 × 2060 × 0048 × 2060 × 0065 × 2060 × 0020 × 2060 × 0064 × 2060 × 0069 × 2060 × 0064 × 2060 × 002E × 2060 × 0029 × 2060 × 2060 ÷	#  ÷ [0.2] WORD JOINER (Form
  30. line length 1475 characters (raw pass, confidence 0.50)

    ÷ 2060 × 0028 × 2060 × 201C × 2060 × 0047 × 2060 × 006F × 2060 × 003F × 2060 × 201D × 2060 × 0029 × 2060 × 0020 × 2060 ÷ 0028 × 2060 × 0048 × 2060 × 0065 × 2060 × 0020 × 2060 × 0064 × 2060 × 0069 × 2060 × 0064 × 2060 × 002E × 2060 × 0029 × 2060 × 2060 ÷	#  ÷ [0.2] WORD JOINER (Form
  31. line length 1806 characters (raw pass, confidence 0.50)

    ÷ 2060 × 0074 × 2060 × 0068 × 2060 × 0065 × 2060 × 0020 × 2060 × 0072 × 2060 × 0065 × 2060 × 0073 × 2060 × 0070 × 2060 × 002E × 2060 × 0020 × 2060 × 006C × 2060 × 0065 × 2060 × 0061 × 2060 × 0064 × 2060 × 0065 × 2060 × 0072 × 2060 × 0073 × 2060 × 0020 × 2060 × 0061 × 2060 × 0072 
  32. info unicode-homoglyph src/utf8.rs:1029:26

    identifier `α` contains homoglyph candidates: α (03B1)→a (in string/comment) (raw pass, confidence 0.35)

            assert_eq!(vec!['☃', '☃'], d("☃☃"));
            assert_eq!(vec!['α', 'β', 'γ', 'δ', 'ε'], d("αβγδε"));
            assert_eq!(vec!['☃', '⛄', '⛇'], d("☃⛄⛇"));
            assert_eq!(vec!['𝗮', '𝗯', '𝗰', '𝗱', '𝗲'], d("𝗮𝗯𝗰𝗱𝗲"));
  33. info unicode-homoglyph src/utf8.rs:1138:50

    identifier `α` contains homoglyph candidates: α (03B1)→a (in string/comment) (raw pass, confidence 0.35)

            assert_eq!(vec!['☃', '☃'], d("☃☃"));
            assert_eq!(vec!['ε', 'δ', 'γ', 'β', 'α'], d("αβγδε"));
            assert_eq!(vec!['⛇', '⛄', '☃'], d("☃⛄⛇"));
            assert_eq!(vec!['𝗲', '𝗱', '𝗰', '𝗯', '𝗮'], d("𝗮𝗯𝗰𝗱𝗲"));

Reproduce This Scan

Run disclude locally to verify. Add --format sarif for SARIF output. Add --llm (with an API key in the environment) to include the LLM review.

cargo install disclude --version 4.3.0
git clone https://github.com/BurntSushi/bstr bstr && cd bstr
git checkout 1.14.0
disclude scan --untrusted --severity info --diff 1.13.1 .