Skip to content
Back to skills

1742 Issue Identifiers 96c5c70c

ASecurity

*Complete identifier reference for all YARA rule conventions, errors, and recommendations. Combines yaraQA automated checks with style guide and performance manual review items.*

  • 9 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added May 31, 2026
documentationgoshellgitsecurityperformance

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned May 31, 2026

npx -y skills add tools-only/X-Skills --skill 1742-issue-identifiers_96c5c70c --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of 1742 Issue Identifiers 96c5c70c?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for 1742 Issue Identifiers 96c5c70c
[![Security: A β€” Skills Directory](https://www.skillsdirectory.com/api/skills/tools-only-1742-issue-identifiers-96c5c70c/badge)](https://www.skillsdirectory.com/skills/tools-only-1742-issue-identifiers-96c5c70c)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
# YARA Rule Issue Identifiers

*Complete identifier reference for all YARA rule conventions, errors, and recommendations. Combines yaraQA automated checks with style guide and performance manual review items.*

## Identifier Scheme

| Code | Category | Source | Level |
|------|----------|--------|-------|
|`CE`|Condition Error|yaraQA|Error πŸ”΄|
|`CF`|Condition Fail (performance)|yaraQA|Warning 🟑|
|`CS`|Combination/String|yaraQA|Warning 🟑|
|`DS`|Duplicate String|yaraQA|Warning 🟑|
|`DU`|Duplicate Rule|yaraQA|Warning 🟑|
|`HS`|High String count|yaraQA|Info/Warning πŸ”΅πŸŸ‘|
|`MF`|Meta Field|Style Guide|Info/Warning πŸ”΅πŸŸ‘|
|`MO`|Module usage|yaraQA|Info πŸ”΅|
|`NC`|Naming Convention|Style Guide|Warning 🟑|
|`NO`|Nocase+Other modifiers|yaraQA|Info πŸ”΅|
|`PA`|Performance Atom|yaraQA|Warning 🟑|
|`PI`|Performance Impact|yaraQA|Warning 🟑|
|`RE`|Regex Error|yaraQA|Warning 🟑|
|`RX`|Performance eXtended|Performance|Warning 🟑|
|`SM`|String Modifier|yaraQA|Info/Error πŸ”΅πŸ”΄|
|`SS`|String Style|Style Guide|Info πŸ”΅|
|`ST`|String Triad|Style Guide|Info πŸ”΅|
|`SV`|String Value (style)|yaraQA|Info/Warning πŸ”΅πŸŸ‘|
|`ID`|Indentation/Formatting|Style Guide|Info πŸ”΅|
|`FM`|condition Formatting|Style Guide|Info πŸ”΅|

---

## NC β€” Naming Convention Issues

*From YARA Style Guide β€” Rule naming standards*

### NC1 β€” Missing Main Category

**Level:** Warning 🟑
**Check:** Rule name lacks a main category prefix

```yara
// WRONG: No category
rule CobaltStrike_Loader { ... }

// CORRECT:
rule MAL_CobaltStrike_Loader_May23 { ... }
rule HKTL_CobaltStrike_Beacon_Jan24 { ... }
```

**Main Categories Required:**
- `MAL` β€” Malware
- `HKTL` β€” Hack tool
- `WEBSHELL` β€” Web shell
- `EXPL` β€” Exploit code
- `VULN` β€” Vulnerable component
- `SUSP` β€” Suspicious/generic
- `PUA` β€” Potentially unwanted application

---

### NC2 β€” Incorrect Category Order

**Level:** Info πŸ”΅
**Check:** Naming components not ordered from generic to specific

```yara
// SUBOPTIMAL: Specific before generic
rule Loader_MAL_APT_CozyBear_ELF_Apr18 { ... }

// CORRECT: Generic to specific
rule MAL_APT_CozyBear_ELF_Loader_Apr18 { ... }
```

**Correct Order:** `CATEGORY β†’ INTENTION β†’ ACTOR β†’ PLATFORM β†’ TYPE β†’ DATE`

---

### NC3 β€” Missing Date Suffix

**Level:** Info πŸ”΅
**Check:** Rule lacks MonthYear or numeric suffix

```yara
// SUBOPTIMAL: No date
rule MAL_APT_CozyBear_ELF_Loader { ... }

// CORRECT:
rule MAL_APT_CozyBear_ELF_Loader_Apr18 { ... }
rule MAL_APT_CozyBear_ELF_Loader_1 { ... }
```

---

### NC4 β€” Ambiguous Technology Tag

**Level:** Info πŸ”΅
**Check:** File type detectable from strings but not in name

```yara
// INCONSISTENT: Go binary detection but not in name
rule MAL_APT_CozyBear_Loader_Apr18 {
    strings:
        $a1 = "Go build"  // Clearly Go binary
    ...
}

// CORRECT:
rule MAL_APT_CozyBear_GO_Loader_Apr18 { ... }
```

---

### NC5 β€” Platform Omission When Non-Windows

**Level:** Info πŸ”΅
**Check:** Non-Windows rule missing platform indicator

```yara
// SUBOPTIMAL: ELF binary without LNX
rule MAL_APT_CozyBear_ELF_Loader_Apr18 { ... }

// CORRECT:
rule MAL_APT_CozyBear_LNX_ELF_Loader_Apr18 { ... }
```

**Note:** `WIN` is default and often omitted, but `LNX`, `MacOS` should be explicit.

---

### NC6 β€” Modifier Not Reflected in Name

**Level:** Info πŸ”΅
**Check:** Rule detects obfuscated/encoded/InMemory but name doesn't indicate

```yara
// INCONSISTENT: Detects obfuscation but not in name
rule MAL_CRIME_RANSOM_PS1_Loader_May23 {
    strings:
        $a1 = /[Bb]64[Dd]ecode/  // Obfuscated Base64
    ...
}

// CORRECT:
rule MAL_CRIME_RANSOM_PS1_OBFUSC_Loader_May23 { ... }
```

**Common Modifiers:** `OBFUSC`, `Encoded`, `Unpacked`, `InMemory`

---

## MF β€” Meta Field Issues

*From YARA Style Guide β€” Metadata standards*

### MF1 β€” Missing Mandatory Meta Field

**Level:** Warning 🟑
**Check:** Rule lacks description, author, reference, or date

```yara
// WRONG: Missing fields
rule MAL_Test_May23 {
    meta:
        description = "Detects malware"
        // Missing: author, reference, date
    ...
}

// CORRECT:
rule MAL_Test_May23 {
    meta:
        description = "Detects X malware family"
        author = "Analyst Name / Company"
        reference = "https://blog.example.com/analysis"
        date = "2023-05-15"
    ...
}
```

**Mandatory Fields:** `description`, `author`, `reference`, `date`

---

### MF2 β€” Description Without "Detects"

**Level:** Info πŸ”΅
**Check:** Description doesn't start with "Detects ..."

```yara
// SUBOPTIMAL:
description = "This is a rule for malware X"

// CORRECT:
description = "Detects X malware family used by APT Y"
```

---

### MF3 β€” Description Contains URL

**Level:** Info πŸ”΅
**Check:** Description field includes URL (should be in reference)

```yara
// WRONG:
description = "Detects malware from https://evil.com/campaign"

// CORRECT:
description = "Detects malware from Evil campaign"
reference = "https://evil.com/campaign"
```

---

### MF4 β€” Description Too Short or Too Long

**Level:** Info πŸ”΅
**Check:** Description < 60 or > 400 characters

```yara
// TOO SHORT (< 60):
description = "Detects evil"

// TOO LONG (> 400):
description = "Detects a very complex malware that does many things including ... [300 more chars]"

// CORRECT (60-400 chars):
description = "Detects X malware family used by APT Y in Z campaign targeting financial institutions"
```

---

### MF5 β€” Author Field Contains URL

**Level:** Info πŸ”΅
**Check:** Author field has URL instead of name/handle

```yara
// WRONG:
author = "https://twitter.com/analyst"

// CORRECT:
author = "Analyst Name (@twitterhandle)"
author = "Security Team / Company Name"
```

---

### MF6 β€” Multiple Author Fields

**Level:** Info πŸ”΅
**Check:** Multiple authors as separate fields instead of comma-separated

```yara
// WRONG:
meta:
    author = "Alice"
    author = "Bob"
    author = "Charlie"

// CORRECT:
meta:
    author = "Alice, Bob, Charlie"
```

---

### MF7 β€” Date Format Incorrect

**Level:** Warning 🟑
**Check:** Date not in YYYY-MM-DD format

```yara
// WRONG:
date = "15-05-2023"
date = "May 15, 2023"
date = "2023"

// CORRECT:
date = "2023-05-15"
```

---

### MF8 β€” Reference is Unstable/Private

**Level:** Warning 🟑
**Check:** Reference points to private repo, paste bin, or temporary URL

```yara
// PROBLEMATIC:
reference = "https://pastebin.com/raw/abc123"  // Expires
reference = "https://private.intel/internal/123"  // Inaccessible

// PREFERRED:
reference = "https://blog.public-site.com/analysis"
reference = "https://github.com/vendor/advisory/blob/main/CVE-2023-1234.md"
reference = "Internal Research"  // If truly internal
```

---

### MF9 β€” Missing Score for Detection Rules

**Level:** Info πŸ”΅
**Check:** High-confidence malware rule lacks score field

```yara
// SUBOPTIMAL: No score for malware detection
rule MAL_APT_CozyBear_Implant_Apr18 {
    meta:
        description = "Detects CozyBear implant"
    ...
}

// CORRECT:
rule MAL_APT_CozyBear_Implant_Apr18 {
    meta:
        description = "Detects CozyBear implant"
        score = 85  // High: direct malware match
    ...
}
```

---

### MF10 β€” Score Mismatch with Rule Type

**Level:** Warning 🟑
**Check:** Score inconsistent with rule's detection target

```yara
// MISMATCH: Generic heuristic with high score
rule SUSP_Obfuscated_PS1_May23 {
    meta:
        score = 95  // Too high for suspicious/heuristic
    ...
}

// MISMATCH: Known malware with low score
rule MAL_APT_CozyBear_Implant_Apr18 {
    meta:
        score = 45  // Too low for known malware
    ...
}

// CORRECT:
// SUSP rules: 60-79
// MAL rules: 80-100
```

**Score Guidelines:**
- 0-39: Very Low (capabilities, common packers)
- 40-59: Noteworthy (uncommon packers, anomalies)
- 60-79: Suspicious (heuristics, obfuscation)
- 80-100: High (direct malware/hack tool matches)

---

### MF11 β€” Using Archive Hash Instead of File Hash

**Level:** Warning 🟑
**Check:** Hash is for ZIP/RAR containing sample, not extracted file

```yara
// WRONG: Hash of the ZIP container
hash = "a1b2c3d4..."  // Hash of malware.zip

// CORRECT: Hash of extracted malware.exe
hash = "e5f6g7h8..."  // Hash of malware.exe from inside zip
```

---

### MF12 β€” Missing Modified Date for Updated Rules

**Level:** Info πŸ”΅
**Check:** Rule has been updated but lacks `modified` field

```yara
// Original
rule MAL_Test_May23 {
    meta:
        date = "2023-05-15"
    ...
}

// Updated (should indicate modification)
rule MAL_Test_May23 {
    meta:
        date = "2023-05-15"
        modified = "2023-08-20"
    ...
}
```

---

## ID β€” Indentation and Formatting Issues

*From YARA Style Guide β€” Code formatting*

### ID1 β€” Inconsistent Indentation

**Level:** Info πŸ”΅
**Check:** Mixed tabs/spaces or inconsistent indentation levels

```yara
// WRONG: Mixed indentation
rule Bad {
 meta:
  description = "inconsistent"
    author = "mixed"
strings:
$s1 = "value"
 condition:
filesize < 10KB
}

// CORRECT:
rule Good {
   meta:
      description = "consistent 3-space indent"
      author = "Name"
   strings:
      $s1 = "value"
   condition:
      filesize < 10KB
}
```

---

### ID2 β€” No Indentation Inside Rule

**Level:** Warning 🟑
**Check:** Rule content at same level as rule keyword

```yara
// WRONG:
rule NoIndent {
meta:
description = "hard to read"
strings:
$s1 = "test"
condition:
filesize < 10KB
}

// CORRECT: Use 3-4 spaces per level
```

---

## TR β€” String Triad Issues

*From YARA Style Guide β€” $x/$s/$a/$fp convention*

### TR1 β€” Missing Pre-Selection String ($a*)

**Level:** Info πŸ”΅
**Check:** Rule targets specific file type but lacks $a* pre-selection

```yara
// SUBOPTIMAL: No file type pre-selection
rule MAL_Go_Malware_Jan24 {
    strings:
        $x1 = "evil payload"
    condition:
        $x1
}

// CORRECT:
rule MAL_Go_Malware_Jan24 {
    strings:
        $a1 = "Go build"      // Pre-select Go binaries
        $x1 = "evil payload"
    condition:
        $a1 and $x1
}
```

---

### TR2 β€” Incorrect String Prefix Usage

**Level:** Warning 🟑
**Check:** String used inconsistently with its prefix

```yara
// WRONG: $a string used as unique signature
rule MAL_Test_Jan24 {
    strings:
        $a1 = "evil_unique_string"  // Should be $x
    condition:
        $a1  // Using pre-selection string alone
}

// CORRECT:
rule MAL_Test_Jan24 {
    strings:
        $a1 = "Go build"
        $x1 = "evil_unique_string"
    condition:
        $a1 and $x1
}
```

---

### TR3 β€” Missing False Positive Filter

**Level:** Info πŸ”΅
**Check:** Generic rule lacks $fp* strings for known benign matches

```yara
// SUBOPTIMAL: Could match legitimate Go tools
rule HKTL_Go_Tool_Jan24 {
    strings:
        $a1 = "Go build"
        $s1 = "main.hack"
    condition:
        $a1 and $s1
}

// BETTER:
rule HKTL_Go_Tool_Jan24 {
    strings:
        $a1 = "Go build"
        $s1 = "main.hack"
        $fp1 = "Copyright by LegitimateCorp"
    condition:
        $a1 and $s1 and not $fp1
}
```

---

### TR4 β€” $fp String Not Used in Condition

**Level:** Warning 🟑
**Check:** $fp* string defined but not negated in condition

```yara
// WRONG: $fp defined but never checked
rule MAL_Test_Jan24 {
    strings:
        $s1 = "evil"
        $fp1 = "legitimate"
    condition:
        $s1  // Missing: and not $fp1
}

// CORRECT:
condition:
    $s1 and not $fp1
```

---

## SS β€” String Style Issues

*From YARA Style Guide β€” String formatting*

### SS1 β€” Hex String Could Be Text

**Level:** Info πŸ”΅
**Check:** Hex string contains only readable ASCII characters

```yara
// SUBOPTIMAL:
$s1 = { 46 72 6F 6D 42 61 73 65 36 34 }

// CORRECT:
$s1 = "FromBase64"
```

**Exception:** Control characters (`\t`, `\n`) acceptable in hex.

---

### SS2 β€” Long Hex Not Wrapped at 16 Bytes

**Level:** Info πŸ”΅
**Check:** Hex string > 16 bytes on single line

```yara
// HARD TO READ:
$s1 = { 2c 20 2a 79 6f 77 2e 69 20 26 20 30 78 46 46 29 3b 0a 20 20 70 72 69 6e 74 66 20 28 28 28 2a 79 6f 77 2e 69 20 26 20 30 78 66 66 29 }

// CORRECT (wrapped at 16):
$s1 = { 2c 20 2a 79 6f 77 2e 69 20 26 20 30 78 46 46 29 
        3b 0a 20 20 70 72 69 6e 74 66 20 28 28 28 2a 79 
        6f 77 2e 69 20 26 20 30 78 66 66 29 }
```

---

### SS3 β€” Hex String Missing ASCII Comment

**Level:** Info πŸ”΅
**Check:** Hex string representing ASCII lacks comment

```yara
// SUBOPTIMAL:
$s1 = { 29 29 29 3b 0a 49 45 58 28 0a }

// CORRECT:
/* )));
IEX( */
$s1 = { 29 29 29 3b 0a 49 45 58 28 0a }
```

---

### SS4 β€” Long Non-Descriptive Identifier

**Level:** Info πŸ”΅
**Check:** String identifier unnecessarily verbose

```yara
// VERBOSE:
$string_value_footer_1 = "eval("
$selection_14 = "eval("

// CONCISE:
$s1 = "eval("
$eval = "eval("
```

---

## FM β€” Condition Formatting Issues

*From YARA Style Guide β€” Condition structure*

### FM1 β€” Missing Newline Before AND

**Level:** Info πŸ”΅
**Check:** Condition operators on same line

```yara
// SUBOPTIMAL:
condition:
    uint16(0) == 0x5a4d and filesize < 300KB and all of ($s*)

// CORRECT:
condition:
    uint16(0) == 0x5a4d
    and filesize < 300KB
    and all of ($s*)
```

---

### FM2 β€” OR Block Not Indented

**Level:** Info πŸ”΅
**Check:** Parentheses for OR conditions not properly indented

```yara
// SUBOPTIMAL:
condition:
    uint16(0) == 0x5a4d
    and filesize < 300KB
    and ( 1 of ($x*) or all of ($s*) )

// CORRECT:
condition:
    uint16(0) == 0x5a4d
    and filesize < 300KB
    and (
        1 of ($x*)
        or all of ($s*)
    )
```

---

### FM3 β€” Nested OR Without Proper Grouping

**Level:** Info πŸ”΅
**Check:** Complex nested conditions lack clear grouping

```yara
// UNCLEAR:
condition:
    uint16(0) == 0x5a4d
    and 1 of ($x*) or 2 of ($s*) and 3 of them

// CORRECT:
condition:
    uint16(0) == 0x5a4d
    and (
        1 of ($x*)
        or (
            2 of ($s*)
            and 3 of them
        )
    )
```

---

## RX β€” Extended Performance Guidelines

*From YARA Performance Guidelines β€” Manual review items*

### RX1 β€” Using Hash Loop Instead of String Match

**Level:** Warning 🟑
**Check:** Hash calculation in loop instead of direct string match

```yara
// SLOW:
condition:
   for any var_sect in pe.sections:
      (hash.md5(var_sect.raw_data_offset, 0x100) == "d99eb1e503...")

// FAST:
strings:
   $section = { d9 9e b1 e5 03 ca c3 a1 ... }
condition:
   $section
```

---

### RX2 β€” Short String Without Position Check

**Level:** Warning 🟑
**Check:** Short string (< 4 bytes) used without `at` position

```yara
// PROBLEMATIC: Searches entire file
strings:
    $mz = "MZ"
condition:
    $mz

// CORRECT: Use uint or add position
condition:
    uint16(0) == 0x5A4D

// OR:
strings:
    $mz = "MZ"
condition:
    $mz at 0  // Still triggers PA1, but better than no position
```

---

### RX3 β€” Regex With Unbounded Quantifier

**Level:** Warning 🟑
**Check:** Regex uses `.*`, `.+`, or `{x,}` without upper bound

```yara
// SLOW:
$re = /cmd\.exe.*\.dll/
$re = /data.{10,}/     // No upper bound

// BETTER:
$re = /cmd\.{1,50}\.dll/
$re = /data.{10,100}/
```

---

### RX4 β€” Condition Order Not Short-Circuit Optimized

**Level:** Warning 🟑
**Check:** Expensive checks before cheap checks

```yara
// SLOW:
condition:
    math.entropy(0, filesize) > 7
    and uint16(0) == 0x5A4D
    and filesize < 100KB

// FAST:
condition:
    uint16(0) == 0x5A4D
    and filesize < 100KB
    and math.entropy(0, filesize) > 7
```

---

### RX5 β€” Using Module for Simple Header Check

**Level:** Warning 🟑
**Check:** Module imported only for basic file type check

```yara
// SLOW: Parses entire PE
import "pe"
condition: pe.is_pe

// FAST: Header check
condition: uint16(0) == 0x5A4D
```

---

### RX6 β€” Using Magic Module

**Level:** Warning 🟑
**Check:** Magic module used (not available on Windows, slows scanning)

```yara
// SLOW and INCOMPATIBLE:
import "magic"
condition:
    magic.mime_type() == "image/gif"

// FAST:
condition:
    (uint32be(0) == 0x47494638 and uint16be(4) == 0x3961)
    or (uint32be(0) == 0x47494638 and uint16be(4) == 0x3761)
```

---

### RX7 β€” Loop Over Full File Without Filesize Limit

**Level:** Warning 🟑
**Check:** `for` loop without filesize limitation

```yara
// SLOW on large files:
condition:
    $mz at 0
    and for all i in (1..filesize) : (whatever)

// BETTER:
condition:
    $mz at 0
    and filesize < 100KB
    and for all i in (1..filesize) : (whatever)
```

---

## Summary Table

| ID | Issue | Level | Category |
|----|-------|-------|----------|
|NC1|Missing main category|🟑 Warning|Naming|
|NC2|Incorrect category order|πŸ”΅ Info|Naming|
|NC3|Missing date suffix|πŸ”΅ Info|Naming|
|NC4|Ambiguous technology tag|πŸ”΅ Info|Naming|
|NC5|Platform omission (non-Windows)|πŸ”΅ Info|Naming|
|NC6|Modifier not in name|πŸ”΅ Info|Naming|
|MF1|Missing mandatory meta field|🟑 Warning|Metadata|
|MF2|Description without "Detects"|πŸ”΅ Info|Metadata|
|MF3|Description contains URL|πŸ”΅ Info|Metadata|
|MF4|Description length|πŸ”΅ Info|Metadata|
|MF5|Author contains URL|πŸ”΅ Info|Metadata|
|MF6|Multiple author fields|πŸ”΅ Info|Metadata|
|MF7|Date format incorrect|🟑 Warning|Metadata|
|MF8|Unstable/private reference|🟑 Warning|Metadata|
|MF9|Missing score|πŸ”΅ Info|Metadata|
|MF10|Score mismatch|🟑 Warning|Metadata|
|MF11|Archive hash vs file hash|🟑 Warning|Metadata|
|MF12|Missing modified date|πŸ”΅ Info|Metadata|
|ID1|Inconsistent indentation|πŸ”΅ Info|Formatting|
|ID2|No indentation|🟑 Warning|Formatting|
|TR1|Missing pre-selection string|πŸ”΅ Info|Strings|
|TR2|Incorrect prefix usage|🟑 Warning|Strings|
|TR3|Missing false positive filter|πŸ”΅ Info|Strings|
|TR4|$fp not used in condition|🟑 Warning|Strings|
|SS1|Hex could be text|πŸ”΅ Info|Style|
|SS2|Hex not wrapped|πŸ”΅ Info|Style|
|SS3|Hex missing comment|πŸ”΅ Info|Style|
|SS4|Long identifier|πŸ”΅ Info|Style|
|FM1|Missing newline before AND|πŸ”΅ Info|Formatting|
|FM2|OR block not indented|πŸ”΅ Info|Formatting|
|FM3|Nested OR without grouping|πŸ”΅ Info|Formatting|
|RX1|Hash loop vs string|🟑 Warning|Performance|
|RX2|Short string without position|🟑 Warning|Performance|
|RX3|Unbounded quantifier|🟑 Warning|Performance|
|RX4|Condition order|🟑 Warning|Performance|
|RX5|Module for header check|🟑 Warning|Performance|
|RX6|Magic module usage|🟑 Warning|Performance|
|RX7|Loop without filesize limit|🟑 Warning|Performance|

Files in this skill

  • README.md940 B
  • skill.md18 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.