agent-boundary-scan 1.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- agent_boundary_scan-1.1.0/.gitattributes +9 -0
- agent_boundary_scan-1.1.0/.github/workflows/ci.yml +31 -0
- agent_boundary_scan-1.1.0/.github/workflows/publish.yml +46 -0
- agent_boundary_scan-1.1.0/.gitignore +29 -0
- agent_boundary_scan-1.1.0/.pre-commit-hooks.yaml +19 -0
- agent_boundary_scan-1.1.0/CLAUDE.md +3474 -0
- agent_boundary_scan-1.1.0/DESIGN.md +377 -0
- agent_boundary_scan-1.1.0/PKG-INFO +322 -0
- agent_boundary_scan-1.1.0/README.md +293 -0
- agent_boundary_scan-1.1.0/action.yml +79 -0
- agent_boundary_scan-1.1.0/benchmark/README.md +61 -0
- agent_boundary_scan-1.1.0/benchmark/benchmark.py +81 -0
- agent_boundary_scan-1.1.0/benchmark/injecagent_bench.py +94 -0
- agent_boundary_scan-1.1.0/fixtures/safe/human_approval_langgraph.py +39 -0
- agent_boundary_scan-1.1.0/fixtures/safe/interrupt_before_langgraph.py +28 -0
- agent_boundary_scan-1.1.0/fixtures/safe/react_agent_langgraph.py +31 -0
- agent_boundary_scan-1.1.0/fixtures/safe/readonly_mcp.json +15 -0
- agent_boundary_scan-1.1.0/fixtures/safe/validated_langgraph.py +41 -0
- agent_boundary_scan-1.1.0/fixtures/vulnerable/command_handoff_cycle_langgraph.py +29 -0
- agent_boundary_scan-1.1.0/fixtures/vulnerable/confused_deputy_langgraph.py +35 -0
- agent_boundary_scan-1.1.0/fixtures/vulnerable/crewai_crew.py +36 -0
- agent_boundary_scan-1.1.0/fixtures/vulnerable/cyclic_delegation_langgraph.py +40 -0
- agent_boundary_scan-1.1.0/fixtures/vulnerable/fastmcp_server.py +28 -0
- agent_boundary_scan-1.1.0/fixtures/vulnerable/guardrail_only_langgraph.py +42 -0
- agent_boundary_scan-1.1.0/fixtures/vulnerable/interprocedural_langgraph.py +39 -0
- agent_boundary_scan-1.1.0/fixtures/vulnerable/lethal_trifecta_mcp.json +19 -0
- agent_boundary_scan-1.1.0/fixtures/vulnerable/openai_agents_handoff.py +34 -0
- agent_boundary_scan-1.1.0/fixtures/vulnerable/tool_injection_fastmcp.py +21 -0
- agent_boundary_scan-1.1.0/pyproject.toml +62 -0
- agent_boundary_scan-1.1.0/src/agent_boundary_scan/__init__.py +13 -0
- agent_boundary_scan-1.1.0/src/agent_boundary_scan/cli.py +97 -0
- agent_boundary_scan-1.1.0/src/agent_boundary_scan/config.py +54 -0
- agent_boundary_scan-1.1.0/src/agent_boundary_scan/extraction/__init__.py +49 -0
- agent_boundary_scan-1.1.0/src/agent_boundary_scan/extraction/common.py +393 -0
- agent_boundary_scan-1.1.0/src/agent_boundary_scan/extraction/crewai.py +163 -0
- agent_boundary_scan-1.1.0/src/agent_boundary_scan/extraction/fastmcp.py +125 -0
- agent_boundary_scan-1.1.0/src/agent_boundary_scan/extraction/langgraph.py +339 -0
- agent_boundary_scan-1.1.0/src/agent_boundary_scan/extraction/mcp.py +143 -0
- agent_boundary_scan-1.1.0/src/agent_boundary_scan/extraction/openai_agents.py +190 -0
- agent_boundary_scan-1.1.0/src/agent_boundary_scan/graph/__init__.py +24 -0
- agent_boundary_scan-1.1.0/src/agent_boundary_scan/graph/builder.py +131 -0
- agent_boundary_scan-1.1.0/src/agent_boundary_scan/graph/classify.py +412 -0
- agent_boundary_scan-1.1.0/src/agent_boundary_scan/ir.py +161 -0
- agent_boundary_scan-1.1.0/src/agent_boundary_scan/pipeline.py +106 -0
- agent_boundary_scan-1.1.0/src/agent_boundary_scan/reporting/__init__.py +14 -0
- agent_boundary_scan-1.1.0/src/agent_boundary_scan/reporting/console.py +58 -0
- agent_boundary_scan-1.1.0/src/agent_boundary_scan/reporting/json_report.py +33 -0
- agent_boundary_scan-1.1.0/src/agent_boundary_scan/reporting/sarif.py +129 -0
- agent_boundary_scan-1.1.0/src/agent_boundary_scan/rules/__init__.py +25 -0
- agent_boundary_scan-1.1.0/src/agent_boundary_scan/rules/boundaries.py +133 -0
- agent_boundary_scan-1.1.0/src/agent_boundary_scan/rules/engine.py +420 -0
- agent_boundary_scan-1.1.0/src/agent_boundary_scan/rules/scoring.py +85 -0
- agent_boundary_scan-1.1.0/src/agent_boundary_scan/rules/taint.py +148 -0
- agent_boundary_scan-1.1.0/tests/conftest.py +83 -0
- agent_boundary_scan-1.1.0/tests/test_boundaries.py +67 -0
- agent_boundary_scan-1.1.0/tests/test_classify.py +134 -0
- agent_boundary_scan-1.1.0/tests/test_cli.py +68 -0
- agent_boundary_scan-1.1.0/tests/test_config.py +58 -0
- agent_boundary_scan-1.1.0/tests/test_determinism.py +37 -0
- agent_boundary_scan-1.1.0/tests/test_engine.py +283 -0
- agent_boundary_scan-1.1.0/tests/test_extraction_crewai.py +57 -0
- agent_boundary_scan-1.1.0/tests/test_extraction_fastmcp.py +148 -0
- agent_boundary_scan-1.1.0/tests/test_extraction_langgraph.py +530 -0
- agent_boundary_scan-1.1.0/tests/test_extraction_mcp.py +109 -0
- agent_boundary_scan-1.1.0/tests/test_extraction_openai_agents.py +72 -0
- agent_boundary_scan-1.1.0/tests/test_fixtures.py +60 -0
- agent_boundary_scan-1.1.0/tests/test_graph_builder.py +106 -0
- agent_boundary_scan-1.1.0/tests/test_pipeline.py +54 -0
- agent_boundary_scan-1.1.0/tests/test_reporting.py +73 -0
- agent_boundary_scan-1.1.0/tests/test_scoring.py +34 -0
- agent_boundary_scan-1.1.0/tests/test_sdk_guardrails.py +69 -0
- agent_boundary_scan-1.1.0/tests/test_smoke.py +17 -0
- agent_boundary_scan-1.1.0/tests/test_taint.py +138 -0
- agent_boundary_scan-1.1.0/tests/test_tool_injection.py +146 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Normalize all text files to LF in the repository, regardless of contributor OS.
|
|
2
|
+
# This keeps diffs clean and CI (Ubuntu) consistent with local Windows checkouts.
|
|
3
|
+
* text=auto eol=lf
|
|
4
|
+
|
|
5
|
+
# Common binary types — never touch line endings.
|
|
6
|
+
*.png binary
|
|
7
|
+
*.jpg binary
|
|
8
|
+
*.gif binary
|
|
9
|
+
*.ico binary
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
test:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
strategy:
|
|
12
|
+
matrix:
|
|
13
|
+
python-version: ["3.11", "3.12"]
|
|
14
|
+
steps:
|
|
15
|
+
- uses: actions/checkout@v4
|
|
16
|
+
|
|
17
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
18
|
+
uses: actions/setup-python@v5
|
|
19
|
+
with:
|
|
20
|
+
python-version: ${{ matrix.python-version }}
|
|
21
|
+
|
|
22
|
+
- name: Install package and dev dependencies
|
|
23
|
+
run: |
|
|
24
|
+
python -m pip install --upgrade pip
|
|
25
|
+
pip install -e ".[dev]"
|
|
26
|
+
|
|
27
|
+
- name: Lint (ruff)
|
|
28
|
+
run: ruff check .
|
|
29
|
+
|
|
30
|
+
- name: Test (pytest)
|
|
31
|
+
run: pytest -q
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
|
|
3
|
+
# Publishes on a GitHub Release (or manual dispatch) using PyPI Trusted
|
|
4
|
+
# Publishing (OIDC) — no API token stored anywhere. One-time setup on PyPI:
|
|
5
|
+
# PyPI project -> Settings -> Publishing -> add a GitHub trusted publisher:
|
|
6
|
+
# owner=AureliusOctavion repo=agent-boundary-scan
|
|
7
|
+
# workflow=publish.yml environment=pypi
|
|
8
|
+
on:
|
|
9
|
+
release:
|
|
10
|
+
types: [published]
|
|
11
|
+
workflow_dispatch:
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
build:
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@v4
|
|
18
|
+
- uses: actions/setup-python@v5
|
|
19
|
+
with:
|
|
20
|
+
python-version: "3.11"
|
|
21
|
+
- name: Build sdist + wheel
|
|
22
|
+
run: |
|
|
23
|
+
python -m pip install --upgrade build
|
|
24
|
+
python -m build
|
|
25
|
+
- name: Check metadata
|
|
26
|
+
run: |
|
|
27
|
+
python -m pip install --upgrade twine
|
|
28
|
+
python -m twine check dist/*
|
|
29
|
+
- uses: actions/upload-artifact@v4
|
|
30
|
+
with:
|
|
31
|
+
name: dist
|
|
32
|
+
path: dist/
|
|
33
|
+
|
|
34
|
+
publish:
|
|
35
|
+
needs: build
|
|
36
|
+
runs-on: ubuntu-latest
|
|
37
|
+
environment: pypi
|
|
38
|
+
permissions:
|
|
39
|
+
id-token: write # required for Trusted Publishing (OIDC)
|
|
40
|
+
steps:
|
|
41
|
+
- uses: actions/download-artifact@v4
|
|
42
|
+
with:
|
|
43
|
+
name: dist
|
|
44
|
+
path: dist/
|
|
45
|
+
- name: Publish
|
|
46
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*.egg-info/
|
|
5
|
+
.eggs/
|
|
6
|
+
build/
|
|
7
|
+
dist/
|
|
8
|
+
*.egg
|
|
9
|
+
|
|
10
|
+
# Virtual environments
|
|
11
|
+
.venv/
|
|
12
|
+
venv/
|
|
13
|
+
env/
|
|
14
|
+
|
|
15
|
+
# Test / tooling caches
|
|
16
|
+
.pytest_cache/
|
|
17
|
+
.ruff_cache/
|
|
18
|
+
.mypy_cache/
|
|
19
|
+
.coverage
|
|
20
|
+
htmlcov/
|
|
21
|
+
|
|
22
|
+
# Editor / OS
|
|
23
|
+
.vscode/
|
|
24
|
+
.idea/
|
|
25
|
+
.DS_Store
|
|
26
|
+
Thumbs.db
|
|
27
|
+
|
|
28
|
+
# Claude Code local (machine-specific) settings
|
|
29
|
+
.claude/settings.local.json
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Consume this from another repo's .pre-commit-config.yaml:
|
|
2
|
+
#
|
|
3
|
+
# repos:
|
|
4
|
+
# - repo: https://github.com/AureliusOctavion/agent-boundary-scan
|
|
5
|
+
# rev: v1.1.0
|
|
6
|
+
# hooks:
|
|
7
|
+
# - id: agent-boundary-scan
|
|
8
|
+
#
|
|
9
|
+
# Scans the whole repo on commit (the analysis is graph-based, so it needs the
|
|
10
|
+
# full tree, not just changed files). Override the target or gate via `args:`,
|
|
11
|
+
# e.g. args: ["scan", "src/", "--fail-on", "CRITICAL"].
|
|
12
|
+
- id: agent-boundary-scan
|
|
13
|
+
name: agent-boundary-scan (confused-deputy scan)
|
|
14
|
+
description: Static analysis for confused-deputy vulnerabilities in MCP/LangGraph/OpenAI/CrewAI agent graphs.
|
|
15
|
+
entry: agent-boundary-scan
|
|
16
|
+
language: python
|
|
17
|
+
args: ["scan", "."]
|
|
18
|
+
pass_filenames: false
|
|
19
|
+
require_serial: true
|