Skip to content

Commit 235d331

Browse files
docs: Apply million-dollar repo standardization (Security, Conduct, Templates)
1 parent 0bfe673 commit 235d331

4 files changed

Lines changed: 93 additions & 0 deletions

File tree

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
## Description
2+
<!-- Describe your changes in detail. Include what problem it solves and how it solves it. -->
3+
4+
## Motivation and Context
5+
<!-- Why is this change required? What issue does it resolve? -->
6+
<!-- If it fixes an open issue, please link to the issue here. -->
7+
8+
## Safety & Sandbox
9+
<!-- For any tool that writes to ROS2 (topics, parameters, nodes): -->
10+
- [ ] This tool respects the `CommandSandbox` (checks `check_publish` / `check_set_parameter`).
11+
- [ ] This change maintains the strict `SAFETY_LEVEL=safe_write` default.
12+
13+
## Testing
14+
<!-- Describe how you tested your changes (e.g., simulation mode, on a real Jetson). -->
15+
- [ ] All tests pass locally (`python run_tests.py`).
16+
- [ ] I have added new tests covering my changes.
17+
- [ ] My code passes the `ruff` linter checks.
18+
19+
## Types of changes
20+
- [ ] Bug fix (non-breaking change which fixes an issue)
21+
- [ ] New feature (non-breaking change which adds functionality)
22+
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
23+
- [ ] Documentation update

CODE_OF_CONDUCT.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
6+
7+
We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
8+
9+
## Our Standards
10+
11+
Examples of behavior that contributes to a positive environment for our community include:
12+
13+
* Demonstrating empathy and kindness toward other people
14+
* Being respectful of differing opinions, viewpoints, and experiences
15+
* Giving and gracefully accepting constructive feedback
16+
* Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
17+
* Focusing on what is best not just for us as individuals, but for the overall community
18+
19+
## Enforcement
20+
21+
Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.

CONTRIBUTING.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Contributing to `ros2-mcp-server`
2+
3+
First off, thank you for considering contributing to `ros2-mcp-server`! We welcome all contributions, from bug reports and documentation fixes to major feature additions.
4+
5+
## Local Development & Instant Playground
6+
7+
You do **not** need a physical robot or a complex ROS2 installation to develop for this repository.
8+
We have built a robust simulation layer that generates synthetic LiDAR, IMU, and Battery data.
9+
10+
To test your code locally:
11+
```bash
12+
python -m venv venv
13+
source venv/bin/activate # On Windows: venv\Scripts\activate
14+
pip install -e .
15+
python ros2_mcp/server.py --demo-sim
16+
```
17+
18+
## Pull Request Process
19+
20+
1. **Fork & Branch**: Fork the repository and create a descriptive branch name (e.g. `feat/new-mcp-tool`).
21+
2. **Strict Linting**: We use `ruff` to ensure absolute codebase integrity. Before committing, run:
22+
```bash
23+
python -m ruff check . --fix
24+
python -m ruff format .
25+
```
26+
3. **Tests**: Ensure the 38-test suite passes via `python run_tests.py`.
27+
4. **Submit PR**: Use our provided PR template to explain your changes. We will review your PR within 2-3 business days.

SECURITY.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Security Policy
2+
3+
## Threat Model: AI & Physical Hardware
4+
5+
Bridging an autonomous AI agent to physical robotics introduces unique attack vectors:
6+
1. **Hallucinated Commands**: The LLM predicts a valid-looking but physically catastrophic command (e.g., publishing `velocity = 100 m/s`).
7+
2. **Infinite Loops**: The LLM traps itself in a read-publish loop.
8+
3. **Malicious Payloads**: Injection of malformed ROS2 parameters leading to buffer overflows in C++ nodes.
9+
10+
## The Command Sandbox
11+
12+
To mitigate this, `ros2-mcp-server` enforces a strict permission boundary.
13+
We implement three safety levels via the `SAFETY_LEVEL` environment variable:
14+
15+
- **`read_only` (Default)**: The AI can list nodes, read topics, and fetch diagnostics, but it **cannot** publish, tune PIDs, or alter parameters.
16+
- **`safe_write`**: The AI can read data and invoke safely allowlisted tuning tools (like PID tuning or parameter adjustment on safe namespaces). Direct publishing to actuator nodes is blocked.
17+
- **`full`**: Unrestricted access. *Only use this in a simulated environment.*
18+
19+
## Reporting a Vulnerability
20+
21+
If you discover a sandbox escape or a crash loop vulnerability, please do **NOT** create a public GitHub issue.
22+
Instead, email us at `abz.king.1.9.2003@gmail.com` with the subject `[SECURITY] ROS2 MCP Server`. We will respond within 48 hours.

0 commit comments

Comments
 (0)