## narrowing_as_casts
src/heuristics/rust/mod.rs:115:        " as u8",
src/heuristics/rust/mod.rs:116:        " as u16",
src/heuristics/rust/mod.rs:117:        " as u32",
src/heuristics/rust/mod.rs:118:        " as u64",
src/heuristics/rust/mod.rs:119:        " as usize",
src/heuristics/rust/mod.rs:120:        " as i8",
src/heuristics/rust/mod.rs:121:        " as i16",
src/heuristics/rust/mod.rs:122:        " as i32",
src/heuristics/rust/mod.rs:123:        " as i64",
src/heuristics/rust/mod.rs:124:        " as isize",

## split_at_and_indexing
src/analysis/python/parser/general/imports.rs:140:                return &line[..index];
src/analysis/python/parser/hotpath.rs:100:                    let inner = &after_in[1..after_in.len() - 1];
src/analysis/python/parser/hotpath.rs:110:            let after_not_in = &trimmed[in_idx + 8..]; // skip " not in "
src/analysis/python/parser/hotpath.rs:112:                let inner = &after_not_in[1..after_not_in.len() - 1];
src/analysis/python/parser/hotpath.rs:188:            let iterable = &trimmed[in_idx + 4..];
src/analysis/python/parser/hotpath.rs:284:                let after_open = &trimmed[callee.len() + 1..];
src/analysis/python/parser/hotpath.rs:286:                    let first_arg = after_open[..end].trim();
src/analysis/python/parser/hotpath.rs:332:            let iterable_part = &trimmed[in_idx + 4..];
src/analysis/python/parser/hotpath.rs:35:/// Detect `len([x for x in ... if ...])` patterns — list built only for length.
src/analysis/python/parser/hotpath.rs:458:                let first_arg = after_open[..end].trim();
src/analysis/python/parser/hotpath.rs:58:            let inner = &trimmed[4..trimmed.len() - 1];
src/analysis/python/parser/hotpath.rs:71:/// Detect `x in [literal, literal, ...]` membership on list literals.
src/analysis/python/parser/hotpath.rs:92:            let before_in = &trimmed[..in_idx];
src/analysis/python/parser/hotpath.rs:97:                let after_in = &trimmed[in_idx + 4..]; // skip " in "
src/analysis/python/parser/hotpath_ext.rs:186:                let after_join = &trimmed[join_idx + 6..];
src/analysis/python/parser/hotpath_ext.rs:240:            let receiver = &trimmed[..get_idx];
src/analysis/python/parser/hotpath_ext.rs:241:            let after = &trimmed[get_idx + 5..];
src/analysis/python/parser/hotpath_ext.rs:243:                let key = after[..end].trim();
src/analysis/rust/parser/evidence.rs:204:    text[vec_start + 4..].contains("Box<")
src/heuristics/go/framework_patterns/data_access/sql.rs:554:                let after_like = &upper[like_pos + 4..];
src/heuristics/go/framework_patterns/gin.rs:241:            let mut evidence = vec![format!("FormFile(...) observed at line {}", call.line)];
src/heuristics/go/framework_patterns/gin.rs:696:        text = text[1..text.len() - 1].trim();
src/heuristics/go/framework_patterns/gin.rs:766:        for (end_index, current) in suffix[index + character.len_utf8()..].char_indices() {
src/heuristics/go/framework_patterns/gin.rs:775:                return Some(suffix[start..end].to_string());
src/heuristics/go/framework_patterns/gin.rs:801:                    return Some(suffix[..index].trim().to_string());
src/heuristics/go/framework_patterns/gin.rs:805:            ',' if depth == 0 => return Some(suffix[..index].trim().to_string()),
src/heuristics/go/framework_patterns/hot_path/repeated_work.rs:1248:                    return Some(suffix[..index].trim().to_string());
src/heuristics/go/framework_patterns/hot_path/repeated_work.rs:1252:            ',' if depth == 0 => return Some(suffix[..index].trim().to_string()),
src/heuristics/go/framework_patterns/mod.rs:319:        if &bytes[start..start + keyword_bytes.len()] != keyword_bytes {
src/heuristics/go/idioms.rs:1039:    let parameters = &signature_text[parameters_start + 1..parameters_end];
src/heuristics/go/idioms.rs:1085:        if &bytes[start..start + keyword_bytes.len()] != keyword_bytes {
src/heuristics/go/library_misuse/performance/collections.rs:179:        let Some(end) = bl.text[start..].find(']') else {
src/heuristics/go/library_misuse/performance/collections.rs:183:        let key_expr = bl.text[start + 1..end].trim();
src/heuristics/go/library_misuse/performance/collections.rs:184:        let map_expr = bl.text[..start]
src/heuristics/go/performance.rs:340:        if &bytes[start..start + keyword_bytes.len()] != keyword_bytes {
src/heuristics/python/framework/django.rs:224:            let rhs = &trimmed[eq_idx + 3..];
src/heuristics/python/framework/django.rs:226:                let var = trimmed[..eq_idx].trim().to_string();
src/heuristics/python/hotpath_ext.rs:418:        // Match patterns like `[x for x in items if ...]` or `filter(lambda x: ..., items)`
src/heuristics/python/hotpath_ext.rs:420:            && let Some(source_start) = trimmed[in_idx + 5..].find(" in ")
src/heuristics/python/hotpath_ext.rs:422:            let after_in = &trimmed[in_idx + 5 + source_start + 4..];
src/heuristics/python/hotpath_ext.rs:688:            let expr = &trimmed[1..for_idx];
src/heuristics/python/hotpath_ext.rs:726:                let next_lines = &lines[i + 1..std::cmp::min(i + 10, lines.len())];
src/heuristics/python/packaging.rs:330:        [first, ..] => Some(*first),
src/heuristics/python/quality/mod.rs:221:    split_top_level_commas(&signature_text[start + 1..end])
src/heuristics/rust/api_design.rs:101:    split_top_level_commas(&signature_text[start + 1..end])
src/heuristics/rust/api_design.rs:85:    for (offset, character) in signature_text[start..].char_indices() {
src/heuristics/rust/module_surface.rs:90:        description: "Same-directory #[path = \"...\"] module attributes that standard resolution could replace.",
src/heuristics/rust/performance.rs:354:    text[vec_start + 4..].contains("Box<")
src/heuristics/rust/performance.rs:361:    line[start + marker.len()..].starts_with('/')
src/heuristics/rust/performance.rs:442:                let receiver = &line[start..index];
src/heuristics/rust/runtime_boundary.rs:271:        if &bytes[start..start + keyword_bytes.len()] != keyword_bytes {
src/rules.rs:509:        while let Some(offset) = source[search_start..].find("rule_id: \"") {
src/rules.rs:511:            let Some(end_offset) = source[start..].find('\"') else {
src/rules.rs:515:            ids.insert(source[start..start + end_offset].to_string());
tests/integration_scan/mod.rs:33:#[path = "../support/mod.rs"]

## toctou_fs_checks
src/cli/rules.rs:201:    fn json_rules_report_renders_metadata() {
src/heuristics/python/framework/django.rs:26:                "function {} uses .count() > 0; prefer .exists() to avoid full count",
src/heuristics/python/packaging.rs:250:    candidate.exists().then_some(candidate)
src/heuristics/rust/boundary.rs:203:            && contains_any(line, &["exists(", "symlink_metadata(", "read_link("])
src/heuristics/rust/runtime_boundary.rs:173:    if !should_emit_workspace_manifest_finding(file, index.root()) || !manifest_path.exists() {
src/heuristics/rust/security_footguns.rs:209:    if !should_emit_manifest_finding(file, index.root()) || !manifest_path.exists() {
src/io.rs:16:        .metadata()
src/io.rs:67:    let metadata = symlink_metadata(path).map_err(|error| Error::io(path, error))?;
src/rules.rs:169:    fn finds_known_rule_metadata() {
src/rules.rs:170:        let metadata = rule_metadata("dropped_error", RuleLanguage::Go)
src/rules.rs:203:        let async_rule = rule_metadata("rust_async_lock_order_cycle", RuleLanguage::Rust)
src/rules.rs:212:        let go_experimental = rule_metadata("likely_n_squared_allocation", RuleLanguage::Go)
src/rules.rs:68:pub fn rule_metadata(rule_id: &str, language: RuleLanguage) -> Option<&'static RuleMetadata> {
src/rules/catalog/python/framework.rs:169:        description: "Django querysets use count() for existence checks instead of exists().",
tests/benchmark_guard.rs:36:        repo_root.exists(),

## toctou_check_then_open
src/heuristics/rust/boundary.rs:203: prior check:             && contains_any(line, &["exists(", "symlink_metadata(", "read_link("])
src/heuristics/rust/boundary.rs:209: check-then-open candidate after line 203:         if check_line.is_some() && contains_any(line, &["File::open(", ".open(", "read_to_string("])

## secret_comparisons
src/analysis/rust/parser/tests.rs:90:            .any(|name| name == "password")
src/heuristics/rust/mod.rs:265:        .any(|token| normalized == *token || normalized.contains(token))
src/rules/catalog/go/security.rs:631:        description: "`token == expectedToken` or `bytes.Equal(token, expected)` for comparing authentication tokens, API keys, or HMAC values",
tests/integration_scan/security.rs:29:            .any(|finding| finding.rule_id == "hardcoded_secret")
tests/integration_scan/security.rs:44:            .any(|finding| finding.rule_id == "hardcoded_secret")

## shared_mutability
src/heuristics/rust/api_design.rs:244:        "RefCell<",
src/heuristics/rust/api_design.rs:274:    type_text.contains("Rc<RefCell<") || type_text.contains("Rc<std::cell::RefCell<")
src/heuristics/rust/api_design_state.rs:78:                        "struct {} uses Rc<RefCell<_>> in a domain-style type",
src/heuristics/rust/security_footguns.rs:183:            name.contains("parent") && type_text.contains("Rc<") && !type_text.contains("Weak<")
src/rules/catalog/rust/api_design.rs:227:        description: "Domain-style structs built around Rc<RefCell<T>> instead of clearer ownership boundaries.",

## unsafe_globals
src/analysis/rust/parser/items/statics.rs:53:            .is_some_and(|text| text.contains("static mut ")),
src/heuristics/rust/security_footguns.rs:83:        description: "static mut global state that bypasses the safer shared-state models already in the scanner.",

## derive_default
src/analysis/config.rs:1:#[derive(Debug, Clone, Copy, Default)]
src/analysis/types/core.rs:53:#[derive(Debug, Clone, Default)]
src/analysis/types/core.rs:62:#[derive(Debug, Clone, Default)]
src/analysis/types/core.rs:69:#[derive(Debug, Clone, Default)]

## thread_spawn_async
src/heuristics/rust/security_footguns.rs:346:        &["thread::spawn(", "std::thread::spawn("],
src/heuristics/rust/security_footguns.rs:370:        &["thread::spawn(", "std::thread::spawn("],
src/heuristics/rust/security_footguns.rs:55:        description: "Raw std::thread::spawn blocks that call async work without an explicit runtime handoff.",

## path_join_absolute

