
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).
An extension for the BehaveX library that enables attaching images to the generated HTML report.
pip install behavex-images
The behavex-images
library provides four main methods for managing image attachments in BehaveX HTML reports:
from behavex_images import image_attachments
image_attachments.attach_image_binary(context, image_binary)
context
: The BehaveX context objectimage_binary
: Binary data of the image (JPG or PNG)from behavex_images import image_attachments
image_attachments.attach_image_file(context, file_path)
context
: The BehaveX context objectfile_path
: Absolute path to the image file (JPG or PNG)from behavex_images import image_attachments
from behavex_images.image_attachments import AttachmentsCondition
image_attachments.set_attachments_condition(context, condition)
context
: The BehaveX context objectcondition
: One of the following AttachmentsCondition
values:
ALWAYS
: Attach images to every reportONLY_ON_FAILURE
: Attach images only when a test fails (default)NEVER
: Do not attach any imagesfrom behavex_images import image_attachments
image_attachments.clean_all_attached_images(context)
context
: The BehaveX context objectfrom behavex_images import image_attachments
@given('I take a screenshot of the current page')
def step_impl(context):
image_attachments.attach_image_file(context, 'path/to/screenshot.png')
from behavex_images import image_attachments
from behavex_images.image_attachments import AttachmentsCondition
def before_all(context):
image_attachments.set_attachments_condition(context, AttachmentsCondition.ONLY_ON_FAILURE)
def after_step(context, step):
# Assuming you're using Selenium WebDriver
image_attachments.attach_image_binary(context, context.driver.get_screenshot_as_png())
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License.
FAQs
BehaveX extension library to attach images to the test execution report.
We found that behavex-images 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.