
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).
extends the capabilities of the earthengine-api by providing custom session management and client interactions
The Earth Engine Session Client is a Python package that extends the Google Earth Engine (GEE) API by introducing multi-user session management through a custom authentication. Unlike the standard GEE API—which relies on a global session object and does not support multi-user environments—this client ensures that each session is authenticated and managed independently.
Each session is instantiated via the EESession
class, currently only accepts SEPAL headers as its only parameter. A valid sepal-session-id
cookie must be present in these headers, as it is used to retrieve the corresponding GEE credentials. Once authenticated, the session exposes an operations
property that provides easy access to key API methods.
sepal-session-id
cookie is automatically used to retrieve GEE credentials.EESession
object.operations
property, which includes methods such as:
get_info
: Retrieve detailed information about an Earth Engine object.get_map_id
: Generate a map ID for an Earth Engine image.get_asset
: Fetch information about a specific Earth Engine asset.To install the package, simply use pip:
.. code-block:: bash
pip install ee-client
Initialization and Authentication +++++++++++++++++++++++++++++++++
The Earth Engine Session Client must be initialized using SEPAL headers. Ensure that the headers include the sepal-session-id
cookie, which is essential for retrieving the GEE credentials.
.. code-block:: python
from eeclient import EESession
sepal_headers = { "cookie": [ "sepal-session-id=your_session_id", "other_cookie=other_value" ], "sepal_user": [{ "id": 123, "username": "your_username", "googleTokens": { "accessToken": "your_access_token", "refreshToken": "your_refresh_token", "accessTokenExpiryDate": 1234567890, "REFRESH_IF_EXPIRES_IN_MINUTES": 10, "projectId": "your_project_id", "legacyProject": "your_legacy_project" }, "status": "active", "roles": ["role1", "role2"], "systemUser": False, "admin": False }] }
session = EESession(sepal_headers)
Making API Calls ++++++++++++++++
After initializing the session, use the operations
property to access the key GEE methods. For example, you can retrieve information about Earth Engine objects, generate map IDs, or fetch asset details:
.. code-block:: python
import ee
ee.Initialize()
result_info = session.operations.get_info(ee.Number(5)) print(result_info) # the GEE server call is done using the custom EE client
image = ee.Image('COPERNICUS/S2/20190726T104031_20190726T104035_T31TGL') map_id = session.operations.get_map_id(image) print(map_id)
asset_info = session.operations.get_asset("users/your_username/your_asset") print(asset_info)
We welcome contributions from the community. If you wish to help improve this package, please submit issues or pull requests.
Forking and Branching +++++++++++++++++++++
Fork the repository.
Create a new branch:
.. code-block:: bash
git checkout -b feature-branch
Commit your changes:
.. code-block:: bash
git commit -am 'Add new feature'
Push the branch:
.. code-block:: bash
git push origin feature-branch
Create a new Pull Request.
This project is licensed under the MIT License. See the LICENSE file for details.
FAQs
extends the capabilities of the earthengine-api by providing custom session management and client interactions
We found that ee-client 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.
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.