
Security Fundamentals
Turtles, Clams, and Cyber Threat Actors: Shell Usage
The Socket Threat Research Team uncovers how threat actors weaponize shell techniques across npm, PyPI, and Go ecosystems to maintain persistence and exfiltrate data.
The graphenv
Python library is designed to
RLLib provides out-of-the-box support for both parametrically-defined actions and masking of invalid actions. However, native support for action spaces where the action choices change for each state is challenging to implement in a computationally efficient fashion. The graphenv
library provides utility classes that simplify the flattening and masking of action observations for choosing from a set of successor states at every node in a graph search.
Graphenv can be installed with pip:
pip install graphenv
graph-env
allows users to create a customized graph search by subclassing the Vertex
class. Basic examples are provided in the graphenv/examples
folder. The following code snippet shows how to randomly sample from valid actions for a random walk down a 1D corridor:
import random
from graphenv.examples.hallway.hallway_state import HallwayState
from graphenv.graph_env import GraphEnv
state = HallwayState(corridor_length=10)
env = GraphEnv({"state": state, "max_num_children": 2})
obs = env.make_observation()
done = False
total_reward = 0
while not done:
action = random.choice(range(len(env.state.children)))
obs, reward, terminated, truncated, info = env.step(action)
done = terminated or truncated
total_reward += reward
Additional details on this example are given in the documentation
The documentation is hosted on GitHub Pages
We welcome bug reports, suggestions for new features, and pull requests. See our contributing guidelines for more details.
graph-env
is licensed under the BSD 3-Clause License.
Copyright (c) 2022, Alliance for Sustainable Energy, LLC
FAQs
Reinforcement learning on directed graphs
We found that graphenv 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 Fundamentals
The Socket Threat Research Team uncovers how threat actors weaponize shell techniques across npm, PyPI, and Go ecosystems to maintain persistence and exfiltrate data.
Security News
At VulnCon 2025, NIST scrapped its NVD consortium plans, admitted it can't keep up with CVEs, and outlined automation efforts amid a mounting backlog.
Product
We redesigned our GitHub PR comments to deliver clear, actionable security insights without adding noise to your workflow.