python-gvm icon indicating copy to clipboard operation
python-gvm copied to clipboard

gmp.create_ticket adds ACL to ticket without verifying if permission already exists

Open frakbe opened this issue 1 year ago • 0 comments

Expected behavior

When creating a new ticket with function gmp.create_ticket it should verify if the assigned user has already read permission to the task

Current behavior

When creating a new ticket with function gmp.create_ticket it adds a new ACL on ticket with read permission to user, without verifying if the user had already read permission to the task.

Steps to reproduce

  1. Give read permission to USER1 for task TASK1
  2. Run task TASK1
  3. Pick a result (UUIDRES1) of TASK1 and use the function gmp.create_ticket (gmp.create_ticket(result_id = UUIDRES1, assigned_to_user_id = USER1)
  4. Go to permission tab of TASK1 and observe a new read ACL for user USER1 with label "Automatically created for ticket"

GVM versions

gsa: (gsad --version)

gvm: (gvmd --version)

openvas-scanner: (openvassd --version)

gvm-libs:

gvm-tools: (gvm-cli --version)

gvm-cli 24.1.0 (API version 24.1.0)

Environment

Operating system:

RHEL8.10

Installation method / source: (packages, source installation)

Installed from pip

Logfiles


frakbe avatar Aug 06 '24 14:08 frakbe