Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ModSecurity secrule language #5850

Closed
wants to merge 1 commit into from

Conversation

fzipi
Copy link

@fzipi fzipi commented Apr 5, 2022

ModSecurity Rules language is a DSL for creating security policies. https://github.com/SpiderLabs/ModSecurity/wiki/ModSecurity-Rules-Language-Porting-Specification. Released under the Apache2 License.

Signed-off-by: Felipe Zipitria felipe.zipitria@owasp.org

Description

Adding ModSecurity Rules DSL language.

Checklist:

  • I am associating a language with a new file extension.

  • I am adding a new language.

  • I am fixing a misclassified language

    • I have included a new sample for the misclassified language:
      • Sample source(s):
        • [URL to each sample source, if applicable]
      • Sample license(s):
    • I have included a change to the heuristics to distinguish my language from others using the same extension.
  • I am changing the source of a syntax highlighting grammar

    • Old: [URL to grammar repo]
    • New: [URL to grammar repo]
  • I am updating a grammar submodule

  • I am adding new or changing current functionality

    • I have added or updated the tests for the new or changed functionality.
  • I am changing the color associated with a language

    • I have obtained agreement from the wider language community on this color change.
      • [URL to public discussion]
      • [Optional: URL to official branding guidelines for the language]

ModSecurity Rules language is a DSL for creating security policies. https://github.com/SpiderLabs/ModSecurity/wiki/ModSecurity-Rules-Language-Porting-Specification. Released under the Apache2 License.

Signed-off-by: Felipe Zipitria <felipe.zipitria@owasp.org>
@fzipi fzipi requested a review from a team as a code owner April 5, 2022 12:56
@fzipi
Copy link
Author

fzipi commented Apr 5, 2022

Hi @lildude! Can you help me test the Bayesian classifier for this language?

@Alhadis Alhadis changed the title feat: added modsecurity secrule language Add ModSecurity secrule language Apr 5, 2022
Copy link
Member

@lildude lildude left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Holy smokes!!! We don't need that many samples. especially when most of the content of each is commented out.

Please reduce the number of samples to the 2-4 most representative of the langauge; the lighter on comments, the better.

Hi @lildude! Can you help me test the Bayesian classifier for this language?

Ensure you keep at least two of the most representative samples and the classifier test will do a good job of assessing the classifier.

That said, this isn't going to be of any use as this is the first addition of .conf to Linguist which means every .conf on the whole of GitHub which isn't already covered by an explicit filename will be classified as this langauge.

To get around this, you'll need to add .conf to the generic.yml file and add a heuristic that will only match these files.

@lildude
Copy link
Member

lildude commented Apr 5, 2022

Usage is a little low for inclusion right now from your search results, even when considering our temporarily relaxed rules.

Copy link
Member

@lildude lildude left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh yes, and you appear to have forgotten to commit the cached license file which would have been generated for the grammar when you ran script/add-grammar. Please add this to the PR too.

@fzipi
Copy link
Author

fzipi commented Apr 5, 2022

So, better to close this one and try again when popularity increases?

@lildude
Copy link
Member

lildude commented Apr 6, 2022

So, better to close this one and try again when popularity increases?

Its up to you. We've got quite a few PRs open pending popularity. If you anticipate this increasing in the not too distant future (currently at 1480 files), then we can keep it open. I'll keep checking everytime I make a new release.

If you don't anticipate popularity to increase soon, then you can close it now and re-open it later when you've found the popularity has increased.

@fzipi
Copy link
Author

fzipi commented Apr 6, 2022

Well, this language is at least 10 years old. So I don't think it will suddenly increase popularity that much 😄 . Closing for better times in the future.

@fzipi fzipi closed this Apr 6, 2022
@github-linguist github-linguist locked as resolved and limited conversation to collaborators Jun 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants