tenable / tenable/pyTenable

tenable.nessus agent_groups.{add,delete}_agents() not consistently available in tenable.io

Open
#684 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

backlog Tenable VM
Dominant language
Python
Stars
417
Forks
190
Avg merge
1d 10h
Merged PRs (30d)
3

Description

Is your feature request related to a problem? Please describe.

tenable.nessus and tenable.io provide similar functionality.

Unfortunately, methods are inconsistently provided, eg: agent_groups.delete_agents() vs agent_groups.delete_agent()

I have written a script that talks to both tenable.io and nessus managers, and unfortunately i have to add method checks due to this.

Example:

        if hasattr(api.agent_groups,"add_agents"):
            api.agent_groups.add_agents(group_id, add_agent.get(group_id))
        else:
            api.agent_groups.add_agent(group_id, *add_agent.get(group_id))

        if hasattr(api.agent_groups,"delete_agents"):
            api.agent_groups.delete_agents(group_id, del_agent.get(group_id))
        else:
            api.agent_groups.delete_agent(group_id, *del_agent.get(group_id))

Describe the solution you'd like

For tenable.io module to support delete_agents(), like it is in tenable.nessus module.

Describe alternatives you've considered

A workaround exists, but it would be beneficial for the modules to be consistent if it provides more or less the same backend functionality (deleting/adding agents to groups)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by comparing the tenable.io agent_groups implementation with the corresponding tenable.nessus module, focusing on add_agents(), delete_agents(), and delete_agent(). Make the tenable.io interface consistent with the Nessus interface, then verify that callers can use the same agent-group operations without method checks.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.