Claude 24f816b6a3
Consolidate 22 sibling repos into layered organism structure
Place useful parts of the surrounding repos into sica-fondt by layer, per the
body model (Ada = membrane; brain/endocrine/capabilities/knowledge non-Ada):

- brain/        LLM reasoning + providers (dapr, hermes, MoMoA)
- capabilities/ REPRAG sidecars: hermes tools/skills, dapr tools, parallel
                dispatch, A51 channels, and the OSINT cluster
- knowledge/    LORAG corpus: 754 cyber-skills, agency personas, secure-coding,
                MITRE ATT&CK data
- reference/    defensive threat-reference (C3, shhbruh doc) + AdaYaml parser

License handling: AGPL sources (worldosint, advanced_evolution, mercury,
Reticulum) and GPL DeTTECT are SPEC-only clean-room/port descriptions — no
copyleft code copied. MIT/Apache/data parts copied as working trees.

Safety: shhbruh escape/persistence material and C3 covert-C2 kept as reference
only, not wired into the running organism. See CONSOLIDATION.md.

https://claude.ai/code/session_01UehUqEXXJJCsHoA4voCU5c
2026-06-10 06:53:01 +00:00

60 lines
2.0 KiB
Markdown

# API Reference: OAuth Misconfiguration Assessment Agent
## Dependencies
| Library | Version | Purpose |
|---------|---------|---------|
| requests | >=2.28 | HTTP client for OAuth flow testing |
## CLI Usage
```bash
python scripts/agent.py \
--url https://auth.example.com \
--client-id APP_CLIENT_ID \
--redirect-uri https://app.example.com/callback \
--output oauth_report.json
```
## Functions
### `discover_oidc_config(base_url) -> dict`
Fetches `/.well-known/openid-configuration` or `/.well-known/oauth-authorization-server`.
### `test_redirect_uri_bypasses(auth_endpoint, client_id, legitimate_uri) -> list`
Tests 10 redirect_uri manipulation techniques: subdomain hijack, path traversal, case variation, protocol downgrade, CRLF injection.
### `test_state_parameter(auth_endpoint, client_id, redirect_uri) -> dict`
Submits authorization request without `state` to check CSRF protection.
### `test_pkce_requirement(auth_endpoint, client_id, redirect_uri) -> dict`
Tests whether `code_challenge` parameter is required. Generates S256 challenge for comparison.
### `test_code_reuse(token_endpoint, auth_code, client_id, client_secret, redirect_uri) -> dict`
Exchanges an authorization code twice to check single-use enforcement.
### `test_scope_escalation(auth_endpoint, client_id, redirect_uri) -> dict`
Requests elevated scopes (`admin`, `write`, `delete`) to test scope validation.
### `run_assessment(config, client_id, redirect_uri) -> dict`
Orchestrates all tests and compiles findings.
## OAuth Endpoints Tested
| Endpoint | Source | Test |
|----------|--------|------|
| `authorization_endpoint` | OIDC config | Redirect URI, state, PKCE, scope |
| `token_endpoint` | OIDC config | Code reuse, scope escalation |
## Output Schema
```json
{
"oidc_config": {"authorization_endpoint": "...", "token_endpoint": "..."},
"redirect_uri_tests": [{"redirect_uri": "https://evil.com", "accepted": false}],
"state_parameter": {"csrf_risk": false},
"pkce": {"pkce_required": true},
"findings": []
}
```