|
| 1 | +version: "1.0" |
| 2 | +name: "ShadowMap Codex Intelligence Framework" |
| 3 | +description: > |
| 4 | + Hybrid AI system combining social listening with cloud security asset intelligence. |
| 5 | + Powered by Codex Agents orchestrated for collection, classification, correlation, remediation, and reporting. |
| 6 | +
|
| 7 | +agents: |
| 8 | + - id: planner |
| 9 | + role: Planner |
| 10 | + goal: > |
| 11 | + Create an optimal plan of tool calls to gather evidence, classify risk, correlate with assets, |
| 12 | + and propose mitigations. |
| 13 | + prompt: | |
| 14 | + You are the Planner. Given a topic or signal, plan the minimal sequence of tools to collect, classify, |
| 15 | + correlate, remediate, and report. Prefer cheapest tools first. Limit plan to <= 6 steps. |
| 16 | + output_schema: planner_plan_schema |
| 17 | + confidence_threshold: 0.6 |
| 18 | + |
| 19 | + - id: classifier |
| 20 | + role: Social Classifier |
| 21 | + goal: > |
| 22 | + Convert unstructured social or open-source data into normalized, machine-actionable security signals. |
| 23 | + prompt: | |
| 24 | + You are the Social Classifier. Given text feeds or social posts, identify type, cloud vendor, |
| 25 | + services, regions, indicators, severity, and confidence. |
| 26 | + Merge duplicates within 48h. Produce normalized JSON. |
| 27 | + output_schema: signal_schema |
| 28 | + confidence_threshold: 0.7 |
| 29 | + |
| 30 | + - id: correlator |
| 31 | + role: Correlator |
| 32 | + goal: > |
| 33 | + Map each normalized signal to ShadowMap asset graph, compute risk scores, and |
| 34 | + identify actionable matches. |
| 35 | + prompt: | |
| 36 | + You are the Correlator. Use ShadowMap's asset_graph and vuln_scan to match |
| 37 | + assets with social signals. Compute risk_score and confidence. |
| 38 | + Penalize sandbox assets and boost prod/payments/PII-tagged ones. |
| 39 | + output_schema: correlation_schema |
| 40 | + confidence_threshold: 0.65 |
| 41 | + |
| 42 | + - id: remediator |
| 43 | + role: Remediator |
| 44 | + goal: > |
| 45 | + Generate stepwise, reversible, low-impact remediations with rollback and verification. |
| 46 | + prompt: | |
| 47 | + You are the Remediator. Build playbooks that fix issues with minimal disruption. |
| 48 | + Always include rollback, verification, and respect change windows. |
| 49 | + output_schema: remediation_schema |
| 50 | + confidence_threshold: 0.8 |
| 51 | + |
| 52 | + - id: reporter |
| 53 | + role: Reporter |
| 54 | + goal: > |
| 55 | + Create dual-view reports (executive and engineer) summarizing the signal, affected assets, |
| 56 | + actions, and business impact. |
| 57 | + prompt: | |
| 58 | + You are the Reporter. Generate concise summaries in plain language for executives, |
| 59 | + and detailed evidence + commands for engineers. Output both as JSON + markdown. |
| 60 | + output_schema: report_schema |
| 61 | + |
| 62 | +schemas: |
| 63 | + planner_plan_schema: |
| 64 | + type: object |
| 65 | + properties: |
| 66 | + topic: { type: string } |
| 67 | + intents: { type: array, items: { type: string } } |
| 68 | + plan: |
| 69 | + type: array |
| 70 | + items: |
| 71 | + type: object |
| 72 | + properties: |
| 73 | + step: { type: integer } |
| 74 | + tool: { type: string } |
| 75 | + args: { type: object } |
| 76 | + why: { type: string } |
| 77 | + confidence: { type: number } |
| 78 | + |
| 79 | + signal_schema: |
| 80 | + type: object |
| 81 | + properties: |
| 82 | + signals: |
| 83 | + type: array |
| 84 | + items: |
| 85 | + type: object |
| 86 | + properties: |
| 87 | + signal_id: { type: string } |
| 88 | + type: { type: string } |
| 89 | + topic: { type: string } |
| 90 | + vendor_cloud: { type: array, items: { type: string } } |
| 91 | + services: { type: array, items: { type: string } } |
| 92 | + regions: { type: array, items: { type: string } } |
| 93 | + severity_guess: { type: string } |
| 94 | + confidence: { type: number } |
| 95 | + evidence: { type: array } |
| 96 | + summary: { type: string } |
| 97 | + |
| 98 | + correlation_schema: |
| 99 | + type: object |
| 100 | + properties: |
| 101 | + matches: |
| 102 | + type: array |
| 103 | + items: |
| 104 | + type: object |
| 105 | + properties: |
| 106 | + asset_id: { type: string } |
| 107 | + reasons: { type: array, items: { type: string } } |
| 108 | + risk_score: { type: number } |
| 109 | + supporting_findings: { type: array } |
| 110 | + coverage_stats: { type: object } |
| 111 | + next_best_actions: { type: array } |
| 112 | + confidence: { type: number } |
| 113 | + |
| 114 | + remediation_schema: |
| 115 | + type: object |
| 116 | + properties: |
| 117 | + playbook: |
| 118 | + type: object |
| 119 | + properties: |
| 120 | + title: { type: string } |
| 121 | + steps: { type: array } |
| 122 | + rollback: { type: array } |
| 123 | + verification: { type: array } |
| 124 | + owner: { type: object } |
| 125 | + change_window: { type: string } |
| 126 | + ticket: |
| 127 | + type: object |
| 128 | + properties: |
| 129 | + project: { type: string } |
| 130 | + title: { type: string } |
| 131 | + severity: { type: string } |
| 132 | + due_days: { type: integer } |
| 133 | + |
| 134 | + report_schema: |
| 135 | + type: object |
| 136 | + properties: |
| 137 | + executive_brief: { type: object } |
| 138 | + engineer_brief: { type: object } |
| 139 | + kb_markdown: { type: string } |
| 140 | + |
| 141 | +guardrails: |
| 142 | + - id: evidence_check |
| 143 | + description: "Reject any claim not supported by tool output" |
| 144 | + - id: rollback_required |
| 145 | + description: "Ensure all remediation steps have rollback" |
| 146 | + - id: schema_validation |
| 147 | + description: "Validate JSON output against schema before next agent" |
| 148 | + - id: duplicate_filter |
| 149 | + description: "Suppress repeated findings or assets" |
| 150 | + |
| 151 | +tools: |
| 152 | + - name: social_feed.fetch |
| 153 | + description: "Collect public signals from X, GitHub, Reddit, etc." |
| 154 | + - name: nvd_cve.search |
| 155 | + description: "Search NVD for matching CVEs or CWEs." |
| 156 | + - name: asset_graph.search |
| 157 | + description: "Query internal ShadowMap asset graph." |
| 158 | + - name: vuln_scan.query |
| 159 | + description: "Get live vulnerability findings." |
| 160 | + - name: cloud_cfg.check |
| 161 | + description: "Verify cloud config policies." |
| 162 | + - name: notify.create |
| 163 | + description: "Open ticket in incident tracker." |
| 164 | + - name: page.create |
| 165 | + description: "Write report to knowledge base." |
| 166 | + |
| 167 | +defaults: |
| 168 | + org_filters: |
| 169 | + env: ["prod", "staging"] |
| 170 | + regions: ["ap-south-1", "asia-south1"] |
| 171 | + controls_available: ["scp", "config_rules", "security_hub"] |
| 172 | + change_windows: ["Sun 02:00-04:00 BST"] |
| 173 | + localization: |
| 174 | + geo: "Bangladesh" |
| 175 | + languages: ["en", "bn"] |
| 176 | + |
| 177 | +testing: |
| 178 | + scenarios: |
| 179 | + - name: redis_exploit |
| 180 | + topic: "Unauthenticated Redis 6379 exploit ap-south-1" |
| 181 | + expected_output: ["plan", "signals", "correlation", "remediation", "report"] |
| 182 | + - name: s3_public_acl |
| 183 | + topic: "Public S3 bucket misconfig leak" |
| 184 | + - name: iam_mfa_fatigue |
| 185 | + topic: "IAM console MFA fatigue attacks" |
0 commit comments