Repositories

The following methods allow for interaction into the Tenable Vulnerability Management Container Security repositories API endpoints.

Methods available on tio.cs.repositories:

class RepositoriesAPI(api: restfly.session.APISession)[source]
delete(name: str) None[source]

Deleted the specified repository.

API Documentation # noqa: E501

Parameters

name (str) – The repository name.

Examples

>>> tio.cs.repositories.delete('centos')
details(name: str) Dict[source]

Returns the details for the specified repository.

API Documentation # noqa: E501

Parameters

name (str) – The repository name.

Examples

>>> tio.cs.repositories.details('centos')
list(name: Optional[str] = None, contains: Optional[str] = None, offset: int = 0, limit: int = 1000, return_json: bool = False) Union[Dict, tenable.io.cs.iterator.CSIterator][source]

Returns the list of images stored within Container Security.

API Documentation # noqa: E501

Parameters
  • name (str, optional) – Image name to filter on. Filter is case-sensitive and enforces an exact match.

  • contains (str, optional) – Partial name to filter on. Filter is case-sensitive.

  • offset (int, optional) – The number of records to skip before starting to return data.

  • limit (int, optional) – The number of records to return for each page of data.

  • return_json (bool, optional) – If set, then the response will instead be a Dict object instead of an iterable.

Examples

Using the default iterable:

>>> for repo in tio.cs.repositories.list():
...     print(repo)

Getting the raw JSON response:

>>> resp = tio.cs.repositories.list(return_json=True)
>>> for item in resp['items']:
...     print(item)