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

105 lines
1.8 KiB
Markdown

# API Reference: IOC Enrichment Pipeline with OpenCTI
## pycti — OpenCTI Python Client
### Installation
```bash
pip install pycti
```
### Client Initialization
```python
from pycti import OpenCTIApiClient
client = OpenCTIApiClient(
url="http://localhost:8080",
token=os.environ.get("OPENCTI_TOKEN", "")
)
```
### Indicator Operations
```python
# List indicators with filter
filters = {
"mode": "and",
"filters": [{"key": "value", "values": ["198.51.100.42"]}],
"filterGroups": []
}
indicators = client.indicator.list(filters=filters)
# Create indicator
client.indicator.create(
name="Malicious IP",
pattern="[ipv4-addr:value = '198.51.100.42']",
pattern_type="stix",
x_opencti_score=80,
valid_from="2025-01-01T00:00:00Z"
)
```
### Observable Operations
```python
# Search observables
obs = client.stix_cyber_observable.list(filters=filters)
# Create observable
client.stix_cyber_observable.create(
observableData={
"type": "ipv4-addr",
"value": "198.51.100.42"
}
)
```
### Relationship Queries
```python
# Get relationships from entity
rels = client.stix_core_relationship.list(
filters={
"mode": "and",
"filters": [{"key": "fromId", "values": [entity_id]}],
"filterGroups": []
}
)
```
## OpenCTI GraphQL API
### Endpoint
```
POST /graphql
Authorization: Bearer <token>
Content-Type: application/json
```
### Example Query
```graphql
query {
indicators(filters: {
mode: and
filters: [{ key: "value", values: ["198.51.100.42"] }]
filterGroups: []
}) {
edges {
node {
id
pattern
x_opencti_score
createdBy { name }
objectLabel { value }
}
}
}
}
```
## STIX Indicator Patterns
| Type | STIX Pattern |
|------|-------------|
| IPv4 | |
| Domain | |
| URL | |
| SHA-256 | |
| MD5 | |
| Email | |