Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 12 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6

- name: Set up Python
uses: actions/setup-python@v6
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
with:
python-version: ${{ env.PYTHON_VERSION }}

Expand All @@ -52,10 +52,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6

- name: Set up Python
uses: actions/setup-python@v6
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
with:
python-version: ${{ env.PYTHON_VERSION }}

Expand All @@ -66,7 +66,6 @@ jobs:

- name: Run mypy
run: mypy src/redops --ignore-missing-imports
continue-on-error: true

test:
name: Test (Python ${{ matrix.python-version }})
Expand All @@ -78,15 +77,15 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
with:
python-version: ${{ matrix.python-version }}

- name: Cache pip
uses: actions/cache@v5
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('pyproject.toml') }}
Expand Down Expand Up @@ -154,10 +153,10 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6

- name: Set up Python
uses: actions/setup-python@v6
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
with:
python-version: ${{ env.PYTHON_VERSION }}

Expand All @@ -173,18 +172,17 @@ jobs:
REDIS_PORT: 6379
run: |
python -m pytest tests/integration/ -v --tb=short
continue-on-error: true

build:
name: Build Package
runs-on: ubuntu-latest
needs: [test]
steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6

- name: Set up Python
uses: actions/setup-python@v6
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
with:
python-version: ${{ env.PYTHON_VERSION }}

Expand All @@ -209,7 +207,7 @@ jobs:
needs: [lint]
steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6

- name: Set up Python
uses: actions/setup-python@v6
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
with:
python-version: "3.12"

Expand Down
11 changes: 5 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
version: ${{ steps.version.outputs.version }}
steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
with:
fetch-depth: 0

Expand All @@ -30,7 +30,7 @@ jobs:
run: echo "version=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT

- name: Set up Python
uses: actions/setup-python@v6
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
with:
python-version: "3.12"

Expand Down Expand Up @@ -64,10 +64,10 @@ jobs:
if: "!contains(github.ref, 'alpha') && !contains(github.ref, 'beta')"
steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6

- name: Set up Python
uses: actions/setup-python@v6
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
with:
python-version: "3.12"

Expand All @@ -81,15 +81,14 @@ jobs:
with:
password: ${{ secrets.PYPI_API_TOKEN }}
skip-existing: true
continue-on-error: true

publish-docker:
name: Publish Docker Image
runs-on: ubuntu-latest
needs: [release]
steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6

- name: Set up QEMU
uses: docker/setup-qemu-action@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/secret-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
with:
fetch-depth: 0

Expand Down
18 changes: 8 additions & 10 deletions .github/workflows/security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6

- name: Set up Python
uses: actions/setup-python@v6
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
with:
python-version: "3.12"

Expand All @@ -36,21 +36,19 @@ jobs:

- name: Run Safety check
run: safety check --full-report
continue-on-error: true

- name: Run pip-audit
run: pip-audit
continue-on-error: true

semgrep:
name: Semgrep Analysis
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6

- name: Set up Python
uses: actions/setup-python@v6
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
with:
python-version: "3.12"

Expand Down Expand Up @@ -84,7 +82,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6

- name: Build Docker image
run: |
Expand Down Expand Up @@ -119,7 +117,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
with:
fetch-depth: 0

Expand All @@ -136,10 +134,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6

- name: Set up Python
uses: actions/setup-python@v6
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
with:
python-version: "3.12"

Expand Down
12 changes: 12 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,15 @@ temp/
.env
.env.*
.env.local

# Security: prevent secret files from being committed
.env
.env.local
.envrc
*.pem
*.key
id_rsa*
id_ecdsa*
id_ed25519*
*.p12
secrets.json
14 changes: 0 additions & 14 deletions AreteDriver/RedOPS/pyproject.toml

This file was deleted.

7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
> **STATUS: FROZEN as of 2026-06-22**
> This repository is no longer actively developed. See [AreteDriver/notes/decisions/2026-04-21-portfolio-triage.md](https://github.com/AreteDriver/notes/blob/main/decisions/2026-04-21-portfolio-triage.md) for context.
> Archived for reference. No new deploys or feature work.
>
> ---
>

# RedOPS Framework

[![CI Pipeline](https://github.com/AreteDriver/RedOPS/actions/workflows/ci.yml/badge.svg)](https://github.com/AreteDriver/RedOPS/actions/workflows/ci.yml)
Expand Down
16 changes: 16 additions & 0 deletions ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,22 @@

---

## Priority 0 — Gate (blocks any offensive Active Chain release)

> Folded in from the qwen-audited roadmap (2026-05-30). The Active Chain — wireless
> evil-twin + deauth, subnet recon, CVE check, and an autonomous Ollama agent under
> `modules/active/` + `modules/ai/` — is coded, tested, and committed, but **unreleased
> and undocumented**. It must not ship until this gate clears. Authorization is a review,
> not a code flag.

- [ ] **Legal-boundary review** — `docs/legal-boundaries.md` + SECURITY.md: jurisdiction, authorized-use definition, explicit will/won't-do list for deauth + evil-twin.
- [ ] **Authorization mechanism** — scope assertion + recorded operator consent that every `modules/active/` module checks before executing (not just a flag). Add a test asserting each active module refuses to run absent an authorized-target assertion.
Comment on lines +19 to +26

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Path and Formatting Consistency Improvements

  1. Repository-Root-Relative Paths:
    The paths modules/active/ and modules/ai/ (mentioned in lines 21 and 26) are specified relative to the src/redops/ directory. However, other paths in this roadmap (such as docs/legal-boundaries.md and config/pipelines/) are specified relative to the repository root. To maintain consistency and avoid confusion, please update these to their full repository-root-relative paths:

    • src/redops/modules/active/
    • src/redops/modules/ai/
  2. Markdown Formatting Consistency:
    In line 25, docs/legal-boundaries.md is enclosed in backticks, but SECURITY.md is not. Enclosing SECURITY.md in backticks (i.e., `SECURITY.md`) will ensure consistent formatting for file references.

- [ ] **Misuse threat model** — model RedOPS pointed at an unauthorized network; document the technical controls that make casual misuse hard.
- [ ] **Tested egress enforcement** — a test that attempts cloud egress during an active-chain run and asserts it is blocked (local Ollama only). Enforced, not asserted.
- [ ] **Operator runbook + smoke test** — mock authorized-engagement walkthrough; full-chain smoke test on lab hardware (Alfa AWUS036NHA + Kali) before tagging the release.

---

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Missing AI Agent Hardening Tasks from Deleted Roadmap

The PR description states "One canonical roadmap, nothing lost." However, several critical security and reliability tasks from Milestone 2 — Harden the AI agent in the deleted roadmap.md were not folded into ROADMAP.md.

Since these tasks are crucial for safely operating an autonomous agent with offensive capabilities, they should be integrated into ROADMAP.md (for example, under Priority 1 — Critical (Do Now) -> Security and Reliability or Priority 2 — High (Next Sprint) -> AI Intelligence):

  • Action allow-list + dry-run mode for the agent's tool registry.
  • Human-in-the-loop confirmation gate for any state-changing/offensive tool call.
  • Bounded reasoning loop (max steps + cost/time budget) to prevent runaway chains.
  • Replay/audit log to persist every agent decision (input context, chosen action, result) to a structured log.
  • Agent stress/load test under a long attack-surface summary to confirm stability.


## Priority 1 — Critical (Do Now)

### Security and Reliability
Expand Down
29 changes: 27 additions & 2 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
If you discover a security vulnerability, please report it responsibly:

1. **Do not** open a public issue
2. Email **jamesyng79@gmail.com** with:
2. Use GitHub **Private Vulnerability Reporting** (enabled on this repository)
or email **security@redops.dev** with:
- Description of the vulnerability
- Steps to reproduce
- Potential impact
Expand All @@ -31,15 +32,39 @@ This project uses:

RedOPS is an offensive security tool intended for **authorized security testing only**. The tool itself is designed to find vulnerabilities in target systems — security reports should focus on vulnerabilities in RedOPS's own code, not in its intended functionality.

## Active Chain Authorization Requirements

The **Active Chain** (`modules/active/`) — wireless deauthentication, evil-twin
access points, ARP scanning, port scanning, and autonomous vulnerability chaining
— is **gated** by the following requirements:

1. **Recorded operator consent** is mandatory. Every active module calls
`assert_active_authorized(ctx)`, which raises `ActiveAuthorizationError`
if no valid authorization exists.
2. **Explicit target assertion** is required. The operator must name the exact
target(s) they claim to own or have permission to test.
3. **Egress blocking** is enforced. `block_external_egress()` prevents cloud API
calls during active chain execution, ensuring local-only operation.
4. **Legal review** is required before any release containing active modules.
See `docs/legal-boundaries.md` for jurisdiction analysis and authorized-use
definition.
5. **Operator runbook** must be followed. See `docs/operator-runbook.md` for
step-by-step authorized engagement procedures.

Vulnerabilities in the authorization or egress enforcement mechanisms are
**critical** and in scope for this security policy.

## Scope

The following are in scope for security reports:
- Code injection in RedOPS itself
- Credential exposure or mishandling
- Authentication bypasses in the web interface
- Dependency vulnerabilities with known exploits
- Bypass of `assert_active_authorized()` or `block_external_egress()`
- Injection or mutation of audit log entries

Out of scope:
- Functionality that is working as designed (scanning, recon, etc.)
- Denial of service
- Denial of service against the target (by design for active modules)
- Social engineering
12 changes: 12 additions & 0 deletions config/pipelines/active_chain.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,18 @@
"warning": "Authorized home lab use only"
},
"steps": [
{
"name": "Record Authorization",
"module": "active.authorization.record_authorization_from_params",
"params": {
"operator": "{{operator}}",
"target_assertion": "{{target}}",
"consent_text": "I am authorized to perform active security testing on the stated target. This is my own network, a designated lab environment, or a system for which I have explicit written permission.",
"duration_hours": 4
},
"enabled": true,
"continue_on_error": false
},
{
"name": "Validate Scope",
"module": "compliance.scope_guard.validate_scope",
Expand Down
Loading
Loading