Skip to content

fedcode-next: Code pipeline and models to continuously collect scripts and vulnerability scanner rules to detect if the vulnerability is "expressed" #1723

Closed

Description

@pombredanne

These are commonly published for important vulns. This can include yara rules, rules for IDS like Suricata, ClamAV entries, OpenVAS and nessus rules and related, like with MISP

Activity

  1. moved this from Needs prep to In progress in 00-AboutCodePlanneron Nov 13, 2025
  2. ziadhany commented on Dec 2, 2025

    @ziadhany
    Member

    We have two options for storing rules:

    • Pre-parsing: Parse the rule to extract specific fields before saving like (metadata , ....)
    • Raw Storage: Store the raw text without validation.

    Rule parsing :

    I think we can start with an initial model like this:

    class DetectionRule(models.Model):
        RULE_TYPES = [
            ("yara", "YARA"),
            ("sigma", "Sigma Detection Rule"),
            ("clamav", "ClamAV Signature"),
            ("suricata", "Suricata Rule")
        ]
    
        rule_type = models.CharField(max_length=100, choices=RULE_TYPES, blank=True)
    
        source_url = models.URLField(
            null=True,
            blank=True,
        )
    
        rule_metadata = models.JSONField(
            null=True,
            blank=True,
        )
        rule_text = models.TextField()
    
        advisory = models.ForeignKey(
            AdvisoryV2,
            related_name="detection_rules",
            on_delete=models.SET_NULL,
            null=True,
            blank=True,
        )
    
    
  3. pombredanne commented on Dec 18, 2025

    @pombredanne
    MemberAuthor

    At this stage we have:

  4. pombredanne commented on Mar 6, 2026

    @pombredanne
    MemberAuthor

    We should have an API and/or a minimal UI to view that data.

  5. ziadhany commented on Mar 25, 2026

    @ziadhany
    Member

    DetectionRule can have multiple advisories

    see:
    https://github.com/SigmaHQ/sigma/blob/master/rules/windows/file/file_event/file_event_win_susp_filewrite_in_sharepoint_layouts_dir.yml

    I think I should update the model to be like this

    class DetectionRule(models.Model):
        """
        A Detection Rule is code used to identify malicious activity or security threats.
        """
    
        rule_type = models.CharField(
            max_length=50,
            choices=DetectionRuleTypes.choices,
            help_text="The type of the detection rule content (e.g., YARA, Sigma).",
        )
    
        source_url = models.URLField(
            max_length=1024, help_text="URL to the original source or reference for this rule."
        )
    
        rule_metadata = models.JSONField(
            null=True,
            blank=True,
            help_text="Additional structured data such as tags, or author information.",
        )
    
        rule_text = models.TextField(help_text="The content of the detection signature.")
    
        related_advisories = models.ManyToManyField(
            AdvisoryV2,
            related_name="detection_rules",
            help_text="Advisories associated with this DetectionRule.",
        )
    
    
    
  6. pombredanne commented on May 14, 2026

    @pombredanne
    MemberAuthor

    As a follow we need to consider some dependencies update:

  7. ziadhany commented on May 14, 2026

    @ziadhany
    Member

    This is now complete.

    This will continuously collect, using a Github Action, scripts and vulnerability scanner rules to detect if the vulnerability is "expressed". The rules are stored and made available at https://github.com/aboutcode-data/detection-rules-collector

    We are collecting rules using this PR:

    YARA rules data sources:

    Suricata:

    Sigma:

    ClamAV:

  8. ziadhany commented on May 14, 2026

    @ziadhany
    Member

    To complete the integration into VulnerableCode and enable the UI and API for rule management and searching, we should merge these PRs:

  9. moved this from Done to Reviewed in 00-AboutCodePlanneron Jul 2, 2026
  10. moved this from Reviewed to Validated in 00-AboutCodePlanneron Aug 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions