Flow matrix

From Crapule421/tiger-team · View interactive version

Flow matrix is an AI agent skill from the GitHub repository Crapule421/tiger-team. Build a network flow matrix and the firewall opening requests from an architecture description, with least-privilege, encryption, bastion and completeness checks (DNS, NTP, monitoring, backup). Use for a new system or a firewall change.

How to use this skill

Skill file

Flow matrix and firewall opening requests

Input: $ARGUMENTS

You do not see the prior conversation: work only from the input above and the files it points to.

0. Intake

1. Confidentiality gate (mandatory, before any analysis)

Stop and ask the user for an anonymized version - without producing the matrix - if the input contains:

Reply only with the category detected, the location (without quoting the value), and a request for a sanitized version. Note for the user in every output: a flow matrix describes production network exposure - label it Confidential and share it on a need-to-know basis.

2. Load template and knowledge

  1. Read the template ${CLAUDE_PLUGIN_ROOT}/skills/deliverables/templates/flow-matrix.md. If it exists, follow its structure (document control, rules, zones, flow matrix columns, review checklist) and its ID convention. If it does not exist, use these columns: ID, source (host/zone/IP), destination (host/zone/IP), port, protocol, direction, application/flow purpose, environment, encryption, owner, justification.
  2. Read ${CLAUDE_PLUGIN_ROOT}/skills/infra-reference/references/network.md - sections 6 (firewalls), 7 (load balancers), 10 (TLS/PKI), 12 (common ports).
  3. If AD/Windows is involved, Read section 1 of ${CLAUDE_PLUGIN_ROOT}/skills/infra-reference/references/windows.md; if DNS design is involved, Read ${CLAUDE_PLUGIN_ROOT}/skills/infra-reference/references/dns.md.

3. Build the model

  1. Components: list every component (clients, reverse proxies/WAF, API gateway, LB VIPs and pool members, app servers, DB (incl. cluster/listener/VIP addresses), MQ/ESB/MFT, batch/scheduler, partners, SaaS/cloud endpoints) with zone and environment.
  2. Zones and crossings: assign each component to a zone; identify which firewall(s) each flow crosses (including cloud security groups and host firewalls); note NAT (pre/post translation addresses) and VPN tunnels.
  3. Application flows: from the interfaces and use cases (who initiates the session -> direction). One row per flow per environment.
  4. Infrastructure flows - add each one that applies (direction = session initiator; ports are common defaults - verify):

| Category | Typical flow |

|---|---|

| DNS | All hosts -> internal resolvers, UDP+TCP 53; resolvers -> forwarders |

| NTP | All hosts -> NTP servers, UDP 123 |

| Directory/auth | Windows members -> DCs (53, 88, 135, 389, 445, 464, 636, 3268-3269, RPC 49152-65535); Linux SSSD -> DCs (88, 389/636, 464, 3268); apps -> IdP (HTTPS 443 for OIDC/SAML back-channel, JWKS) |

| PKI | Clients/servers -> CRL/OCSP endpoints (often HTTP 80 by design, content is signed - document as justified exception) |

| Monitoring | Pull: collector -> agents (e.g. SNMPv3 161/udp, exporter/agent ports); push: agents -> server. Direction matters |

| Logs/SIEM | Hosts -> log collector (syslog TLS 6514/tcp, or SIEM agent ports - vendor-specific) |

| Backup | Backup server/media agents <-> client agents (vendor-specific, often both directions), backup network |

| Security agents | EDR/AV agents -> management console or cloud via proxy |

| Patching | Hosts -> repository mirror/Satellite/WSUS (HTTPS 443; WSUS default 8530/8531) |

| Outbound internet | Hosts -> proxy (port per proxy config) - never direct |

| Mail | Apps -> SMTP relay (25 or 587 with STARTTLS) |

| Secrets | Apps/pipelines -> Vault/PAM (e.g. 8200 TLS, vendor ports) |

| Scheduler/MFT agents | Server <-> agents (vendor-specific ports, check direction) |

| Containers | Nodes -> registry (443); CI runners -> registry, repos, artifact store |

| Load balancing | Clients -> VIP; LB self-IP/SNAT -> pool members; LB health monitors -> members |

| Clusters/replication | Node <-> node heartbeat/interconnect; quorum witness; DB replication (e.g. Oracle Data Guard redo via listener port, PostgreSQL 5432, SQL Server AG endpoint 5022 default, Db2 HADR service ports as configured) |

| DR | Every PROD flow replicated for the DR site; PROD -> DR replication flows |

| Licence servers | Apps -> licence server (vendor ports) |

  1. Administration flows: bastion/PAM -> targets only (SSH 22, RDP 3389, WinRM 5986, DB admin ports, web consoles 443, out-of-band management iLO/iDRAC/IPMI on the admin network). Never from user LANs or the internet.
  2. Database specifics: Oracle RAC -> flows to SCAN IPs and node VIPs; SQL Server named instances -> static port (avoid UDP 1434 browser dependency); Db2 -> instance SVCENAME port; IBM i -> host server ports (prefer TLS 9470-9476, DRDA 446).

4. Checks (apply to every flow; report results)

| # | Check | Rule |

|---|---|---|

| C1 | Least privilege | Host/group objects instead of subnets where possible; single ports; justified ranges only (RPC, passive FTP); no ephemeral source ports as rules |

| C2 | No any/any | No any in source, destination or service; never any/any |

| C3 | Encryption | Encrypted protocol (TLS 1.2+, SSH, SFTP, LDAPS, HTTPS, IPsec); cleartext (HTTP, FTP, Telnet, LDAP 389 without StartTLS, SNMPv1/v2c, unencrypted DB protocols) only with justification and compensating measure |

| C4 | Admin via bastion | All admin protocols sourced from the ADMIN zone/bastion only |

| C5 | Segmentation | No PROD <-> non-PROD flows (except approved one-way anonymized feeds); no USERS/internet -> DATA; exposure via DMZ/reverse proxy/API gateway |

| C6 | Regulated perimeter | Flows into CDE / HDS / II 901 perimeters listed and justified against their rules |

| C7 | Egress | Internet egress only via proxy/approved gateway with allow-listing |

| C8 | Completeness | DNS, NTP, directory, monitoring, logs, backup, patching, EDR, PKI (CRL/OCSP), LB health checks, cluster/replication, DR flows present |

| C9 | NAT/LB | Pre/post NAT addresses and LB VIP vs members documented |

| C10 | Lifecycle | Owner and justification on every row; temporary flows with expiry date; test method per flow |

5. Output (Markdown)

Document control

From the template (section 0), filled with placeholders; Sensitivity label: Confidential.

Context

System summary (3-6 lines), environments, components inventory table (component | role | zone | environment | address or <IP>).

Zones

Template zone table (zone | description | security level/constraints).

Flow matrix

Template columns exactly (or the default columns if no template), IDs FLW-001, FLW-002, ... grouped by: application flows, infrastructure flows, administration flows, DR flows. Optional columns when useful: interface ID, status, change ticket, expiry. Use → in the Direction column (e.g. APP → DATA). One row per flow per environment (or state explicitly that non-prod rows mirror PROD with their own addresses).

NAT and load balancing details

Only if applicable: translation table and VIP/pool/monitor table.

Firewall opening requests

Grouped by firewall / zone crossing, ready to paste into change requests:

| Request ID | Firewall / crossing | Source object(s) | Destination object(s) | Service (proto/port) | Action | Logging | Validity | Flow IDs | Justification |

|---|---|---|---|---|---|---|---|---|---|

| FWR-01 | FW-INT: ZONE-APP → ZONE-DATA | G_APP-PROD | H_SRV-DB-01 | TCP/5432 | Allow | Yes | Permanent | FLW-002 | ... |

Propose object names following a convention (H_ host, N_ network, G_ group) and merge flows sharing source, destination and service. Add a test line per request (command from the real source, e.g. Test-NetConnection SRV-DB-01 -Port 5432 or nc -vz srv-db-01 5432).

Check results

| Check | Status (OK / KO / To confirm) | Details (flow IDs, remediation) |

|---|---|---|

Then the template's review checklist with boxes ticked or left open with a reason.

Risks

| Risk | Criticality | Mitigation |

|---|---|---|

| ... | Critical/High/Medium/Low | ... |

Handoffs

One line per relevant expert, only when there is a real point for them, using: project-manager, enterprise-architect, devsecops-expert, security-expert, dba-expert, scheduling-expert, integration-expert, erp-expert, infra-expert, ibmi-expert. Format:

Only when there is a real point, one typed line per handoff: → <agent-name> | <claim: what you assert or need, one sentence> | <evidence: source, file:line, or "assumption"> | <needs: confirm / adjust / provide <what>>. Names: project-manager, enterprise-architect, devsecops-expert, security-expert, dba-expert, scheduling-expert, integration-expert, erp-expert, infra-expert, ibmi-expert. Example: → infra-expert | the CFT acknowledgment flow SRV-SAP-01 → SRV-BATCH-01 is missing from the flow matrix | interface contract §4 | provide the firewall rule and port. A settled point is not a handoff.

Open questions

Numbered, each naming the flow IDs it blocks.

Assumptions

Numbered: zones, environments, addresses, ports marked "(default - verify)", NAT, initiators, products.

Answer in the language used in the input.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.