Skip to content

Contributing

Geekstrange edited this page Aug 31, 2026 · 1 revision

Thank you for your interest in contributing to Deeprotection!

Development Setup

Prerequisites

  • Rust toolchain (latest stable)
  • Git

Build from Source

# Clone the repository
git clone https://github.com/Geekstrange/Deeprotection.git
cd Deeprotection

# Debug build
cargo build

# Release build
cargo build --release

Development Commands

# Type-check without building
cargo check

# Run clippy lints
cargo clippy

# Format code
cargo fmt

Project Structure

src/
├── builtins/          # 50+ built-in command implementations
├── config/            # TOML configuration deserialization
├── executor/          # fork/execve, pipelines, expansion
├── interactive/       # Reedline editor, highlighter, hinter, completers
├── jobs/              # POSIX job control
├── logging/           # JSONL audit logger
├── parser/            # Recursive-descent parser, AST, expansion
├── security/          # Rules, plugins, path protection
├── shell/             # Shell state
├── main.rs            # REPL loop, script mode, login shell
└── utils.rs           # Prompt generation, startup animation

Coding Guidelines

  1. No sh -c invocations — all execution must go through the AST and fork/execve
  2. Security checks at two points — pre-fork (AST) and post-expansion (concrete paths)
  3. Built-ins dispatched before security pipeline — they run in-process
  4. Match existing code style — use cargo fmt
  5. No automated test suite currently — verify changes against posix_test.sh (14 tests)

Submitting Changes

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Run cargo fmt and cargo clippy
  5. Submit a pull request

Reporting Issues

Report bugs and propose new features via the GitHub Issues page.

License

This project is licensed under the Mozilla Public License Version 2.0 (MPL 2.0).

Clone this wiki locally