Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
This module has been deprecated. Please consider using cyberwatch_api.
Please contact Cyberwatch support if you need help to migrate your existing scripts to the new client.
A simple interface for your Cyberwatch instance API composed of a python library and a command line program.
To install Cyberwatch API toolbox, simply use python 3 with:
$ pip3 install cbw-api-toolbox
Some scripts from version 1.X may not work in version 2.X of cbw-api-toolbox
, to install an older version, simply do:
pip3 install cbw-api-toolbox==1.1.2
Create a new file called ping.py
and copy/paste this content
# ping.py
import os
from configparser import ConfigParser
from cbw_api_toolbox.cbw_api import CBWApi
CONF = ConfigParser()
CONF.read(os.path.join(os.path.abspath(os.path.dirname(__file__)), '..', 'api.conf'))
CLIENT = CBWApi(CONF.get('cyberwatch', 'url'), CONF.get('cyberwatch', 'api_key'), CONF.get('cyberwatch', 'secret_key'))
CLIENT.ping()
Configure an api.conf file with your credentials
See the Configuration section
Test your script
$ python3 ping.py
If everything is ok, the OK
message will appear
$ python3 ping.py
INFO:root:OK
Otherwise, the FAILED
message will appear
$ python3 ping.py
ERROR:root:FAILED
In this case, please check that there are no typing errors in your API_KEY
, SECRET_KEY
or API_URL
and that your Cyberwatch instance is up.
Create an api.conf
file at the root of the project (see example_api.conf
)
api_key
: your Cyberwatch user api keysecret_key
: your Cyberwatch user secret keyurl
: your Cyberwatch instance URLExample
[cyberwatch]
api_key = PyXpxrcJ7rQ...
secret_key = +bUx37WnB0qt...
url = https://myinstance.local
To find your API credentials:
Launch a script example
$ python3 your_example_script_file.py
See the full API documentation here
See the command line interface documentation here
FAQs
CyberWatch Api Tools.
We found that cbw-api-toolbox demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.