<!-- Copyright (c) 2026 defconxt. All rights reserved. -->
<!-- Licensed under AGPL-3.0 — see LICENSE file for details. -->

# Analyzing CI/CD Pipeline Poisoning — API Reference

## actionlint

```bash
# Lint all workflow files
actionlint .github/workflows/*.yml

# JSON output for programmatic processing
actionlint -format json .github/workflows/*.yml

# Check specific workflow
actionlint .github/workflows/ci.yml
```

## GitHub CLI Workflow Inspection

```bash
# List workflow runs
gh run list --json databaseId,name,status,conclusion

# View workflow file
gh workflow view ci.yml

# List workflow permissions
gh api repos/{owner}/{repo}/actions/permissions --jq '.'
```

## yq YAML Analysis

```bash
# Extract all uses clauses
yq '.jobs[].steps[].uses' .github/workflows/*.yml

# Find steps with run commands
yq '.jobs[].steps[] | select(.run != null) | .run' .github/workflows/ci.yml

# Check workflow permissions
yq '.permissions' .github/workflows/ci.yml
```

