mirror of
https://github.com/SHOGGOTH-SECTOR/sica-fondt.git
synced 2026-08-01 08:30:20 +00:00
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
58 lines
1.6 KiB
Markdown
58 lines
1.6 KiB
Markdown
# API Reference: Analyzing Kubernetes Audit Logs
|
|
|
|
## Audit Log Format (JSON Lines)
|
|
|
|
```json
|
|
{
|
|
"kind": "Event",
|
|
"apiVersion": "audit.k8s.io/v1",
|
|
"level": "RequestResponse",
|
|
"verb": "create",
|
|
"user": {"username": "admin", "groups": ["system:masters"]},
|
|
"sourceIPs": ["10.0.0.5"],
|
|
"objectRef": {
|
|
"resource": "pods",
|
|
"subresource": "exec",
|
|
"namespace": "default",
|
|
"name": "web-pod"
|
|
},
|
|
"responseStatus": {"code": 200},
|
|
"requestReceivedTimestamp": "2025-03-15T14:00:00Z"
|
|
}
|
|
```
|
|
|
|
## Security-Critical Audit Events
|
|
|
|
| Event | objectRef | Severity |
|
|
|-------|-----------|----------|
|
|
| Pod exec | `resource: pods, subresource: exec` | HIGH |
|
|
| Secret access | `resource: secrets, verb: get/list` | HIGH |
|
|
| RBAC change | `resource: clusterrolebindings` | CRITICAL |
|
|
| Privileged pod | `requestObject.spec.containers[].securityContext.privileged` | CRITICAL |
|
|
| Anonymous access | `user.username: system:anonymous` | CRITICAL |
|
|
|
|
## Audit Policy Levels
|
|
|
|
| Level | Captures |
|
|
|-------|----------|
|
|
| None | No logging |
|
|
| Metadata | Timestamp, user, verb, resource |
|
|
| Request | Metadata + request body |
|
|
| RequestResponse | Request + response body |
|
|
|
|
## Python Parsing
|
|
|
|
```python
|
|
import json
|
|
with open("audit.log") as f:
|
|
for line in f:
|
|
event = json.loads(line)
|
|
print(event["verb"], event["objectRef"]["resource"])
|
|
```
|
|
|
|
### References
|
|
|
|
- K8s Auditing: https://kubernetes.io/docs/tasks/debug/debug-cluster/audit/
|
|
- Audit policy: https://kubernetes.io/docs/reference/config-api/apiserver-audit.v1/
|
|
- Datadog k8s audit: https://www.datadoghq.com/blog/monitor-kubernetes-audit-logs/
|