pyTenable icon indicating copy to clipboard operation
pyTenable copied to clipboard

update allowed value of cisco privilege escalation

Open nkoleske opened this issue 3 years ago • 3 comments

Description

This change renames the allowed values for Tenable.sc Credential's privilege escalation from "cisco" to "Cisco 'enable'".

Fixes #618

Type of change

  • [ ] Bug fix (non-breaking change which fixes an issue)
  • [ ] This change requires a documentation update

How Has This Been Tested?

  1. Establish an authenticated Tenable.sc session
  2. Create a credential entry
  3. sc.credentials.edit("1000001", privilege_escalation="Cisco 'enable'")

Test Configuration:

  • Python Version(s) Tested: 3.7.9
  • Tenable.sc version 5.19

Checklist:

  • [x] My code follows the style guidelines of this project
  • [x] I have performed a self-review of my own code
  • [x] I have commented my code, particularly in hard-to-understand areas
  • [x] I have made corresponding changes to the documentation
  • [x] My changes generate no new warnings
  • [ ] I have added tests that prove my fix is effective or that my feature works
  • [ ] New and existing unit tests pass locally with my changes
  • [ ] Any dependent changes have been merged and published in downstream modules

nkoleske avatar Sep 08 '22 21:09 nkoleske

I am not familiar with pytest. If you can recommend what type of test you are looking for and an example to reference I could try to write one. I took a look at tests/sc/test_credentials.py and didnt see anything that looked similar.

nkoleske avatar Sep 22 '22 15:09 nkoleske

This does seem to line up with the actual SC API.

CleanShot 2022-09-22 at 10 41 12

SteveMcGrath avatar Sep 22 '22 15:09 SteveMcGrath

Hey @nkoleske! pyTenable majorly uses pytest and pytest-vcr. Looking these libraries up would be beneficial. pyTenable/tests/io/conftest.py houses the test fixtures. You can refer to the files inside pyTenable/tests/io/* directory with a test_ prefix as your examples for tests. Thanks.

aseemsavio avatar Sep 26 '22 06:09 aseemsavio

Changed will be merged in PR -> https://github.com/tenable/pyTenable/pull/639

inayathulla avatar Nov 21 '22 09:11 inayathulla