Skip to content

CI/CD Pipelines

Add a single Vygl step to your pipeline to scan every push and pull request. The CLI auto-detects branch, commit, and repository URL from CI environment variables — the only secret you need to configure is VYGL_API_KEY.

GitHub Actions
name: Vygl Security Scan
on:
push:
branches: [main]
pull_request:
jobs:
security-scan:
runs-on: ubuntu-latest
container:
image: vygl/vygl-cli:latest
options: --entrypoint ""
env:
VYGL_API_KEY: ${{ secrets.VYGL_API_KEY }}
steps:
- uses: actions/checkout@v4
- run: vygl scan --fail-on high .
# Optional: post scan summary as a PR comment.
# Add a Git Token in project settings, then uncomment:
# - run: vygl scan --fail-on high --pr ${{ github.event.pull_request.number }} .

Add VYGL_API_KEY under Settings → Secrets and variables → Actions. Branch, commit, and repo URL are auto-detected from the GitHub Actions environment.

When run inside CI, the CLI reads environment variables to fill in scan metadata:

  • Repository URL, branch, commit SHA — from CI-native variables (GITHUB_REPOSITORY, CI_COMMIT_REF_NAME, BITBUCKET_BRANCH, etc.).
  • PR number — only when explicitly passed via --pr. CI-native variables are referenced in the snippets above.
  • Trigger type (push / pull_request / scheduled) — derived from CI variables.

If detection fails, override with --repo-url, --branch, --commit, or --pr flags.