Skip to content

feat: add plugin.yaml descriptor - #13

Open
fzipi wants to merge 2 commits into
mainfrom
add-plugin-yaml
Open

fzipi wants to merge 2 commits into
mainfrom
add-plugin-yaml

Conversation

@fzipi

@fzipi fzipi commented Sep 13, 2026

Copy link
Copy Markdown
Member

Summary

Test plan

  • Validated with check-jsonschema --schemafile plugin-schema.json plugin.yaml

🤖 Generated with Claude Code

fzipi and others added 2 commits September 13, 2026 09:33
Adds the machine-readable plugin descriptor defined in
coreruleset/plugin-registry#37, per the rollout plan in
coreruleset/plugin-registry#21.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The repo's conf file lives under plugin/ (singular), not plugins/ as
the plugin-schema.json naming convention expects. Point at the real
path instead of a nonexistent plugins/ one; this makes the descriptor
accurate but not schema-compliant until the directory is renamed or
the schema pattern is relaxed to also accept plugin/.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@fzipi fzipi changed the title Add plugin.yaml descriptor feat: add plugin.yaml descriptor Sep 13, 2026
Comment thread plugin.yaml
Comment on lines +39 to +76
configuration:
# NOTE: this repo keeps its conf file under `plugin/` (singular), not the
# `plugins/` directory convention `plugin-schema.json` expects, so this path
# does not satisfy the schema's `configuration.file` pattern. Flagged for a
# maintainer decision (rename the directory vs. relax the schema pattern)
# rather than papering over it with a path that doesn't exist in this repo.
file: "plugin/machine-learning-config.conf"
variables:
- name: "tx.machine-learning-plugin_enabled"
type: "boolean"
default: 1
description: "Enable or disable the plugin (0 to disable)"
required: false

- name: "tx.machine-learning-plugin_mode"
type: "integer"
default: 2
min: 1
max: 2
description: >-
Operating mode: 1 = false positive detection mode (only requests
whose CRS inbound anomaly score already exceeds the threshold are
scored by the ML model), 2 = general detection mode (every request
is scored by the ML model)

- name: "tx.machine-learning-plugin_ml_server_url"
type: "string"
default: "http://127.0.0.1:5000/"
description: "URL of the Flask ml_model_server that scores requests and returns an anomaly status"
example: "http://127.0.0.1:5000/"

- name: "tx.machine-learning-plugin_inbound_ml_threshold"
type: "integer"
default: 0
description: >-
Threshold compared against the CRS inbound anomaly score to decide
when the ML model should evaluate a request in false positive
detection mode (mode 1)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

A couple of config options are missing:

  • tx.machine-learning-plugin_inbound_ml_status
  • tx.machine-learning-plugin_inbound_ml_pass_flag
  • tx.machine-learning-plugin_inbound_ml_deny_flag
  • tx.machine-learning-plugin_inbound_ml_anomaly_score

@EsadCetiner

Copy link
Copy Markdown
Member

Opened a PR to store the plugins file in plugins instead of plugin as flagged by your LLM: #14

@fzipi

fzipi commented Sep 14, 2026

Copy link
Copy Markdown
Member Author

Do we even want to keep this plugin? I feel like it doesn't add any value.

@EsadCetiner

Copy link
Copy Markdown
Member

@fzipi There's probably a lot of plugins we should remove, I'm not even sure if this plugin works. It might be worth adding it to the agenda to discuss.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants