Skip to content

[Bug Report] Rule filename keeps old action prefix when action is changed #1571

@marcpinolpique

Description

@marcpinolpique

Describe the bug:

When editing an existing rule and changing its action (e.g. from deny to allow), the JSON content is updated correctly, but the rule name (which is used as the filename in /etc/opensnitchd/rules/) retains the original action prefix.

This causes a mismatch between the filename and the actual rule action, making rule analysis confusing.

Example:

  • File: deny-always-firefox-esr.json

  • Content: {"action": "allow", ...}

  • OpenSnitch version: 1.6.9

  • OS: Debian GNU/Linux 13 (trixie)

  • Window Manager: KDE

  • Kernel version: 6.12.74+deb13+1-amd64

To Reproduce:

  1. Create or have an existing rule with an auto-generated name (e.g. deny-always-firefox-esr)
  2. Open the Rules Editor and double-click the rule
  3. Change the action from Deny to Allow
  4. Click Save
  5. The filename remains deny-always-firefox-esr.json while the content now has "action": "allow"

Expected behavior:

The rule name/filename should update to allow-always-firefox-esr.json to match the new action.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions