
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
.. image:: https://img.shields.io/pypi/dw/zalando-kubectl.svg :target: https://pypi.python.org/pypi/zalando-kubectl/ :alt: PyPI Downloads
.. image:: https://img.shields.io/pypi/v/zalando-kubectl.svg :target: https://pypi.python.org/pypi/zalando-kubectl/ :alt: Latest PyPI version
.. image:: https://img.shields.io/pypi/l/zalando-kubectl.svg :target: https://pypi.python.org/pypi/zalando-kubectl/ :alt: License
Kubernetes CLI (kubectl) wrapper in Python with OAuth token authentication.
This wrapper script zkubectl
serves as a drop-in replacement for the kubectl
binary:
kubectl
binary from Google~/.kube/config
with an OAuth Bearer token acquired via zign
_.kubectl
binaryRequires Python 3.6+.
.. code-block:: bash
$ sudo pip3 install --upgrade zalando-kubectl
You can directly login to a known Kubernetes API server endpoint:
.. code-block:: bash
$ zkubectl login https://my-api-server.example.org
$ zkubectl cluster-info
You can also configure a Cluster Registry to look up clusters by ID:
.. code-block:: bash
$ zkubectl configure --cluster-registry=https://cluster-registry.example.org
$ zkubectl login my-cluster-id
The Cluster Registry needs to provide the following HTTP API for this to work:
.. code-block:: bash
$ curl -H "Authorization: Bearer $(zign tok)" https://cluster-registry.example.org/kubernetes-clusters/my-cluster-id
{
"api_server_url": "https://my-api-server.example.org"
}
There is an additional convenience command to open the kube-web-view
dashboard in the browser:
.. code-block:: bash
$ zkubectl dashboard
Opening https://kube-web-view.zalando.net/ ..
Run unit tests with Tox:
.. code-block:: bash
$ sudo pip3 install tox
$ tox
It's recommended to have a virtualenv
for the project. The project uses Black
_ for code formatting,
please configure your editor to use it.
Go to the project dir and install dependencies into virtual test environment
.. code-block:: bash
$ cd <project-path>
# create new virtual environment if not yet
$ python -m venv test_environment
# enter virtual environment
$ source ./test_environment/bin/activate
# check pip is executed fron this virtual environment
(test_environment) $ which pip
<project-path>/test_environment/bin/pip
(test_environment) $ pip install -r requirements.txt
(test_environment) $ pip install --editable .
Now the code change will just be reflected in the zkubectl
binary
.. code-block:: bash
(test_environment) $ zkubectl <whatever>
As an alternative for creating an environment you can run local changes from zalando_kubectl
.. code-block:: bash
$ cd <project-path>
$ python -m zalando_kubectl <whatever>
.. _zign: https://pypi.python.org/pypi/stups-zign .. _Kubernetes Dashboard web UI: http://kubernetes.io/docs/user-guide/ui/ .. _Black: https://black.readthedocs.io/en/stable/
FAQs
Kubectl wrapper in Python with OAuth token auth
We found that zalando-kubectl demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers 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.
Research
/Security News
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.