Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on Nov 6, 2023. It is now read-only.
This repository was archived by the owner on Nov 6, 2023. It is now read-only.

Make it easier to add coverage to old rulesets #1069

Copy link
Copy link

Description

@jsha
Issue body actions

Right now the process of updating old rulesets to ensure they have sufficient test coverage is very tedious. Typically one has to pull out a list of hostnames from deeply nested regexes like this one:

<rule from="^http://s3(?:-website)?(-ap-(?:nor|sou)theast-1|-(?:eu|us)-west-\d|-external-\d|-sa-east-1)?\.amazonaws\.com/"                                                     

Instead, it would be nice to automatically extract hostnames from regexes when possible. The Python exrex module claims to do this. We could write a script that would do use that module to extract hostnames where possible and add them to <target host=...> tags.

Of course, we can't extract hostnames from wildcard matches like \w+, but that's fine. We'll have to manually add test cases for those.

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.